/*!
 * Appbizy - design system
 * Dark, layered, "cosmic arcade" art direction. No framework, no resets library.
 */

/* ============================================================ 1. tokens === */

:root {
  /* surfaces */
  --void: #05060d;
  --deep: #090b16;
  --panel: #101426;
  --panel-2: #161b30;
  --line: rgba(150, 170, 255, 0.13);
  --line-soft: rgba(150, 170, 255, 0.07);

  /* text */
  --ink: #eef1ff;
  --ink-2: #b7bede;
  --ink-3: #7e87a8;

  /* accents */
  --hue: 258;
  /* the Appbizy purple, taken from the logo. Fixed on purpose: --hue changes per
     category and quiz, but the brand must not change colour with it. */
  --brand-hue: 272;
  --brand: hsl(var(--brand-hue) 72% 62%);
  --cyan: #3ddcff;
  --gold: #ffc857;
  --good: #37e0a5;
  --bad: #ff5f7e;

  /* geometry */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 34px;
  --shell: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* elevation */
  --lift: 0 24px 60px -28px rgba(0, 0, 0, 0.95);
  --glass: inset 0 1px 0 rgba(255, 255, 255, 0.06);

  --head-h: 68px;
}

/* ============================================================= 2. base === */

*,
*::before,
*::after {
  box-sizing: border-box;

  /* Custom properties resolve var() where they are declared, so the accent trio
     is re-declared on every element: any ancestor can set --hue and the whole
     subtree recolours. This is what gives each category and quiz its own light. */
  --accent: hsl(var(--hue) 96% 68%);
  --accent-deep: hsl(var(--hue) 88% 56%);
  --accent-soft: hsl(var(--hue) 96% 68% / 0.16);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  /* `clip` trims the artwork that bleeds past the edges without turning body
     into a scroll container; `hidden` is the fallback for older engines. */
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: Sora, system-ui, sans-serif;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--accent);
  color: #06070f;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 22px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -70px;
  z-index: 99;
  background: var(--accent);
  color: #07070f;
  padding: 10px 18px;
  border-radius: 0 0 12px 12px;
  font-weight: 700;
  transition: top 0.2s;
}
.skip:focus {
  top: 0;
}

/* ==================================================== 3. atmosphere ====== */

.atmos {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 78% -10%, hsl(var(--hue) 90% 30% / 0.5) 0%, transparent 55%),
    radial-gradient(90% 60% at 8% 0%, rgba(0, 190, 255, 0.22) 0%, transparent 50%),
    radial-gradient(120% 90% at 50% 110%, hsl(calc(var(--hue) + 40) 80% 30% / 0.3) 0%, transparent 60%),
    linear-gradient(180deg, #070811 0%, var(--void) 40%, #04050b 100%);
}

.atmos::before {
  /* fine engineering grid, faded toward the edges */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(160, 180, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 180, 255, 0.06) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(80% 60% at 50% 20%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(80% 60% at 50% 20%, #000 0%, transparent 78%);
}

.atmos::after {
  /* star dust */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1.2px 1.2px at 72% 12%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.6px 1.6px at 42% 42%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1.2px 1.2px at 88% 55%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1.3px 1.3px at 24% 72%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1.1px 1.1px at 62% 84%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 6% 52%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1.2px 1.2px at 94% 30%, rgba(255, 255, 255, 0.35), transparent);
  opacity: 0.9;
  animation: twinkle 9s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from {
    opacity: 0.5;
  }
  to {
    opacity: 1;
  }
}

/* ======================================================== 4. header ====== */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--head-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  background: linear-gradient(180deg, rgba(6, 8, 18, 0.92), rgba(6, 8, 18, 0.6));
  border-bottom: 1px solid var(--line-soft);
}

.site-head__in {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: Sora, system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  flex: none;
}

/* `.brand .brand__mark` rather than `.brand__mark`: the generic `.emblem` rule
   below sets colour at the same specificity and would win on source order. */
.brand .brand__mark {
  width: 32px;
  height: 32px;
  color: var(--brand);
  filter: drop-shadow(0 0 12px hsl(var(--hue) 96% 66% / 0.75));
  transition: transform 0.5s var(--ease), filter 0.4s;
}

.brand__mark .e-fill {
  opacity: 0.5;
}

