/* kybalion-trial-build: 6.5-mystic-seven-gates */
@font-face {
  font-family: "Cinzel";
  src: url("assets/fonts/cinzel-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Cinzel";
  src: url("assets/fonts/cinzel-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --black: #050505;
  --black-soft: #0b0a09;
  --ivory: #eee8db;
  --ivory-muted: #bfb6a6;
  --gold: #b9985d;
  --gold-light: #d7bd83;
  --gold-dark: #6d5936;
  --line: rgba(185, 152, 93, 0.25);
  --focus: #f2d28c;
  --slider-position: 50%;
  --gate-progress: 0;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ivory);
  background:
    radial-gradient(circle at 76% 12%, rgba(146, 111, 54, 0.09), transparent 28rem),
    radial-gradient(circle at 18% 80%, rgba(110, 85, 43, 0.06), transparent 34rem),
    var(--black);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.009) 1px, transparent 1px);
  background-size: 88px 88px;
  content: "";
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

button,
a,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

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

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gold);
  color: var(--black);
  background: var(--gold-light);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.trial-grain {
  position: fixed;
  z-index: 20;
  inset: -60%;
  pointer-events: none;
  opacity: 0.035;
  background:
    repeating-radial-gradient(circle at 22% 31%, #fff 0 0.35px, transparent 0.6px 3px),
    repeating-radial-gradient(circle at 71% 63%, #fff 0 0.3px, transparent 0.55px 4px);
  background-size:
    97px 89px,
    71px 83px;
  animation: grain-shift 0.32s steps(2) infinite;
}

.trial-header,
.trial-footer {
  position: relative;
  z-index: 5;
  width: min(1440px, calc(100% - 5rem));
  margin-inline: auto;
}

.trial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  border-bottom: 1px solid rgba(185, 152, 93, 0.16);
}

.trial-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 44px;
}

.trial-brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.trial-brand span {
  display: grid;
}

.trial-brand strong,
.trial-brand small,
.return-link,
.eyebrow,
.question-index,
.progress-realm,
.result-law,
.privacy-note,
.trial-footer {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.trial-brand strong {
  font-family: "Cinzel", serif;
  font-size: 0.92rem;
  font-weight: 600;
}

.trial-brand small {
  color: var(--ivory-muted);
  font-size: 0.56rem;
}

.return-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--ivory-muted);
  font-size: 0.69rem;
  transition: color 220ms ease;
}

.return-link:hover {
  color: var(--gold-light);
}

main {
  position: relative;
  z-index: 2;
  width: min(1440px, calc(100% - 5rem));
  margin-inline: auto;
}

.intro-view {
  display: grid;
  grid-template-columns: minmax(19rem, 0.86fr) minmax(28rem, 1.14fr);
  align-items: center;
  gap: clamp(4rem, 8vw, 9rem);
  min-height: calc(100vh - 168px);
  padding-block: 4rem 6rem;
}

.intro-constellation {
  position: relative;
  width: min(70vw, 530px);
  aspect-ratio: 1;
  justify-self: center;
}

.intro-constellation::before,
.intro-constellation::after {
  position: absolute;
  inset: 23%;
  border: 1px solid rgba(185, 152, 93, 0.23);
  border-radius: 50%;
  content: "";
}

.intro-constellation::after {
  inset: 42%;
  background: radial-gradient(circle, rgba(215, 189, 131, 0.16), transparent 64%);
  box-shadow: 0 0 4rem rgba(185, 152, 93, 0.1);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(185, 152, 93, 0.16);
  border-radius: 50%;
}

.orbit-one {
  inset: 8%;
}

.orbit-two {
  inset: 15%;
  transform: rotate(58deg) scaleY(0.64);
}

.intro-glyph {
  position: absolute;
  z-index: 2;
  inset: 50% auto auto 50%;
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  transform: translate(-50%, -50%);
}

.intro-constellation i {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--black);
  box-shadow: 0 0 1.2rem rgba(215, 189, 131, 0.28);
  transform: translate(-50%, -50%);
}

.intro-constellation i:nth-of-type(1) {
  top: 50%;
  left: 92%;
}

.intro-constellation i:nth-of-type(2) {
  top: 83%;
  left: 76%;
}

