@font-face { font-family: "Cinzel"; src: url("/fonts/cinzel-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("/fonts/cinzel-latin-900-normal.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("/fonts/alegreya-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("/fonts/alegreya-sans-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("/fonts/alegreya-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0a1a1e;
  --bg-deep: #061114;
  --panel: #0f2328;
  --ivory: #efe6d2;
  --muted: #a8b8b5;
  --bronze: #b48d57;
  --bronze-lt: #e2c58f;
  --bronze-dk: #5e4729;
  --hazard: #ffd400;
  --cyan: #6fe3d8;
  --guild: #40ff40;
  --epic: #b56cf0;
  --parchment: #eadfc2;
  --parchment-dk: #d6c49b;
  --ink: #2a1f14;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --display: "Cinzel", Georgia, serif;
  --frame:
    0 0 0 1px var(--bronze-dk),
    0 0 0 4px var(--bg-deep),
    0 0 0 5px var(--bronze),
    0 18px 40px rgb(0 0 0 / .45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ivory); overflow-x: clip;
  font: 400 19px/1.6 "Alegreya Sans", system-ui, sans-serif;
  background: radial-gradient(ellipse 120% 60% at 50% 0%, #10292f, transparent 70%), var(--bg);
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; line-height: 1.15; letter-spacing: .01em; }
h2 { font-size: clamp(30px, 3.4vw, 46px); color: var(--ivory); }
p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--hazard); outline-offset: 3px; }
.tag { font-family: var(--display); font-weight: 700; color: var(--guild); text-shadow: 0 1px 2px #000, 0 0 6px rgb(0 0 0 / .8); }

.btn {
  display: inline-block; padding: 13px 26px; border: 1px solid #fff08a; border-radius: 3px;
  background: linear-gradient(#ffe24a, var(--hazard) 50%, #e0b400); color: #1b1404;
  box-shadow: 0 0 0 1px #6b5200, 0 2px 0 #4a3900, inset 0 1px 0 rgb(255 255 255 / .5);
  font: 700 15px/1.2 var(--display); letter-spacing: .06em; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: transform .15s cubic-bezier(.16, 1, .3, 1), filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: rgb(6 17 20 / .7); color: var(--bronze-lt); border-color: var(--bronze); box-shadow: 0 0 0 1px var(--bg-deep); }
.btn-ghost:hover { color: var(--ivory); border-color: var(--bronze-lt); filter: none; }
.btn-small { padding: 8px 16px; font-size: 13px; }

.nav {
  position: sticky; top: 0; z-index: 3; height: 64px; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(rgb(6 17 20 / .96), rgb(10 26 30 / .92)); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bronze-dk); box-shadow: 0 1px 0 rgb(226 197 143 / .12);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 21px; }
.brand img { width: 44px; height: 44px; filter: drop-shadow(0 2px 4px rgb(0 0 0 / .6)); }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.nav-links > a:not(.btn) { color: var(--muted); font: 700 14px var(--display); letter-spacing: .05em; text-decoration: none; }
.nav-links > a:not(.btn):hover { color: var(--bronze-lt); }

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(calc(100dvh - 64px), 900px); padding: 64px var(--gutter);
  display: flex; align-items: center; background: #04161a;
}
.hero-art, #decay { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art { z-index: -3; max-width: none; object-fit: cover; object-position: 100% 50%; filter: saturate(.85); }
#decay { z-index: -2; mix-blend-mode: screen; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgb(6 17 20 / .85), rgb(6 17 20 / .4) 45%, transparent 65%),
    linear-gradient(0deg, var(--bg) 0, transparent 22%);
}
.hero-copy { width: 100%; max-width: var(--max); margin: 0 auto; animation: rise .8s cubic-bezier(.16, 1, .3, 1) both; }
.nameplate { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: 22px; font-size: 15px; color: var(--muted); letter-spacing: .04em; }
.nameplate .tag { font-size: 20px; }
.hero h1 { max-width: 11.5em; font-size: clamp(42px, 5.6vw, 80px); line-height: 1.08; text-shadow: 0 2px 18px rgb(0 0 0 / .6); }
.hero h1 em { font-style: normal; color: var(--hazard); }
.lede { margin-top: 22px; max-width: 28em; font-size: 21px; color: var(--ivory); text-shadow: 0 1px 10px rgb(4 22 26), 0 0 3px rgb(4 22 26); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }

.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--gutter); }

