/* =====================================================================
   RIPENED — design system
   Brand idea: ripeness spectrum (unripe green → ripe gold → hot red),
   warm cinematic dark. The deliberate inverse of "Rotten" Tomatoes.
   Display: Newsreader (warm editorial serif — critic/film-program authority).
   Text/numerals: Hanken Grotesk w/ tabular figures (legible dense data).
   ===================================================================== */

:root {
  /* warm near-blacks */
  --bg:        #0b0a08;
  --bg-2:      #100d0a;
  --surface:   #16110d;
  --surface-2: #1e1812;
  --surface-3: #271f17;
  --line:      rgba(255, 235, 205, 0.085);
  --line-2:    rgba(255, 235, 205, 0.14);

  /* warm ink */
  --text:      #f5ede1;
  --text-dim:  #c0b2a0;
  --text-mute: #8d8071;
  --text-faint:#5f564b;

  /* the ripeness spectrum */
  --sprout:    #9bd64b;   /* fresh / rising / new */
  --gold:      #f6b53c;   /* QUALITY — perfectly ripe, the good stuff */
  --gold-soft: #ffd585;
  --heat:      #ff5e3a;   /* HYPE — hot right now */
  --heat-soft: #ff916b;
  --ripe-grad: linear-gradient(100deg, #9bd64b 0%, #f6b53c 46%, #ff5e3a 100%);
  --gold-grad: linear-gradient(135deg, #ffd585 0%, #f6b53c 55%, #e0931f 100%);
  --heat-grad: linear-gradient(135deg, #ff916b 0%, #ff5e3a 60%, #e83c1a 100%);

  --good: #8fd14f;
  --warn: #ffb13c;
  --bad:  #ff6f54;

  /* type — editorial serif headlines + neutral humanist sans for dense data */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num: "Hanken Grotesk", system-ui, sans-serif; /* tabular numerals for scores */

  /* shape */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --r-xl: 28px;

  /* warm-tinted shadows */
  --sh-1: 0 1px 2px rgba(0,0,0,.4);
  --sh-2: 0 10px 30px -12px rgba(0,0,0,.7);
  --sh-3: 0 24px 60px -20px rgba(0,0,0,.78);
  --glow-gold: 0 6px 30px -8px rgba(246,181,60,.45);
  --glow-heat: 0 6px 30px -8px rgba(255,94,58,.45);

  --maxw: 1240px;
  --nav-h: 66px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-text);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ambient warmth: faint top glow + grain */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1100px 600px at 78% -8%, rgba(255,120,60,.10), transparent 60%),
    radial-gradient(900px 520px at 10% 0%, rgba(246,181,60,.08), transparent 58%),
    var(--bg);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: 0; margin: 0; line-height: 1.06; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(246,181,60,.3); color: #fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--text-mute); }
.dim { color: var(--text-dim); }
.kicker { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--text-mute); font-weight: 600; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 60; height: var(--nav-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 22px; width: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display);
  font-weight: 600; font-size: 21px; letter-spacing: -.02em; }
.brand .mark { width: 26px; height: 26px; flex: 0 0 auto; }
.brand b { color: var(--text); }
.brand .dot { color: var(--heat); }

.tabs { display: flex; gap: 4px; margin-left: 6px; }
.tab {
  border: 0; background: transparent; color: var(--text-mute);
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px; transition: .18s;
}
.tab:hover { color: var(--text); background: var(--surface); }
.tab.active { color: #1a1206; background: var(--gold); box-shadow: var(--glow-gold); }
.tab .ic { width: 16px; height: 16px; }

.nav-spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 8px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
  color: var(--text-mute); min-width: 200px; transition: .18s;
}
.search:focus-within { border-color: var(--line-2); background: var(--surface-2); }
.search input { border: 0; background: transparent; color: var(--text); outline: 0; width: 100%; font-size: 14px; }
.search svg { width: 16px; height: 16px; flex: 0 0 auto; }

.btn {
  border: 1px solid var(--line-2); background: var(--surface);
  color: var(--text); padding: 9px 16px; border-radius: 999px; font-weight: 600;
  font-size: 14px; display: inline-flex; align-items: center; gap: 8px; transition: .18s;
}
.btn:hover { background: var(--surface-2); border-color: var(--text-faint); }
.btn-primary { background: var(--gold); color: #1a1206; border-color: transparent; }
.btn-primary:hover { background: var(--gold-soft); }
.btn svg { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 60px 0 26px; position: relative; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); font-weight: 600; max-width: 16ch; letter-spacing: -.025em; }
.hero h1 .grad { background: var(--ripe-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: clamp(16px, 2vw, 19px); color: var(--text-dim); max-width: 54ch; margin: 18px 0 0; }
.hero .stats { display: flex; gap: 30px; margin-top: 26px; flex-wrap: wrap; }
.hero .stat b { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 800; font-size: 26px; display: block; }
.hero .stat span { font-size: 12.5px; color: var(--text-mute); }

/* ---------------------------------------------------------- lens bar */
.lensbar {
  position: sticky; top: var(--nav-h); z-index: 50; margin: 18px 0 26px;
  background: color-mix(in srgb, var(--bg-2) 86%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 20px; display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  box-shadow: var(--sh-2);
}
.lens-slider { flex: 1 1 460px; min-width: 280px; }
.lens-slider .heads { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.lens-slider .heads .lab { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; }
.lens-slider .heads .q { color: var(--gold); }
.lens-slider .heads .h { color: var(--heat); }
.lens-slider .heads .pos { font-size: 12px; color: var(--text-mute); font-weight: 600; }

.slider { position: relative; height: 26px; display: flex; align-items: center; }
.slider .track { position: absolute; inset: 50% 0 auto; height: 7px; transform: translateY(-50%);
  border-radius: 999px; background: linear-gradient(90deg, var(--gold), #c98a3a 38%, #b56a4a 60%, var(--heat)); opacity: .9; }
.slider input { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; margin: 0; position: relative; z-index: 2; }
.slider input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 3px solid var(--bg); box-shadow: 0 2px 10px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.2); cursor: grab;
}
.slider input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--bg); cursor: grab; }
.slider input:active::-webkit-slider-thumb { cursor: grabbing; }

.lens-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--text-mute); padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 13px; transition: .16s; }
.seg button.active { background: var(--surface-3); color: var(--text); }
.toggle { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; color: var(--text-dim); }
.switch { width: 42px; height: 24px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); position: relative; transition: .18s; flex: 0 0 auto; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-mute); transition: .18s; }
.toggle.on .switch { background: var(--gold); border-color: transparent; }
.toggle.on .switch::after { left: 20px; background: #1a1206; }

/* ---------------------------------------------------------- sections */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 8px 0 18px; }
.section-head h2 { font-size: 22px; }
.section-head .sub { font-size: 13.5px; color: var(--text-mute); }