/* the mark is a letterform, so it lifts instead of spinning */
.brand:hover .brand__mark {
  transform: translateY(-2px) scale(1.07);
  filter: drop-shadow(0 0 18px hsl(var(--brand-hue) 90% 70% / 0.95));
}

.brand__name em {
  font-style: normal;
  color: var(--brand);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

/* `:not(.btn)` matters: `.nav a` outranks `.btn--primary` on specificity, so
   without it the call-to-action inherits muted link colour and turns into
   light-on-light text. */
.nav a:not(.btn) {
  padding: 8px 14px;
  border-radius: 99px;
  color: var(--ink-2);
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.nav a:not(.btn):hover,
.nav a:not(.btn)[aria-current="page"] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  align-items: center;
  justify-content: center;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav-toggle span::before {
  transform: translateY(-6px);
}
.nav-toggle span::after {
  transform: translateY(4px);
}
.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}
.nav-toggle[aria-expanded="true"] span::before {
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span::after {
  transform: rotate(-45deg) translateY(-1px);
}

/* ======================================================= 5. buttons ====== */

.btn {
  --btn-bg: rgba(255, 255, 255, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 99px;
  font-family: Sora, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  background: var(--btn-bg);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.09);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, hsl(calc(var(--hue) + 34) 92% 60%) 100%);
  border-color: transparent;
  color: #080812;
  font-weight: 700;
  box-shadow: 0 12px 34px -12px hsl(var(--hue) 96% 60% / 0.9), var(--glass);
}

.btn--primary:hover {
  background: linear-gradient(135deg, hsl(var(--hue) 100% 74%) 0%, hsl(calc(var(--hue) + 34) 96% 66%) 100%);
  box-shadow: 0 18px 44px -12px hsl(var(--hue) 96% 62% / 1);
}

.btn--lg {
  padding: 17px 34px;
  font-size: 1.05rem;
}

.btn--sm {
  padding: 10px 18px;
  font-size: 0.88rem;
}

.btn__arrow {
  transition: transform 0.25s var(--ease);
}
.btn:hover .btn__arrow {
  transform: translateX(4px);
}

/* ========================================================== 6. bits ====== */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: Sora, system-ui, sans-serif;
  /* stays above 12px once the body drops to 16px on small screens */
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

.chip--accent {
  border-color: hsl(var(--hue) 96% 68% / 0.4);
  background: var(--accent-soft);
  color: hsl(var(--hue) 96% 82%);
}

.chip--gold {
  border-color: rgba(255, 200, 87, 0.4);
  background: rgba(255, 200, 87, 0.12);
  color: var(--gold);
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* emblem artwork ---------------------------------------------------------- */

.emblem {
  color: var(--accent);
  overflow: visible;
}

.emblem .e-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.emblem .e-fill {
  fill: currentColor;
  opacity: 0.15;
  stroke: none;
}

.emblem .e-hot {
  fill: currentColor;
  opacity: 0.9;
  stroke: none;
}

/* solid brand mark: traced outlines, so the counters need even-odd */
.emblem .e-mark {
  fill: currentColor;
  fill-rule: evenodd;
  stroke: none;
}

.emblem--glow {
  filter: drop-shadow(0 0 18px hsl(var(--hue) 96% 62% / 0.55))
    drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
}

/* section framing --------------------------------------------------------- */

.section {
  position: relative;
  padding: 92px 0;
}

.section__head {
  max-width: 640px;
  margin-bottom: 46px;
}

.section__title {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  margin: 16px 0 14px;
}

.section__lead {
  color: var(--ink-2);
  font-size: 1.05rem;
  margin: 0;
}

.section__head--split {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.section__head--split > div {
  max-width: 640px;
}

/* ============================================================ 7. hero === */

.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: center;
  padding: 70px 0 40px;
  overflow: hidden;
}

.hero__in {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 30px;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 22px;
}

.hero__copy {
  position: relative;
  z-index: 3;
  max-width: 620px;
}

.hero__title {
  font-size: clamp(2.7rem, 7.2vw, 4.9rem);
  font-weight: 800;
  margin: 20px 0 22px;
}

.hero__title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent) 0%, var(--cyan) 55%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 26px hsl(var(--hue) 96% 60% / 0.5));
}

.hero__lead {
  font-size: 1.14rem;
  color: var(--ink-2);
  max-width: 520px;
  margin-bottom: 32px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 40px;
}

.hero__stats {
  display: flex;
  gap: 38px;
  flex-wrap: wrap;
}

