:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #111214;
  --ink: #f7f7f7;
  --muted: #98999f;
  --line: #292a2e;
  --blue: #2878ff;
  --green: #c7ff43;
  --cyan: #58dfff;
  --orange: #ffad57;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; color: var(--ink); background: var(--bg); }
button, input { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
.app-shell { width: min(100%, 1480px); min-height: 100dvh; margin: 0 auto; overflow: clip; background: #050505; }
.topbar { position: relative; z-index: 10; display: flex; align-items: center; justify-content: space-between; height: 82px; padding: 0 26px; background: linear-gradient(#050505 55%, transparent); }
.brand { display: flex; align-items: baseline; gap: 10px; color: var(--ink); text-decoration: none; }
.brand strong { font-size: 23px; letter-spacing: -.04em; }
.brand span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.card-count { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; }
.card-count strong { color: var(--ink); }
.data-menu { position: relative; }
.data-menu summary { list-style: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; color: var(--ink); font-size: 11px; cursor: pointer; }
.data-menu summary::-webkit-details-marker { display: none; }
.data-menu nav { position: absolute; top: 42px; right: 0; display: grid; width: 190px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #151619; box-shadow: 0 18px 50px #000; }
.data-menu a { padding: 9px 10px; border-radius: 8px; color: #cdced2; font-size: 12px; text-decoration: none; }
.data-menu a:hover { background: #23252a; color: white; }

main { padding-bottom: 110px; }
.hero { position: relative; height: clamp(460px, 63vw, 790px); margin-top: -82px; overflow: hidden; background: #141414; }
.hero > img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease, transform 7s ease; }
.hero.changing > img { opacity: .25; }
.hero:not(.changing) > img { transform: scale(1.025); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.3) 46%, rgba(0,0,0,.08) 72%), linear-gradient(0deg, #050505 0%, transparent 48%, rgba(0,0,0,.35) 100%); }
.hero-copy { position: absolute; left: clamp(24px, 5vw, 74px); bottom: clamp(80px, 10vw, 128px); max-width: 540px; }
.hero-copy > p:first-child { margin: 0 0 9px; color: #e6e6e6; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(38px, 5.7vw, 78px); line-height: .95; letter-spacing: -.055em; }
#hero-description { max-width: 470px; margin: 14px 0 0; color: #c3c4c7; font-size: clamp(14px, 1.7vw, 19px); line-height: 1.42; }
.hero-model { display: inline-flex; margin-top: 16px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; color: #d7d8db; background: rgba(0,0,0,.3); font-size: 10px; backdrop-filter: blur(10px); }
.hero-try { position: absolute; right: clamp(24px, 5vw, 74px); bottom: clamp(94px, 10vw, 136px); border: 0; border-radius: 999px; padding: 14px 22px; color: #111; background: #f1f1f2; font-weight: 750; cursor: pointer; }
.hero-dots { position: absolute; left: 50%; bottom: 50px; display: flex; gap: 7px; translate: -50%; }
.hero-dots button { width: 6px; height: 6px; border: 0; border-radius: 50%; padding: 0; background: rgba(255,255,255,.35); cursor: pointer; transition: width .2s ease, border-radius .2s ease, background .2s ease; }
.hero-dots button.active { width: 22px; border-radius: 999px; background: white; }

.evidence-note { margin: 16px clamp(18px, 3.3vw, 48px) 0; border: 1px solid var(--line); border-radius: 14px; background: #0c0d0f; }
.evidence-note summary { display: flex; justify-content: space-between; gap: 24px; padding: 14px 16px; cursor: pointer; }
.evidence-note summary span { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.evidence-note summary strong { color: #bebfc3; font-size: 12px; }
.evidence-note p { max-width: 920px; margin: 0; padding: 0 16px 16px; color: var(--muted); font-size: 12px; line-height: 1.6; }

.discovery { position: sticky; z-index: 6; top: 8px; margin: 34px 0 34px; padding: 10px clamp(18px, 3.3vw, 48px); background: rgba(5,5,5,.88); backdrop-filter: blur(18px); }
.search { position: relative; display: block; }
.search > span { position: absolute; left: 15px; top: 50%; translate: 0 -50%; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.search input { width: 100%; height: 45px; border: 1px solid var(--line); border-radius: 13px; padding: 0 16px 0 76px; color: white; background: #121316; outline: none; }
.search input:focus { border-color: #5f85c8; box-shadow: 0 0 0 3px rgba(40,120,255,.13); }
.category-jump { display: flex; gap: 7px; margin-top: 9px; overflow-x: auto; scrollbar-width: none; }
.category-jump::-webkit-scrollbar, .rail-track::-webkit-scrollbar { display: none; }
.category-jump a { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; color: #a7a8ad; font-size: 10px; text-decoration: none; }
.category-jump a:hover { color: white; border-color: #555860; }

.rail-section, .search-results { margin: 0 0 42px; scroll-margin-top: 130px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 0 clamp(18px, 3.3vw, 48px) 14px; }
.section-kicker { margin: 0 0 5px; color: #6f7178; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.section-heading h2 { margin: 0; font-size: clamp(22px, 2.4vw, 34px); letter-spacing: -.035em; }
.see-all { border: 0; padding: 5px 0; color: #85868b; background: transparent; font-size: 13px; cursor: pointer; }
.see-all:hover { color: white; }
.rail-frame { position: relative; }
.rail-track { display: flex; gap: 14px; overflow-x: auto; padding: 0 clamp(18px, 3.3vw, 48px) 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
.rail-section.expanded .rail-track { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; }
.catalog-card { flex: 0 0 clamp(146px, 16.2vw, 230px); min-width: 0; scroll-snap-align: start; }
.card-open { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; border: 0; border-radius: 13px; padding: 0; color: white; background: #17181b; cursor: pointer; }
.card-open img { width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease, filter .28s ease; }
.card-open:hover img { transform: scale(1.035); filter: brightness(.78); }
.card-gradient { position: absolute; inset: 42% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.82)); }
.coin-cost { position: absolute; top: 9px; right: 9px; padding: 5px 7px; border-radius: 999px; color: #111; background: rgba(255,255,255,.9); font-size: 9px; font-weight: 800; }
.model-dot { position: absolute; top: 10px; left: 10px; width: 8px; height: 8px; border: 2px solid rgba(0,0,0,.35); border-radius: 50%; background: #74777f; box-shadow: 0 0 0 3px rgba(0,0,0,.2); }
.model-dot.exact { background: var(--green); }
.model-dot.named { background: var(--cyan); }
.model-dot.inferred { background: var(--orange); }
.card-title { position: absolute; left: 10px; right: 10px; bottom: 13px; font-size: clamp(11px, 1.1vw, 15px); font-weight: 850; line-height: 1.03; letter-spacing: .1em; text-align: center; text-transform: uppercase; text-shadow: 0 2px 10px #000; }
.rail-arrow { position: absolute; z-index: 2; top: 50%; width: 38px; height: 38px; translate: 0 -50%; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: white; background: rgba(0,0,0,.72); font-size: 28px; line-height: 1; cursor: pointer; backdrop-filter: blur(8px); }
.rail-arrow.previous { left: 8px; }
.rail-arrow.next { right: 8px; }
.rail-section.expanded .rail-arrow { display: none; }
.search-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; padding: 0 clamp(18px, 3.3vw, 48px); }
#search-count { margin: 0; color: var(--muted); font-size: 12px; }

.floating-search { position: fixed; z-index: 7; left: 50%; bottom: 24px; translate: -50%; border: 0; border-radius: 999px; padding: 14px 23px; color: white; background: linear-gradient(135deg, #398cff, #1e63ee); font-weight: 780; box-shadow: 0 14px 40px rgba(20,82,220,.45); cursor: pointer; }

dialog { width: min(1040px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; border: 1px solid #3a3c43; border-radius: 22px; padding: 0; color: white; background: #111214; box-shadow: 0 28px 100px #000; }
dialog::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(8px); }
.dialog-close { position: sticky; z-index: 3; top: 14px; float: right; margin: 14px 14px -52px 0; border: 1px solid #45474f; border-radius: 999px; padding: 9px 13px; color: white; background: rgba(17,18,20,.88); cursor: pointer; }
.dialog-layout { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(0, 1.15fr); }
.dialog-media { min-height: 650px; background: #000; }
.dialog-media video, .dialog-media img { display: block; width: 100%; height: 100%; max-height: 86dvh; object-fit: contain; }
.dialog-details { padding: 42px 34px; }
.dialog-kicker { margin: 0 0 8px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.dialog-details h2 { margin: 0; font-size: clamp(32px, 4vw, 54px); letter-spacing: -.045em; }
.dialog-key { color: #777a82; font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.dialog-description { color: #b3b5bb; line-height: 1.55; }
.evidence-list { display: grid; gap: 9px; margin: 25px 0; }
.evidence-item { padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: #17181b; }
.evidence-item small { display: block; margin-bottom: 5px; color: #777a82; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.evidence-item p { margin: 0; font-size: 12px; line-height: 1.48; }
.prompt-box { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #090a0b; }
.prompt-box p { margin: 0; color: #d7d8dc; 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: 13px; }
.dialog-actions button, .dialog-actions a { border: 1px solid #44474e; border-radius: 999px; padding: 9px 12px; color: white; background: transparent; font-size: 11px; text-decoration: none; cursor: pointer; }

@media (max-width: 1050px) {
  .rail-section.expanded .rail-track, .search-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .topbar { height: 70px; padding: 0 17px; }
  .brand span, .card-count { display: none; }
  .hero { height: min(710px, 91dvh); margin-top: -70px; border-radius: 0 0 24px 24px; }
  .hero-shade { background: linear-gradient(0deg, #050505 2%, transparent 58%, rgba(0,0,0,.48)); }
  .hero-copy { left: 20px; right: 90px; bottom: 82px; }
  .hero h1 { font-size: clamp(38px, 12vw, 58px); }
  #hero-description { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .hero-try { right: 18px; bottom: 92px; padding: 12px 15px; font-size: 12px; }
  .hero-dots { bottom: 35px; }
  .evidence-note summary strong { font-size: 10px; }
  .discovery { top: 5px; margin-top: 22px; }
  .category-jump a { padding: 6px 9px; }
  .rail-track { gap: 12px; }
  .catalog-card { flex-basis: 42vw; }
  .rail-arrow { display: none; }
  .rail-section.expanded .rail-track, .search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rail-section.expanded .catalog-card { width: auto; }
  .dialog-layout { grid-template-columns: 1fr; }
  .dialog-media { min-height: 0; max-height: 56dvh; }
  .dialog-details { padding: 30px 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