/* ---------------------------------------------------------- card grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); gap: 22px 20px; }

.card { position: relative; cursor: pointer; transition: transform .2s cubic-bezier(.2,.7,.3,1); }
.card:hover { transform: translateY(-5px); }
.card .poster {
  position: relative; aspect-ratio: 2/3; border-radius: var(--r); overflow: hidden;
  background: var(--surface-2); box-shadow: var(--sh-2); border: 1px solid var(--line);
}
.card .poster .poster-svg, .card .poster img.real { width: 100%; height: 100%; object-fit: cover; display: block; }
.card:hover .poster { box-shadow: var(--sh-3); border-color: var(--line-2); }

.rank-no { position: absolute; top: 9px; left: 9px; z-index: 3; font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 14px; font-weight: 600; color: var(--text); background: rgba(10,8,6,.62);
  backdrop-filter: blur(6px); border: 1px solid var(--line-2); border-radius: 8px; min-width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }

.scorepair { position: absolute; top: 9px; right: 9px; z-index: 3; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 4px; border-radius: 999px;
  font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; background: rgba(10,8,6,.66);
  backdrop-filter: blur(6px); border: 1px solid var(--line-2); }
.pill .num { line-height: 1; }
.pill .dotq, .pill .doth { width: 16px; height: 16px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; }
.pill .dotq { background: var(--gold-grad); color: #1a1206; }
.pill .doth { background: var(--heat-grad); color: #1a1206; }
.pill.q { color: var(--gold-soft); }
.pill.h { color: var(--heat-soft); }

.card .like {
  position: absolute; bottom: 9px; right: 9px; z-index: 3; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(10,8,6,.6); backdrop-filter: blur(6px); border: 1px solid var(--line-2);
  display: grid; place-items: center; opacity: 0; transform: translateY(4px); transition: .18s; color: var(--text);
}
.card:hover .like, .card .like.liked { opacity: 1; transform: none; }
.card .like svg { width: 17px; height: 17px; }
.card .like.liked { background: var(--heat); border-color: transparent; color: #1a1206; }
.card .like.liked svg { fill: #1a1206; }

.card .meta { padding: 11px 2px 0; }
.card .meta .t { font-weight: 700; font-size: 14.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta .sub { font-size: 12.5px; color: var(--text-mute); margin-top: 2px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.card .meta .sub .where { color: var(--text-dim); }

/* type chip */
.tchip { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 1px 7px; border-radius: 5px; }
.tchip.movie { color: #ffd585; background: rgba(246,181,60,.13); }
.tchip.tv    { color: #8fd1ff; background: rgba(90,170,255,.13); }
.tchip.anime { color: #ff9bd0; background: rgba(255,110,190,.13); }
.tchip.game  { color: #9bd64b; background: rgba(155,214,75,.14); }

/* ---------------------------------------------- featured #1 banner */
.featured { display: grid; grid-template-columns: 230px 1fr; gap: 28px; padding: 22px;
  background: linear-gradient(120deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line); border-radius: var(--r-xl); margin-bottom: 30px; box-shadow: var(--sh-2); position: relative; overflow: hidden; }
.featured::before { content: ""; position: absolute; right: -10%; top: -40%; width: 60%; height: 180%;
  background: radial-gradient(closest-side, rgba(246,181,60,.10), transparent); pointer-events: none; }
.featured .poster { aspect-ratio: 2/3; border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-3); border: 1px solid var(--line-2); cursor: pointer; }
.featured .fbody { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.featured .ftag { color: var(--gold); font-weight: 700; }
.featured h2 { font-size: clamp(26px, 3.4vw, 40px); margin: 8px 0 6px; cursor: pointer; }
.featured .fsyn { color: var(--text-dim); max-width: 60ch; font-size: 15.5px; }
.featured .fmeta { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; align-items: center; }
.featured .fscores { display: flex; gap: 14px; margin-top: 6px; }

/* score dial (svg ring rendered in JS) */
.dial { display: inline-flex; align-items: center; gap: 11px; }
.dial .ring { width: 58px; height: 58px; flex: 0 0 auto; }
.dial .dlab b { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 800; font-size: 21px; display: block; line-height: 1; }
.dial .dlab span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mute); font-weight: 700; }
.dial.q .dlab b { color: var(--gold); }
.dial.h .dlab b { color: var(--heat); }

.tag { font-size: 12px; font-weight: 600; color: var(--text-dim); padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }

/* ---------------------------------------------------------- modal */
.scrim { position: fixed; inset: 0; z-index: 100; background: rgba(6,5,4,.72); backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity .22s; display: grid; place-items: start center; overflow-y: auto; padding: 40px 18px; }
.scrim.open { opacity: 1; pointer-events: auto; }
.modal { width: min(960px, 100%); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl);
  box-shadow: var(--sh-3); overflow: hidden; transform: translateY(16px) scale(.98); transition: transform .26s cubic-bezier(.2,.8,.3,1); }
.scrim.open .modal { transform: none; }
.modal .hd { position: relative; display: grid; grid-template-columns: 220px 1fr; gap: 26px; padding: 26px; }
.modal .hd .backdrop { position: absolute; inset: 0; z-index: 0; opacity: .26; filter: saturate(1.1); }
.modal .hd .backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, var(--surface) 92%), linear-gradient(90deg, var(--surface) 8%, transparent 60%); }
.modal .hd > * { position: relative; z-index: 1; }
.modal .hd .poster { aspect-ratio: 2/3; border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-3); border: 1px solid var(--line-2); }
.modal .x { position: absolute; top: 16px; right: 16px; z-index: 5; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(10,8,6,.6); border: 1px solid var(--line-2); color: var(--text); display: grid; place-items: center; }
.modal .x:hover { background: var(--surface-3); }
.modal .info { min-width: 0; display: flex; flex-direction: column; }
.modal .info h2 { font-size: clamp(24px, 3vw, 34px); }
.modal .info .yr { color: var(--text-mute); font-size: 15px; margin-top: 4px; }
.modal .info .syn { color: var(--text-dim); margin: 14px 0; font-size: 15.5px; max-width: 60ch; }
.modal .chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 2px; }
.modal .credits { font-size: 13.5px; color: var(--text-mute); margin-top: auto; padding-top: 12px; }
.modal .credits b { color: var(--text-dim); font-weight: 600; }
.modal .dials { display: flex; gap: 26px; margin: 16px 0 4px; }
.modal .actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.why { font-size: 13px; color: var(--text-mute); margin-top: 12px; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); border-left: 3px solid var(--gold); }
.why b { color: var(--gold); font-weight: 700; }

