/* Blog pages only (index + posts), loaded after styles.css.
   Articles sit on a light reading sheet that rises out of the dark hero: long
   text in grey on the purple wash was hard going past a few paragraphs. */
.qr-blog {
  --b-plum: #1f0a33;
  --b-paper: #fbf8ff;
  --b-ink: #24122f;
  --b-ink-soft: #5e4f6b;
  --b-rule: #e9e0f2;
  --b-purple: #6f23a8;
  --b-coin: #ffc700;
  --b-blue: #2e7cf6;
  --b-green: #17a34a;
  --b-yellow: #f5b400;
  --b-red: #e5484d;
  --b-display: "Bangers", "Lato", system-ui, sans-serif;
}

[data-tile="blue"] {
  --tile: var(--b-blue);
}
[data-tile="green"] {
  --tile: var(--b-green);
}
[data-tile="yellow"] {
  --tile: var(--b-yellow);
}
[data-tile="red"] {
  --tile: var(--b-red);
}

/* ─── Hero ──────────────────────────────────────────────────────────────── */
.qr-bhero {
  margin-top: -65px;
  padding: 128px 0 132px;
  background:
    radial-gradient(800px 480px at 8% 0%, rgba(46, 124, 246, 0.35), transparent 60%),
    radial-gradient(900px 520px at 92% 10%, rgba(196, 105, 227, 0.4), transparent 62%),
    var(--b-plum);
  color: #fff;
}

.qr-bhero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.qr-bhero__grid--solo {
  grid-template-columns: minmax(0, 760px);
}

.qr-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
}

.qr-crumbs li + li::before {
  content: "/";
  margin-right: 8px;
  opacity: 0.6;
}

.qr-crumbs a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.qr-crumbs a:hover {
  border-bottom-color: var(--b-coin);
}

/* The homepage's sticker type, scaled down and turned a little less so a long
   title stays readable. */
.qr-page .qr-bhero__title {
  font: 400 clamp(44px, 6.2vw, 76px) / 0.95 var(--b-display);
  letter-spacing: 1px;
  margin: 0 0 22px;
  transform: rotate(-1.5deg);
  transform-origin: left center;
  text-shadow:
    0 4px 0 #0d6adb,
    0 8px 0 #0a4596,
    0 24px 40px rgb(0 0 0 / 0.4);
}

.qr-bhero__lead {
  font-size: 20px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
  max-width: 34em;
  margin: 0 0 26px;
}

.qr-bhero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.qr-bhero__meta li {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 6px 12px;
}

.qr-bhero__art {
  position: relative;
  margin: 0;
}

.qr-bhero__art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 22px;
  border: 4px solid #fff;
  transform: rotate(2deg);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.65);
}

/* Four answer tiles peeking out from behind the photo: the game, in miniature. */
.qr-bhero__art::before {
  content: "";
  position: absolute;
  inset: auto auto -22px -22px;
  width: 92px;
  height: 92px;
  border-radius: 18px;
  background:
    linear-gradient(var(--b-blue) 0 0) 0 0 / 44px 44px no-repeat,
    linear-gradient(var(--b-green) 0 0) 48px 0 / 44px 44px no-repeat,
    linear-gradient(var(--b-yellow) 0 0) 0 48px / 44px 44px no-repeat,
    linear-gradient(var(--b-red) 0 0) 48px 48px / 44px 44px no-repeat;
  transform: rotate(-8deg);
  z-index: 1;
}

/* ─── Reading sheet ─────────────────────────────────────────────────────── */
.qr-sheet {
  position: relative;
  width: min(1180px, calc(100% - 48px));
  margin: -72px auto 0;
  background: var(--b-paper);
  color: var(--b-ink);
  border-radius: 32px;
  padding: 64px 48px 72px;
  box-shadow: 0 -10px 40px -20px rgb(0 0 0 / 0.5);
}

.qr-sheet__grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 700px);
  justify-content: center;
  gap: 64px;
}

/* ─── On this page ──────────────────────────────────────────────────────── */
.qr-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  font-size: 15px;
}

.qr-toc__title {
  font-weight: 900;
  margin: 0 0 12px;
  color: var(--b-ink);
}

