/* BuffyQuiz.com – all presentation lives here. */

:root {
  --black: #000;
  --panel: #0e0e0e;
  --panel-2: #171717;
  --line: #2c2c2c;
  --red: #b3001b;
  --red-bright: #ff3348;
  --link: #ff5a6b;
  --text: #f3f1ee;
  --muted: #bdb8b2;
  --star-off: #474747;
  --radius: 999px;
  --gap: clamp(1rem, 3vw, 2rem);
  --font: "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: #140005;
  background-image:
    repeating-linear-gradient(45deg, rgba(179, 0, 27, .12) 0 2px, transparent 2px 18px),
    linear-gradient(90deg, #3d000b, #0f0003 30%, #0f0003 70%, #3d000b);
  background-attachment: fixed;
  -webkit-text-size-adjust: 100%;
}

body {
  max-width: 1200px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--black);
  color: var(--text);
  font: 1.125rem/1.65 var(--font);
  border-inline: 3px solid var(--red);
  box-shadow: 0 0 60px rgba(179, 0, 27, .45);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-underline-offset: .15em; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--red-bright); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font);
  line-height: 1.2;
  letter-spacing: .03em;
  margin: 1.4em 0 .5em;
}
h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-variant: small-caps;
  color: #fff;
  text-shadow: 0 0 1px var(--red), 2px 2px 0 var(--red);
  margin-top: .6em;
}
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); color: var(--red-bright); font-variant: small-caps; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .4em; }

p, ul, ol, dl, table { margin: 0 0 1em; }

.small { font-size: .9rem; color: var(--muted); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  background: var(--red); color: #fff;
  padding: .5rem 1rem; z-index: 200;
}
.skip-link:focus { top: 1rem; }

main, .breadcrumbs, .site-footer { padding-inline: var(--gap); }
main { padding-bottom: 3rem; }

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  padding: .45em 1.2em;
  border: 2px solid var(--red);
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #000; color: #fff; }
.button-alt { background: #000; }
.button-alt:hover { background: var(--red); }

.link-button {
  background: none; border: 0; padding: 0;
  color: var(--link); font: inherit; text-decoration: underline; cursor: pointer;
}

/* ---------- Header, banner and main nav ---------- */
/* The banner's bottom strip overlaps the nav so the stake tip points into it (22/1200 of the width). */
.banner { display: block; position: relative; z-index: 4; margin-bottom: -1.84%; pointer-events: none; }
.banner img { pointer-events: auto; }
.banner img { width: 100%; }

.main-nav {
  position: relative;
  z-index: 3;
  background: var(--black);
  border-block: 3px solid var(--red);
  padding: .75rem var(--gap);
}

.menu, .submenu { list-style: none; margin: 0; padding: 0; }

.menu {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: .5rem;
}

.menu > li { position: relative; display: flex; }

.menu a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: .35rem .9rem;
  border: 2px solid var(--red);
  border-radius: var(--radius);
  background: var(--black);
  color: #fff;
  font-size: .95rem;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}
.menu a:hover, .menu a:focus-visible { background: var(--red); }
.menu a[aria-current="page"], .menu a.in-section { background: var(--red); border-color: #fff; }

.has-sub > a { padding-right: 1.9rem; }
html:not(.js) .has-sub > a::after { content: "\25BE"; position: absolute; right: .8rem; }

.sub-toggle {
  position: absolute;
  right: .35rem; top: 50%;
  transform: translateY(-50%);
  width: 1.6rem; height: 1.6rem;
  border: 0; border-radius: 50%;
  background: transparent; color: #fff;
  font-size: .85rem; cursor: pointer;
}
.sub-toggle:hover { background: rgba(255, 255, 255, .15); }
.open > .sub-toggle { transform: translateY(-50%) rotate(180deg); }

.submenu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 18rem;
  padding: .5rem;
  background: var(--black);
  border: 2px solid var(--red);
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .8);
  z-index: 20;
}
.submenu li + li { margin-top: .35rem; }
.submenu a { justify-content: flex-start; text-align: left; min-height: 2.4rem; }

.menu li:focus-within > .submenu,
.menu li.open > .submenu { display: block; }
@media (hover: hover) {
  .menu li:hover > .submenu { display: block; }
}

.menu-toggle {
  display: none;
  width: 100%;
  padding: .6rem 1rem;
  border: 2px solid var(--red);
  border-radius: var(--radius);
  background: var(--black);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.menu-toggle::before { content: "\2630\00a0\00a0"; }
.menu-toggle[aria-expanded="true"]::before { content: "\2715\00a0\00a0"; }

/* Tablet: pills wrap onto two rows */
@media (max-width: 1024px) {
  .menu { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); }
}