.modal .bd { padding: 0 26px 26px; }
.bd h3 { font-size: 15px; letter-spacing: .02em; margin: 18px 0 12px; display: flex; align-items: center; gap: 9px; }
.bd h3 .hint { font-size: 12px; color: var(--text-mute); font-weight: 400; font-family: var(--font-text); }

/* source breakdown rows */
.sources { display: flex; flex-direction: column; gap: 2px; }
.srow { display: grid; grid-template-columns: 168px 64px 1fr 70px; align-items: center; gap: 14px; padding: 10px 12px; border-radius: var(--r-sm); }
.srow:hover { background: var(--surface-2); }
.srow .sname { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 13.5px; min-width: 0; }
.srow .slogo { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 10px; font-weight: 800; flex: 0 0 auto; color: #1a1206; }
.srow .native { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; }
.srow .native s { font-size: 11px; color: var(--text-mute); text-decoration: none; font-family: var(--font-text); }
.srow .barwrap { height: 7px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.srow .bar { height: 100%; border-radius: 999px; background: var(--gold-grad); }
.srow .votes { font-size: 12px; color: var(--text-mute); text-align: right; }
.srow .votes b { color: var(--text-dim); font-weight: 700; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.consensus-note { font-size: 12.5px; color: var(--text-mute); margin-top: 10px; display: flex; align-items: center; gap: 8px; }

/* where to watch */
.watch { display: flex; gap: 10px; flex-wrap: wrap; }
.wchip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; font-size: 13.5px; }
.wchip .k { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 1px 6px; border-radius: 5px; }
.wchip .k.stream { color: var(--sprout); background: rgba(155,214,75,.13); }
.wchip .k.rent, .wchip .k.buy { color: var(--gold-soft); background: rgba(246,181,60,.12); }
.wchip .k.free { color: #8fd1ff; background: rgba(90,170,255,.12); }
.wchip .k.platform { color: var(--heat-soft); background: rgba(255,94,58,.12); }

/* ---------------------------------------------------- onboarding */
.ob .modal { width: min(640px, 100%); }
.ob .obhead { padding: 30px 30px 8px; }
.ob h2 { font-size: 28px; }
.ob .obsub { color: var(--text-dim); margin-top: 8px; }
.ob .obbody { padding: 18px 30px 8px; min-height: 220px; }
.ob .qlabel { font-weight: 700; margin-bottom: 14px; font-size: 16px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 10px; }
.choice { border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); border-radius: var(--r-sm);
  padding: 13px 14px; font-weight: 600; font-size: 14px; text-align: left; transition: .15s; display: flex; align-items: center; gap: 9px; }
.choice:hover { border-color: var(--text-faint); }
.choice.sel { border-color: var(--gold); background: rgba(246,181,60,.1); color: var(--gold-soft); }
.choice .em { font-size: 18px; }
.ob .obfoot { display: flex; align-items: center; justify-content: space-between; padding: 16px 30px 28px; gap: 12px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--surface-3); transition: .2s; }
.dots i.on { background: var(--gold); width: 20px; border-radius: 999px; }

/* duel (this or that) */
.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.duelcard { border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: var(--surface-2); transition: .15s; cursor: pointer; }
.duelcard:hover { border-color: var(--text-faint); transform: translateY(-3px); }
.duelcard.sel { border-color: var(--gold); box-shadow: var(--glow-gold); }
.duelcard .dp { aspect-ratio: 16/10; overflow: hidden; }
.duelcard .dn { padding: 10px 12px; font-weight: 700; font-size: 14px; }

/* ---------------------------------------------------- empty / misc */
.empty { text-align: center; padding: 70px 20px; color: var(--text-mute); }
.empty .big { font-family: var(--font-display); font-size: 22px; color: var(--text-dim); margin-bottom: 8px; }
.trust { display: flex; gap: 18px; flex-wrap: wrap; margin: 16px 0 0; }
.trust .item { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-dim); }
.trust .item svg { width: 17px; height: 17px; color: var(--gold); flex: 0 0 auto; }