.intro-constellation i:nth-of-type(3) {
  top: 91%;
  left: 41%;
}

.intro-constellation i:nth-of-type(4) {
  top: 68%;
  left: 12%;
}

.intro-constellation i:nth-of-type(5) {
  top: 32%;
  left: 12%;
}

.intro-constellation i:nth-of-type(6) {
  top: 9%;
  left: 41%;
}

.intro-constellation i:nth-of-type(7) {
  top: 17%;
  left: 76%;
}

.intro-copy {
  max-width: 700px;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 600;
}

h1,
h2 {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 500;
  line-height: 1.12;
  text-wrap: balance;
}

.intro-copy h1 {
  max-width: 16ch;
  font-size: clamp(2.55rem, 4.8vw, 4.75rem);
}

.intro-lead {
  max-width: 62ch;
  margin: 1.65rem 0 0;
  color: var(--ivory-muted);
  font-size: clamp(1rem, 1.5vw, 1.16rem);
}

.intro-instruction {
  margin: 1rem 0 0;
  color: var(--ivory);
}

.intro-disclaimer {
  max-width: 62ch;
  margin: 0.8rem 0 2rem;
  color: #8f8779;
  font-size: 0.76rem;
}

.gold-button,
.outline-button,
.quiet-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition:
    color 220ms ease,
    background-color 220ms ease,
    border-color 220ms ease,
    transform 220ms ease;
}

.gold-button {
  gap: 2.5rem;
  min-width: 220px;
  padding: 0.8rem 1.2rem 0.8rem 1.5rem;
  border: 1px solid var(--gold-light);
  color: #17120a;
  background:
    linear-gradient(110deg, transparent 30%, rgba(255, 249, 222, 0.48) 48%, transparent 64%)
      170% 0 / 220% 100% no-repeat,
    linear-gradient(135deg, #d3b779, #9e7c42);
  font-weight: 600;
}

.gold-button:hover {
  background-position:
    -75% 0,
    0 0;
  transform: translateY(-2px);
}

.gold-button:disabled {
  cursor: not-allowed;
  filter: saturate(0.25);
  opacity: 0.45;
  transform: none;
}

.privacy-note {
  margin-top: 1rem;
  color: #7d7568;
  font-size: 0.58rem;
}

.question-view {
  min-height: calc(100vh - 88px);
  padding: 2rem 0 5rem;
}

.trial-progress {
  display: grid;
  grid-template-columns: auto minmax(14rem, 1fr) auto;
  align-items: center;
  gap: 2rem;
  max-width: 1180px;
  margin: 0 auto 2rem;
}

.trial-progress > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  color: var(--ivory-muted);
  font-size: 0.72rem;
}

.progress-realm {
  color: var(--gold);
  font-size: 0.54rem;
}

.progress-track {
  height: 1px;
  overflow: visible;
  background: rgba(238, 232, 219, 0.14);
}

.progress-track span {
  display: block;
  width: 6.666%;
  height: 1px;
  background: var(--gold-light);
  box-shadow: 0 0 0.8rem rgba(215, 189, 131, 0.3);
  transition: width 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gate-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 12px);
  gap: 0.7rem;
  align-items: center;
}

.gate-progress::before {
  position: absolute;
  right: 5px;
  left: 5px;
  height: 1px;
  background: rgba(185, 152, 93, 0.18);
  content: "";
}

.gate-progress i {
  position: relative;
  display: block;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(185, 152, 93, 0.32);
  border-radius: 50%;
  background: #070706;
  transition:
    border-color 260ms ease,
    background-color 260ms ease,
    box-shadow 260ms ease,
    transform 260ms ease;
}

.gate-progress i.is-open {
  border-color: var(--gold-light);
  background: var(--gold-dark);
  box-shadow: 0 0 0 4px rgba(185, 152, 93, 0.07);
  transform: scale(1.08);
}

.question-stage {
  display: grid;
  grid-template-columns: minmax(32rem, 1.12fr) minmax(28rem, 0.88fr);
  align-items: center;
  min-height: min(720px, calc(100vh - 230px));
  border: 1px solid rgba(185, 152, 93, 0.18);
  background: rgba(8, 8, 7, 0.72);
  box-shadow: 0 2rem 7rem rgba(0, 0, 0, 0.35);
}

