:root {
  --bg: #080b10;
  --bg-soft: #0f141d;
  --panel: rgba(12, 16, 24, 0.82);
  --panel-strong: rgba(16, 22, 31, 0.94);
  --panel-border: rgba(131, 255, 162, 0.16);
  --line: rgba(120, 255, 174, 0.12);
  --text: #f7f0e6;
  --muted: #9aacb8;
  --acid: #90ff65;
  --cyan: #62defd;
  --orange: #ff8d5d;
  --red: #ff5f7c;
  --gold: #f5c66c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(98, 222, 253, 0.14), transparent 32%),
    radial-gradient(circle at 80% 14%, rgba(255, 95, 124, 0.16), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(144, 255, 101, 0.12), transparent 36%),
    linear-gradient(180deg, #06080c 0%, #090d14 45%, #07090d 100%);
  overflow: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.04) 46%, transparent 50%) 0 0 / 220px 220px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 25%, transparent 75%, rgba(255, 255, 255, 0.03));
  mix-blend-mode: screen;
  opacity: 0.6;
}

body::after {
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent 5px
    );
  opacity: 0.08;
}

.fx-noise,
.fx-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.fx-noise {
  background-image:
    radial-gradient(circle at 15% 50%, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px),
    radial-gradient(circle at 55% 88%, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px);
  background-size: 120px 120px, 180px 180px, 220px 220px;
  opacity: 0.35;
  animation: noiseShift 10s steps(6) infinite;
}

.fx-grid {
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78) 18%, rgba(0, 0, 0, 0.8) 82%, transparent);
  opacity: 0.24;
}

.laser-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 12;
}

.laser-beam {
  position: absolute;
  height: 4px;
  border-radius: 999px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(255, 195, 208, 0.95), rgba(255, 71, 120, 0.95) 48%, rgba(255, 248, 171, 0.92));
  box-shadow:
    0 0 16px rgba(255, 71, 120, 0.9),
    0 0 40px rgba(255, 71, 120, 0.55);
  animation: laserFlash 320ms ease-out forwards;
}

.laser-beam::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 10px;
  transform: translateY(-50%);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 151, 174, 0.1));
  filter: blur(5px);
}

.laser-impact {
  position: absolute;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(255, 240, 183, 0.96);
  box-shadow:
    0 0 22px rgba(255, 95, 124, 0.92),
    0 0 44px rgba(255, 95, 124, 0.45);
  animation: laserImpact 360ms ease-out forwards;
}

.page-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  height: 100vh;
  height: 100svh;
  padding: 18px 0 96px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
}

.hero {
  position: relative;
  padding: 28px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(11, 15, 22, 0.92), rgba(16, 22, 31, 0.76)),
    radial-gradient(circle at top right, rgba(98, 222, 253, 0.18), transparent 28%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-100%);
  animation: heroSweep 8s ease-in-out infinite;
}