.stat__n {
  font-family: Sora, system-ui, sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(180deg, #fff, var(--ink-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat__l {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 4px;
}

/* the stage: main visual object ------------------------------------------ */

.stage {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.stage__glow {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 45%,
    hsl(var(--hue) 96% 66% / 0.55) 0%,
    hsl(var(--hue) 96% 50% / 0.16) 38%,
    transparent 68%
  );
  filter: blur(14px);
  animation: pulse 7s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.07);
    opacity: 1;
  }
}

.stage__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.stage__ring--1 {
  inset: 8%;
  border-color: hsl(var(--hue) 90% 70% / 0.28);
  animation: spin 26s linear infinite;
}

.stage__ring--2 {
  inset: 20%;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.14);
  animation: spin 34s linear reverse infinite;
}

.stage__ring--3 {
  inset: -2%;
  border-color: rgba(255, 255, 255, 0.07);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.stage__core {
  position: relative;
  width: 46%;
  color: #fff;
  filter: drop-shadow(0 0 34px hsl(var(--hue) 96% 64% / 0.8));
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(-8px);
  }
  50% {
    transform: translateY(10px);
  }
}

/* small emblems orbiting the core */
.stage__sat {
  position: absolute;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(24, 28, 50, 0.92), rgba(11, 13, 26, 0.86));
  box-shadow: var(--lift), var(--glass);
  backdrop-filter: blur(8px);
  animation: float 9s ease-in-out infinite;
}

.stage__sat svg {
  width: 30px;
  height: 30px;
}

.stage__sat--a {
  top: 6%;
  left: 8%;
  --hue: 190;
  animation-delay: -1.5s;
}
.stage__sat--b {
  top: 34%;
  right: 0%;
  --hue: 330;
  animation-delay: -3.5s;
}
.stage__sat--c {
  bottom: 10%;
  left: 18%;
  --hue: 44;
  animation-delay: -5.5s;
}
.stage__sat--d {
  bottom: 20%;
  right: 10%;
  --hue: 142;
  animation-delay: -7s;
}

.stage__sat .emblem {
  color: var(--accent);
  filter: drop-shadow(0 0 10px hsl(var(--hue) 96% 62% / 0.7));
}

/* drifting specks */
.motes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.mote {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: hsl(var(--hue) 96% 78%);
  box-shadow: 0 0 12px 2px hsl(var(--hue) 96% 68% / 0.7);
  animation: rise linear infinite;
}

@keyframes rise {
  from {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  15% {
    opacity: 0.9;
  }
  to {
    transform: translateY(-320px) scale(0.3);
    opacity: 0;
  }
}

/* ===================================================== 8. home blocks === */

/* featured: intentionally uneven — one tall panel, two wide ones */
.featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
}

.feature {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 28px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(24, 28, 52, 0.85) 0%, rgba(9, 11, 22, 0.9) 62%);
  box-shadow: var(--lift), var(--glass);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--ease), border-color 0.35s;
}

.feature::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -110px;
  top: -130px;
  border-radius: 50%;
  background: radial-gradient(circle, hsl(var(--hue) 96% 60% / 0.42), transparent 66%);
  transition: transform 0.5s var(--ease), opacity 0.4s;
  z-index: -1;
}

.feature:hover {
  transform: translateY(-6px);
  border-color: hsl(var(--hue) 96% 66% / 0.45);
}

.feature:hover::before {
  transform: scale(1.25);
}

.feature__art {
  position: absolute;
  right: -18px;
  top: -14px;
  width: 190px;
  height: 190px;
  opacity: 0.95;
  transition: transform 0.5s var(--ease);
  z-index: -1;
}

.feature:hover .feature__art {
  transform: translateY(6px) rotate(-6deg) scale(1.06);
}

.feature__rank {
  font-family: Sora, system-ui, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.feature__title {
  font-size: 1.5rem;
}

.feature__desc {
  color: var(--ink-2);
  font-size: 0.95rem;
  margin: 0;
  max-width: 46ch;
}

.feature__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.feature--lead {
  grid-row: span 2;
  min-height: 430px;
  padding: 34px;
}

.feature--lead .feature__title {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
}

.feature--lead .feature__art {
  width: 330px;
  height: 330px;
  right: -60px;
  top: 4px;
}

.feature--lead .feature__desc {
  font-size: 1.02rem;
}

/* category portals -------------------------------------------------------- */

.portals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.portal {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 20px 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(20, 24, 44, 0.8), rgba(9, 11, 21, 0.9));
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}