.ritual-visual {
  position: relative;
  display: grid;
  place-items: center;
  align-self: stretch;
  min-height: 580px;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(185, 152, 93, 0.08), transparent 28%),
    radial-gradient(circle at 52% 47%, #11100d 0, #070707 52%, #040404 100%);
}

.ritual-visual::before,
.ritual-visual::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
}

.ritual-visual::before {
  opacity: 0.26;
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(185, 152, 93, 0.22) 50%, transparent 50.1%),
    linear-gradient(transparent 49.9%, rgba(185, 152, 93, 0.11) 50%, transparent 50.1%);
  mask-image: radial-gradient(circle at center, black 0 33%, transparent 72%);
}

.ritual-visual::after {
  opacity: 0.08;
  background:
    repeating-radial-gradient(circle at center, transparent 0 45px, var(--gold-light) 46px 47px),
    conic-gradient(from 12deg at center, transparent 0 12%, var(--gold) 12.2% 12.35%, transparent 12.6% 25%);
  mask-image: radial-gradient(circle at center, transparent 0 17%, black 20% 66%, transparent 74%);
}

.ritual-orbit {
  position: absolute;
  border: 1px solid rgba(185, 152, 93, 0.18);
  border-radius: 50%;
  box-shadow:
    inset 0 0 2.5rem rgba(185, 152, 93, 0.025),
    0 0 2.5rem rgba(185, 152, 93, 0.025);
}

.ritual-orbit-one {
  width: min(72%, 430px);
  aspect-ratio: 1;
  animation: ritual-turn 24s linear infinite;
}

.ritual-orbit-two {
  width: min(54%, 320px);
  aspect-ratio: 1;
  border-style: dotted;
  opacity: 0.72;
  animation: ritual-turn 18s linear infinite reverse;
}

.ritual-orbit-three {
  width: min(36%, 210px);
  aspect-ratio: 1;
  opacity: 0.82;
}

.ritual-orbit-one::before,
.ritual-orbit-two::before {
  position: absolute;
  top: 50%;
  left: -4px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: #080706;
  content: "";
}

.ritual-stars {
  position: absolute;
  width: min(80%, 480px);
  aspect-ratio: 1;
  animation: ritual-breathe 5s ease-in-out infinite;
}

.ritual-stars i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 0.8rem rgba(215, 189, 131, 0.75);
  transform: rotate(calc(var(--i) * 51.43deg)) translateY(-225px);
}

.gate-core {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 0.55rem;
  place-items: center;
  width: min(74%, 420px);
  padding: 3rem 1.5rem;
  text-align: center;
}

.gate-kicker {
  color: var(--gold);
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.gate-core strong {
  max-width: 17ch;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.35rem, 3.2vw, 2.6rem);
  font-weight: 500;
  line-height: 1.18;
  text-wrap: balance;
}

.gate-glyph {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 0.9rem 0;
  border: 1px solid rgba(215, 189, 131, 0.44);
  border-radius: 50%;
  color: var(--gold-light);
  font-family: "Cinzel", Georgia, serif;
  font-size: 2rem;
  box-shadow:
    0 0 0 8px rgba(185, 152, 93, 0.035),
    inset 0 0 2rem rgba(185, 152, 93, 0.06);
}

.gate-core small {
  max-width: 32ch;
  color: #8d8372;
  font-size: 0.66rem;
  letter-spacing: 0.05em;
}

.question-stage.view-enter .ritual-orbit-one {
  animation:
    gate-unfold 540ms cubic-bezier(0.2, 0.75, 0.2, 1) both,
    ritual-turn 24s linear 540ms infinite;
}