footer { border-top: 1px solid var(--line); margin-top: 70px; padding: 34px 0 60px; color: var(--text-mute); font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
footer .attribution { max-width: 60ch; line-height: 1.6; }

/* toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 200;
  background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 999px; padding: 12px 20px; font-weight: 600;
  font-size: 14px; box-shadow: var(--sh-3); opacity: 0; transition: .25s; display: flex; align-items: center; gap: 10px; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast .tdot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------- icons / rings */
.ic { width: 18px; height: 18px; }
.x { width: 16px; height: 16px; }
.mini { width: 13px; height: 13px; vertical-align: -2px; }
.big { width: 44px; height: 44px; color: var(--heat); }
.tab .ic { width: 16px; height: 16px; }
.ringv { transition: stroke-dashoffset .7s cubic-bezier(.2,.7,.3,1); }
.dials { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; }
.dial .dlab { display: flex; flex-direction: column; justify-content: center; }
.dial .dlab i { font-style: normal; font-size: 11px; color: var(--text-faint); margin-top: 1px; }

/* new / status badges on cards */
.newb { position: absolute; top: 9px; left: 9px; z-index: 3; font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: #1a1206; background: var(--sprout); border-radius: 7px; padding: 3px 7px; }
.card .meta .sub .where { display: inline-flex; align-items: center; gap: 3px; }
.card .meta .sub .ago { color: var(--heat-soft); font-weight: 700; }
.newb { display: inline-flex; align-items: center; }
.tag.fresh { color: #1a1206; background: var(--gold); border-color: transparent; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.tag.fresh .x { width: 13px; height: 13px; }

/* spotlight: 5 most popular up top, the rest found by scrolling */
.spotlight { margin-bottom: 20px; }
.spotlight .featured { margin-bottom: 18px; }
.spot4 { grid-template-columns: repeat(4, 1fr); }
.scrollcue { text-align: center; color: var(--text-faint); font-size: 13px; font-style: italic;
  font-family: var(--font-display); padding: 18px 0 2px; letter-spacing: .01em; }
@media (max-width: 900px) { .spot4 { grid-template-columns: repeat(2, 1fr); } }

/* themed rails (bounded horizontal — still a clear end) */
.railsec { margin: 30px 0; }
.rail { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 4px 14px; margin: 0 -4px;
  scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.rail::-webkit-scrollbar { height: 8px; }
.rail::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 999px; }
.rail::-webkit-scrollbar-track { background: transparent; }
.rail .card { flex: 0 0 168px; scroll-snap-align: start; }

.endcap { text-align: center; color: var(--text-faint); font-size: 13px; padding: 30px 0 6px; font-style: italic;
  font-family: var(--font-display); }

/* trust flags */
.flag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.flag .x { width: 14px; height: 14px; }
.flag.bomb { color: var(--gold); background: rgba(246,181,60,.13); border: 1px solid rgba(246,181,60,.3); }
.flag.divisive { color: var(--heat-soft); background: rgba(255,94,58,.12); border: 1px solid rgba(255,94,58,.28); }
.flag.crowd { color: var(--sprout); background: rgba(155,214,75,.13); border: 1px solid rgba(155,214,75,.3); }

.flags { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 6px; }
.flagrow { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.flagrow .x { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.flagrow b { display: block; font-size: 13.5px; }
.flagrow span { font-size: 12.5px; color: var(--text-mute); }
.flagrow.bomb { border-left: 3px solid var(--gold); } .flagrow.bomb .x { color: var(--gold); }
.flagrow.divisive { border-left: 3px solid var(--heat); } .flagrow.divisive .x { color: var(--heat); }
.flagrow.crowd { border-left: 3px solid var(--sprout); } .flagrow.crowd .x { color: var(--sprout); }

/* source-row weight/tag meta */
.srmeta { display: flex; align-items: center; gap: 8px; margin-top: 5px; font-size: 11px; color: var(--text-mute); }
.stag { font-weight: 700; text-transform: capitalize; padding: 1px 7px; border-radius: 5px; }
.stag.critics { color: var(--gold-soft); background: rgba(246,181,60,.12); }
.stag.audience { color: var(--heat-soft); background: rgba(255,94,58,.1); }

.tag.soft { color: var(--text-mute); background: transparent; border-style: dashed; }

/* distribution chart */
.distrib { width: 100%; height: auto; margin: 2px 0 4px; }
.distrib .axt { font: 600 11px var(--font-num); fill: var(--text-mute); }
.distrib .mkt { font: 800 11px var(--font-num); fill: #1a1206; }

/* onboarding finish */
.obdone { text-align: center; padding: 18px 0 8px; }
.obdone p { color: var(--text-dim); max-width: 42ch; margin: 14px auto 0; }

/* spoiler-safe: hide scores until hover */
body.spoiler .scorepair, body.spoiler .fscores, body.spoiler .modal .dials { filter: blur(8px); opacity: .65; transition: .22s; }
body.spoiler .card:hover .scorepair, body.spoiler .featured:hover .fscores, body.spoiler .modal:hover .dials { filter: none; opacity: 1; }

/* lens slider dimmed in all-time mode */
.lens-slider.off { opacity: .4; pointer-events: none; }

/* poster sizing everywhere + backdrop clip (fixes title bleed) */
.poster-svg, img.real { display: block; width: 100%; height: 100%; object-fit: cover; }
.modal .hd .backdrop { overflow: hidden; }
.modal .hd .backdrop .poster-svg { width: 100%; height: 100%; }

/* source ledger refinements */
.srow .slogo { font-size: 9px; letter-spacing: -.3px; overflow: hidden; line-height: 1; padding: 0 1px; }
.srow .barcell { min-width: 0; }
.srmeta .norm { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.srmeta .wt { color: var(--text-faint); }
.srow .votes b { display: block; line-height: 1.1; }
.srow .votes span { display: block; font-size: 11px; color: var(--text-mute); }
.srow .votes .na { font-size: 11px; color: var(--text-faint); }

/* ---------------------------------------------------- responsive */
@media (max-width: 880px) {
  .featured { grid-template-columns: 150px 1fr; gap: 18px; padding: 16px; }
  .modal .hd { grid-template-columns: 150px 1fr; gap: 18px; padding: 20px; }
  .srow { grid-template-columns: 120px 52px 1fr 54px; gap: 10px; }
  .search { display: none; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 18px 14px; }
  /* compact single-row nav: brand · scrollable tabs · icon-only actions */
  .nav .wrap { gap: 10px; }
  .nav-spacer { display: none; }
  .brand { flex: 0 0 auto; font-size: 19px; gap: 8px; }
  .tabs { flex: 1 1 auto; min-width: 0; margin-left: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 7px 11px; }
  #surprise, #meBtn { font-size: 0; gap: 0; padding: 9px; flex: 0 0 auto; }
  #surprise svg, #meBtn svg { width: 18px; height: 18px; }
  .lensbar { gap: 16px; }
  .featured { grid-template-columns: 110px 1fr; }
  .modal .hd { grid-template-columns: 110px 1fr; }
  .modal .dials { gap: 16px; }
  .srow { grid-template-columns: 96px 46px 1fr; }
  .srow .votes { display: none; }
  .hero { padding: 36px 0 18px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