.portal::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.portal:hover {
  transform: translateY(-5px);
  border-color: hsl(var(--hue) 96% 66% / 0.42);
}

.portal:hover::after {
  opacity: 1;
}

.portal__art {
  position: relative;
  width: 46px;
  height: 46px;
  margin-bottom: 6px;
  transition: transform 0.35s var(--ease);
}

.portal:hover .portal__art {
  transform: translateY(-3px) scale(1.1);
}

/* oversized watermark of the same mark, bleeding out of the tile */
.portal__ghost {
  position: absolute;
  right: -34px;
  bottom: -38px;
  width: 132px;
  height: 132px;
  color: hsl(var(--hue) 96% 70%);
  opacity: 0.09;
  transition: transform 0.55s var(--ease), opacity 0.4s;
  pointer-events: none;
}

.portal:hover .portal__ghost {
  transform: rotate(-8deg) scale(1.14);
  opacity: 0.16;
}

.portal__name {
  position: relative;
  font-family: Sora, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.06rem;
}

.portal__n {
  position: relative;
  font-size: 0.82rem;
  color: var(--ink-3);
}

.portal__blurb {
  display: none;
}

/* the first tile of the home grid is deliberately twice the size */
.portals--feature .portal:first-child {
  grid-column: span 2;
  grid-row: span 2;
  justify-content: flex-end;
  padding: 30px;
}

.portals--feature .portal:first-child .portal__art {
  width: 64px;
  height: 64px;
}

.portals--feature .portal:first-child .portal__name {
  font-size: 1.6rem;
}

.portals--feature .portal:first-child .portal__ghost {
  width: 260px;
  height: 260px;
  right: -60px;
  bottom: -70px;
  opacity: 0.12;
}

.portals--feature .portal:first-child .portal__blurb {
  display: block;
  position: relative;
  color: var(--ink-2);
  font-size: 0.94rem;
  max-width: 40ch;
  margin-top: 4px;
}

/* quiz index: a game menu, not a card grid -------------------------------- */

.index-list {
  border-top: 1px solid var(--line-soft);
}

.index-row {
  position: relative;
  display: grid;
  grid-template-columns: 54px 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.25s, padding-left 0.3s var(--ease);
}

.index-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
  transform: scaleY(0.3);
  transition: opacity 0.25s, transform 0.3s var(--ease);
}

.index-row:hover {
  background: linear-gradient(90deg, hsl(var(--hue) 90% 60% / 0.1), transparent 70%);
  padding-left: 26px;
}

.index-row:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

.index-row__n {
  font-family: Sora, system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}

.index-row__art {
  width: 38px;
  height: 38px;
  transition: transform 0.3s var(--ease);
}

.index-row:hover .index-row__art {
  transform: scale(1.15) rotate(-5deg);
}

.index-row__title {
  font-family: Sora, system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.06rem;
  margin: 0;
}

.index-row__sub {
  font-size: 0.86rem;
  color: var(--ink-3);
  margin: 2px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.index-row__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  font-size: 0.82rem;
}

.index-row__go {
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.28s var(--ease);
}

.index-row:hover .index-row__go {
  opacity: 1;
  transform: translateX(0);
}

/* rank bands -------------------------------------------------------------- */

/* The three ranks are drawn as a staircase, not as three equal cards: each step
   sits lower than the next and gains weight, so the section reads as a climb
   even before the copy is read. */
.bands {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 26px;
  padding-top: 76px;
}

.bands__rail {
  position: absolute;
  inset: auto 8% 62px 8%;
  height: 1px;
  background: linear-gradient(
    90deg,
    hsl(200 96% 66% / 0.35),
    hsl(268 96% 68% / 0.5),
    hsl(42 96% 62% / 0.75)
  );
  transform: rotate(-4.6deg);
  transform-origin: left center;
  pointer-events: none;
}

.band-step {
  position: relative;
  padding: 30px 26px 32px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(22, 26, 48, 0.8), rgba(9, 11, 21, 0.92));
  overflow: hidden;
}

/* lit top edge, brightest on the left so the eye starts where the rank does */
.band-step__peg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, hsl(var(--hue) 96% 66%), hsl(var(--hue) 96% 66% / 0) 72%);
  box-shadow: 0 0 16px hsl(var(--hue) 96% 60% / 0.55);
}