.question-stage.view-enter .gate-core {
  animation: gate-reveal 540ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.question-copy {
  padding: clamp(2rem, 5vw, 5rem);
}

.question-index {
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: 0.62rem;
}

.question-copy h2 {
  min-height: 3.4em;
  font-size: clamp(1.7rem, 2.8vw, 2.8rem);
}

.question-copy h2:focus,
.result-copy h1:focus {
  outline: none;
}

.question-hint {
  margin: 1.4rem 0 2rem;
  color: var(--ivory-muted);
  font-size: 0.88rem;
}

.slider-question {
  position: relative;
  padding-top: 1rem;
}

.slider-axis {
  position: relative;
  height: 48px;
}

.slider-axis::before {
  position: absolute;
  top: 21px;
  right: 2px;
  left: 2px;
  height: 5px;
  opacity: 0.72;
  background:
    radial-gradient(circle, var(--gold-dark) 0 1.5px, transparent 2px) 0 50% / 16.666% 5px repeat-x;
  content: "";
  pointer-events: none;
}

input[type="range"] {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 48px;
  margin: 0;
  appearance: none;
  border: 0;
  color: var(--gold-light);
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold-dark));
}

input[type="range"]::-moz-range-track {
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold-dark));
}

input[type="range"]::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  margin-top: -13.5px;
  appearance: none;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.slider-symbol {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: clamp(14px, var(--slider-position), calc(100% - 14px));
  width: 25px;
  height: 25px;
  border: 1px solid var(--gold-light);
  border-radius: 56% 44% 56% 44%;
  background:
    radial-gradient(circle, var(--gold-light) 0 2px, #090806 2.5px 6px, transparent 6.5px),
    #0a0907;
  box-shadow:
    0 0 0 5px rgba(185, 152, 93, 0.07),
    0 0 1.35rem rgba(215, 189, 131, 0.24);
  pointer-events: none;
  transform: translateX(-50%) rotate(45deg);
  transition:
    left 90ms linear,
    box-shadow 220ms ease;
}

.slider-symbol::after {
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(215, 189, 131, 0.35);
  border-radius: 50%;
  content: "";
}

.slider-question.is-moving .slider-symbol {
  box-shadow:
    0 0 0 6px rgba(185, 152, 93, 0.09),
    0 0 2rem rgba(215, 189, 131, 0.38);
}

.slider-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-top: 0.9rem;
}

.slider-answers button {
  position: relative;
  min-height: 72px;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(185, 152, 93, 0.13);
  color: var(--ivory-muted);
  background:
    linear-gradient(135deg, rgba(185, 152, 93, 0.035), transparent 42%),
    rgba(255, 255, 255, 0.008);
  cursor: pointer;
  font-size: 0.84rem;
  line-height: 1.45;
  text-align: left;
  transition:
    color 200ms ease,
    border-color 200ms ease,
    background-color 200ms ease,
    box-shadow 200ms ease,
    transform 200ms ease;
}

.slider-answers button::before,
.slider-answers button::after {
  position: absolute;
  width: 13px;
  height: 13px;
  border-color: var(--gold-dark);
  opacity: 0.46;
  content: "";
  transition:
    width 240ms ease,
    height 240ms ease,
    border-color 240ms ease,
    opacity 240ms ease;
}

.slider-answers button::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.slider-answers button::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.slider-answers button:last-child {
  text-align: right;
}

.slider-answers button:hover,
.slider-question.is-left .slider-answers button:first-child,
.slider-question.is-right .slider-answers button:last-child {
  color: var(--gold-light);
  border-color: rgba(215, 189, 131, 0.32);
  background-color: rgba(185, 152, 93, 0.045);
  box-shadow: inset 0 0 2rem rgba(185, 152, 93, 0.035);
}

.slider-answers button:hover::before,
.slider-answers button:hover::after,
.slider-question.is-left .slider-answers button:first-child::before,
.slider-question.is-left .slider-answers button:first-child::after,
.slider-question.is-right .slider-answers button:last-child::before,
.slider-question.is-right .slider-answers button:last-child::after {
  width: 23px;
  height: 23px;
  border-color: var(--gold-light);
  opacity: 0.8;
}

.center-choice {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  min-height: 44px;
  margin: 0.65rem auto 0;
  padding: 0.35rem 0.7rem;
  border: 0;
  color: #81786a;
  background: transparent;
  cursor: pointer;
  font-size: 0.68rem;
  transition:
    color 200ms ease,
    transform 200ms ease;
}

.center-choice:hover,
.center-choice[aria-pressed="true"] {
  color: var(--gold-light);
}