.qr-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid var(--b-rule);
}

.qr-toc a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--b-ink-soft);
  text-decoration: none;
  line-height: 1.35;
}

.qr-toc a:hover {
  color: var(--b-purple);
}

.qr-toc a[aria-current="true"] {
  color: var(--b-purple);
  font-weight: 700;
  border-left-color: var(--b-purple);
}

/* ─── Article typography ────────────────────────────────────────────────── */
.qr-article {
  font-size: 18px;
  line-height: 1.7;
  min-width: 0;
}

.qr-article > :first-child {
  margin-top: 0;
}

.qr-page .qr-article h2 {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--b-ink);
  margin: 64px 0 14px;
  scroll-margin-top: 96px;
}

.qr-page .qr-article h3 {
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.2px;
  color: var(--b-ink);
  margin: 0 0 6px;
}

/* :where() keeps these at class-level specificity, so every component below
   (tags, tiles, cards) overrides them simply by coming later. */
.qr-article :where(p, li) {
  color: var(--b-ink);
}

.qr-article :where(p) {
  margin: 0 0 18px;
}

.qr-article :where(ul, ol) {
  padding-left: 1.3rem;
  margin: 0 0 22px;
}

.qr-article :where(li) {
  margin-bottom: 8px;
}

.qr-article a {
  color: var(--b-purple);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--b-purple) 35%, transparent);
}

.qr-article a:hover {
  text-decoration-color: var(--b-purple);
}

.qr-article :focus-visible,
.qr-toc :focus-visible,
.qr-qcard :focus-visible {
  outline: 3px solid var(--b-blue);
  outline-offset: 2px;
}

.qr-quick {
  background: #fff6cc;
  border-radius: 18px;
  padding: 22px 26px;
  margin: 0 0 40px;
}

.qr-quick p {
  font-size: 19px;
  margin: 0;
}

.qr-quick strong {
  display: block;
  margin-bottom: 4px;
}

/* ─── Recipe strip: the three slots of a short quiz ─────────────────────── */
.qr-recipe {
  list-style: none;
  padding: 0;
  margin: 8px 0 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  counter-reset: slot;
}

.qr-article .qr-recipe li {
  margin: 0;
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: #fff;
  border: 2px solid var(--b-rule);
  border-top: 8px solid var(--tile);
  font-size: 16px;
  line-height: 1.45;
}

.qr-recipe b {
  display: block;
  font: 400 26px/1 var(--b-display);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

/* ─── Rounds ────────────────────────────────────────────────────────────── */
.qr-round {
  margin-top: 72px;
}

.qr-round__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.qr-round__badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--tile);
  color: #fff;
  font: 400 34px/1 var(--b-display);
  transform: rotate(-4deg);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--tile) 60%, #000);
}

.qr-round__badge--dark {
  color: var(--b-ink);
}

.qr-page .qr-article .qr-round__head h2 {
  margin: 0;
}

.qr-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}

.qr-article .qr-tags li {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--b-ink-soft);
  background: #fff;
  border: 1px solid var(--b-rule);
  border-radius: 999px;
  padding: 3px 12px;
}

/* ─── Playable question card ────────────────────────────────────────────── */
.qr-qset {
  display: grid;
  gap: 18px;
  margin: 22px 0 0;
}