.band-step__n {
  font-family: Sora, system-ui, sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.4px hsl(var(--hue) 96% 70% / 0.75);
}

.band-step h3 {
  font-size: 1.3rem;
  margin: 14px 0 8px;
}

.band-step p {
  color: var(--ink-2);
  font-size: 0.94rem;
  margin: 0;
}

.band-step--cool {
  --hue: 200;
  margin-bottom: -34px;
  opacity: 0.86;
}

.band-step--warm {
  --hue: 268;
  margin-bottom: 6px;
}

.band-step--gold {
  --hue: 42;
  margin-bottom: 46px;
  padding-block: 38px 40px;
  border-color: hsl(42 90% 62% / 0.32);
  background: linear-gradient(170deg, rgba(46, 36, 18, 0.72), rgba(11, 10, 20, 0.94));
  box-shadow: 0 30px 70px -40px rgba(255, 200, 87, 0.7);
}

.band-step--gold::after {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 87, 0.3), transparent 65%);
  pointer-events: none;
}

.band-step--gold .band-step__n {
  font-size: 3.1rem;
  color: hsl(42 96% 66% / 0.16);
}

.band-step--gold h3 {
  font-size: 1.55rem;
}

/* closing call to action -------------------------------------------------- */

.cta-band {
  position: relative;
  margin: 40px 0 90px;
  padding: 62px 44px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: linear-gradient(140deg, rgba(30, 24, 70, 0.9), rgba(9, 11, 22, 0.95));
  overflow: hidden;
  text-align: center;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: auto -10% -70% -10%;
  height: 320px;
  background: radial-gradient(60% 100% at 50% 0%, hsl(var(--hue) 96% 60% / 0.4), transparent 70%);
}

.cta-band h2 {
  position: relative;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  margin-bottom: 14px;
}

.cta-band p {
  position: relative;
  color: var(--ink-2);
  max-width: 540px;
  margin: 0 auto 28px;
}

.cta-band .btn {
  position: relative;
}

/* =================================================== 9. quiz page ======= */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.83rem;
  color: var(--ink-3);
  padding-top: 26px;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--ink-3);
  opacity: 0.5;
}

.breadcrumb [aria-current] {
  color: var(--ink-2);
}

.q-hero {
  position: relative;
  padding: 40px 0 60px;
  overflow: hidden;
}

.q-hero__in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  align-items: center;
  gap: 40px;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 22px;
}

.q-hero__copy {
  position: relative;
  z-index: 2;
}

.q-hero__title {
  font-size: clamp(2.2rem, 5.4vw, 3.6rem);
  margin: 18px 0 18px;
}

.q-hero__lead {
  color: var(--ink-2);
  font-size: 1.08rem;
  max-width: 560px;
}

.q-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 26px 0 30px;
}

.q-hero__art {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.q-hero__art .stage__core {
  width: 58%;
}

.best-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 12px;
  border-radius: 99px;
  border: 1px solid rgba(255, 200, 87, 0.35);
  background: rgba(255, 200, 87, 0.1);
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
}

.best-badge svg {
  width: 17px;
  height: 17px;
}

/* the arena --------------------------------------------------------------- */

.arena {
  position: relative;
  margin-bottom: 80px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(21, 25, 46, 0.86) 0%, rgba(8, 10, 20, 0.94) 70%);
  box-shadow: var(--lift), var(--glass);
  overflow: hidden;
}

.arena::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  width: 700px;
  height: 500px;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, hsl(var(--hue) 96% 58% / 0.22), transparent 70%);
  pointer-events: none;
}

.arena__top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 30px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.arena__count {
  font-family: Sora, system-ui, sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.arena__count b {
  color: var(--ink);
  font-size: 1.05rem;
}

.arena__score {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: Sora, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
}

.arena__score svg {
  width: 18px;
  height: 18px;
  color: var(--good);
}

.progress {
  position: relative;
  height: 5px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  width: 0;
  border-radius: 0 99px 99px 0;
  background: linear-gradient(90deg, var(--cyan), var(--accent));
  box-shadow: 0 0 18px hsl(var(--hue) 96% 62% / 0.9);
  transition: width 0.55s var(--ease);
}

.arena__body {
  position: relative;
  padding: 40px 30px 34px;
}

.q-text {
  font-family: Sora, system-ui, sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.95rem);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.02em;
  margin: 0 0 30px;
  max-width: 30ch;
}

