/* JDM Classic - jdm-classic.org. Self-hosted OFL fonts (assets/fonts), no external requests, no inline styles.
   One dark ground with three scenes painted into it (hero panorama, the chosen school's backdrop, the closing
   stairway); a scene has no frame, it fades into the ground on every side. Two type families, two accents (gold =
   the main action and what is earned, jade = links and live state); a class colour (--cc) appears only on that
   class. Every colour and font is a token in :root. Motion: colour and transform on hover and press, a short fade
   when the school changes; all off under prefers-reduced-motion. */
@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 800; font-display: swap; src: url(/assets/fonts/alegreya-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 800; font-display: swap; src: url(/assets/fonts/alegreya-cyrillic-800-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/golos-text-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/golos-text-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/golos-text-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/golos-text-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
/* the wordmark only: the same face as the game's login logo */
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/cinzel-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ground: #0d1411;
  --ground-rgb: 13 20 17;
  --surface: #131c18;
  --surface-2: #1b2621;
  --rule: #27342e;
  --rule-strong: #43544b; --field-edge: #74827a;
  --paper: #ede8da;
  --paper-2: #b7bcae;
  --paper-3: #8e978b;
  --jade: #5fcfa3;
  --jade-strong: #86e0bb;
  --gold: #dcbb6c;
  --gold-strong: #edd493;
  --gold-ink: #1c1505;
  --danger: #ff9b8a;
  --shade: rgba(4, 8, 6, .62);
  /* class colours: the light each class picture is painted in */
  --c-qingyun: #6fdcf0;
  --c-tianyin: #f3cf72;
  --c-guiwang: #ff6a5a;
  --c-hehuan: #e78bd8;
  --c-fenxiang: #ff9a3c;
  /* numerals engraved on the reward medals */
  --medal-bronze: #fff1dc;
  --medal-silver: #26313d;
  --medal-gold: #5b3606;
  --medal-diamond: #1d4f5a;
  --medal-crown: #f6e3ff;
  --cc: var(--jade);
  --display: "Alegreya", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --wordmark: "Cinzel", "Alegreya", Georgia, serif;
  --text-small: .875rem;
  --text-body: 1.0625rem;
  --text-lead: 1.1875rem;
  --text-title: 1.25rem;
  --text-section: clamp(2.1rem, 1.35rem + 3vw, 3.4rem);
  --text-display: clamp(2.5rem, 1.1rem + 5.6vw, 4.75rem);
  --gutter: 1.25rem;
  --wrap: 75rem;
  --section-gap: clamp(4.5rem, 3rem + 6vw, 8rem);
  --radius: 4px;
  --header: 4rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 1rem); overflow-x: clip; }
body {
  margin: 0; background: var(--ground); color: var(--paper);
  font: 400 var(--text-body)/1.6 var(--body); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--jade); text-underline-offset: .18em; }
a:hover { color: var(--jade-strong); }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 800; line-height: 1.02; color: var(--paper); text-wrap: balance; overflow-wrap: break-word; min-width: 0; }
h2 { font-size: var(--text-section); letter-spacing: -.01em; }
h3, h4 { font: 600 var(--text-title)/1.3 var(--body); }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .6rem 1rem; border-radius: var(--radius); background: var(--paper); color: var(--ground); font-weight: 600; text-decoration: none; }
.skip:focus { top: .6rem; color: var(--ground); }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: calc(46rem + 2 * var(--gutter)); }
main { display: block; }
main:focus { outline: 0; }

/* class colour on everything that belongs to one class */
.cls-qingyun { --cc: var(--c-qingyun); }
.cls-tianyin { --cc: var(--c-tianyin); }
.cls-guiwang { --cc: var(--c-guiwang); }
.cls-hehuan { --cc: var(--c-hehuan); }
.cls-fenxiang { --cc: var(--c-fenxiang); }
.tile-sealed, .panel-sealed { --cc: var(--gold); }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .5rem 1.25rem;
  border: 1px solid transparent; border-radius: var(--radius); cursor: pointer; text-align: center; text-decoration: none;
  font: 600 1rem/1.25 var(--body); transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: var(--gold-ink); }
