:root {
  color-scheme: dark;
  --bg: #0f1218;
  --surface: #171c26;
  --surface-2: #202737;
  --line: #2b3447;
  --text: #e8ebf2;
  --muted: #a2adc2;
  --accent: #f2b84b;
  --accent-ink: #1a1405;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

.l-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px max(16px, 4vw); max-width: 1200px; margin: 0 auto; }
.l-brand { font-weight: 700; font-size: 1.35rem; letter-spacing: .02em; color: var(--text); text-decoration: none; }

.l-btn { display: inline-block; border-radius: 10px; padding: .7rem 1.4rem; font: inherit; font-weight: 600; text-decoration: none; border: 1px solid transparent; transition: transform .15s ease, opacity .15s ease; }
.l-btn:hover { transform: translateY(-1px); }
.l-btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); padding: .9rem 2rem; font-size: 1.05rem; }
.l-btn-primary:hover { background: #ffc965; border-color: #ffc965; }
.l-btn-ghost { color: var(--text); border-color: var(--line); background: var(--surface); }
.l-btn-ghost:hover { border-color: var(--accent); }

main { overflow-x: clip; }
.l-hero { max-width: 1200px; margin: 0 auto; padding: 48px max(16px, 4vw) 56px; display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .l-hero { grid-template-columns: 1.1fr .9fr; padding-top: 72px; padding-bottom: 88px; } }
.l-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.01em; }
.l-lead { margin-top: 20px; font-size: 1.15rem; color: var(--muted); max-width: 38rem; }
.l-cta { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.l-cta-note { flex-basis: 100%; margin-top: 4px; color: var(--muted); font-size: .95rem; }

.l-hero-art { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; transform: rotate(-3deg); }
.tile { aspect-ratio: 2 / 3; border-radius: var(--radius); border: 1px solid var(--line); display: flex; align-items: flex-end; padding: 10px; font-weight: 700; font-size: .95rem; color: var(--accent-ink); }
.tile span { background: var(--accent); border-radius: 6px; padding: 2px 8px; }
.t1 { background: linear-gradient(160deg, #35507a, #1b2438); }
.t2 { background: linear-gradient(160deg, #5b3a57, #231a2a); margin-top: 24px; }
.t3 { background: linear-gradient(160deg, #2f6b64, #14262a); }
.t4 { background: linear-gradient(160deg, #6b4f2f, #271c12); margin-top: -12px; }
.t5 { background: linear-gradient(160deg, #3d4f8f, #181d33); }
.t6 { background: linear-gradient(160deg, #6b2f3d, #2a1219); margin-top: 12px; }

/* Popular right now: public listing, filled in by landing.js */
.l-popular { max-width: 1200px; margin: 0 auto; padding: 8px max(16px, 4vw) 56px; }
.l-popular[hidden] { display: none; }
.l-popular h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 20px; }
.p-controls { display: grid; gap: 12px; margin-bottom: 8px; }
.p-tabs, .p-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.p-pill { font: inherit; font-size: .92rem; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; cursor: pointer; }
.p-pill:hover { border-color: var(--accent); }
.p-pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.p-genre { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .92rem; }
.p-genre select { font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; max-width: 100%; min-width: 0; }
.p-status { min-height: 1.5rem; margin: 8px 0; color: var(--muted); font-size: .92rem; }
.p-status.is-error { color: #ff8d8d; }
.p-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 640px) { .p-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .p-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .p-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.p-card { min-width: 0; }
.p-card-btn { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .15s ease; }
.p-card-btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.p-poster { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; background: var(--surface-2); }
.p-poster-empty { display: grid; place-items: center; color: var(--muted); font-size: .85rem; }
.p-card-body { display: grid; gap: 4px; padding: 10px 12px 12px; align-content: start; }
.p-card-title { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.p-card-meta, .p-card-services { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.p-ratings { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: .82rem; }
.p-rating-source { color: var(--muted); }
.p-more { display: block; margin: 24px auto 0; }
.p-more[hidden] { display: none; }

.p-dialog { color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; }
.p-dialog::backdrop { background: rgba(5, 8, 14, .72); }
html:has(.p-dialog[open]) { overflow: hidden; }
.p-dlayout { display: grid; gap: 18px; padding: 52px 18px 20px; }
@media (min-width: 640px) { .p-dlayout { grid-template-columns: 220px 1fr; padding: 28px 28px 28px 24px; } }
.p-dposter { display: block; width: 100%; max-width: 130px; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.p-dposter.p-poster-empty { display: grid; }
@media (min-width: 640px) { .p-dposter { max-width: 220px; } }
.p-dbody { display: grid; gap: 10px; align-content: start; min-width: 0; }
.p-dbody h2 { font-size: 1.5rem; padding-right: 0; overflow-wrap: anywhere; }
.p-dbody h2:focus { outline: none; }
.p-dmeta { color: var(--muted); }
.p-doverview { color: var(--text); }
.p-dsec h3 { font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.p-dsec p { overflow-wrap: anywhere; }
.p-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.p-cta .l-btn-primary { padding: .75rem 1.2rem; font-size: 1rem; }
.p-close { position: absolute; top: 10px; right: 10px; padding: .4rem 1rem; }

.l-services { max-width: 1200px; margin: 0 auto; padding: 0 max(16px, 4vw) 48px; text-align: center; }
.l-services p { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.l-services ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px; }
.l-services li { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 16px; font-size: .95rem; }

.l-features, .l-steps { max-width: 1200px; margin: 0 auto; padding: 56px max(16px, 4vw); }
.l-features h2, .l-steps h2, .l-final h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 28px; }
.l-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .l-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .l-grid { grid-template-columns: repeat(3, 1fr); } }
.l-grid article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.l-grid h3 { font-size: 1.1rem; margin-bottom: 8px; }
.l-grid p { color: var(--muted); }

.l-steps { background: transparent; }
.l-steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 800px) { .l-steps ol { grid-template-columns: repeat(3, 1fr); } }
.l-steps li { counter-increment: step; background: var(--surface-2); border-radius: var(--radius); padding: 22px 22px 22px 70px; position: relative; color: var(--muted); }
.l-steps li::before { content: counter(step); position: absolute; left: 22px; top: 20px; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; display: grid; place-items: center; }
.l-steps strong { display: block; color: var(--text); margin-bottom: 4px; }

.l-final { text-align: center; padding: 72px max(16px, 4vw); background: linear-gradient(180deg, transparent, var(--surface)); }
.l-final h2 { margin-bottom: 24px; }

.l-footer { border-top: 1px solid var(--line); padding: 24px max(16px, 4vw); color: var(--muted); font-size: .8rem; }
.l-footer p { max-width: 60rem; margin: .25rem auto; text-align: center; }
.l-footer a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .l-btn { transition: none; }
  .l-btn:hover { transform: none; }
  .p-card-btn { transition: none; }
  .p-card-btn:hover { transform: none; }
}
