:root {
  color-scheme: dark;
  --bg: #0b0c0f;
  --panel: #13151a;
  --panel-raised: #191c22;
  --ink: #f5f3ed;
  --muted: #a3a7b1;
  --line: #2b2f38;
  --acid: #c8ff3d;
  --cyan: #63e6ff;
  --violet: #b99cff;
  --orange: #ffae57;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% -10%, rgba(99, 230, 255, 0.12), transparent 34rem),
    radial-gradient(circle at 88% 4%, rgba(185, 156, 255, 0.12), transparent 30rem),
    var(--bg);
}
button, input, select { font: inherit; }
a { color: inherit; }
main { width: min(1460px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 90px; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: end; padding: 34px 0 42px; }
.hero-copy { max-width: 920px; }
.eyebrow { margin: 0 0 12px; color: var(--acid); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; max-width: 900px; font-size: clamp(42px, 7.3vw, 104px); line-height: .9; letter-spacing: -.065em; }
h2 { margin: 0; font-size: clamp(28px, 4vw, 54px); line-height: 1; letter-spacing: -.045em; }
.lede { max-width: 790px; margin: 26px 0 0; color: var(--muted); font-size: clamp(17px, 2vw, 22px); line-height: 1.5; }
.downloads { display: grid; gap: 8px; min-width: 190px; }
.downloads a { border: 1px solid var(--line); border-radius: 999px; padding: 10px 15px; color: var(--muted); text-decoration: none; font-size: 13px; text-align: center; }
.downloads a:hover { color: var(--ink); border-color: #535966; }

.boundary { display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; align-items: end; margin: 12px 0 18px; padding: 28px; border: 1px solid rgba(200,255,61,.3); border-radius: var(--radius); background: linear-gradient(120deg, rgba(200,255,61,.07), rgba(200,255,61,.015)); }
.boundary h2 { font-size: clamp(24px, 3vw, 42px); }
.boundary > p { margin: 0; color: #c2c5cc; font-size: 15px; line-height: 1.65; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 70px; }
.stats article { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(19,21,26,.7); }
.stats span { display: block; font-size: clamp(32px, 4vw, 56px); font-weight: 780; letter-spacing: -.05em; }
.stats small { color: var(--muted); }

.catalog-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
#result-count { margin: 0; color: var(--muted); font-size: 14px; }
.filters { position: sticky; z-index: 5; top: 10px; display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 10px; margin-bottom: 22px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: rgba(11,12,15,.9); backdrop-filter: blur(18px); }
.filters label { display: grid; gap: 6px; }
.filters label > span { padding-left: 3px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.filters input, .filters select { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; color: var(--ink); background: var(--panel-raised); outline: none; }
.filters input:focus, .filters select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(99,230,255,.1); }

.grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); transition: transform .18s ease, border-color .18s ease; }
.card:hover { transform: translateY(-3px); border-color: #454b57; }
.poster-button { position: relative; display: block; width: 100%; border: 0; padding: 0; color: var(--ink); background: #20232a; cursor: pointer; aspect-ratio: 3 / 4; overflow: hidden; }
.poster { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease, filter .35s ease; }
.poster-button:hover .poster { transform: scale(1.025); filter: brightness(.76); }
.view-label { position: absolute; left: 50%; bottom: 15px; translate: -50% 10px; opacity: 0; white-space: nowrap; padding: 8px 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: rgba(0,0,0,.62); font-size: 11px; font-weight: 700; transition: opacity .2s ease, translate .2s ease; }
.poster-button:hover .view-label, .poster-button:focus-visible .view-label { opacity: 1; translate: -50% 0; }
.card-body { padding: 14px; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.card h3 { margin: 9px 0 7px; font-size: 19px; line-height: 1.05; letter-spacing: -.025em; }
.description { display: -webkit-box; min-height: 3.9em; margin: 0 0 12px; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.badges span { border: 1px solid var(--line); border-radius: 999px; padding: 4px 7px; color: #c8cbd2; font-size: 9px; text-transform: uppercase; letter-spacing: .04em; }
.badges .captured { border-color: rgba(200,255,61,.45); color: var(--acid); }
.badges .named { border-color: rgba(99,230,255,.4); color: var(--cyan); }
.badges .inferred { border-color: rgba(255,174,87,.4); color: var(--orange); }
.badges .unknown { color: #858a95; }
.model { min-height: 2.5em; margin: 0; color: #d8d9dd; font-size: 11px; line-height: 1.25; }
.empty { margin: 70px 0; color: var(--muted); text-align: center; }

dialog { width: min(1050px, calc(100% - 28px)); max-height: calc(100dvh - 28px); overflow: auto; border: 1px solid #414651; border-radius: 22px; padding: 0; color: var(--ink); background: #111318; box-shadow: 0 30px 120px rgba(0,0,0,.72); }
dialog::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(8px); }
.dialog-close { position: sticky; z-index: 2; top: 14px; float: right; margin: 14px 14px -50px 0; border: 1px solid #484e59; border-radius: 999px; padding: 9px 13px; color: var(--ink); background: rgba(17,19,24,.9); cursor: pointer; }
.dialog-layout { display: grid; grid-template-columns: minmax(280px, .86fr) minmax(0, 1.14fr); }
.dialog-media { min-height: 620px; background: #050607; }
.dialog-media video, .dialog-media img { width: 100%; height: 100%; max-height: 82dvh; object-fit: contain; display: block; }
.dialog-details { padding: 42px 34px; }
.dialog-details h2 { margin-bottom: 10px; }
.dialog-key { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.evidence-list { display: grid; gap: 12px; margin: 28px 0; }
.evidence-item { padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.evidence-item small { display: block; margin-bottom: 6px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.evidence-item p { margin: 0; font-size: 13px; line-height: 1.55; }
.prompt-box { position: relative; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #0b0d10; }
.prompt-box p { margin: 0; color: #dbdde1; font: 12px/1.62 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dialog-actions a, .copy-prompt { border: 1px solid #454b57; border-radius: 999px; padding: 9px 12px; color: var(--ink); background: transparent; font-size: 11px; text-decoration: none; cursor: pointer; }
.dialog-actions a:hover, .copy-prompt:hover { border-color: var(--acid); }

@media (max-width: 1180px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 920px) {
  main { width: min(100% - 24px, 760px); padding-top: 30px; }
  .hero, .boundary { grid-template-columns: 1fr; }
  .downloads { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .filters { position: static; grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .dialog-layout { grid-template-columns: 1fr; }
  .dialog-media { min-height: 0; max-height: 58dvh; }
}
@media (max-width: 620px) {
  .hero { gap: 26px; }
  .boundary { padding: 22px; gap: 22px; }
  .stats { margin-bottom: 50px; }
  .filters, .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters .search-field { grid-column: 1 / -1; }
  .card-body { padding: 11px; }
  .card h3 { font-size: 16px; }
  .description { display: none; }
  .model { font-size: 10px; }
  .dialog-details { padding: 32px 20px; }
}
@media (max-width: 410px) { .grid { gap: 9px; } .downloads { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