.btn-primary:hover { background: var(--gold-strong); color: var(--gold-ink); }
.btn-ghost { background: rgb(var(--ground-rgb) / .6); border-color: var(--rule-strong); color: var(--paper); }
.btn-ghost:hover { border-color: var(--paper-2); color: var(--paper); }
.btn-large { min-height: 3.25rem; padding-inline: 1.75rem; font-size: var(--text-body); }
.btn-small { min-height: 2.5rem; padding: .3rem 1rem; font-size: .9375rem; }
.btn[disabled] { background: var(--surface-2); border-color: var(--rule); color: var(--paper-3); cursor: not-allowed; transform: none; }
.fine { font-size: .8125rem; line-height: 1.5; color: var(--paper-3); }

/* ------------------------------------------------------------------ header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ground); border-bottom: 1px solid transparent; transition: border-color .15s ease; }
.site-header.scrolled { border-bottom-color: var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header); }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--paper); text-decoration: none; }
.brand:hover { color: var(--paper); }
.brand-seal { width: 2.25rem; height: 2.25rem; }
.brand-mark { width: 2rem; height: 2rem; fill: none; stroke: var(--jade); stroke-width: 1.6; }
.brand-name { display: none; font: 600 1.0625rem/1 var(--wordmark); letter-spacing: .04em; white-space: nowrap; }
.brand-name span { color: var(--gold); }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.socials { display: flex; flex-wrap: wrap; gap: .5rem; }
.social { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .3rem .9rem; border: 1px solid var(--rule-strong); border-radius: var(--radius); color: var(--paper); text-decoration: none; font-size: .9375rem; font-weight: 600; transition: border-color .15s ease; }
.social:hover { border-color: var(--paper-2); color: var(--paper); }
/* each service's own mark in its own colour, on a round badge (the only place a foreign colour appears) */
.social { --mark: var(--paper-2); --glyph: #fff; padding-left: .5rem; background: rgb(var(--ground-rgb) / .72); }
.social:hover { border-color: var(--mark); }
.social-mark { display: grid; place-items: center; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--mark); }
.social svg { width: 1.05rem; height: 1.05rem; fill: var(--glyph); }
.social-discord { --mark: #5865f2; }
.social-boosty { --mark: #f15f2c; }
.social-telegram { --mark: #fff; --glyph: #26a5e4; }
.social-telegram:hover { border-color: #26a5e4; }
.social-telegram svg { width: 1.75rem; height: 1.75rem; }
.btn-telegram { gap: .6rem; padding-left: .7rem; }
.btn-telegram .social-mark { background: #fff; }
.btn-telegram svg { width: 1.75rem; height: 1.75rem; fill: #26a5e4; }
.site-header .socials { display: none; flex-wrap: nowrap; gap: .25rem; }
.site-header .social { justify-content: center; width: 2.75rem; padding: 0; border-color: transparent; background: none; }
.site-header .social:hover { border-color: var(--rule-strong); }
.site-header .social-mark { width: 2rem; height: 2rem; }
.site-header .social svg { width: 1.2rem; height: 1.2rem; }
.site-header .social-telegram svg { width: 2rem; height: 2rem; }
.site-header .social-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lang-switch { display: flex; }
.lang-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; min-height: 2.75rem; padding: 0 .4rem; color: var(--paper-3); text-decoration: none; font-size: .9375rem; font-weight: 600; }
.lang-switch a:hover { color: var(--paper); }
.lang-switch a[aria-current] { color: var(--paper); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .4em; }

/* -------------------------------------------------------------------- hero */
/* the panorama fills the first screen; it fades into the ground at the top (under the header), at the bottom and,
   behind the text, on the left. Phones: the portrait crop on top, the text on the fade below it. */
/* The panorama lies behind the whole first screen at every width (owner 13.11.2026: the generated scenes are
   the page's strongest part and stay large and bright); only the ground under the text is darkened. */
.hero { position: relative; isolation: isolate; display: grid; align-items: end; min-height: calc(100svh - var(--header)); padding: clamp(5rem, 15svh, 14rem) 0 1.5rem; }
.hero-scene { position: absolute; inset: 0; z-index: -2; }
.hero-scene img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.hero:has(.hero-scene)::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, var(--ground) 0, rgb(var(--ground-rgb) / 0) 7%, rgb(var(--ground-rgb) / 0) 30%, rgb(var(--ground-rgb) / .74) 54%, rgb(var(--ground-rgb) / .9) 78%, var(--ground) 100%); }
.hero:not(:has(.hero-scene)) { min-height: 0; padding-top: clamp(1.5rem, 4vw, 3rem); }
.hero-inner { display: grid; gap: 1.5rem; }
.hero h1 { font-size: var(--text-display); line-height: .96; letter-spacing: -.015em; }
/* a soft shade of the ground behind the letters where they cross bright cloud (legibility, not a glow) */
.hero:has(.hero-scene) :is(h1, .hero-lead) { text-shadow: 0 1px 2px rgb(var(--ground-rgb) / .5), 0 2px 20px rgb(var(--ground-rgb) / .6); }
.hero h1 .line { display: block; }
.hero-lead { margin-top: 1.1rem; max-width: 34rem; font-size: var(--text-lead); line-height: 1.5; color: var(--paper); }
.hero-action { display: grid; gap: 1rem; max-width: 34rem; }
.download { display: grid; gap: .75rem; }
.download .btn-ghost { padding-inline: .9rem; font-size: .9375rem; font-weight: 400; }
.download-title { font-weight: 600; }
.hero .fine { color: var(--paper-2); }
.hero-community { display: grid; gap: .6rem; margin-top: .75rem; padding-top: 1.1rem; border-top: 1px solid rgb(237 232 218 / .22); }
.hero-count { font-size: .9375rem; color: var(--paper); }
.hero-count b { color: var(--gold-strong); font-variant-numeric: lining-nums tabular-nums; }
.hero-community-label { font-size: .9375rem; font-weight: 600; color: var(--paper); }
.hero-community:has(.hero-count:not([hidden])) .hero-community-label { display: none; }
/* before the launch: date and countdown */
.launch { display: grid; gap: .2rem; }
.launch-kicker { color: var(--paper-2); }
.launch-date { font: 800 1.9rem/1.1 var(--display); font-variant-numeric: lining-nums; }
.launch-zones { font-size: var(--text-small); color: var(--paper-2); }
.launch-now { margin-top: .5rem; color: var(--jade); font-weight: 600; }
.countdown { list-style: none; display: flex; gap: 1.25rem; margin: .8rem 0 0; padding: 0; }
.countdown li { display: grid; gap: .1rem; }
.countdown b { font: 800 2.2rem/1 var(--display); font-variant-numeric: lining-nums tabular-nums; }
.countdown span { font-size: .8125rem; color: var(--paper-2); font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------- how to get in */
.join { padding-top: clamp(3rem, 2rem + 4vw, 5rem); }
.join-grid { display: grid; gap: 2.25rem; }
.join-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 1.75rem; }
.join-steps li { counter-increment: step; display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); column-gap: .5rem; align-content: start; }
.join-steps li::before { content: counter(step); grid-row: span 2; font: 800 3.5rem/.8 var(--display); color: var(--gold); }
.join-steps p { margin-top: .35rem; color: var(--paper-2); max-width: 26rem; }
.join-facts { list-style: none; margin: 0; padding: 1.5rem 0 0; border-top: 1px solid var(--rule); display: grid; gap: 1.25rem; }
.join-facts li { display: grid; gap: .2rem; align-content: start; }
.join-facts b { font-weight: 600; }
.join-facts span { color: var(--paper-2); font-size: 1rem; max-width: 26rem; }

/* ----------------------------------------------------------------- rewards */
/* a band one step lighter than the ground, so the page is not one flat sheet */
.rewards { margin-top: var(--section-gap); padding: clamp(3.5rem, 2rem + 6vw, 6rem) 0; background: var(--surface); }
.rewards h2 { max-width: 16em; }
.rewards-lead { margin-top: 1rem; max-width: 40rem; color: var(--paper-2); font-size: var(--text-lead); }
/* live registration counter above the tiers (hidden until app.js has the count) */
.tally { margin-top: 2.25rem; max-width: 46rem; }
.tally-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: .3rem .8rem; }
.tally-head span { color: var(--paper-2); }
.tally-head b { font: 800 clamp(2.4rem, 8vw, 3.25rem)/1 var(--display); color: var(--gold); font-variant-numeric: lining-nums tabular-nums; }
.tally-bar { position: relative; height: .5rem; margin-top: .7rem; border-radius: 999px; background: var(--rule); overflow: hidden; }
.tally-bar span { position: absolute; inset: 0; border-radius: inherit; background: var(--jade); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.tally-bar i { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--surface); }
.tally-next { margin-top: .6rem; color: var(--paper-2); font-size: 1rem; }
.milestones { list-style: none; margin: 2.25rem 0 0; padding: 0; display: grid; }
.ms { position: relative; display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1.25rem; align-items: center; padding: 1.1rem 2.25rem 1.1rem 0; border-top: 1px solid var(--rule-strong); }
.ms:last-child { border-bottom: 1px solid var(--rule-strong); }
.ms-badge { position: relative; display: grid; justify-items: center; gap: .15rem; text-align: center; }
.ms-badge b { font: 800 2.4rem/1 var(--display); color: var(--gold); font-variant-numeric: lining-nums tabular-nums; }
.ms-badge span { font-size: .8125rem; color: var(--paper-3); }
/* generated tier medallion (scene/medal-<tier>.webp) with the numeral on its centre disc */
.ms-medal { width: 5.25rem; height: 5.25rem; }
.ms-badge:has(.ms-medal) b { position: absolute; left: 0; right: 0; top: 2.625rem; transform: translateY(-50%); font-size: 1.6rem; color: var(--medal-bronze); }
.ms-silver .ms-badge:has(.ms-medal) b { color: var(--medal-silver); }
.ms-gold .ms-badge:has(.ms-medal) b { color: var(--medal-gold); }
.ms-diamond .ms-badge:has(.ms-medal) b { color: var(--medal-diamond); }
.ms-crown .ms-badge:has(.ms-medal) b { color: var(--medal-crown); }
.ms-items { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.ms-items li { display: flex; align-items: center; gap: .75rem; line-height: 1.3; }
.ms-items img { width: 2.75rem; height: 2.75rem; flex: none; border-radius: var(--radius); }
.ms-dot { width: .5rem; height: .5rem; flex: none; border-radius: 50%; background: var(--gold); }
/* reached tiers: a gold rule and a tick */
.ms-check { position: absolute; top: 1.1rem; right: 0; width: 1.5rem; height: 1.5rem; padding: .28rem; border-radius: 50%; background: var(--gold); fill: none; stroke: var(--gold-ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.ms:not(.ms-done) .ms-check { display: none; }
.ms-done { border-top-color: var(--gold); }

/* ----------------------------------------------------------------- classes */
/* the centre piece: the chosen school's backdrop fills the whole section and fades into the ground above and below */
.classes { position: relative; isolation: isolate; overflow: clip; padding: var(--section-gap) 0 clamp(4rem, 2rem + 7vw, 7rem); }
.panel-back { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.classes::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(to bottom, var(--ground) 0, rgb(var(--ground-rgb) / 0) 22%, rgb(var(--ground-rgb) / 0) 78%, var(--ground) 100%),
  linear-gradient(to right, rgb(var(--ground-rgb) / .22) 0, rgb(var(--ground-rgb) / .22) 40%, rgb(var(--ground-rgb) / .66) 62%, rgb(var(--ground-rgb) / .7) 100%); }
.classes-lead { margin-top: 1rem; color: var(--paper); font-size: var(--text-lead); }
.selector { margin-top: 2rem; }
.roster { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.roster-open, .roster-sealed { display: flex; flex-wrap: wrap; gap: .5rem; }
.pick { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.tile { display: inline-flex; align-items: center; gap: .55rem; min-height: 2.75rem; padding: .3rem .9rem .3rem .7rem; background: rgb(var(--ground-rgb) / .6); border: 1px solid var(--rule-strong); border-radius: var(--radius); color: var(--paper-2); cursor: pointer; font-size: .9375rem; font-weight: 600; transition: border-color .15s ease, color .15s ease, background-color .15s ease; }
.tile-medal { display: grid; place-items: center; }
.tile-emblem { width: 1.4rem; height: 1.4rem; overflow: visible; }
.emblem { fill: none; stroke: var(--cc); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cls-tianyin .emblem circle { fill: var(--cc); stroke: none; }
.tile:hover { border-color: var(--paper-2); color: var(--paper); }
.pick:checked + .tile { border-color: var(--cc); background: var(--ground); color: var(--paper); }
.pick:focus-visible + .tile { outline: 2px solid var(--paper); outline-offset: 3px; }
.tile-sealed { justify-content: center; width: 2.75rem; padding: 0; border-style: dashed; }
.tile-lock { width: 1.1rem; height: 1.1rem; fill: none; stroke: var(--paper-3); stroke-width: 1.8; stroke-linecap: round; }
.pick:checked + .tile-sealed .tile-lock { stroke: var(--gold); }

/* .stage and .panel stay unpositioned: .panel-back is placed against .classes */
.stage { margin-top: 1.5rem; touch-action: pan-y; }
.panel { display: grid; gap: 1.5rem; }
.panel-art { display: grid; place-items: center; min-width: 0; }
/* class picture: the skill arc and the picture are laid out on a 4:5 field (the picture takes cutout.py FIG_SHARE,
   420 / 540, of its width, top-aligned); the box shows the top 87 % of that field, where the arc ends. */
.stage-box { position: relative; width: min(100%, 35rem); aspect-ratio: 400 / 435; }
.figure { position: relative; z-index: 1; width: 100%; height: auto; }
/* without the class pictures: the own SVG drawing (400 x 480) fills the box */
.stage-drawn { aspect-ratio: 400 / 480; }
.stage-box .figure-render { position: absolute; top: 0; left: 11.1%; width: 77.8%; aspect-ratio: 4 / 5; object-fit: contain; pointer-events: none; }
/* a short fade when the school changes */
@keyframes scene-in { from { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(.75rem); } }
.panel-back { animation: scene-in .5s ease both; }
.stage-box, .seal-ring { animation: rise-in .4s ease both; }
.panel-info { animation: rise-in .4s .06s ease both; }
/* active skills on an arc around the class figure; the Ascension skills wear a gold ring */
.skill-orbit { position: absolute; z-index: 2; top: 0; left: 0; width: 100%; height: auto; aspect-ratio: 4 / 5; overflow: visible; }
.orb { cursor: help; }
.orb > * { transform-box: fill-box; transform-origin: center; transition: transform .15s ease; }
.orb-ring { fill: var(--ground); stroke: var(--cc); stroke-width: 1.5; }
.orb-asc .orb-ring { stroke: var(--gold); stroke-width: 2.5; }
.orb:hover > * { transform: scale(1.25); }

.panel-info { min-width: 0; }
.panel-name { font: 800 clamp(2.6rem, 1.6rem + 4.4vw, 4.75rem)/.95 var(--display); letter-spacing: -.015em; }
.panel-alt { display: block; margin-top: .5rem; font: 400 1rem/1.3 var(--body); letter-spacing: 0; color: var(--paper-2); }
.panel-school { margin-top: .6rem; font-size: var(--text-lead); color: var(--cc); }
.panel-tags { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.1rem 0 0; padding: 0; }
.panel-tags li { padding: .15rem .6rem; background: rgb(var(--ground-rgb) / .6); border: 1px solid var(--rule-strong); border-radius: var(--radius); font-size: var(--text-small); color: var(--paper); }
.panel-line { margin-top: 1.1rem; max-width: 32rem; color: var(--paper); }
.panel-sub { margin-top: 1.75rem; font-size: 1rem; }
.branches { list-style: none; margin: .6rem 0 0; padding: 0; max-width: 28rem; counter-reset: br; }
.branches li { counter-increment: br; display: flex; align-items: baseline; gap: .9rem; padding: .65rem 0; border-top: 1px solid var(--rule-strong); }
.branches li:last-child { border-bottom: 1px solid var(--rule-strong); }
.branches li::before { content: counter(br); min-width: 1ch; color: var(--cc); font-variant-numeric: tabular-nums; }
/* sealed schools: a ring of seven locked sigils */
.seal-ring { width: min(100%, 26rem); overflow: visible; }
.seal-orbit { fill: none; stroke: var(--rule-strong); stroke-width: 1; stroke-dasharray: 2 8; }
.seal-core { fill: var(--surface); stroke: var(--rule-strong); }
.seal-q { font: 800 72px var(--display); fill: var(--paper-3); }
.seal circle { fill: var(--surface); stroke: var(--rule-strong); stroke-width: 1.2; }
.seal g { fill: none; stroke: var(--paper-3); stroke-width: 1.8; stroke-linecap: round; }
.selector:has(#pick-sealed-1:checked) .seal-1 circle, .selector:has(#pick-sealed-2:checked) .seal-2 circle,
.selector:has(#pick-sealed-3:checked) .seal-3 circle, .selector:has(#pick-sealed-4:checked) .seal-4 circle,
.selector:has(#pick-sealed-5:checked) .seal-5 circle, .selector:has(#pick-sealed-6:checked) .seal-6 circle,
.selector:has(#pick-sealed-7:checked) .seal-7 circle { stroke: var(--gold); stroke-width: 2; }
.selector:has(#pick-sealed-1:checked) .seal-1 g, .selector:has(#pick-sealed-2:checked) .seal-2 g,
.selector:has(#pick-sealed-3:checked) .seal-3 g, .selector:has(#pick-sealed-4:checked) .seal-4 g,
.selector:has(#pick-sealed-5:checked) .seal-5 g, .selector:has(#pick-sealed-6:checked) .seal-6 g,
.selector:has(#pick-sealed-7:checked) .seal-7 g { stroke: var(--gold); }

.stage-controls { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.5rem; }
.stage-nav { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: rgb(var(--ground-rgb) / .6); color: var(--paper); cursor: pointer; transition: border-color .15s ease, transform .1s ease; }
.stage-nav:hover { border-color: var(--paper-2); }
.stage-nav:active { transform: translateY(1px); }
.stage-nav svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.swipe-hint { margin-top: .75rem; font-size: .8125rem; color: var(--paper-2); }

/* one stage at a time where :has() exists; otherwise every panel is shown stacked */
@supports selector(:has(*)) {
  .selector .panel { display: none; }
  .selector:has(#pick-qingyun:checked) .panel-qingyun,
  .selector:has(#pick-tianyin:checked) .panel-tianyin,
  .selector:has(#pick-guiwang:checked) .panel-guiwang,
  .selector:has(#pick-hehuan:checked) .panel-hehuan,
  .selector:has(#pick-fenxiang:checked) .panel-fenxiang,
  .selector:has(.pick-sealed:checked) .panel-sealed { display: grid; }
}
@supports not selector(:has(*)) {
  .roster, .stage-controls, .swipe-hint { display: none !important; }
  .stage { display: grid; gap: 3rem; }
}

/* ----------------------------------------------------------------- closing */
/* the stairway scene behind the last call; phones: the picture on top, the text on the fade below it */
.closing { position: relative; isolation: isolate; padding: min(52vw, 15rem) 0 var(--section-gap); }
.closing-scene { position: absolute; inset: 0 0 auto; z-index: -2; width: 100%; height: min(78vw, 24rem); object-fit: cover; object-position: 40% 30%; }
.closing:has(.closing-scene)::before { content: ""; position: absolute; inset: 0 0 auto; z-index: -1; height: min(78vw, 24rem); background: linear-gradient(to bottom, var(--ground) 0, rgb(var(--ground-rgb) / 0) 22%, rgb(var(--ground-rgb) / 0) 45%, var(--ground) 100%); }
.closing:not(:has(.closing-scene)) { padding-top: var(--section-gap); }
.closing-grid { display: grid; gap: 2.5rem; }
.closing-text { margin: 1rem 0 1.5rem; max-width: 30rem; color: var(--paper); font-size: var(--text-lead); }
.signup-form { align-self: start; padding: 1.5rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field-row { display: grid; gap: .6rem; margin-top: 1rem; }
.field-row input { min-width: 0; min-height: 3rem; padding: 0 .9rem; border: 1px solid var(--field-edge); border-radius: var(--radius); background: var(--ground); color: var(--paper); font: inherit; }
.field-row input::placeholder { color: var(--paper-3); }
.field-row input:hover { border-color: var(--paper-2); }
.field-row input:focus-visible { border-color: var(--jade); outline-offset: 2px; }
.consent { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .7rem; align-items: start; margin-top: 1rem; font-size: var(--text-small); line-height: 1.5; color: var(--paper-2); }
.consent input { width: 1.25rem; height: 1.25rem; margin: .1rem 0 0; accent-color: var(--jade); }
.form-status { margin-top: .9rem; font-size: .9375rem; }
.form-status:empty { display: none; }
.form-status.ok { color: var(--jade); }
.form-status.err { color: var(--danger); }
.signup-count { margin-top: .9rem; font-size: .9375rem; color: var(--paper-2); }
.signup-count b { color: var(--gold); font-variant-numeric: tabular-nums; }
.signup-form .fine { margin-top: .9rem; }

/* ------------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--rule); padding: 2.25rem 0 2.75rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.footer-name { font: 600 1rem/1 var(--wordmark); letter-spacing: .04em; color: var(--paper-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: .2rem 1.5rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--paper-2); text-decoration: none; font-size: .9375rem; }
.footer-links a:hover { color: var(--paper); text-decoration: underline; }
.footer-support { font-size: .9375rem; color: var(--paper-3); }
.footer-support a, .legal a.mail { overflow-wrap: anywhere; }

/* -------------------------------------------------------- text pages */
.simple { padding: clamp(3rem, 8vw, 5.5rem) 0 var(--section-gap); min-height: 60vh; }
.simple h1 { font-size: var(--text-section); letter-spacing: -.01em; }
.lead { margin-top: 1rem; font-size: var(--text-lead); line-height: 1.5; color: var(--paper-2); }
.simple-card > p:last-child { margin-top: 2.5rem; }
.unsub-form { margin-top: 1.5rem; }
.legal h2 { margin: 2.5rem 0 .6rem; font: 600 var(--text-title)/1.3 var(--body); letter-spacing: 0; }
.legal h2 ~ p, .legal li { margin: 0 0 .7rem; color: var(--paper-2); }
.legal ul { margin: .2rem 0 .7rem; padding-left: 1.2rem; }
.legal-updated, .privacy-credit { font-size: var(--text-small); color: var(--paper-3); }
.legal h2 ~ p.legal-updated { margin-top: 2rem; color: var(--paper-3); }
.support-box { margin: 1.75rem 0 .5rem; padding: 1rem 1.25rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.support-box p { color: var(--paper-2); }
.support-box .support-title { margin-bottom: .2rem; font-weight: 600; color: var(--paper); }
.price-table { width: 100%; margin: 1.75rem 0 .5rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.price-table caption { caption-side: bottom; padding-top: .7rem; text-align: left; font-size: var(--text-small); color: var(--paper-3); }
.price-table th, .price-table td { padding: .7rem .75rem .7rem 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.price-table th { border-bottom-color: var(--rule-strong); font-size: var(--text-small); font-weight: 600; color: var(--paper-3); }
.price-table td { color: var(--paper); }
.price-table td:last-child, .price-table th:last-child { padding-right: 0; text-align: right; white-space: nowrap; }
.price-table td:last-child { font-weight: 600; }
.price-table .price-note { display: block; margin-top: .25rem; font-size: var(--text-small); color: var(--paper-3); }
.price-table .price-includes { margin: .4rem 0 0; padding-left: 1.1rem; font-size: var(--text-small); line-height: 1.45; }
.price-table .price-includes li { margin: .15rem 0; color: var(--paper-3); }
.odds-list { margin: 1.75rem 0 .5rem; border-top: 1px solid var(--rule); }
.odds-bag { border-bottom: 1px solid var(--rule); }
.odds-bag summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1rem; padding: .85rem 0; cursor: pointer; list-style-position: inside; }
.odds-bag summary:hover .odds-name { color: var(--jade-strong); }
.odds-name { flex: 1 1 14rem; font-weight: 600; }
.odds-price { color: var(--paper-2); font-variant-numeric: tabular-nums; }
.odds-bag[open] { padding-bottom: .8rem; }
.odds-table { margin: .4rem 0 .6rem; }
.odds-table td:first-child { overflow-wrap: anywhere; }
.legal .odds-line { margin: .5rem 0; color: var(--paper-2); }
.legal .odds-pity { padding: .6rem .9rem; border-radius: var(--radius); background: var(--surface); }
.legal .odds-note, .odds-note { font-size: var(--text-small); color: var(--paper-3); }
.craft-title { margin: 1.75rem 0 0; font-size: 1.0625rem; }
.craft-table th:not(:first-child), .craft-table td:not(:first-child) { text-align: right; white-space: nowrap; }
.craft-table td .odds-note { display: block; font-weight: 400; white-space: normal; }

/* ------------------------------------------------------------- breakpoints */
@media (max-width: 519px) {
  .craft-table th, .craft-table td { padding: .5rem .35rem .5rem 0; font-size: .875rem; }
}
@media (min-width: 420px) {
  .brand-name { display: inline; }
}
@media (min-width: 560px) {
  .site-header .socials { display: flex; }
  .field-row { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (min-width: 760px) {
  :root { --gutter: 2.5rem; }
  .download { grid-template-columns: auto auto; justify-content: start; }
  .download .fine { grid-column: 1 / -1; }
  .join-steps, .join-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
  .join-steps li { grid-template-columns: minmax(0, 1fr); }
  .join-steps li::before { grid-row: auto; margin-bottom: 1rem; font-size: 4.5rem; }
  .closing { display: grid; align-items: end; min-height: min(46vw, 40rem); padding: 8rem 0 clamp(3.5rem, 7vw, 6rem); }
  .closing-scene, .closing:has(.closing-scene)::before { inset: 0; height: 100%; }
  .closing:has(.closing-scene)::before { background:
    linear-gradient(to bottom, var(--ground) 0, rgb(var(--ground-rgb) / 0) 24%, rgb(var(--ground-rgb) / 0) 70%, var(--ground) 100%),
    linear-gradient(to right, rgb(var(--ground-rgb) / .72) 0, rgb(var(--ground-rgb) / .25) 50%, rgb(var(--ground-rgb) / 0) 100%); }
  .milestones { grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 1.5rem; }
  .ms { grid-template-columns: minmax(0, 1fr); align-content: start; justify-items: start; gap: 1rem; padding: 1.5rem 0 0; border-top-width: 2px; }
  .ms:last-child { border-bottom: 0; }
  .ms-badge { justify-items: start; text-align: left; }
  .ms-badge:has(.ms-medal) b { right: auto; width: 5.25rem; text-align: center; }
  .ms-check { top: 1.5rem; }
  .ms-items li { align-items: flex-start; flex-direction: column; gap: .4rem; font-size: 1rem; }
}
@media (max-width: 979px) {
  /* The class backdrops are painted with a dark middle and the scenery at both sides. In one column the backdrop
     therefore sits behind the figure at a size that keeps the scenery in view, and fades out above and below. */
  .panel { position: relative; }
  .panel-back { inset: -7rem auto auto calc(-1 * var(--gutter)); width: calc(100% + 2 * var(--gutter)); max-width: none; height: min(140vw, 46rem); object-position: 50% 50%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 68%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 68%, transparent 100%); }
  .classes::before { content: none; }
}
@media (min-width: 980px) {
  /* from here the class text stands beside the figure */
  .hero { min-height: min(calc(100svh - var(--header)), 60rem); padding: 5rem 0 clamp(3rem, 8svh, 5.5rem); }
  .hero-scene img { object-position: 72% 38%; }
  .hero:has(.hero-scene)::before { background:
    linear-gradient(to bottom, var(--ground) 0, rgb(var(--ground-rgb) / 0) 9%, rgb(var(--ground-rgb) / 0) 80%, var(--ground) 100%),
    linear-gradient(to right, rgb(var(--ground-rgb) / .84) 0, rgb(var(--ground-rgb) / .6) 30%, rgb(var(--ground-rgb) / 0) 60%); }
  .hero-head { max-width: 52rem; }
  .hero-action { max-width: 44rem; }
  .panel { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; gap: 3.5rem; }
  .panel-art { justify-items: start; }
  .swipe-hint { display: none; }
  .closing-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2rem; }
  .closing-main { grid-column: 1 / span 6; }
  .signup-form { grid-column: 8 / span 5; }
}
@media (hover: hover) and (pointer: fine) {
  .swipe-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:active, .stage-nav:active, .orb:hover > * { transform: none; }
}
@media (forced-colors: active) {
  .btn, .tile, .social, .stage-nav { border-color: ButtonText; }
  .pick:checked + .tile { border-color: Highlight; outline: 2px solid Highlight; }
  .tally-bar span { background: Highlight; forced-color-adjust: none; }
}