.qr-qcard {
  margin: 0;
  padding: 22px;
  border-radius: 22px;
  background:
    radial-gradient(500px 220px at 85% -20%, rgba(196, 105, 227, 0.55), transparent 70%),
    linear-gradient(160deg, #3d1263, #250a3d);
  color: #fff;
}

.qr-qcard__q {
  background: #fff;
  color: var(--b-ink);
  border-radius: 16px;
  padding: 16px 20px;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 6px 0 rgb(0 0 0 / 0.18);
}

.qr-qcard__opts {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.qr-article .qr-qcard__opts li {
  margin: 0;
}

.qr-qcard__opt {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font: 900 16px/1.25 "Lato", system-ui, sans-serif;
  color: #fff;
  background: var(--tile);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--tile) 55%, #000);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}

.qr-qcard__opt[data-tile="yellow"] {
  color: var(--b-ink);
}

/* A shape per tile as well as a colour, so the answers can be told apart
   without relying on hue. */
.qr-qcard__opt::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background: currentColor;
  opacity: 0.85;
}

.qr-qcard__opt[data-tile="blue"]::before {
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.qr-qcard__opt[data-tile="green"]::before {
  border-radius: 50%;
}
.qr-qcard__opt[data-tile="yellow"]::before {
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.qr-qcard__opt[data-tile="red"]::before {
  border-radius: 3px;
}

.qr-qcard__opts--tf .qr-qcard__opt {
  justify-content: center;
  font-size: 18px;
}

.qr-qcard__opts--tf .qr-qcard__opt::before {
  display: none;
}

/* Interactive only once blog.js has wired the card up. */
.qr-qcard[data-live] .qr-qcard__opt {
  cursor: pointer;
  transition:
    transform 0.12s ease,
    opacity 0.2s ease,
    filter 0.2s ease;
}

.qr-qcard[data-live] .qr-qcard__opt:hover {
  transform: translateY(-2px);
}

.qr-qcard[data-answered] .qr-qcard__opt {
  cursor: default;
  transform: none;
}

.qr-qcard[data-answered] .qr-qcard__opt:not([data-correct]) {
  opacity: 0.38;
  filter: saturate(0.4);
}

.qr-qcard[data-answered] .qr-qcard__opt[data-picked]:not([data-correct]) {
  opacity: 0.75;
  animation: qr-shake 0.35s ease;
}

.qr-qcard[data-answered] .qr-qcard__opt[data-correct] {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.qr-qcard[data-answered] .qr-qcard__opt[data-correct]::after {
  content: "✓";
  margin-left: auto;
  font-size: 20px;
}

.qr-qcard[data-answered] .qr-qcard__opt[data-picked]:not([data-correct])::after {
  content: "✗";
  margin-left: auto;
  font-size: 20px;
}

@keyframes qr-shake {
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.qr-qcard__reveal {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.5;
}

.qr-qcard__reveal summary {
  cursor: pointer;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

.qr-qcard__reveal p {
  color: #fff;
  margin: 8px 0 0;
}

.qr-qcard__verdict {
  font-weight: 900;
}

/* Once JS is in charge the tiles are the control; the summary would only
   duplicate them. */
.qr-qcard[data-live] .qr-qcard__reveal summary {
  display: none;
}

.qr-qcard[data-live] .qr-qcard__reveal:not([open]) {
  display: none;
}

/* ─── Fill-in prompts (your own company round) ──────────────────────────── */
.qr-prompts {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}

.qr-article .qr-prompts li {
  margin: 0;
  background: #fff;
  border: 2px dashed #d7c6e8;
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 700;
}

.qr-prompts__hint {
  display: block;
  font-weight: 400;
  font-size: 15px;
  color: var(--b-ink-soft);
  margin-top: 4px;
}

.qr-blank {
  background: var(--b-coin);
  border-radius: 4px;
  padding: 0 6px;
  font-weight: 900;
}

/* ─── Activity cards (games, ice breakers) ──────────────────────────────── */
.qr-acts {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.qr-article .qr-acts > li {
  margin: 0;
  background: #fff;
  border: 1px solid var(--b-rule);
  border-left: 6px solid var(--tile);
  border-radius: 16px;
  padding: 18px 22px;
}

.qr-article .qr-acts p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
}

.qr-article .qr-acts .qr-tags {
  margin: 10px 0 0;
}

/* ─── Steps (genuinely a sequence) ──────────────────────────────────────── */
.qr-step-h {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.qr-step-h__n {
  font: 400 52px/0.8 var(--b-display);
  color: var(--b-purple);
}

.qr-script {
  background: #fff;
  border: 1px solid var(--b-rule);
  border-radius: 18px;
  padding: 22px 26px 8px;
  margin: 0 0 24px;
}

/* ─── Pitch ─────────────────────────────────────────────────────────────── */
.qr-pitch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 24px;
  align-items: center;
  margin: 56px 0;
  padding: 28px;
  border-radius: 24px;
  background:
    radial-gradient(500px 300px at 0% 0%, rgba(46, 124, 246, 0.35), transparent 60%),
    #2a0b45;
  color: #fff;
}

.qr-article .qr-pitch p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 16px;
  font-size: 17px;
}

.qr-article .qr-pitch .qr-pitch__title {
  color: #fff;
  margin: 0 0 8px;
  font: 400 34px/1 var(--b-display);
  letter-spacing: 0.5px;
}

.qr-pitch img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  transform: rotate(3deg);
  border: 3px solid #fff;
}

.qr-article .qr-pitch .qr-btn {
  color: var(--b-ink);
  text-decoration: none;
  background: var(--b-coin);
  border-color: var(--b-coin);
}

/* ─── FAQ ───────────────────────────────────────────────────────────────── */
.qr-faq details {
  border-bottom: 1px solid var(--b-rule);
  padding: 4px 0;
}

.qr-faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  font-weight: 900;
  font-size: 19px;
}

.qr-faq summary::-webkit-details-marker {
  display: none;
}

.qr-faq summary::after {
  content: "+";
  font-size: 26px;
  line-height: 0.9;
  color: var(--b-purple);
}

.qr-faq details[open] summary::after {
  content: "–";
}

.qr-faq details p {
  margin: 0 0 16px;
  color: var(--b-ink-soft);
}

/* ─── Related posts ─────────────────────────────────────────────────────── */
.qr-related {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}

.qr-article .qr-related li {
  margin: 0;
}

.qr-related a {
  display: block;
  text-decoration: none;
  color: var(--b-ink);
  font-weight: 900;
  font-size: 17px;
  line-height: 1.3;
}

.qr-related img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 10px;
}

.qr-related a:hover span {
  color: var(--b-purple);
}

/* ─── Index ─────────────────────────────────────────────────────────────── */
.qr-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  text-decoration: none;
  color: var(--b-ink);
  margin-bottom: 56px;
}

.qr-feature img,
.qr-pcard img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 20px;
}