.opts {
  display: grid;
  gap: 12px;
}

.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 17px 20px;
  text-align: left;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  font-size: 1.02rem;
  line-height: 1.4;
  transition: transform 0.22s var(--ease), border-color 0.22s, background 0.22s, box-shadow 0.22s;
}

.opt__key {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  font-family: Sora, system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-2);
  transition: all 0.22s;
}

.opt__mark {
  margin-left: auto;
  width: 22px;
  height: 22px;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.28s var(--ease);
}

.opt:not(:disabled):hover {
  transform: translateX(5px);
  border-color: hsl(var(--hue) 96% 68% / 0.55);
  background: hsl(var(--hue) 96% 62% / 0.1);
}

.opt:not(:disabled):hover .opt__key {
  color: var(--ink);
  border-color: hsl(var(--hue) 96% 68% / 0.6);
  background: var(--accent-soft);
}

.opt:disabled {
  cursor: default;
}

.opt--correct {
  border-color: rgba(55, 224, 165, 0.65);
  background: rgba(55, 224, 165, 0.12);
  box-shadow: 0 0 0 1px rgba(55, 224, 165, 0.25), 0 14px 34px -20px rgba(55, 224, 165, 0.9);
}

.opt--correct .opt__key {
  background: var(--good);
  border-color: transparent;
  color: #052018;
}

.opt--correct .opt__mark {
  opacity: 1;
  transform: scale(1);
  color: var(--good);
}

.opt--wrong {
  border-color: rgba(255, 95, 126, 0.6);
  background: rgba(255, 95, 126, 0.1);
  animation: shake 0.4s;
}

.opt--wrong .opt__key {
  background: var(--bad);
  border-color: transparent;
  color: #2b0710;
}

.opt--wrong .opt__mark {
  opacity: 1;
  transform: scale(1);
  color: var(--bad);
}

.opt--muted {
  opacity: 0.42;
}

@keyframes shake {
  20% {
    transform: translateX(-6px);
  }
  45% {
    transform: translateX(5px);
  }
  70% {
    transform: translateX(-3px);
  }
  100% {
    transform: translateX(0);
  }
}

.explain {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  transition: grid-template-rows 0.45s var(--ease), opacity 0.35s, margin-top 0.35s;
}

.explain[data-open="true"] {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 20px;
}

.explain__in {
  overflow: hidden;
}

.explain__box {
  display: flex;
  gap: 15px;
  padding: 19px 22px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: linear-gradient(100deg, hsl(var(--hue) 90% 55% / 0.12), rgba(255, 255, 255, 0.02));
}

.explain__icon {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--accent);
  margin-top: 2px;
}

.explain__verdict {
  font-family: Sora, system-ui, sans-serif;
  font-weight: 700;
  display: block;
  margin-bottom: 3px;
}

.explain__verdict[data-good="true"] {
  color: var(--good);
}
.explain__verdict[data-good="false"] {
  color: var(--bad);
}

.explain p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.97rem;
}

.arena__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 30px 32px;
  min-height: 20px;
}

.arena__hint {
  font-size: 0.82rem;
  color: var(--ink-3);
}

.arena__hint kbd {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  font-family: inherit;
  font-size: 0.78rem;
}

.is-hidden {
  display: none !important;
}

/* start gate -------------------------------------------------------------- */

.gate {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 66px 30px 70px;
  text-align: center;
}

.gate h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
}

.gate p {
  color: var(--ink-2);
  max-width: 460px;
  margin: 10px 0 26px;
}

/* result ------------------------------------------------------------------ */

.result {
  position: relative;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: center;
  gap: 44px;
  padding: 52px 40px 46px;
}

.ring {
  position: relative;
  display: grid;
  place-items: center;
}

.ring svg {
  width: 100%;
  transform: rotate(-90deg);
}

.ring__track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 9;
}

.ring__bar {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  transition: stroke-dashoffset 1.3s var(--ease);
  filter: drop-shadow(0 0 10px hsl(var(--hue) 96% 62% / 0.9));
}

.ring__num {
  position: absolute;
  text-align: center;
}

.ring__num b {
  display: block;
  font-family: Sora, system-ui, sans-serif;
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1;
}