.center-choice[aria-pressed="true"] span {
  text-shadow: 0 0 0.8rem rgba(215, 189, 131, 0.7);
  transform: rotate(45deg);
}

.slider-position {
  margin: 1rem 0 0;
  color: var(--gold);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.symbol-question {
  padding: 0;
  border: 0;
}

.symbol-question legend {
  margin-bottom: 1.2rem;
  color: var(--ivory-muted);
  font-size: 0.82rem;
}

.symbol-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.symbol-option {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 112px;
  padding: 0.75rem 0.4rem;
  border: 1px solid rgba(185, 152, 93, 0.18);
  color: var(--ivory-muted);
  background: rgba(255, 255, 255, 0.012);
  cursor: pointer;
  text-align: center;
  transition:
    color 200ms ease,
    border-color 200ms ease,
    background-color 200ms ease,
    transform 200ms ease;
}

.symbol-option:hover {
  color: var(--ivory);
  border-color: rgba(215, 189, 131, 0.5);
  transform: translateY(-2px);
}

.symbol-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.symbol-option:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.symbol-option:has(input:checked) {
  color: var(--gold-light);
  border-color: var(--gold);
  background: rgba(185, 152, 93, 0.08);
  box-shadow: inset 0 0 1.5rem rgba(185, 152, 93, 0.06);
}

.symbol-glyph {
  font-family: "Cinzel", serif;
  font-size: 1.8rem;
  line-height: 1;
}

.symbol-label {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

.trial-controls {
  display: flex;
  justify-content: space-between;
  max-width: 1180px;
  margin: 2rem auto 0;
}

.quiet-button {
  gap: 0.65rem;
  min-width: 120px;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  color: var(--ivory-muted);
  background: transparent;
}

.quiet-button:hover {
  color: var(--gold-light);
  border-color: var(--line);
}

.status-message {
  min-height: 1.6em;
  margin: 0.5rem 0 0;
  color: var(--gold-light);
  font-size: 0.76rem;
  text-align: right;
}

.result-view {
  display: grid;
  grid-template-columns: minmax(22rem, 0.85fr) minmax(31rem, 1.15fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  min-height: calc(100vh - 168px);
  padding: 4rem 0 6rem;
}

.result-image {
  position: relative;
  align-self: center;
  max-width: 570px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #090806;
  box-shadow: 0 2rem 8rem rgba(0, 0, 0, 0.5);
}

.result-image::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(4, 4, 4, 0.9), transparent 44%),
    radial-gradient(circle at 50% 38%, transparent 24%, rgba(4, 4, 4, 0.28) 76%);
  content: "";
}

.result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-number,
.result-symbol {
  position: absolute;
  z-index: 2;
  color: var(--gold-light);
}

.result-number {
  top: 1.6rem;
  left: 1.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
}

.result-symbol {
  right: 1.6rem;
  bottom: 1.4rem;
  font-family: "Cinzel", serif;
  font-size: 3rem;
}

.result-copy {
  max-width: 760px;
}

.result-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4.7rem);
}

.result-copy h1 span {
  display: block;
  color: var(--gold-light);
}

.result-law {
  margin: 1rem 0 1.8rem;
  color: var(--gold);
  font-size: 0.66rem;
}

.result-description {
  max-width: 66ch;
  color: var(--ivory);
  font-size: 1.06rem;
}

.result-disclaimer {
  max-width: 70ch;
  padding-left: 1rem;
  border-left: 1px solid var(--gold-dark);
  color: var(--ivory-muted);
  font-size: 0.82rem;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 2rem 0;
}

.outline-button {
  min-width: 220px;
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--gold-dark);
  color: var(--gold-light);
  background: rgba(185, 152, 93, 0.025);
  font-size: 0.78rem;
}

.outline-button:hover {
  border-color: var(--gold-light);
  background: rgba(185, 152, 93, 0.08);
  transform: translateY(-2px);
}

.text-link {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.8rem;
  color: var(--ivory-muted);
  font-size: 0.78rem;
}

.text-link:hover {
  color: var(--gold-light);
}

.second-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.7rem 0;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(185, 152, 93, 0.18);
  background: rgba(185, 152, 93, 0.035);
}

