:root {
  --ink: #101313;
  --panel: #161a19;
  --raised: #202624;
  --line: #2d3532;
  --copy: #e7ece9;
  --muted: #98a39e;
  --accent: #ff3b3b;
  --ember: #f06f5f;
}

* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; letter-spacing: 0; }
/* Sprite icons carry no presentation attributes of their own — the stroke setup
   that lucide's runtime used to apply per element lives here instead. */
svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
::selection { color: #101313; background: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: var(--accent); color: #101313; padding: .65rem 1rem; border-radius: 6px; }
.skip-link:focus { top: 1rem; }
.topbar { background: rgba(16, 19, 19, .96); backdrop-filter: blur(12px); }
.nav-link { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .7rem; border-radius: 6px; color: var(--muted); font-size: .875rem; }
.nav-link:hover { color: white; background: var(--raised); }
.footer-link { transition: color .15s ease; }
.footer-link:hover, .footer-link:focus-visible { color: var(--accent); }

.mobile-nav { min-height: 4.25rem; padding-bottom: env(safe-area-inset-bottom); background: rgba(22, 26, 25, .98); }
.mobile-nav a { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; color: var(--muted); font-size: .68rem; }
.mobile-nav a:hover, .mobile-nav a:focus-visible { color: var(--accent); }
.mobile-nav svg { width: 1.2rem; height: 1.2rem; }

.search-shell { position: relative; display: flex; height: 3.25rem; align-items: center; gap: .75rem; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); padding: 0 1rem; }
.search-shell:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 59, 59, .14); }
.search-shell > svg { flex: 0 0 auto; color: var(--muted); }
.search-shell input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: white; }
.search-shell input::placeholder { color: #7e8984; }
.search-shell input::-webkit-search-cancel-button { display: none; }
.search-clear { display: inline-flex; flex: 0 0 auto; color: var(--muted); }
.search-clear:hover { color: white; }
.search-go { flex: 0 0 auto; border: 0; border-radius: 6px; background: var(--accent); padding: .55rem .9rem; color: #101313; font-size: .8rem; font-weight: 700; cursor: pointer; }
.htmx-indicator { opacity: 0; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

.category-rail { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .35rem; scrollbar-width: none; scroll-snap-type: x proximity; }
.category-rail::-webkit-scrollbar { display: none; }
.category-rail a { display: inline-flex; height: 2.4rem; flex: 0 0 auto; align-items: center; gap: .55rem; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); padding: 0 .8rem; font-size: .8rem; }
.category-rail a:hover { border-color: var(--accent); color: white; }
.category-rail small { color: var(--accent); font-size: .68rem; }
.category-rail svg { width: .9rem; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-heading p, .page-intro > p, .profile-header p, .collection-header > p, .eyebrow { margin: 0 0 .25rem; color: var(--accent); font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.section-heading h1, .section-heading h2 { margin: 0; color: white; font-size: 1.35rem; font-weight: 650; }
.section-heading > span { color: var(--muted); font-size: .75rem; }

.video-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem 1rem; }
.video-card { min-width: 0; }
.video-card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 7px; background: var(--raised); }
.thumbnail-frame::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(100deg, var(--raised) 20%, #303835 40%, var(--raised) 60%); background-size: 220% 100%; animation: thumbnail-shimmer 1.35s ease-in-out infinite; transition: opacity .2s ease; }
.thumbnail-frame > img[data-thumbnail] { opacity: 0; }
.thumbnail-frame.is-loaded::before { opacity: 0; animation: none; }
.thumbnail-frame.is-loaded > img[data-thumbnail] { opacity: 1; }
.video-card-media img { position: relative; z-index: 1; width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .25s ease, opacity .25s ease; }
.video-card:hover .thumbnail-frame.is-loaded img { transform: scale(1.025); opacity: .9; }
.video-card-media::after { content: ""; position: absolute; inset: 45% 0 0; z-index: 2; background: linear-gradient(transparent, rgba(0,0,0,.45)); pointer-events: none; }
.play-mark { position: absolute; right: .7rem; bottom: .7rem; z-index: 3; display: grid; width: 2.25rem; height: 2.25rem; place-items: center; border-radius: 50%; background: var(--accent); color: #101313; box-shadow: 0 3px 14px rgba(0,0,0,.35); }
.play-mark svg { width: 1rem; fill: currentColor; }
.video-card h2 { margin: 0; overflow: hidden; color: white; font-size: .95rem; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.video-card p { display: flex; align-items: center; gap: .35rem; margin: .4rem 0 0; overflow: hidden; color: var(--muted); font-size: .75rem; white-space: nowrap; text-overflow: ellipsis; }
.video-card p svg { width: .8rem; flex: 0 0 auto; color: var(--accent); }
/* Horizontal shelf. The old version sized cards at 78vw, so on a phone one card
   filled the screen, the next peeked by ~18%, and the scrollbar was hidden -
   nothing told you it scrolled. Cards are now ~2.3 per screen and the scrollbar
   is visible on touch widths. */
.shelf { margin-bottom: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.shelf-track {
  display: flex; gap: .9rem;
  /* Bleeds into main's 1rem gutter so cards run off the edge instead of stopping
     short of it - reinforces that there is more to the right. */
  /* padding-bottom reserves the scrollbar's own 4px, which is drawn inside the
     padding box and would otherwise crowd the card titles. */
  margin-right: -1rem; padding: 0 1rem .55rem 0;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain; /* keeps a swipe past the end off the browser's back gesture */
  scroll-snap-type: x proximity; scroll-behavior: smooth;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.shelf-track:focus-visible { outline-offset: -2px; }
.shelf-track::-webkit-scrollbar { height: 4px; }
.shelf-track::-webkit-scrollbar-track { background: transparent; }
.shelf-track::-webkit-scrollbar-thumb { border-radius: 4px; background: var(--line); }
.shelf-track .video-card { width: 40vw; flex: 0 0 auto; scroll-snap-align: start; }
.shelf-track .video-card h2 { font-size: .85rem; }

.shelf-nav { display: none; flex: 0 0 auto; gap: .4rem; }
.shelf-arrow { display: inline-grid; width: 2.1rem; height: 2.1rem; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--copy); cursor: pointer; }
.shelf-arrow:hover:not(:disabled) { border-color: var(--accent); color: white; }
.shelf-arrow:disabled { opacity: .3; cursor: default; }
.shelf-arrow svg { width: 1rem; height: 1rem; }

.sort-row { display: flex; align-items: center; gap: .4rem; margin-bottom: 1rem; color: var(--muted); font-size: .75rem; }
.sort-row > span { margin-right: .2rem; text-transform: uppercase; font-size: .68rem; font-weight: 700; }
.sort-row a { border: 1px solid var(--line); border-radius: 5px; padding: .3rem .7rem; }
.sort-row a:hover { border-color: var(--accent); color: white; }
.sort-row a.is-active { border-color: var(--accent); background: var(--accent); color: #101313; font-weight: 700; }

.pagination { display: flex; min-height: 2.6rem; align-items: center; justify-content: center; gap: .5rem; color: var(--muted); font-size: .8rem; }
.pagination a, .pagination-arrow, .pagination-pages > span:not(.pagination-ellipsis) { display: inline-grid; width: 2.35rem; height: 2.35rem; place-items: center; border: 1px solid var(--line); border-radius: 6px; color: var(--copy); }
.pagination a:hover { border-color: var(--accent); background: var(--raised); color: white; }
.pagination-pages { display: flex; align-items: center; justify-content: center; gap: .35rem; }
.pagination-pages > .is-current { border-color: var(--accent); background: var(--accent); color: var(--ink); font-weight: 750; }
.pagination-arrow { flex: 0 0 auto; }
.pagination-arrow.is-disabled { opacity: .35; }
.pagination svg { width: 1rem; height: 1rem; }
.pagination-ellipsis { display: grid; width: 1.2rem; place-items: center; }
.load-more { grid-column: 1 / -1; display: flex; justify-content: center; padding: 1rem 0; }
.load-more button { display: inline-flex; min-height: 2.8rem; align-items: center; gap: .5rem; border: 1px solid var(--line); border-radius: 7px; background: var(--raised); padding: .65rem 1rem; color: var(--copy); font-size: .8rem; cursor: pointer; }
.load-more button:hover { border-color: var(--accent); }
.desktop-pagination { display: none; }

.page-intro { position: relative; margin-bottom: 1.75rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.page-intro h1, .collection-header h1 { margin: 0; color: white; font-size: 2rem; font-weight: 650; }
.page-intro > span, .collection-header > span { position: absolute; right: 0; bottom: 1.4rem; color: var(--muted); font-size: .75rem; }
/* Prose under a directory heading. /categories and /models are otherwise 100%
   anchor text, which search engines skip when building a result snippet. */
.directory-intro { max-width: 48rem; margin: 0 0 1.75rem; color: var(--muted); font-size: .86rem; line-height: 1.65; }
.directory-grid { display: grid; grid-template-columns: 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--line); }
.directory-item { display: grid; min-width: 0; grid-template-columns: 3.5rem minmax(0, 1fr) auto; align-items: center; gap: .8rem; background: var(--panel); padding: .85rem; }
.directory-item:hover { background: var(--raised); }
.directory-item img, .avatar-placeholder { display: grid; width: 3.5rem; height: 3.5rem; place-items: center; border-radius: 50%; background: #3a2422; object-fit: cover; color: var(--accent); font-weight: 700; }
.directory-item strong, .directory-item small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.directory-item strong { color: white; font-size: .9rem; }
.directory-item small { margin-top: .2rem; color: var(--muted); font-size: .72rem; }
.directory-item > svg { color: var(--muted); width: .95rem; }

.category-directory { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .8rem; }
.category-directory > a { display: flex; min-width: 0; flex-direction: column; gap: .5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 1rem; }
.category-directory > a:hover { border-color: var(--accent); background: var(--raised); }
.category-directory > a:hover h2 { color: var(--accent); }
.category-directory small { color: var(--ember); font-size: .65rem; }
.category-directory h2 { margin: .2rem 0 .35rem; color: white; font-size: 1.1rem; font-weight: 600; }
.category-directory p { margin: 0; overflow: hidden; color: var(--muted); font-size: .78rem; line-height: 1.45; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.category-directory > a > div { flex: 1; min-width: 0; }
.category-directory > a > img { width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; object-fit: cover; background: var(--raised); }
.directory-item .model-blurb { overflow: hidden; color: var(--muted); opacity: .8; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.category-directory > a > span { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .35rem; color: var(--muted); font-size: .7rem; }
.category-directory svg { width: .9rem; color: var(--accent); }

.link-section, .discovery-section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.discovery-section { margin-top: 2.75rem; }
.discovery-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
.discovery-grid h3 { margin: 0 0 .7rem; color: white; font-size: .9rem; font-weight: 650; }
.entity-links { display: grid; grid-template-columns: minmax(0, 1fr); gap: .45rem; }
.entity-links a { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: .5rem; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); padding: .65rem .75rem; }
.entity-links a:hover { border-color: var(--accent); background: var(--raised); }
.entity-links strong, .entity-links span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.entity-links strong { min-width: 0; color: white; font-size: .78rem; font-weight: 600; }
.entity-links span { flex: 0 0 auto; color: var(--muted); font-size: .66rem; }

.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-bottom: 1rem; color: var(--muted); font-size: .72rem; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs svg { width: .8rem; }
.player-shell { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #050606; border-radius: 0; }
.player-shell > img, .player-shell > iframe { position: relative; z-index: 1; display: block; width: 100%; height: 100%; border: 0; object-fit: cover; }
.player-shell > video, .player-shell > .plyr { display: block; width: 100%; height: 100%; }
.player-shell .plyr {
  --plyr-color-main: var(--accent);
  --plyr-video-background: #050606;
  --plyr-menu-background: var(--panel);
  --plyr-menu-color: var(--copy);
  --plyr-tooltip-background: var(--panel);
  --plyr-tooltip-color: var(--copy);
}
.player-shell .plyr__video-wrapper, .player-shell .plyr video { height: 100%; }
.player-shell .plyr video { object-fit: contain; }
.player-shell > button { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7rem; border: 0; background: rgba(3,6,5,.62); color: white; cursor: pointer; }
.player-shell > button span { display: grid; width: 3.8rem; height: 3.8rem; place-items: center; border-radius: 50%; background: var(--accent); color: #101313; }
.player-shell > button svg { width: 1.5rem; height: 1.5rem; fill: currentColor; }
.player-shell > button strong { font-size: .82rem; }
.unavailable { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; background: rgba(3,6,5,.78); color: var(--muted); }
.unavailable svg { width: 2rem; height: 2rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag-row a { border: 1px solid var(--line); border-radius: 5px; padding: .32rem .55rem; color: var(--accent); font-size: .68rem; }
.person-chip { display: inline-flex; height: 2.4rem; align-items: center; gap: .55rem; border: 1px solid var(--line); border-radius: 7px; padding: .2rem .65rem .2rem .2rem; font-size: .76rem; }
.person-chip:hover { border-color: var(--accent); }
.person-chip img, .person-chip > span { display: grid; width: 1.9rem; height: 1.9rem; place-items: center; border-radius: 50%; background: var(--raised); object-fit: cover; color: var(--accent); }
.description-copy { margin-top: 1.6rem; border-left: 2px solid var(--accent); padding-left: 1rem; }
.description-copy h2 { margin: 0 0 .35rem; color: white; font-size: .82rem; }
.description-copy p, .profile-description { max-width: 48rem; margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.65; }

.profile-header { display: flex; align-items: center; gap: 1rem; }
.profile-header > img, .avatar-placeholder.large { width: 5.5rem; height: 5.5rem; flex: 0 0 auto; border-radius: 50%; object-fit: cover; }
.profile-header h1 { margin: 0; color: white; font-size: 1.7rem; font-weight: 650; }
.profile-header span { color: var(--muted); font-size: .75rem; }
.profile-description { margin-top: 1.2rem; }
.collection-header { position: relative; padding: 1rem 0; border-bottom: 1px solid var(--line); }

.empty-state { display: flex; min-height: 15rem; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.empty-state > svg { width: 2rem; height: 2rem; color: var(--accent); }
.empty-state h1, .empty-state h2 { margin: .8rem 0 .25rem; color: white; font-size: 1.15rem; }
.empty-state p { margin: 0; font-size: .8rem; }
.error-code { color: var(--ember); font-size: 3rem; font-weight: 800; }
.primary-button { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1.2rem; border-radius: 6px; background: var(--accent); padding: .65rem .9rem; color: #101313; font-size: .8rem; font-weight: 700; }

@keyframes thumbnail-shimmer { to { background-position-x: -220%; } }

.legal-copy { max-width: 46rem; margin: 0 auto; color: var(--muted); }
.legal-copy > h1 { margin: 0 0 2rem; color: white; font-size: 2rem; }
.legal-copy section { margin: 0 0 2rem; }
.legal-copy h2 { margin: 0 0 .55rem; color: white; font-size: 1rem; }
.legal-copy p { margin: 0 0 1rem; font-size: .86rem; line-height: 1.7; }
.legal-copy a { color: var(--accent); }
.contact-address { display: inline-flex; align-items: center; gap: .5rem; margin: .5rem 0 2rem; font-size: 1rem; }
.placeholder-notice { margin: 1.5rem 0; border: 1px solid #6b3b35; border-radius: 7px; background: #251a18; padding: 1rem; color: #e9aaa2; }
.placeholder-notice p { margin: .35rem 0 0; }
.placeholder-notice code { color: white; }

@media (min-width: 480px) {
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 479px) {
  .pagination { gap: .2rem; }
  .pagination a, .pagination-arrow, .pagination-pages > span:not(.pagination-ellipsis) { width: 1.9rem; height: 2.1rem; }
  .pagination-pages { gap: .1rem; }
  .pagination-ellipsis { width: .7rem; }
  .pagination-far { display: none !important; }
}
@media (min-width: 640px) {
  .player-shell { border-radius: 8px; }
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading h1, .section-heading h2 { font-size: 1.55rem; }
  .load-more { display: none; }
  .desktop-pagination { display: block; }
  /* main switches to sm:px-6, so the bleed has to follow it. */
  .shelf-track { margin-right: -1.5rem; padding-right: 1.5rem; }
  .shelf-track .video-card { width: 30vw; }
  .shelf-track .video-card h2 { font-size: .95rem; }
  .discovery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Arrows only where there's a real pointer - a touch device scrolls by swiping,
   and hiding them in CSS keeps them out of the tab order too. */
@media (hover: hover) and (min-width: 640px) {
  .shelf-nav { display: flex; }
  /* Arrows are the affordance here, so drop the bar. Touch tablets at this width
     keep it, since (hover: none) excludes them from this block. */
  .shelf-track { scrollbar-width: none; padding-bottom: 0; }
  .shelf-track::-webkit-scrollbar { display: none; }
}
@media (min-width: 960px) {
  .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.15rem; }
  .shelf-track .video-card { width: 22vw; }
  .entity-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .directory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* main caps at max-w-7xl, so vw units would keep inflating the cards past the
     point where the track stops growing. Fixed width from here on. */
  .shelf-track .video-card { width: 17.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