.ring__num span {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.result__band {
  font-size: clamp(2rem, 4.6vw, 3rem);
  margin: 12px 0 12px;
}

.result__msg {
  color: var(--ink-2);
  font-size: 1.05rem;
  max-width: 46ch;
}

.result__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 26px;
}

.result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

#confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

/* related ----------------------------------------------------------------- */

.related {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.rel-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(22, 26, 48, 0.8), rgba(9, 11, 21, 0.9));
  overflow: hidden;
  transition: transform 0.32s var(--ease), border-color 0.32s;
}

.rel-card::before {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, hsl(var(--hue) 96% 60% / 0.35), transparent 68%);
  transition: transform 0.5s var(--ease);
}

.rel-card:hover {
  transform: translateY(-6px);
  border-color: hsl(var(--hue) 96% 66% / 0.45);
}

.rel-card:hover::before {
  transform: scale(1.3);
}

.rel-card__art {
  width: 44px;
  height: 44px;
}

.rel-card h3 {
  font-size: 1.16rem;
}

.rel-card p {
  font-size: 0.9rem;
  color: var(--ink-3);
  margin: 0;
}

.rel-card__go {
  margin-top: auto;
  padding-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

/* ============================================== 10. editorial pages ===== */

.page-hero {
  position: relative;
  padding: 60px 0 46px;
  overflow: hidden;
}

/* oversized decorative mark, cropped by the viewport edge */
.page-hero__deco {
  position: absolute;
  right: -70px;
  top: -30px;
  width: 380px;
  height: 380px;
  color: hsl(var(--hue) 96% 68%);
  opacity: 0.13;
  filter: drop-shadow(0 0 60px hsl(var(--hue) 96% 60% / 0.5));
  animation: float 11s ease-in-out infinite;
  pointer-events: none;
}

@media (max-width: 900px) {
  .page-hero__deco {
    width: 240px;
    height: 240px;
    right: -80px;
    opacity: 0.08;
  }
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5.2vw, 3.4rem);
  margin: 16px 0 16px;
}

.page-hero p {
  color: var(--ink-2);
  font-size: 1.08rem;
  max-width: 640px;
  margin: 0;
}

.prose {
  max-width: 760px;
  padding-bottom: 90px;
  color: var(--ink-2);
}

.prose h2 {
  font-size: 1.5rem;
  color: var(--ink);
  margin: 44px 0 14px;
}

.prose h3 {
  font-size: 1.14rem;
  color: var(--ink);
  margin: 30px 0 10px;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2em;
}

.prose ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 9px;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}

.prose strong {
  color: var(--ink);
}

.note-panel {
  margin: 30px 0;
  padding: 22px 24px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.03);
}

.note-panel p:last-child {
  margin-bottom: 0;
}

/* editorial block on a quiz page ------------------------------------------ */

.insight {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  align-items: start;
  gap: 34px;
  padding-bottom: 90px;
}

.insight__copy {
  color: var(--ink-2);
  font-size: 1.02rem;
}

.insight__copy p {
  margin: 0;
  max-width: 62ch;
}

.insight__copy .note-panel {
  margin-bottom: 0;
}

.insight__facts {
  position: relative;
  padding: 30px 30px 32px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(24, 28, 52, 0.82), rgba(9, 11, 22, 0.92));
  box-shadow: var(--lift), var(--glass);
  /* the watermark below bleeds past this box on purpose */
  overflow: hidden;
}

/* oversized echo of the quiz emblem, sunk into the panel */
.insight__ghost {
  position: absolute;
  right: -46px;
  bottom: -52px;
  width: 190px;
  height: 190px;
  opacity: 0.07;
  pointer-events: none;
}

.insight__facts-title {
  position: relative;
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 20px;
}

.insight__facts ul {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: fact;
}

.insight__facts li {
  position: relative;
  counter-increment: fact;
  padding-left: 42px;
  margin-bottom: 18px;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.6;
}

.insight__facts li:last-child {
  margin-bottom: 0;
}

.insight__facts li::before {
  content: counter(fact);
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  font-family: Sora, system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: hsl(var(--hue) 96% 74%);
  background: hsl(var(--hue) 96% 60% / 0.14);
  border: 1px solid hsl(var(--hue) 96% 66% / 0.28);
}

/* ======================================================== 11. footer ==== */

.site-foot {
  position: relative;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(7, 9, 18, 0.4), rgba(4, 5, 12, 0.9));
  padding: 62px 0 30px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 44px;
}