.hero__layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(310px, 360px);
  gap: 28px;
  align-items: center;
  min-height: 0;
  height: 100%;
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 24px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(7, 10, 16, 0.78), rgba(12, 16, 24, 0.52));
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero__eyebrow,
.panel__eyebrow,
.question-head__eyebrow,
.intro-card__eyebrow,
.result-hero__eyebrow {
  margin: 0 0 10px;
  color: var(--acid);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.hero h1 {
  margin: 0;
  font-family: "Rubik Glitch", system-ui;
  font-size: clamp(3rem, 8vw, 5.6rem);
  line-height: 0.98;
  text-transform: uppercase;
  text-shadow:
    2px 0 0 rgba(98, 222, 253, 0.4),
    -2px 0 0 rgba(255, 95, 124, 0.35);
}

.hero__dek {
  width: min(780px, 100%);
  margin: 18px 0 0;
  color: var(--text);
  font-size: clamp(1rem, 1.6vw, 1.24rem);
  line-height: 1.65;
}

.hero__notes {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.hero__note {
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.hero__stage-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  align-content: space-between;
  justify-self: end;
  width: min(350px, 100%);
}

.hero-stage-copy {
  padding: 10px 12px 0;
  overflow: hidden;
}

.hero-stage-copy__label {
  margin: 0 0 10px;
  color: var(--gold);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.hero-stage-copy h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.95rem);
  line-height: 1.08;
}

.hero-stage-copy p:not(.hero-stage-copy__label) {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.hegel-stage {
  position: relative;
  min-height: min(21svh, 210px);
  height: 100%;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 50% 20%, rgba(98, 222, 253, 0.18), transparent 32%),
    radial-gradient(circle at 50% 82%, rgba(255, 95, 124, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(5, 8, 14, 0.96), rgba(14, 18, 27, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 24px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  isolation: isolate;
  opacity: 0.94;
  touch-action: pan-y;
}

.hegel-stage::before,
.hegel-stage::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
}

.hegel-stage::before {
  left: 50%;
  bottom: -12%;
  width: 82%;
  height: 28%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(144, 255, 101, 0.18), rgba(144, 255, 101, 0.02) 66%, transparent 72%);
  filter: blur(12px);
}

.hegel-stage::after {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 24%, transparent 78%, rgba(255, 255, 255, 0.05)),
    linear-gradient(110deg, transparent 0 38%, rgba(255, 255, 255, 0.05) 50%, transparent 64%);
  mix-blend-mode: screen;
  opacity: 0.75;
}

.hegel-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hegel-stage__hud {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  z-index: 2;
}

.hegel-stage__pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 10, 16, 0.74);
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.app-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  min-height: 0;
}

.panel {
  position: relative;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(10, 14, 21, 0.86), rgba(16, 21, 31, 0.94));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(98, 222, 253, 0.08), transparent 26%),
    linear-gradient(315deg, rgba(255, 95, 124, 0.08), transparent 22%);
  pointer-events: none;
}

.panel--feed {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding: 22px;
}

.panel--quiz {
  min-height: 0;
  height: 100%;
  padding: 20px;
}

.panel__header,
.quiz-topline,
.result-breakdown__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel__header h2,
.intro-card h2,
.question-head h2,
.result-hero h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.1;
}

.status-pill {
  flex-shrink: 0;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--orange);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feed-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  margin-top: 18px;
  margin-bottom: 18px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-width: thin;
}

.feed-entry {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.feed-entry__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
}

.feed-entry__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(98, 222, 253, 0.55);
}

.feed-entry__body {
  margin: 0;
  color: var(--text);
  line-height: 1.58;
}

.result-card__label {
  margin: 0 0 10px;
  color: var(--gold);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.result-card__body,
.result-description,
.result-school,
.question-subtext,
.intro-card p,
.progress-label,
.progress-state {
  margin: 0;
  line-height: 1.6;
}

.quiz-frame {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 4px;
}

.progress-label {
  color: var(--text);
  font-weight: 700;
}

.progress-state {
  max-width: 220px;
  color: var(--muted);
  text-align: right;
}

.progress-bar {
  width: 100%;
  height: 12px;
  margin-top: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, var(--cyan), var(--acid), var(--orange));
  box-shadow: 0 0 28px rgba(98, 222, 253, 0.4);
  transition: width 220ms ease;
}

.screen {
  display: none;
  margin-top: 12px;
  min-height: 0;
}

.screen--active {
  display: flex;
  flex: 1;
  min-height: 0;
}