.qr-page .qr-feature h2 {
  font-size: 38px;
  line-height: 1.08;
  margin: 10px 0 12px;
}

.qr-feature p,
.qr-pcard p {
  color: var(--b-ink-soft);
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
}

.qr-pill {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: var(--b-ink-soft);
  background: #fff;
  border: 1px solid var(--b-rule);
  border-radius: 999px;
  padding: 3px 12px;
}

.qr-pgrid {
  list-style: none;
  padding: 36px 0 0;
  margin: 0;
  border-top: 2px solid var(--b-rule);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.qr-pcard a {
  display: block;
  text-decoration: none;
  color: var(--b-ink);
}

.qr-page .qr-pcard h3 {
  font-size: 22px;
  line-height: 1.2;
  margin: 14px 0 8px;
}

.qr-feature:hover h2,
.qr-pcard a:hover h3 {
  color: var(--b-purple);
}

.qr-feature:focus-visible,
.qr-pcard a:focus-visible {
  outline: 3px solid var(--b-blue);
  outline-offset: 6px;
  border-radius: 20px;
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .qr-sheet__grid {
    grid-template-columns: minmax(0, 700px);
  }

  .qr-toc {
    display: none;
  }
}

@media (max-width: 860px) {
  .qr-bhero {
    padding: 112px 0 112px;
  }

  .qr-bhero__grid,
  .qr-feature {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .qr-bhero__art {
    max-width: 460px;
    margin-left: 22px;
  }

  .qr-sheet {
    width: calc(100% - 24px);
    margin-top: -64px;
    padding: 40px 20px 56px;
    border-radius: 24px;
  }

  .qr-article {
    font-size: 17px;
  }

  .qr-page .qr-article h2 {
    font-size: 26px;
  }

  .qr-recipe,
  .qr-pgrid,
  .qr-acts {
    grid-template-columns: 1fr;
  }

  .qr-pitch {
    grid-template-columns: 1fr;
  }

  .qr-pitch img {
    display: none;
  }
}

@media (max-width: 480px) {
  .qr-qcard {
    padding: 16px;
  }

  .qr-qcard__opts {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qr-qcard[data-live] .qr-qcard__opt,
  .qr-qcard[data-answered] .qr-qcard__opt[data-picked] {
    transition: none;
    animation: none;
  }
}