/* Phone: stacked menu. Without JS it is always open. */
@media (max-width: 760px) {
  .menu { grid-template-columns: 1fr 1fr; }
  .menu > li { flex-wrap: wrap; }
  .submenu {
    position: static;
    width: 100%; max-width: none;
    margin-top: .4rem;
    box-shadow: none;
    display: block;
  }
  html:not(.js) .has-sub { grid-column: 1 / -1; }
  html:not(.js) .has-sub > a::after { content: none; }

  .sub-toggle { top: 1.375rem; }
  .js .menu-toggle { display: block; }
  .js .menu { display: none; grid-template-columns: 1fr; margin-top: .75rem; }
  .js .main-nav.open .menu { display: grid; }
  .js .submenu { display: none; }
  .js .menu li.open > .submenu { display: block; }
  .js .menu li:focus-within > .submenu { display: block; }
}
@media (max-width: 760px) and (hover: hover) {
  .js .menu li:hover > .submenu { display: none; }
  .js .menu li.open > .submenu { display: block; }
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs ol {
  display: flex; flex-wrap: wrap;
  list-style: none; margin: 0; padding: .9rem 0 0;
  font-size: .9rem; color: var(--muted);
}
.breadcrumbs li + li::before { content: "\203A"; margin: 0 .5em; color: var(--red-bright); }

/* ---------- Intros (image left, text right) ---------- */
.intro { display: flow-root; max-width: 75ch; }
.intro.has-image { max-width: none; }
.intro-img {
  float: left;
  width: min(40%, 380px);
  margin: .3rem 1.5rem 1rem 0;
  border: 2px solid var(--red);
}
@media (max-width: 600px) {
  .intro-img { float: none; width: 100%; margin: 0 0 1rem; }
}

/* ---------- Star ratings ---------- */
.rating { display: flex; align-items: center; gap: .5rem; margin: 0 0 .75rem; font-weight: bold; }
.out-of { color: var(--muted); font-weight: normal; }
.stars { position: relative; display: inline-block; font-size: 1.3rem; line-height: 1; color: var(--star-off); }
.stars::before { content: "\2605\2605\2605\2605\2605"; }
.stars::after {
  content: "\2605\2605\2605\2605\2605";
  position: absolute; left: 0; top: 0;
  overflow: hidden; white-space: nowrap;
  color: var(--red-bright);
  width: 0;
}
.s5::after { width: 10%; } .s10::after { width: 20%; } .s15::after { width: 30%; }
.s20::after { width: 40%; } .s25::after { width: 50%; } .s30::after { width: 60%; }
.s35::after { width: 70%; } .s40::after { width: 80%; } .s45::after { width: 90%; }
.s50::after { width: 100%; }

/* ---------- Homepage quiz list ---------- */
.sort-controls { display: flex; align-items: center; gap: .75rem; }
.sort-controls select {
  font: inherit; font-size: 1rem;
  padding: .35rem 2rem .35rem .8rem;
  background: var(--panel-2); color: var(--text);
  border: 2px solid var(--red); border-radius: var(--radius);
}

.quiz-list { list-style: none; padding: 0; }
.quiz + .quiz { margin-top: 1.5rem; }

.quiz-card {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 2fr 1fr 1fr;
  grid-template-areas:
    "shot title pros cons"
    "shot rating pros cons"
    "shot desc pros cons"
    "shot cta pros cons"
    "facts facts facts facts";
  grid-template-rows: auto auto 1fr auto auto;
  column-gap: 1.5rem;
  padding: 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
}
.quiz-card .shot { grid-area: shot; align-self: start; border: 1px solid var(--line); }
.quiz-card h3 { grid-area: title; margin: 0 0 .4rem; }
.quiz-card h3 a { color: #fff; text-decoration-color: var(--red); }
.quiz-card .rating { grid-area: rating; }
.quiz-desc { grid-area: desc; }
.quiz-desc p:last-child { margin-bottom: .75rem; }
.quiz-cta { grid-area: cta; margin: 0; }
.quiz-card .pros { grid-area: pros; }
.quiz-card .cons { grid-area: cons; }
.quiz-card .facts { grid-area: facts; margin: 1rem 0 0; }

.pros ul, .cons ul { list-style: none; padding: 0; margin: 0 0 1rem; font-size: 1rem; }
.pros li, .cons li { position: relative; padding-left: 1.4em; margin-bottom: .35em; }
.pros li::before, .cons li::before { position: absolute; left: 0; font-weight: bold; }
.pros li::before { content: "+"; color: #7ddc7a; }
.cons li::before { content: "\2212"; color: var(--red-bright); }

.facts { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .9rem; }
.facts div {
  display: flex; gap: .35em;
  padding: .2rem .8rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.facts dt { color: var(--muted); }
.facts dt::after { content: ":"; }
.facts dd { margin: 0; }

@media (max-width: 1024px) {
  .quiz-card {
    grid-template-columns: minmax(160px, 220px) 1fr 1fr;
    grid-template-areas:
      "shot title title"
      "shot rating rating"
      "shot desc desc"
      "shot cta cta"
      "pros pros cons"
      "facts facts facts";
    grid-template-rows: auto auto 1fr auto auto auto;
  }
  .quiz-card .pros, .quiz-card .cons { margin-top: 1rem; }
}
@media (max-width: 600px) {
  .quiz-card {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "rating" "shot" "desc" "pros" "cons" "cta" "facts";
    grid-template-rows: none;
  }
  .quiz-card .shot { margin-bottom: 1rem; }
  .quiz-card .pros, .quiz-card .cons { margin-top: 0; }
}

/* ---------- Learning resources tiles ---------- */
.tiles {
  list-style: none; padding: 0; margin: 2rem 0 0;
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.tile {
  display: flex; flex-direction: column;
  padding: 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
}
.tile h2 { margin: 0 0 .75rem; font-size: 1.4rem; }
.tile-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: .75rem; }
.tile p { font-size: 1rem; }
.tile p:last-child { margin-top: auto; margin-bottom: 0; }

/* ---------- Tables ---------- */
.listing { width: 100%; border-collapse: collapse; margin-top: 2rem; font-size: 1rem; }
.listing caption { text-align: left; font-size: 1.3rem; font-variant: small-caps; color: var(--red-bright); padding-bottom: .6rem; }
.listing th {
  text-align: left; padding: .6rem .8rem;
  background: var(--red); color: #fff; font-weight: normal; letter-spacing: .05em;
}
.listing td { padding: .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.listing tbody tr:nth-child(odd) { background: var(--panel); }
.listing .rating { margin: 0; }
.cell-img { width: 110px; }
.websites .cell-img { width: 200px; }
.listing td p { margin: .3em 0 0; }

@media (max-width: 700px) {
  .listing, .listing tbody, .listing tr, .listing td { display: block; width: 100%; }
  .listing thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .listing caption { display: block; }
  .listing tr { padding: .75rem; border: 1px solid var(--line); border-left: 4px solid var(--red); margin-bottom: 1rem; }
  .listing td { border: 0; padding: .3rem 0; }
  .listing td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  }
  .cell-img, .websites .cell-img { width: auto; }
  .cell-img img { max-width: 160px; }
  .websites .cell-img img { max-width: 100%; }
}

/* ---------- Review, event and study pages ---------- */
.review, .event {
  display: grid;
  grid-template-columns: minmax(200px, 320px) 1fr;
  column-gap: 2rem;
  align-items: start;
}
.review > *, .event > * { grid-column: 2; }
.review > h1, .event > h1 { grid-column: 1 / -1; }
.review > .cover, .event > .event-img { grid-column: 1; grid-row: 2 / span 5; border: 2px solid var(--red); }
.review-body, .event-body, .review .pros, .review .cons, .review .reviewed { grid-column: 1 / -1; }
.review-body, .event-body { max-width: 75ch; margin-top: 1rem; }
.review .pros, .review .cons { padding: 1rem 1.25rem; background: var(--panel); border-left: 4px solid var(--red); margin-bottom: 1rem; }
.review .pros h2, .review .cons h2 { margin-top: 0; font-size: 1.3rem; }
.lead { font-size: 1.2rem; }

.specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .3rem 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 1rem;
}
.specs div { display: contents; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.price { font-size: 1.4rem; font-weight: bold; margin-right: .75rem; }

@media (max-width: 700px) {
  .review, .event { display: block; }
  .review > .cover, .event > .event-img { max-width: 260px; margin-bottom: 1rem; }
}

.study-list { display: grid; gap: 1.5rem; margin-top: 2rem; }
.study { padding: 1.25rem; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--red); }
.study h2 { margin-top: 0; }

.trivia-list { counter-reset: trivia; list-style: none; padding: 0; margin-top: 2rem; }
.trivia-list li {
  counter-increment: trivia;
  position: relative;
  padding: 1rem 1rem 1rem 4rem;
  margin-bottom: .75rem;
  background: var(--panel);
  border-left: 4px solid var(--red);
}
.trivia-list li::before {
  content: counter(trivia);
  position: absolute; left: 1rem; top: .8rem;
  font-size: 1.6rem; color: var(--red-bright); font-variant: small-caps;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 3px solid var(--red);
  padding-block: 2rem;
  background: var(--panel);
}
.footer-menu, .footer-menu ul { list-style: none; margin: 0; padding: 0; }
.footer-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
}
.footer-menu > li > a { font-weight: bold; }
.footer-menu ul { margin-top: .3rem; font-size: .95rem; }
.footer-menu ul li { margin: .2rem 0; }
.footer-menu a { color: var(--text); }
.footer-menu a[aria-current="page"] { color: var(--red-bright); }

/* ---------- Cookie consent ---------- */
.consent {
  position: fixed;
  left: 50%; bottom: 1rem;
  transform: translateX(-50%);
  width: min(100% - 2rem, 44rem);
  padding: 1rem 1.25rem;
  background: var(--black);
  border: 2px solid var(--red);
  border-radius: 1rem;
  box-shadow: 0 0 40px rgba(0, 0, 0, .9);
  z-index: 100;
  font-size: 1rem;
}
.consent p { margin-bottom: .75rem; }
.consent-actions { margin: 0; display: flex; gap: .75rem; }

/* ---------- Phones: drop the side borders ---------- */
@media (max-width: 760px) {
  body { border-inline: 0; box-shadow: none; font-size: 1.0625rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