.foot-about p {
  color: var(--ink-3);
  font-size: 0.92rem;
  max-width: 34ch;
  margin: 16px 0 0;
}

.foot-col h4 {
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
  font-weight: 600;
}

.foot-col li {
  margin-bottom: 10px;
}

.foot-col a {
  color: var(--ink-2);
  font-size: 0.93rem;
  transition: color 0.2s;
}

.foot-col a:hover {
  color: var(--accent);
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-3);
  font-size: 0.85rem;
}

/* ======================================================= 12. motion ===== */

/* Only hide-then-reveal when scripting is on, so a no-JS visitor (and any
   crawler that does not execute scripts) still sees every section. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* =================================================== 13. responsive ===== */

@media (max-width: 1040px) {
  .hero__in {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .hero {
    min-height: 0;
    padding-bottom: 20px;
  }
  .stage {
    max-width: 460px;
    margin: 10px auto 0;
    order: -1;
  }
  .hero__copy {
    max-width: none;
  }
  .featured {
    grid-template-columns: 1fr;
  }
  .feature--lead {
    grid-row: auto;
    min-height: 340px;
  }
  .portals {
    grid-template-columns: repeat(2, 1fr);
  }
  .portals--feature .portal:first-child {
    grid-row: span 1;
  }
  .q-hero__in {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .q-hero {
    padding-bottom: 34px;
  }
  .q-hero__art {
    max-width: 280px;
    width: 100%;
    order: -1;
    margin: 0 auto 6px;
  }
  .related {
    grid-template-columns: 1fr;
  }
  .insight {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .insight__facts {
    padding: 26px 24px 28px;
  }
  .insight__ghost {
    width: 150px;
    height: 150px;
    right: -36px;
    bottom: -42px;
  }
  .foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 780px) {
  body {
    font-size: 16px;
  }
  .nav-toggle {
    display: flex;
  }
  .nav {
    position: fixed;
    inset: var(--head-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px 18px 22px;
    background: rgba(7, 9, 18, 0.97);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    transition: transform 0.35s var(--ease);
    margin-left: 0;
  }
  .nav[data-open="true"] {
    transform: none;
  }
  .nav a:not(.btn) {
    padding: 13px 14px;
    border-radius: 12px;
    font-size: 1rem;
  }
  .nav .btn {
    margin-top: 8px;
    padding-block: 13px;
  }
  .section {
    padding: 62px 0;
  }
  /* The staircase only reads horizontally; stacked, it becomes a plain list. */
  .bands {
    grid-template-columns: 1fr;
    padding-top: 0;
    gap: 16px;
  }
  .bands__rail {
    display: none;
  }
  .band-step--cool,
  .band-step--warm,
  .band-step--gold {
    margin-bottom: 0;
    opacity: 1;
  }
  .band-step--gold {
    padding-block: 30px 32px;
  }
  .section__head--split {
    flex-direction: column;
    align-items: flex-start;
  }
  .index-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 15px 8px;
  }
  .index-row__art,
  .index-row__meta,
  .index-row__go {
    display: none;
  }
  .arena__top,
  .arena__body,
  .arena__foot {
    padding-inline: 20px;
  }
  .arena__body {
    padding-top: 30px;
  }
  .arena__foot {
    justify-content: flex-end;
  }
  .arena__hint {
    display: none;
  }
  .result {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 40px 22px;
    text-align: center;
  }
  .ring {
    max-width: 190px;
    margin-inline: auto;
  }
  .result__msg {
    margin-inline: auto;
  }
  .result__stats,
  .result__actions {
    justify-content: center;
  }
  .cta-band {
    padding: 44px 22px;
  }
  .opt {
    padding: 15px 16px;
    gap: 13px;
    font-size: 0.98rem;
  }
  .foot-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero__stats {
    gap: 26px;
  }

  /* Comfortable touch targets: on a phone these links were only ~20px tall,
     well under the 24px WCAG minimum and far under what a thumb expects. */
  .foot-col li {
    margin-bottom: 0;
  }
  .foot-col a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }
  .breadcrumb a,
  .breadcrumb [aria-current] {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
  }
}

@media (max-width: 460px) {
  .portals {
    grid-template-columns: 1fr;
  }
  .portals--feature .portal:first-child {
    grid-column: span 1;
  }
  .hero__cta .btn {
    width: 100%;
  }
  .result__actions .btn {
    width: 100%;
  }
}