.divider {
  position: relative; height: 1px; margin: clamp(56px, 8vw, 104px) auto;
  max-width: 720px; background: linear-gradient(90deg, transparent, var(--bronze) 30%, var(--bronze) 70%, transparent);
}
.divider::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 11px;
  transform: translate(-50%, -50%) rotate(45deg); background: var(--bg); border: 1px solid var(--bronze-lt);
  box-shadow: 0 0 0 4px var(--bg), 0 0 12px rgb(111 227 216 / .35);
}

.frame { box-shadow: var(--frame); background: var(--bg-deep); }
.frame img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; filter: saturate(.88); }

.split { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 72px); align-items: center; scroll-margin-top: 96px; }
.split + .split { margin-top: clamp(72px, 9vw, 120px); }
.split-flip { grid-template-columns: 7fr 5fr; }
.split-copy > p { margin-top: 16px; color: var(--muted); }
.split-copy > p:first-of-type { color: var(--ivory); font-size: 21px; }
.split-copy .aside { font-style: italic; font-size: 18px; color: var(--muted); }
.effects { font: 700 clamp(26px, 2.5vw, 34px)/1.3 "Alegreya Sans", sans-serif; letter-spacing: 0; }
.effects mark { background: none; color: var(--guild); }
.effects mark.epic { color: var(--epic); }
.need { font: 700 22px/1.3 var(--display); color: var(--cyan) !important; }
.class-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.class-strip img { width: 44px; height: 44px; border-radius: 3px; box-shadow: 0 0 0 1px var(--bronze-dk), 0 0 0 2px #000; }

.perks { list-style: none; margin: clamp(48px, 6vw, 72px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.perk { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: rgb(15 35 40 / .7); border: 1px solid var(--bronze-dk); border-radius: 4px; }
.perk svg { flex: none; width: 40px; height: 40px; padding: 7px; fill: none; stroke: var(--bronze-lt); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  background: var(--bg-deep); border-radius: 3px; box-shadow: 0 0 0 1px var(--bronze); }
.perk h3 { font-size: 17px; color: var(--ivory); }
.perk p { margin-top: 4px; font-size: 16px; line-height: 1.45; color: var(--muted); }

.plan { display: grid; justify-items: center; gap: 28px; text-align: center; scroll-margin-top: 96px; }
.tooltip {
  width: min(460px, 100%); padding: 16px 20px 18px; border-radius: 6px; text-align: left;
  background: linear-gradient(rgb(16 24 46 / .97), rgb(8 12 26 / .97));
  border: 1px solid #8f9bb3; box-shadow: inset 0 0 0 1px #000, 0 12px 32px rgb(0 0 0 / .55);
  font-size: 19px; line-height: 1.4; color: #fff;
}
.tooltip p + p { margin-top: 4px; }
.tt-name { font-size: 23px; font-weight: 700; color: var(--epic); }
.tt-row { display: flex; justify-content: space-between; gap: 16px; }
.tt-big { font-size: 21px; }
.tt-green { color: #1eff00; }
.tt-flavor { margin-top: 8px !important; color: #ffd100; }

.test { scroll-margin-top: 96px; }
.test-head p { margin-top: 10px; color: var(--muted); }
.roles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 32px; }
.role {
  padding: 0; background: var(--bg-deep); color: var(--ivory); border: 0; border-radius: 0; cursor: pointer; overflow: hidden;
  box-shadow: var(--frame);
  transition: transform .2s cubic-bezier(.16, 1, .3, 1), box-shadow .2s;
}
.role img { width: 100%; filter: saturate(.8); }
.role span { display: block; padding: 12px 8px; font: 700 20px/1 var(--display); letter-spacing: .03em; }
.role:hover { transform: translateY(-4px); }
.role[aria-pressed="true"] { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--bronze-dk), 0 0 0 4px var(--bg-deep), 0 0 0 5px var(--cyan), 0 0 28px rgb(111 227 216 / .45); }
.role[aria-pressed="true"] span { color: var(--cyan); }

.readout { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(24px, 4vw, 56px); margin-top: 36px; padding: clamp(22px, 3vw, 36px); background: rgb(15 35 40 / .7); border: 1px solid var(--bronze-dk); border-radius: 4px; }
.meter span { display: block; font: 900 clamp(64px, 7vw, 104px)/.95 var(--display); color: var(--hazard); font-variant-numeric: tabular-nums; }
.meter small { display: block; margin-top: 6px; color: var(--muted); font-size: 16px; }
.sound { margin-top: 8px; padding: 6px 0; background: none; border: 0; color: var(--muted); font: 400 16px "Alegreya Sans", sans-serif; text-decoration: underline; cursor: pointer; }
.sound:hover { color: var(--ivory); }
.result { min-width: 0; }
.result h3 { font-size: clamp(26px, 2.6vw, 36px); color: var(--cyan); }
.result > p { margin-top: 10px; color: var(--muted); min-height: 3.2em; }
.result-cta { margin-top: 16px; }

.faq { max-width: 760px; margin: 0 auto; scroll-margin-top: 96px; }
.faq h2 { text-align: center; }
.questlog { margin-top: 28px; }
.questlog details { border-bottom: 1px solid rgb(180 141 87 / .3); }
.questlog summary {
  display: flex; align-items: center; gap: 14px; padding: 16px 4px; cursor: pointer; list-style: none;
  font: 700 19px/1.3 var(--display); color: var(--ivory);
}
.questlog summary::-webkit-details-marker { display: none; }
.questlog summary::before {
  content: "?"; flex: none; width: 28px; height: 28px; display: grid; place-items: center;
  font: 900 22px/1 var(--display); color: var(--hazard); text-shadow: 0 0 2px #000, 0 1px 2px #000;
}
.questlog summary:hover { color: var(--bronze-lt); }
.questlog details[open] summary { color: var(--hazard); }
.questlog details p { padding: 0 4px 18px 46px; color: var(--muted); }

.closing { position: relative; isolation: isolate; padding: 0 var(--gutter) clamp(64px, 8vw, 110px); }
.closing-art { width: 100%; max-height: 640px; object-fit: cover; object-position: 50% 30%; margin: 0 calc(-1 * var(--gutter)); width: calc(100% + 2 * var(--gutter)); max-width: none; filter: saturate(.85); -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.quest {
  position: relative; max-width: 880px; margin: clamp(-200px, -14vw, -80px) auto 0; padding: clamp(28px, 5vw, 56px);
  color: var(--ink); scroll-margin-top: 80px;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 55%, rgb(120 86 40 / .28)),
    linear-gradient(170deg, #f1e7cc, var(--parchment) 45%, var(--parchment-dk));
  box-shadow: var(--frame);
}
.quest h2 { font-size: clamp(30px, 4vw, 48px); color: #3a2410; line-height: 1.1; }
.quest-text { margin-top: 16px; font-size: 20px; line-height: 1.5; }
.quest-label { margin: 28px 0 14px; font-size: 20px; color: #3a2410; padding-bottom: 6px; border-bottom: 1px solid rgb(58 36 16 / .3); }

.apply { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: grid; gap: 6px; align-content: start; }
.field-wide { grid-column: 1 / -1; }
.field label, .picker legend { font-weight: 700; font-size: 17px; line-height: 1.25; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; color: var(--ink); background: rgb(255 252 240 / .75);
  border: 1px solid #8a6c45; border-radius: 3px; box-shadow: inset 0 1px 3px rgb(58 36 16 / .2);
  font: 400 18px/1.35 "Alegreya Sans", sans-serif;
}
.field textarea { resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid #3a2410; outline-offset: 1px; }
.picker { margin: 0; padding: 0; border: 0; min-width: 0; }
.picker legend { padding: 0; margin-bottom: 8px; }
.picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pick {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 5px; cursor: pointer;
  background: rgb(255 252 240 / .6); border: 1px solid #8a6c45; border-radius: 3px; color: var(--ink);
  transition: transform .15s cubic-bezier(.16, 1, .3, 1), background-color .15s, color .15s;
}
.pick input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.pick img { width: 40px; height: 40px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px #000; }
.pick span { min-width: 0; font: 700 16px/1.1 var(--display); }
.pick:hover { transform: translateY(-1px); background: rgb(255 252 240 / .9); }
.pick:has(input:checked) { background: #2e2012; color: var(--hazard); border-color: #2e2012; box-shadow: 0 0 0 2px var(--bronze); }
.pick:has(input:focus-visible) { outline: 2px solid #3a2410; outline-offset: 3px; }
.pick:has(input:disabled) { opacity: .35; cursor: not-allowed; transform: none; }
.pick input:disabled { cursor: not-allowed; }
.check { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 0; accent-color: #3a2410; color-scheme: light; cursor: pointer; }
.adult { display: grid; gap: 6px; }
.rewards .quest-label { margin-top: 8px; }
.rewards ul { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 10px 0 0; padding: 0; }
.rewards li { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.rewards li { padding: 4px 14px 4px 4px; background: rgb(58 36 16 / .08); border: 1px solid rgb(58 36 16 / .25); border-radius: 3px; }
.rewards img { filter: drop-shadow(0 1px 2px rgb(0 0 0 / .5)); }
.error { color: #8b1200; font-weight: 700; font-size: 16px; }
.error:empty { display: none; }
.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding-top: 8px; }
.btn:disabled { opacity: .65; cursor: progress; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.applied:focus { outline: none; }
.applied[hidden], .apply[hidden] { display: none; }
.applied h3 { margin-top: 24px; font-size: clamp(30px, 4vw, 44px); color: #3a2410; }
.applied p { margin-top: 10px; font-size: 20px; }

.foot { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 28px var(--gutter) 40px; border-top: 1px solid var(--bronze-dk); color: var(--muted); font-size: 15px; display: grid; gap: 4px; }

@media (max-width: 960px) {
  .split, .split-flip { grid-template-columns: 1fr; }
  .split-flip .frame { order: 2; }
  .perks { grid-template-columns: 1fr 1fr; }
  .plan { grid-template-columns: 1fr; }
  .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readout { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  body { font-size: 18px; }
  .hero { align-items: flex-end; padding-block: 40px; min-height: calc(100dvh - 64px); }
  .hero-art { object-position: 92% 50%; }
  .hero::after { background: linear-gradient(0deg, var(--bg) 10%, rgb(6 17 20 / .82) 55%, rgb(6 17 20 / .2) 85%); }
  .hero h1 { font-size: clamp(36px, 10.5vw, 56px); }
  .lede { font-size: 19px; }
  .perks { grid-template-columns: 1fr; }
  .apply { grid-template-columns: 1fr; }
  .nav-links > a:not(.btn) { display: none; }
  .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .submit-row .btn, .result-cta { width: 100%; }
  .btn { text-align: center; }
  .brand { font-size: 18px; }
  .quest { margin-top: -48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy { animation: none; }
  .btn, .role, .pick { transition: none; }
  .pick:hover, .role:hover, .role[aria-pressed="true"] { transform: none; }
}
