:root {
  --bg: #020714;
  --surface: #071430;
  --ink: #dcebff;
  --muted: #86a2cc;
  --line: rgba(110, 170, 255, .18);
  --accent: #3d9bff;
  --accent-ink: #7ec8ff;
  --radius: 12px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: radial-gradient(ellipse at 50% -10%, #0a2257 0%, #04102a 35%, var(--bg) 70%) fixed; color: var(--ink); font: 16px/1.55 var(--font); }
h1, h2, h3 { color: #f0f6ff; }
a { color: var(--accent-ink); }
img { max-width: 100%; display: block; }
.wrap { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* header / footer */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(2, 8, 22, .8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font: 700 1.25rem/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.logo { font-family: var(--font); letter-spacing: .2em; text-transform: uppercase; font-size: 1rem; }
.logo::before { content: ""; display: inline-block; width: .55em; height: .55em; margin-right: .6em; border-radius: 50%; background: #7ef0ff; box-shadow: 0 0 12px #7ef0ff; vertical-align: .05em; }
.site-header nav a { color: var(--ink); text-decoration: none; margin-left: 1.25rem; font-size: .95rem; }
.site-header nav a:hover { color: var(--accent-ink); }
.site-footer { margin-top: 4rem; padding: 2rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }

/* hero + search */
.hero { padding: 3.5rem 0 2rem; }
.hero h1 { font: 700 clamp(2rem, 5vw, 3.4rem)/1.08 var(--serif); letter-spacing: -.02em; margin: 0 0 .6rem; max-width: 18ch; }
.stats { color: var(--muted); margin: 0 0 1.5rem; }
.search input { width: 100%; max-width: 680px; font: inherit; font-size: 1.1rem; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.search input { color: var(--ink); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61, 155, 255, .25); }

/* filters */
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.filters select { width: 100%; min-width: 0; }
.filters label { min-width: 0; display: flex; flex-direction: column; gap: .25rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
select { font: inherit; font-size: .95rem; text-transform: none; letter-spacing: normal; color: var(--ink); padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 0; flex-wrap: wrap; }
.bar p { margin: 0; font-weight: 600; }
.bar-right { display: flex; gap: .75rem; align-items: center; }
button { font: inherit; cursor: pointer; }
button.link { background: none; border: 0; color: var(--accent-ink); text-decoration: underline; padding: 0; }
.more { text-align: center; margin: 2rem 0; }
.more button { background: linear-gradient(90deg, #1652d8, #1b8cff); color: #fff; border: 0; border-radius: 999px; padding: .75rem 1.6rem; }
.more button:hover { filter: brightness(1.15); }
.empty { grid-column: 1 / -1; color: var(--muted); padding: 2rem 0; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.card { display: block; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); border-color: rgba(126, 200, 255, .5); box-shadow: 0 8px 30px rgba(0, 0, 0, .4), 0 0 24px -8px var(--accent); }
.thumb { aspect-ratio: 16 / 9; background: #0b1c3d; overflow: hidden; display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.ph { font: 700 2.4rem var(--serif); color: #2c4a80; }
.meta { padding: .75rem .9rem .9rem; }
.meta h3 { font-size: 1rem; line-height: 1.3; margin: 0 0 .3rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta p { margin: 0; font-size: .88rem; }
.muted { color: var(--muted); }

/* ad page */
.ad { padding-top: 1.5rem; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }
.ad h1 { font: 700 clamp(1.8rem, 4vw, 2.8rem)/1.1 var(--serif); letter-spacing: -.02em; margin: 0 0 .4rem; }
.lede { color: var(--muted); font-size: 1.1rem; margin: 0 0 1.5rem; }
.ad-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; align-items: start; }
.player, .still { margin: 0; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.still { aspect-ratio: auto; background: var(--surface); border: 1px solid var(--line); }
.still img { margin: auto; max-height: 75vh; width: auto; }
.player iframe { width: 100%; height: 100%; border: 0; }
.play { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #000; }
.play img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.play .btn { position: absolute; inset: 50% auto auto 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(40, 130, 255, .9); box-shadow: 0 0 0 8px rgba(80, 170, 255, .2), 0 0 40px rgba(80, 170, 255, .8); transition: transform .15s ease; }
.play .btn::after { content: ""; position: absolute; left: 30px; top: 22px; border-style: solid; border-width: 16px 0 16px 26px; border-color: transparent transparent transparent #fff; }
.play:hover .btn { transform: scale(1.07); }
.watch { font-size: .9rem; color: var(--muted); margin: .6rem 0 1.5rem; }
.analysis h2 { font: 600 .78rem var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 1.6rem 0 .35rem; }
.analysis p { margin: 0; max-width: 65ch; }
.tags { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tags a { display: inline-block; padding: .2rem .65rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: .85rem; }
.tags a:hover { border-color: var(--accent); color: var(--accent-ink); }
.ad-facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; position: sticky; top: 80px; }
.ad-facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; font-size: .92rem; }
.ad-facts dt { color: var(--muted); }
.ad-facts dd { margin: 0; }
.ref { margin: 1rem 0 0; font-size: .8rem; color: var(--muted); }
.related h2 { font: 700 1.3rem var(--serif); margin: 3rem 0 1rem; }
.in-brain { display: inline-block; margin-left: .6rem; padding: .2rem .75rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(40, 90, 180, .18); color: #7ef0ff; text-decoration: none; font-size: .85rem; vertical-align: .1em; }
.in-brain::before { content: ""; display: inline-block; width: .45em; height: .45em; border-radius: 50%; background: #7ef0ff; box-shadow: 0 0 8px #7ef0ff; margin-right: .45em; vertical-align: .1em; }
.in-brain:hover { border-color: #7ef0ff; }
select option { background: #071430; }

/* prose pages */
.prose { max-width: 720px; padding-top: 2.5rem; }
.prose h1 { font: 700 2.4rem/1.1 var(--serif); }
.prose h2 { font: 700 1.3rem var(--serif); margin-top: 2rem; }

@media (max-width: 860px) {
  .ad-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .ad-facts { position: static; }
  .site-header nav a { margin-left: .9rem; }
  .hero { padding-top: 2.25rem; }
}
@media (max-width: 600px) {
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .6rem; }
  .filters label { font-size: .7rem; }
  select { font-size: .88rem; padding: .4rem .45rem; }
  .hero { padding: 1.75rem 0 1.25rem; }
  .grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .meta { padding: .55rem .6rem .7rem; }
  .meta h3 { font-size: .9rem; }
  .meta p { font-size: .8rem; }
}

/* Join button: shown by signup.js only when a sign-up address is set */
[data-join][hidden], [data-cookie-settings][hidden] { display: none !important; }

/* binge bars: fixed at the sides of ad pages; hover shows what's next */
.binge .bb { position: fixed; top: 50%; z-index: 6; display: flex; align-items: center; gap: .6rem; height: 168px; width: 46px; margin-top: -84px; padding: 0 .55rem; overflow: hidden; color: var(--ink); text-decoration: none; background: linear-gradient(180deg, rgba(61, 155, 255, .08), rgba(61, 155, 255, .22) 50%, rgba(61, 155, 255, .08)), rgba(4, 14, 36, .72); border: 1px solid var(--line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: width .25s cubic-bezier(.2, .8, .2, 1), background .2s, border-color .2s, box-shadow .2s; }
.binge .bb.prev { left: 0; border-left: 0; border-radius: 0 14px 14px 0; }
.binge .bb.next { right: 0; border-right: 0; border-radius: 14px 0 0 14px; flex-direction: row-reverse; text-align: right; }
.binge .bb .arr { flex: none; width: 26px; text-align: center; font-size: 34px; line-height: 1; color: var(--accent-ink); transform: translateY(-2px); }
.binge .bb .bt { display: flex; flex-direction: column; gap: 2px; min-width: 0; width: 200px; opacity: 0; transition: opacity .15s; }
.binge .bb .bt small { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.binge .bb .bt b { font-size: 14px; line-height: 1.25; color: #f0f6ff; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.binge .bb .bt i { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.binge a.bb:focus-visible { width: 262px; background: linear-gradient(180deg, rgba(61, 155, 255, .18), rgba(61, 155, 255, .34) 50%, rgba(61, 155, 255, .18)), rgba(4, 14, 36, .92); border-color: rgba(126, 200, 255, .55); box-shadow: 0 0 30px -8px var(--accent); }
.binge a.bb:focus-visible .bt { opacity: 1; transition-delay: .08s; }
/* Hover-to-expand only where a real mouse exists, so iPad/iPhone open the next ad on the first tap */
@media (hover: hover) and (min-width: 861px) { .binge a.bb:hover { width: 262px; background: linear-gradient(180deg, rgba(61, 155, 255, .18), rgba(61, 155, 255, .34) 50%, rgba(61, 155, 255, .18)), rgba(4, 14, 36, .92); border-color: rgba(126, 200, 255, .55); box-shadow: 0 0 30px -8px var(--accent); } .binge a.bb:hover .bt { opacity: 1; transition-delay: .08s; } }
.binge .bb.off { opacity: .25; pointer-events: none; }
@media (max-width: 860px) {
  .binge { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); background: rgba(2, 8, 22, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .binge .bb, .binge a.bb:hover, .binge a.bb:focus-visible { position: static; width: auto; height: 62px; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; padding: 0 .75rem; }
  .binge .bb.next { border-left: 1px solid var(--line); }
  .binge .bb .bt { opacity: 1; width: auto; }
  .binge .bb .bt b { -webkit-line-clamp: 1; font-size: 13px; }
  .binge .bb .bt i { display: none; }
  body:has(.binge) .site-footer { padding-bottom: 80px; }
}
@media (prefers-reduced-motion: reduce) { .binge .bb, .binge .bb .bt { transition: none; } }

/* iPhone/iPad zoom into form fields smaller than 16px; keep them at 16px on touch screens */
@media (pointer: coarse) { input, select, textarea { font-size: 16px !important; } }