.second-gate p {
  margin: 0;
  color: var(--ivory-muted);
  font-size: 0.76rem;
}

.second-gate a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-size: 0.8rem;
}

.result-copy blockquote {
  margin: 2rem 0 1.5rem;
  padding: 1.2rem 0 1.2rem 1.4rem;
  border-left: 1px solid var(--line);
  color: var(--ivory-muted);
  font-family: "Cinzel", serif;
  font-size: 0.86rem;
  line-height: 1.75;
}

.restart-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  color: var(--ivory-muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.75rem;
}

.restart-button:hover {
  color: var(--gold-light);
  border-color: var(--gold-dark);
}

.trial-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  min-height: 80px;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(185, 152, 93, 0.12);
  color: #746d61;
  font-size: 0.52rem;
}

.view-enter {
  animation: view-enter 520ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

@keyframes view-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ritual-turn {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ritual-breathe {
  0%,
  100% {
    opacity: 0.48;
    transform: scale(0.985);
  }
  50% {
    opacity: 0.78;
    transform: scale(1);
  }
}

@keyframes gate-unfold {
  from {
    opacity: 0;
    transform: rotate(-7deg) scale(0.92);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

@keyframes gate-reveal {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes grain-shift {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(2%, -1%);
  }
  50% {
    transform: translate(-1%, 2%);
  }
  75% {
    transform: translate(1%, 1%);
  }
}

@media (max-width: 1050px) {
  .intro-view,
  .result-view {
    gap: 3rem;
  }

  .question-stage {
    grid-template-columns: 0.85fr 1.15fr;
  }

  .ritual-visual {
    min-height: 520px;
  }

  .symbol-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .trial-header,
  .trial-footer,
  main {
    width: min(100% - 2rem, 720px);
  }

  .trial-header {
    min-height: 72px;
  }

  .trial-brand small {
    display: none;
  }

  .intro-view,
  .result-view {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 2.5rem 0 5rem;
  }

  .intro-constellation {
    width: min(84vw, 390px);
  }

  .intro-copy {
    text-align: center;
  }

  .intro-copy h1,
  .intro-lead {
    margin-inline: auto;
  }

  .trial-progress {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .question-view {
    min-height: 0;
  }

  .question-stage {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .ritual-visual {
    min-height: 330px;
    max-height: 42vh;
  }

  .question-copy {
    padding: 2rem 1.25rem 2.5rem;
  }

  .question-copy h2 {
    min-height: 0;
  }

  .symbol-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .symbol-option {
    min-height: 100px;
  }

  .result-image {
    width: min(90%, 480px);
    max-height: 58vh;
    margin-inline: auto;
  }

  .result-copy {
    text-align: center;
  }

  .result-description,
  .result-disclaimer,
  .result-copy blockquote {
    margin-inline: auto;
  }

  .result-actions {
    justify-content: center;
  }

  .second-gate {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .return-link {
    font-size: 0;
  }

  .return-link span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .intro-view {
    gap: 2rem;
  }

  .intro-constellation {
    width: min(72vw, 280px);
  }

  .intro-copy h1 {
    font-size: clamp(2.35rem, 10vw, 3rem);
  }

  .trial-progress > div:first-child {
    justify-content: space-between;
  }

  .progress-realm {
    max-width: 15ch;
    text-align: right;
  }

  .ritual-visual {
    min-height: 270px;
  }

  .gate-core {
    padding: 1.5rem 1rem;
  }

  .gate-glyph {
    width: 62px;
    height: 62px;
    margin: 0.35rem 0;
    font-size: 1.55rem;
  }

  .slider-answers {
    gap: 1rem;
  }

  .slider-answers button {
    min-height: 88px;
    font-size: 0.75rem;
  }

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

  .trial-controls {
    gap: 0.75rem;
  }

  .trial-controls .gold-button,
  .trial-controls .quiet-button {
    min-width: 0;
    flex: 1;
  }

  .result-actions {
    display: grid;
  }

  .result-actions > * {
    width: 100%;
  }

  .second-gate {
    display: grid;
    justify-content: center;
    text-align: center;
  }

  .trial-footer {
    display: grid;
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .trial-grain {
    display: none;
  }
}