.intro-card,
.question-shell,
.result-shell {
  width: 100%;
  min-height: 0;
  overflow: auto;
  padding: 28px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(15, 20, 28, 0.92), rgba(9, 13, 19, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.intro-card p {
  color: var(--muted);
  max-width: 60ch;
}

.intro-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.intro-card__note {
  color: var(--muted);
  font-size: 0.95rem;
}

.choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.question-shell,
.result-shell {
  display: flex;
  flex-direction: column;
}

.question-shell {
  overflow: hidden;
  padding: 20px;
  gap: 10px;
}

.question-head {
  display: grid;
  gap: 6px;
}

.question-head h2 {
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.08;
}

.question-subtext {
  font-size: 0.9rem;
  line-height: 1.4;
}

.choice-list {
  min-height: 0;
  overflow: visible;
  padding-right: 0;
  align-content: start;
  grid-auto-rows: 1fr;
}

.choice-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  min-height: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.choice-card:hover,
.choice-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(98, 222, 253, 0.4);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  outline: none;
}

.choice-card.is-selected {
  border-color: rgba(144, 255, 101, 0.62);
  background:
    linear-gradient(135deg, rgba(144, 255, 101, 0.12), rgba(98, 222, 253, 0.08)),
    rgba(255, 255, 255, 0.05);
}

.choice-card::after {
  content: "";
  position: absolute;
  inset: auto 12px 0 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.choice-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
}

.choice-card__avatar {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--orange));
  box-shadow: 0 0 18px rgba(98, 222, 253, 0.42);
}

.choice-card__text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.34;
}

.choice-card__footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.quiz-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 12px;
  margin-top: 12px;
}

.quiz-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quiz-actions .action {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.76rem;
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 14px 20px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.action:hover,
.action:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.action--primary {
  color: #061108;
  background: linear-gradient(90deg, var(--acid), var(--cyan));
}

.action--primary:hover,
.action--primary:focus-visible {
  border-color: rgba(255, 255, 255, 0.16);
}

.action--ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.action--x {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(98, 222, 253, 0.08)),
    rgba(255, 255, 255, 0.03);
}

.action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.result-hero {
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.result-school {
  margin-top: 10px;
  color: var(--cyan);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.result-description {
  margin-top: 14px;
  color: var(--text);
  font-size: 1.04rem;
}

.result-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 18px;
  margin-top: 22px;
}

.result-hero__copy {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.philosopher-portrait {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.philosopher-portrait__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(98, 222, 253, 0.18), rgba(255, 95, 124, 0.18)),
    rgba(255, 255, 255, 0.04);
}

.philosopher-portrait__image,
.philosopher-portrait__fallback {
  width: 100%;
  height: 100%;
}

.philosopher-portrait__image {
  display: block;
  object-fit: cover;
}

.philosopher-portrait__fallback {
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  line-height: 1.6;
}

.philosopher-portrait__name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.philosopher-portrait__tagline,
.philosopher-portrait__source {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.philosopher-portrait__source {
  width: fit-content;
  color: var(--cyan);
  text-decoration: none;
}

.philosopher-portrait__source:hover,
.philosopher-portrait__source:focus-visible {
  color: var(--text);
  outline: none;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

body[data-screen="quiz"] .hero,
body[data-screen="result"] .hero {
  display: none;
}

.result-grid--stacked {
  margin-top: 18px;
}

.result-card,
.result-breakdown,
.result-books {
  margin-top: 18px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.result-breakdown__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.score-bars {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.score-bar {
  display: grid;
  gap: 8px;
}

.score-bar__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
}

.score-bar__track {
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.score-bar__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--acid));
}

.philosopher-match-grid,
.deepcut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.philosopher-match,
.deepcut-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.philosopher-match__meta,
.deepcut-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.philosopher-match__name,
.deepcut-card h3 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.35;
}

.philosopher-match__body,
.deepcut-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.book-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
  padding: 18px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.book-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
}

.book-card__author {
  margin: 0;
  color: var(--cyan);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-card__note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
}

.book-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(144, 255, 101, 0.08);
  border: 1px solid rgba(144, 255, 101, 0.18);
  color: var(--text);
  text-decoration: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-card a:hover,
.book-card a:focus-visible {
  background: rgba(98, 222, 253, 0.12);
  border-color: rgba(98, 222, 253, 0.28);
  outline: none;
}

@keyframes heroSweep {
  0%,
  55%,
  100% {
    transform: translateX(-100%);
  }

  70% {
    transform: translateX(100%);
  }
}

@keyframes noiseShift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  20% {
    transform: translate3d(12px, -8px, 0);
  }

  40% {
    transform: translate3d(-10px, 6px, 0);
  }

  60% {
    transform: translate3d(7px, 10px, 0);
  }

  80% {
    transform: translate3d(-6px, -5px, 0);
  }
}

@keyframes laserFlash {
  0% {
    opacity: 0;
    filter: blur(2px);
  }

  20% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    filter: blur(1px);
  }
}

@keyframes laserImpact {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35);
  }

  20% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.4);
  }
}

@media (max-width: 1080px) {
  .hero__layout {
    grid-template-columns: 1fr;
  }

  .app-grid {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.18fr) minmax(0, 0.82fr);
  }

  .panel--quiz {
    order: 1;
  }

  .panel--feed {
    order: 2;
    min-height: auto;
  }

  .quiz-frame {
    min-height: auto;
  }
}

@media (max-width: 780px) {
  body {
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body[data-screen="quiz"] {
    overflow-y: hidden;
  }

  .page-shell {
    width: min(100% - 20px, 100%);
    min-height: 100svh;
    height: auto;
    padding: 10px 0;
    gap: 10px;
  }

  .app-grid {
    grid-template-rows: minmax(0, auto) minmax(220px, 34svh);
  }

  .hero,
  .panel--feed,
  .panel--quiz {
    padding: 16px;
  }

  .hero-stage-copy {
    padding: 6px 6px 0;
  }

  .hero__notes {
    gap: 10px;
  }

  .hegel-stage {
    min-height: min(18svh, 160px);
  }

  .intro-card,
  .question-shell,
  .result-shell {
    padding: 18px;
  }

  .intro-card,
  .result-shell,
  .feed-list {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .panel--quiz {
    padding: 14px;
  }

  .quiz-frame {
    padding: 2px;
  }

  .screen {
    margin-top: 10px;
  }

  .progress-bar {
    height: 9px;
    margin-top: 10px;
  }

  .question-head {
    gap: 5px;
  }

  .question-head__eyebrow {
    margin-bottom: 4px;
    font-size: 0.66rem;
    letter-spacing: 0.12em;
  }

  .question-head h2 {
    font-size: clamp(1.08rem, 4.3vw, 1.42rem);
    line-height: 1.05;
  }

  .question-subtext {
    font-size: 0.76rem;
    line-height: 1.26;
  }

  .question-shell {
    padding: 14px;
    gap: 8px;
    border-radius: 20px;
  }

  .choice-list {
    gap: 8px;
    margin-top: 10px;
  }

  .choice-card {
    padding: 10px;
    border-radius: 14px;
  }

  .choice-card__head {
    gap: 6px;
    margin-bottom: 4px;
    font-size: 0.58rem;
  }

  .choice-card__avatar {
    width: 10px;
    height: 10px;
  }

  .choice-card__text {
    font-size: 0.74rem;
    line-height: 1.24;
  }

  .choice-card__footer {
    gap: 6px;
    margin-top: 6px;
    font-size: 0.51rem;
    letter-spacing: 0.04em;
  }

  .quiz-actions {
    gap: 8px;
    margin-top: 10px;
  }

  .quiz-actions .action {
    padding: 10px 8px;
    font-size: 0.64rem;
    letter-spacing: 0.06em;
  }

  .panel__header,
  .quiz-topline,
  .result-breakdown__header {
    flex-direction: column;
  }

  .progress-state {
    max-width: none;
    text-align: left;
  }

  .result-grid,
  .result-hero__layout,
  .book-grid,
  .philosopher-match-grid,
  .deepcut-grid {
    grid-template-columns: 1fr;
  }

  .hegel-stage__hud,
  .result-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .action {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
