/* =========================================================================
   Cosmoria

   The Cosmoria section of the site, loaded only on its pages, on top of
   styles.css. It has its own header and footer and borrows the launcher's
   world: deep space, a black hole, violet and indigo light, cyan crystal.
   Angular rather than round, and dark without being murky: text always sits
   on a plate or a veil dark enough to read against, whatever the artwork
   behind it is doing.

   The artwork is scenery, not a gallery: each piece is the backdrop of one
   chapter of the page, faded into the next.

   Motion is CSS only, and only for somebody who has not asked for less of it.
   Nothing starts hidden: scroll effects move things a little, they never
   fade them in, so the page is whole with or without them, in a full-page
   capture, and in a browser that has no scroll-driven animations.
   ========================================================================= */

.page-cosmoria {
  --cz-void: #04030d;
  --cz-deep: #0a0820;
  --cz-edge: rgba(167, 139, 250, 0.18);
  --cz-edge-strong: rgba(167, 139, 250, 0.4);
  --cz-violet: #8b5cf6;
  --cz-violet-soft: #c4b5fd;
  --cz-indigo: #6366f1;
  --cz-cyan: #22d3ee;
  --cz-cyan-soft: #a5f3fc;
  --cz-text: #f1eeff;
  --cz-soft: #c3bce2;
  --cz-muted: #8e87b0;
  --cz-cut: 12px;
  --cz-shell: 1200px;
  --cz-top: 64px;
  --cz-gap: clamp(88px, 11vw, 160px);

  background: var(--cz-void);
}

.page-cosmoria .ambient {
  background:
    radial-gradient(50% 40% at 85% 30%, rgba(99, 102, 241, 0.1), transparent 70%),
    radial-gradient(45% 35% at 8% 70%, rgba(139, 92, 246, 0.09), transparent 70%);
}

.page-cosmoria main.cz { width: 100%; margin: 0; padding: 0; overflow-x: clip; }

.cz-shell { width: min(100% - 48px, var(--cz-shell)); margin: 0 auto; }

.page-cosmoria :focus-visible { outline: 2px solid var(--cz-cyan); outline-offset: 3px; }

.page-cosmoria [id] { scroll-margin-top: calc(var(--cz-top) + 12px); }

/* ---------------------------------------------------------------- Header -- */

.cz-top {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--cz-top);
  background: linear-gradient(180deg, rgba(4, 3, 13, 0.92), rgba(4, 3, 13, 0.72));
  border-bottom: 1px solid rgba(167, 139, 250, 0.12);
  backdrop-filter: blur(14px) saturate(1.2);
}

/* A thread of crystal light under the bar. */
.cz-top::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.55) 30%, rgba(139, 92, 246, 0.55) 70%, transparent);
  opacity: 0.6;
}

.cz-top-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(100% - 48px, var(--cz-shell));
  height: 100%;
  margin: 0 auto;
}

.cz-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cz-text);
}

.cz-brand img { filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.6)); }

.cz-nav { display: flex; align-items: center; gap: 18px; margin-left: auto; }

.cz-nav-links { display: flex; gap: 4px; }

.cz-nav-links a,
.cz-menu-drawer a {
  position: relative;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--cz-soft);
  transition: color 0.2s;
}

.cz-nav-links a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: linear-gradient(90deg, var(--cz-cyan), var(--cz-violet));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.cz-nav-links a:hover { color: var(--cz-text); }
.cz-nav-links a:hover::after,
.cz-nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.cz-nav-links a[aria-current="page"] { color: var(--cz-text); }

/* The way back to the studio: there, and quiet. */
.cz-parent {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-left: 1px solid var(--cz-edge);
  font-size: 0.8rem;
  color: var(--cz-muted);
  transition: color 0.2s;
}

.cz-parent:hover { color: var(--cz-text); }

.cz-menu { display: none; position: relative; }

.cz-menu > summary {
  display: grid;
  place-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--cz-edge);
  cursor: pointer;
  list-style: none;
}

.cz-menu > summary::-webkit-details-marker { display: none; }
.cz-menu > summary::marker { content: ""; }

.cz-menu > summary span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--cz-text);
  transition: transform 0.25s var(--ease);
}

.cz-menu[open] > summary span:first-child { transform: translateY(3.75px) rotate(45deg); }
.cz-menu[open] > summary span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.cz-menu-drawer {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  width: min(280px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--cz-edge-strong);
  background: #080619;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.cz-menu-drawer a { display: flex; align-items: center; min-height: 48px; padding: 10px 14px; font-size: 1rem; }
.cz-menu-drawer a[aria-current="page"] { color: var(--cz-text); box-shadow: inset 2px 0 0 var(--cz-cyan); }
.cz-menu-drawer .cz-parent { border-left: 0; border-top: 1px solid var(--cz-edge); margin-top: 6px; padding-top: 14px; }

/* ------------------------------------------------------------ Shared type -- */

.cz-display {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.6vw, 3.9rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--cz-text);
  text-wrap: balance;
}

.cz-body { color: var(--cz-soft); font-size: clamp(1rem, 1.2vw, 1.12rem); line-height: 1.7; }
.cz-aside { color: var(--cz-muted); font-size: 0.9rem; }

.cz-icon { display: block; }

/* An angular tile for a line icon. */
.cz-glyph {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  color: var(--cz-cyan-soft);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(139, 92, 246, 0.1));
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.28);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}

/* ------------------------------------------------------------ Status chip -- */

.cz-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border: 1px solid;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.cz-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.cz-chip-built { color: var(--cz-cyan-soft); border-color: rgba(34, 211, 238, 0.42); background: rgba(34, 211, 238, 0.07); }

/* --------------------------------------------------------------- Buttons -- */

.cz-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 14px 16px; }
.cz-call { display: grid; gap: 9px; justify-items: center; }
.cz-call-note { font-size: 0.8rem; color: var(--cz-muted); }

.cz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  margin: 0;
  padding: 14px 26px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  color: #fff;
  clip-path: polygon(var(--cz-cut) 0, 100% 0, 100% calc(100% - var(--cz-cut)), calc(100% - var(--cz-cut)) 100%, 0 100%, 0 var(--cz-cut));
  transition: transform 0.25s var(--ease), filter 0.25s, background-color 0.25s;
}

.cz-btn .cz-icon { width: 19px; height: 19px; }

/* The cut corners would clip an outline, so focus is drawn inside the edge. */
.cz-btn:focus-visible { outline: none; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px var(--cz-cyan); }

.cz-btn-primary {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(100deg, #7c3aed, #4f46e5 55%, #0e7490);
  box-shadow: 0 0 0 1px rgba(196, 181, 253, 0.25) inset;
}

a.cz-btn-primary:hover { transform: translateY(-2px); filter: brightness(1.12); }

/* Outlined, so square: a cut corner would clip its border. */
.cz-btn-ghost {
  clip-path: none;
  color: var(--cz-text);
  background: rgba(4, 3, 13, 0.45);
  box-shadow: inset 0 0 0 1px var(--cz-edge-strong);
}

.cz-btn-ghost:hover { background: rgba(139, 92, 246, 0.2); transform: translateY(-2px); }

/* ------------------------------------------------------- Artwork layers -- */

.cz-layer { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: var(--cz-void); }
.cz-layer picture, .cz-layer img { display: block; width: 100%; height: 100%; }
.cz-layer img { object-fit: cover; }

/* ------------------------------------------------------------------ Hero -- */

.cz-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 32px;
  /* Up behind the header, which is sticky and see-through. */
  margin-top: calc(-1 * var(--cz-top));
  padding: calc(var(--cz-top) + clamp(28px, 5vh, 72px)) 0 clamp(28px, 4vh, 48px);
  min-height: max(680px, min(100svh, 1120px));
  overflow: hidden;
  text-align: center;
}

.cz-hero-art {
  z-index: -3;
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}
.cz-hero-art img { object-position: 60% 42%; }

/* A pool of dark where the words are, light kept where the black hole is. */
.cz-hero-veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(42% 46% at 50% 50%, rgba(4, 3, 13, 0.62), transparent 100%),
    linear-gradient(180deg, rgba(4, 3, 13, 0.55) 0%, rgba(4, 3, 13, 0.1) 22%, rgba(4, 3, 13, 0.18) 60%, var(--cz-void) 100%);
}

/* Voxels, drifting in front of the art and behind the words. */
.cz-voxels { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.cz-voxels i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  transform: rotate(45deg);
  background: linear-gradient(135deg, rgba(165, 243, 252, 0.95), rgba(139, 92, 246, 0.85) 55%, rgba(30, 20, 80, 0.9));
  box-shadow: 0 0 calc(var(--s) * 1.4) rgba(139, 92, 246, 0.65);
  opacity: 0.85;
}

.cz-voxels i:nth-child(1) { --x: 7%; --y: 24%; --s: 14px; --d: 0s; }
.cz-voxels i:nth-child(2) { --x: 17%; --y: 66%; --s: 9px; --d: -3s; }
.cz-voxels i:nth-child(3) { --x: 28%; --y: 16%; --s: 6px; --d: -6s; }
.cz-voxels i:nth-child(4) { --x: 73%; --y: 17%; --s: 10px; --d: -2s; }
.cz-voxels i:nth-child(5) { --x: 86%; --y: 58%; --s: 16px; --d: -5s; }
.cz-voxels i:nth-child(6) { --x: 93%; --y: 30%; --s: 7px; --d: -8s; }
.cz-voxels i:nth-child(7) { --x: 64%; --y: 76%; --s: 8px; --d: -4s; }
.cz-voxels i:nth-child(8) { --x: 38%; --y: 80%; --s: 5px; --d: -7s; }

.cz-hero-body {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 16px;
}

.cz-hero-logo { margin: 0 0 4px; line-height: 0; }

.cz-hero-logo img {
  display: block;
  width: clamp(260px, min(50vh, 42vw), 540px);
  height: auto;
  filter: drop-shadow(0 0 36px rgba(139, 92, 246, 0.5)) drop-shadow(0 12px 40px rgba(4, 3, 13, 0.8));
}

.cz-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.7vw, 2.3rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--cz-text);
  text-shadow: 0 2px 24px rgba(4, 3, 13, 0.9);
  text-wrap: balance;
}

.cz-intro {
  max-width: 46ch;
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  color: var(--cz-soft);
  text-shadow: 0 1px 14px rgba(4, 3, 13, 0.95);
}

.cz-hero .cz-actions { margin-top: 14px; }

/* The pinned versions, as one line along the bottom of the hero. */
.cz-rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 28px;
}

.cz-specs { display: flex; flex-wrap: wrap; justify-content: center; margin: 0; }

.cz-specs div { display: flex; align-items: baseline; gap: 9px; padding: 4px 20px; }
.cz-specs div + div { border-left: 1px solid var(--cz-edge-strong); }
.cz-specs dt { font-size: 0.82rem; color: var(--cz-muted); }
.cz-specs dd { margin: 0; font-family: var(--font-display); font-weight: 600; color: var(--cz-text); }

/* ------------------------------------------------------ Enter Cosmoria -- */

.cz-enter {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: end;
  gap: clamp(48px, 7vw, 88px);
  min-height: clamp(640px, 96vh, 1040px);
  padding: clamp(140px, 20vh, 240px) 0 clamp(56px, 8vh, 100px);
  overflow: hidden;
}

.cz-enter-art {
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
}
.cz-enter-art img { object-position: 60% 45%; }

.cz-enter::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 3, 13, 0.9) 0%, rgba(4, 3, 13, 0.6) 38%, rgba(4, 3, 13, 0.05) 72%),
    linear-gradient(180deg, transparent 45%, rgba(4, 3, 13, 0.85) 100%);
}

.cz-enter-body { display: grid; gap: 22px; justify-items: start; }
.cz-enter-body > * { max-width: 36rem; }
.cz-enter .cz-display { font-size: clamp(2.6rem, 6.4vw, 5.4rem); }

.cz-enter-lead {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.65;
  color: var(--cz-soft);
}

.cz-realms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--cz-edge-strong);
}

.cz-realms li { position: relative; padding: 26px 32px 0 0; }
.cz-realms li + li { padding-left: 32px; border-left: 1px solid var(--cz-edge); }

.cz-realms li::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, var(--cz-cyan), transparent);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
}

.cz-realms li + li::before { left: 32px; }

.cz-realm-mark {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cz-cyan-soft);
}

.cz-realms h3 { font-size: 1.3rem; color: var(--cz-text); margin-bottom: 8px; }
.cz-realms p { color: var(--cz-soft); }

/* --------------------------------------------------------------- Launcher -- */

.cz-launcher {
  position: relative;
  padding: var(--cz-gap) 0;
  background:
    radial-gradient(40% 50% at 18% 30%, rgba(99, 102, 241, 0.18), transparent 70%),
    radial-gradient(35% 45% at 90% 80%, rgba(34, 211, 238, 0.07), transparent 70%);
}

.cz-launcher-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.cz-launcher-intro {
  position: sticky;
  top: calc(var(--cz-top) + 32px);
  display: grid;
  gap: 20px;
  justify-items: start;
}

/* The launcher's icon, with an orbit of light around it. */
.cz-emblem { position: relative; isolation: isolate; width: 196px; height: 196px; margin: 26px 0 26px 26px; }

/* A slow pool of light behind the icon, so it sits in space rather than on black. */
.cz-emblem::after {
  content: "";
  position: absolute;
  inset: -60px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.32), rgba(34, 211, 238, 0.08) 55%, transparent);
}

.cz-emblem img {
  position: relative;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.6));
}

.cz-emblem::before {
  content: "";
  position: absolute;
  inset: -24px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 20%, rgba(34, 211, 238, 0.7) 32%, transparent 44% 70%, rgba(139, 92, 246, 0.75) 82%, transparent 94%);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  mask: radial-gradient(closest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
}

.cz-product {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--cz-cyan-soft);
}

.cz-ledger { display: grid; gap: 44px; }

.cz-ledger-group ul { margin: 0; padding: 0; list-style: none; }

.cz-ledger-head { margin: 0 0 6px; padding-bottom: 14px; border-bottom: 1px solid var(--cz-edge-strong); }

.cz-ledger-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid rgba(167, 139, 250, 0.1);
  transition: padding-left 0.3s var(--ease);
}

.cz-ledger-item:hover { padding-left: 6px; }
.cz-ledger-item h4 { margin: 2px 0 4px; font-family: var(--font-display); font-size: 1.12rem; color: var(--cz-text); }
.cz-ledger-item p { color: var(--cz-soft); font-size: 0.96rem; }

/* ------------------------------------------------ Install, update, repair -- */

.cz-flow { padding: 0 0 var(--cz-gap); }

.cz-flow-title { max-width: 18ch; margin-bottom: clamp(44px, 6vw, 72px); }

.cz-flowline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The line the three stages sit on. */
.cz-flowline::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--cz-cyan), var(--cz-violet) 50%, var(--cz-indigo) 90%, transparent);
  opacity: 0.7;
}

.cz-flowline li { position: relative; padding-top: 40px; }

.cz-node {
  position: absolute;
  top: 0;
  left: 0;
  width: 15px;
  height: 15px;
  transform: rotate(45deg);
  background: var(--cz-void);
  border: 2px solid var(--cz-cyan);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.7);
}

.cz-step-no {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--cz-muted);
}

.cz-flowline h3 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); color: var(--cz-text); margin-bottom: 10px; }
.cz-flowline p { color: var(--cz-soft); }

.cz-keep {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: clamp(48px, 6vw, 80px);
  padding: 28px clamp(22px, 3vw, 36px);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.09), rgba(99, 102, 241, 0.05) 60%, transparent);
  border-left: 2px solid var(--cz-cyan);
}

.cz-keep h3 { font-size: 1.2rem; color: var(--cz-text); margin-bottom: 6px; }
.cz-keep p { max-width: 70ch; color: var(--cz-soft); }

/* ------------------------------------------------------------------ Setup -- */

.cz-setup {
  position: relative;
  isolation: isolate;
  padding: clamp(96px, 12vw, 180px) 0;
  overflow: hidden;
}

/* The towers take the right of the section, fading into the page on the left. */
.cz-setup-art {
  left: 34%;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, #000 38%),
    linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 38%),
    linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
  mask-composite: intersect;
}
.cz-setup-art img { object-position: 72% 50%; }

.cz-setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.cz-setup-copy { display: grid; gap: 22px; }

.cz-points { display: grid; gap: 12px; margin: 4px 0 0; padding: 0; list-style: none; }

.cz-points li { position: relative; padding-left: 24px; color: var(--cz-soft); }

.cz-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.6em;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--cz-cyan);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.8);
}

/* Read like a configuration, because it is one: the pack's own pins. */
.cz-panel {
  margin: 0;
  padding: 28px 30px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  background:
    linear-gradient(180deg, rgba(34, 211, 238, 0.07), transparent 40%),
    rgba(5, 4, 16, 0.9);
  box-shadow: inset 0 0 0 1px var(--cz-edge-strong), 0 40px 90px -30px rgba(99, 102, 241, 0.55);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}

.cz-panel div {
  display: grid;
  grid-template-columns: 14ch minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(167, 139, 250, 0.18);
}

.cz-panel div:last-child { border-bottom: 0; }
.cz-panel dt { color: var(--cz-muted); }
.cz-panel dd { margin: 0; color: var(--cz-cyan-soft); }

/* ------------------------------------------------------------ The modpack -- */

.cz-pack { position: relative; isolation: isolate; padding: var(--cz-gap) 0; }

/* A faint halo of the section's light, so the statement is not white on nothing. */
.cz-pack::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(34% 46% at 22% 55%, rgba(99, 102, 241, 0.13), transparent 70%),
    radial-gradient(24% 34% at 78% 50%, rgba(34, 211, 238, 0.05), transparent 70%);
  pointer-events: none;
}

.cz-pack-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(40px, 7vw, 110px);
  align-items: end;
}

/* An energy line down the side of the statement, with a crystal at its head. */
.cz-pack-statement { position: relative; display: grid; gap: 24px; padding-left: clamp(22px, 2.6vw, 36px); }

.cz-pack-statement::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 6px;
  left: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--cz-cyan), var(--cz-violet) 55%, transparent);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.35);
}

.cz-pack-statement::after {
  content: "";
  position: absolute;
  top: 0;
  left: -4px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #ecfeff, var(--cz-cyan) 45%, var(--cz-violet));
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.8);
}
.cz-pack .cz-display { font-size: clamp(2.2rem, 5vw, 4.3rem); }

/* The words picked out in crystal light. */
.cz-pack .cz-display {
  background: linear-gradient(100deg, #f5f3ff 0%, #ddd6fe 40%, #a5b4fc 70%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cz-pack-list { margin: 0; padding: 0; list-style: none; }

.cz-pack-list li { padding: 22px 0; border-top: 1px solid var(--cz-edge); }
.cz-pack-list li:first-child { border-top: 1px solid transparent; border-image: linear-gradient(90deg, var(--cz-cyan), var(--cz-violet) 50%, transparent) 1; }
.cz-pack-list li:last-child { border-bottom: 1px solid var(--cz-edge); }

.cz-pack-list h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.15rem;
  color: var(--cz-text);
  margin-bottom: 6px;
}

.cz-pack-list h3::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--cz-cyan), var(--cz-violet));
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
}

.cz-pack-list p { padding-left: 20px; color: var(--cz-soft); font-size: 0.96rem; }

/* -------------------------------------------------------------------- FAQ -- */

.cz-faq-section { position: relative; isolation: isolate; padding: 0 0 var(--cz-gap); }

.cz-faq-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(28% 40% at 16% 22%, rgba(139, 92, 246, 0.11), transparent 70%);
  pointer-events: none;
}

.cz-faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.cz-faq-grid > h2 { position: sticky; top: calc(var(--cz-top) + 40px); }

/* A short bar of crystal light under the title. */
.cz-faq-grid > h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin-top: 22px;
  background: linear-gradient(90deg, var(--cz-cyan), var(--cz-violet));
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.5);
}

.cz-faq { border-top: 1px solid transparent; border-image: linear-gradient(90deg, var(--cz-cyan), var(--cz-violet) 45%, var(--cz-edge) 100%) 1; }

.cz-faq details { border-bottom: 1px solid var(--cz-edge); }

.cz-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
}

.cz-faq summary::-webkit-details-marker { display: none; }
.cz-faq summary::marker { content: ""; }
.cz-faq summary h3 { font-size: 1.1rem; font-weight: 600; color: var(--cz-text); transition: color 0.2s; }
.cz-faq summary:hover h3 { color: var(--cz-cyan-soft); }

/* A plus that turns into a minus. */
.cz-faq summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--cz-cyan), var(--cz-cyan)) center / 14px 2px no-repeat,
    linear-gradient(var(--cz-cyan), var(--cz-cyan)) center / 2px 14px no-repeat;
  transition: transform 0.3s var(--ease);
}

.cz-faq details[open] summary::after {
  transform: rotate(90deg);
  background: linear-gradient(var(--cz-cyan), var(--cz-cyan)) center / 14px 2px no-repeat;
}

.cz-faq details[open] summary h3 { color: var(--cz-cyan-soft); }
.cz-faq details p { max-width: 66ch; padding: 0 0 24px; color: var(--cz-soft); }

/* ---------------------------------------------------------- Closing call -- */

/* The gateway, like a title screen: the art above, the words at its foot. */
.cz-cta {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: end;
  min-height: clamp(600px, 92vh, 1000px);
  padding: 0 0 clamp(56px, 8vh, 96px);
  overflow: hidden;
  text-align: center;
}

.cz-cta-art {
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%);
}
.cz-cta-art img { object-position: 50% 22%; }

.cz-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 38%, rgba(4, 3, 13, 0.82) 64%, var(--cz-void) 94%);
}

.cz-cta-body { display: grid; gap: 18px; justify-items: center; }
.cz-cta-body > p { max-width: 54ch; color: var(--cz-soft); font-size: 1.08rem; }
.cz-cta .cz-call { margin-top: 8px; }

/* ---------------------------------------------------------------- Footer -- */

.cz-foot {
  position: relative;
  padding: 64px 0 28px;
  border-top: 1px solid var(--cz-edge);
  background: linear-gradient(180deg, rgba(10, 8, 32, 0.6), #030209 70%);
  font-size: 0.9rem;
}

.cz-landing .cz-foot { border-top-color: transparent; background: #030209; }

.cz-foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 48px;
}

.cz-foot-brand { display: grid; gap: 14px; align-content: start; }
.cz-foot-brand p { color: var(--cz-soft); }
.cz-byline { color: var(--cz-muted) !important; font-size: 0.86rem; }
.cz-byline a { color: var(--cz-violet-soft); }
.cz-byline a:hover { color: #fff; }

.cz-foot-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cz-foot-links div { display: grid; gap: 10px; align-content: start; }

.cz-foot-links h2 {
  margin-bottom: 4px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--cz-text);
}

.cz-foot-links a { color: var(--cz-muted); overflow-wrap: anywhere; transition: color 0.2s; }
.cz-foot-links a:hover,
.cz-foot-links a[aria-current="page"] { color: var(--cz-text); }

.cz-foot-notes {
  display: grid;
  gap: 6px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid rgba(167, 139, 250, 0.1);
}

.cz-foot-notes p { max-width: 90ch; font-size: 0.8rem; color: var(--cz-muted); }

.cz-foot-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 22px;
  font-size: 0.78rem;
  color: var(--cz-muted);
}

.cz-foot-bottom a { color: var(--cz-soft); text-decoration: underline; text-underline-offset: 3px; }
.cz-foot .lang-picker > summary { border-radius: 0; border-color: var(--cz-edge); }
.cz-foot .lang-menu { border-radius: 0; background: #0b0920; border-color: var(--cz-edge-strong); }
.cz-foot .lang-choice { border-radius: 0; }

/* -------------------------------------------------------------- Documents -- */

/*
 * The documents are for reading: no artwork behind them, a calm background,
 * and the site's legal layout in the section's colours.
 */
.cz-doc {
  position: relative;
  width: min(100% - 48px, var(--cz-shell));
  padding-top: clamp(40px, 6vw, 72px);
}

.cz-doc::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  z-index: -1;
  width: 100vw;
  height: 320px;
  transform: translateX(-50%);
  background:
    radial-gradient(50% 100% at 20% 0%, rgba(99, 102, 241, 0.16), transparent 70%),
    radial-gradient(40% 90% at 85% 0%, rgba(34, 211, 238, 0.06), transparent 70%);
  pointer-events: none;
}

.cz-doc .legal-head { border-bottom-color: var(--cz-edge); }
.cz-doc .legal-head h1 { font-size: clamp(2rem, 4vw, 2.9rem); letter-spacing: -0.02em; color: var(--cz-text); }
.cz-doc .legal-head .lead { color: var(--cz-soft); font-size: 1.06rem; }

.cz-doc .cz-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--cz-cyan-soft);
}

.cz-doc .cz-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--cz-cyan), var(--cz-violet));
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.7);
}

.cz-doc .legal-switch { border-radius: 0; border-color: var(--cz-edge); background: rgba(10, 8, 32, 0.6); }
.cz-doc .legal-switch a { border-radius: 0; color: var(--cz-soft); }
.cz-doc .legal-switch a[aria-current="page"] {
  color: #fff;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.45), rgba(99, 102, 241, 0.32));
  box-shadow: inset 0 -2px 0 var(--cz-cyan);
}

.cz-doc .legal-toc { top: calc(var(--cz-top) + 24px); }
.cz-doc .legal-toc { border-radius: 0; }

/* The folded contents, for narrow screens only. */
.cz-toc-narrow { display: none; }

.cz-toc-narrow details { border: 1px solid var(--cz-edge); background: rgba(10, 8, 32, 0.55); }

.cz-toc-narrow summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--cz-text);
  cursor: pointer;
  list-style: none;
}

.cz-toc-narrow summary::-webkit-details-marker { display: none; }
.cz-toc-narrow summary::marker { content: ""; }

.cz-toc-narrow summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--cz-cyan);
  border-bottom: 2px solid var(--cz-cyan);
  margin: -4px 4px 0 0;
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease), margin 0.25s var(--ease);
}

.cz-toc-narrow details[open] summary::after { margin-top: 4px; transform: rotate(-135deg); }
.cz-toc-narrow details[open] summary { border-bottom: 1px solid var(--cz-edge); }

.cz-toc-narrow ol { display: grid; margin: 0; padding: 6px 0; list-style: none; counter-reset: toc; }

.cz-toc-narrow a {
  display: flex;
  gap: 10px;
  padding: 9px 16px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--cz-soft);
}

.cz-toc-narrow li { counter-increment: toc; }
.cz-toc-narrow a::before {
  content: counter(toc, decimal-leading-zero);
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.8;
  color: var(--cz-muted);
}

.cz-toc-narrow a:hover { color: var(--cz-text); background: rgba(139, 92, 246, 0.1); }

@media (max-width: 900px) {
  .cz-doc .cz-toc-wide { display: none; }
  .cz-toc-narrow { display: block; }
}
.cz-doc .legal-toc a { border-left-color: var(--cz-edge); }
.cz-doc .legal-toc a:hover { border-color: var(--cz-cyan); }
.cz-doc .legal-section { scroll-margin-top: calc(var(--cz-top) + 20px); }
.cz-doc .legal-section + .legal-section { border-top-color: rgba(167, 139, 250, 0.12); }
.cz-doc .legal-prose { color: #cfc9e8; }
.cz-doc .legal-prose a { color: var(--cz-violet-soft); }
.cz-doc .legal-prose a:hover { color: #fff; }
.cz-doc .legal-prose ul { margin: 0 0 0.9em; padding-left: 1.2em; }
.cz-doc .legal-prose li { margin: 0.25em 0; }
.cz-doc .legal-prose li::marker { color: var(--cz-cyan); }
.cz-doc .legal-foot a { color: var(--cz-violet-soft); }
.cz-doc .callout { border-radius: 0; }
.cz-doc .contact-list div { border-radius: 0; }

.cz-facts { display: grid; gap: 1px; margin: 0 0 1em; background: var(--cz-edge); border: 1px solid var(--cz-edge); }
.cz-facts div { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: 16px; padding: 11px 14px; background: var(--cz-void); }
.cz-facts dt { color: var(--cz-muted); font-size: 0.88rem; }
.cz-facts dd { margin: 0; color: var(--cz-text); }

/* Missing on purpose, and impossible to mistake for an answer. */
.cz-pending {
  display: inline-block;
  padding: 1px 8px;
  border: 1px dashed #ff8fa8;
  color: #ffc2cf;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* ------------------------------------------------------------------ News -- */

/* The same entries as the launcher's: dated, plain text, newest first. */
.cz-news { position: relative; isolation: isolate; padding: 0 0 var(--cz-gap); }
.cz-news .cz-body { max-width: 62ch; margin-top: 12px; }

.cz-news-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 18px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.cz-news-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 26px;
  background: rgba(5, 4, 16, 0.82);
  box-shadow: inset 0 0 0 1px var(--cz-edge);
}

.cz-news-item time { color: var(--cz-cyan-soft); font-family: var(--font-mono); font-size: 0.82rem; }
.cz-news-item h3 { font-family: var(--font-display); font-size: 1.2rem; color: var(--cz-text); }
.cz-news-item p { color: var(--cz-soft); font-size: 0.96rem; }
.cz-news-item .cz-points { gap: 8px; font-size: 0.92rem; }

.cz-news-link { margin-top: auto; padding-top: 6px; color: var(--cz-violet-soft); font-weight: 600; text-decoration: none; }
.cz-news-link:hover { color: #fff; }

/* Product and type, before the date: small, flat, one accent per product. */
.cz-news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; }
.cz-news-meta time { margin-left: 4px; }

.cz-tag {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--cz-edge);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--cz-soft);
}

.cz-tag-launcher { color: var(--cz-cyan-soft); border-color: rgba(34, 211, 238, 0.4); }
.cz-tag-modpack { color: var(--cz-violet-soft); border-color: rgba(167, 139, 250, 0.45); }
.cz-tag-mod { color: #f9a8d4; border-color: rgba(244, 114, 182, 0.45); }

.cz-news-all { margin-top: 22px; }
.cz-news-all a { color: var(--cz-violet-soft); font-weight: 600; }
.cz-news-all a:hover { color: #fff; }

/* ------------------------------------------------------------- News page -- */

.cz-np { padding: clamp(36px, 5vw, 64px) 0 clamp(64px, 8vw, 104px); }
.cz-np-shell { width: min(100% - 48px, 860px); margin: 0 auto; }

.cz-np h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.01em;
  color: var(--cz-text);
}

.cz-np-lead { margin-top: 8px; color: var(--cz-soft); }

/* Radio buttons drawn as a row of small toggles. */
.cz-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 28px 0 0;
  padding: 0;
  border: 0;
}

.cz-filter-legend {
  float: left;
  width: 100%;
  margin-bottom: 8px;
  padding: 0;
  font-size: 0.84rem;
  color: var(--cz-muted);
}

.cz-filter-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

.cz-filter-label {
  padding: 6px 12px;
  border: 1px solid var(--cz-edge);
  border-radius: 4px;
  font-size: 0.86rem;
  color: var(--cz-soft);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}

.cz-filter-label:hover { color: var(--cz-text); border-color: var(--cz-edge-strong); }
.cz-filter-input:checked + .cz-filter-label { color: #fff; border-color: var(--cz-violet); background: rgba(139, 92, 246, 0.2); }
.cz-filter-input:focus-visible + .cz-filter-label { outline: 2px solid var(--cz-cyan); outline-offset: 2px; }

.cz-np-list { display: grid; gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.cz-np-list .cz-news-item { padding: 20px 22px; border-radius: 4px; }

/* The filter: everything but the chosen product steps aside. */
.cz-np-browse:has(#cz-f-launcher:checked) .cz-news-item:not([data-product="launcher"]),
.cz-np-browse:has(#cz-f-modpack:checked) .cz-news-item:not([data-product="modpack"]),
.cz-np-browse:has(#cz-f-mod:checked) .cz-news-item:not([data-product="mod"]) { display: none; }

@media (max-width: 720px) {
  .cz-np-shell { width: min(100% - 32px, 860px); }
  .cz-np-list .cz-news-item { padding: 18px 16px; }
}

/* -------------------------------------------------------------- Download -- */

/*
 * A download page, not a landing page: one column, the file's facts as a
 * spec sheet, the button plain. No artwork, no glow, no gradient.
 */
.cz-dl { padding: clamp(36px, 5vw, 64px) 0 clamp(64px, 8vw, 104px); }

.cz-dl-shell { width: min(100% - 48px, 920px); margin: 0 auto; }

.cz-dl-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px 20px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--cz-edge);
}

.cz-dl-icon { display: block; width: 44px; height: 44px; }

.cz-dl-title h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--cz-text);
}

.cz-dl-version {
  margin-left: 4px;
  font-family: var(--font-mono);
  font-size: 0.62em;
  font-weight: 500;
  color: var(--cz-cyan-soft);
  vertical-align: 0.18em;
}

.cz-dl-title p { margin-top: 6px; max-width: 60ch; font-size: 0.94rem; color: var(--cz-soft); }

.cz-dl-action { display: grid; gap: 6px; justify-items: end; }

.cz-dl-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: 4px;
  background: #6d28d9;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  white-space: nowrap;
  transition: background-color 0.15s;
}

.cz-dl-button:hover { background: #7c3aed; }
.cz-dl-button:focus-visible { outline: 2px solid var(--cz-cyan); outline-offset: 2px; }
.cz-dl-button .cz-icon { width: 17px; height: 17px; }

.cz-dl-note { font-size: 0.78rem; color: var(--cz-muted); }

.cz-dl-spec {
  margin: 28px 0 0;
  border: 1px solid var(--cz-edge);
  border-radius: 4px;
  background: rgba(10, 8, 28, 0.6);
}

.cz-dl-spec div {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 16px;
  padding: 11px 16px;
}

.cz-dl-spec div + div { border-top: 1px solid rgba(167, 139, 250, 0.1); }
.cz-dl-spec dt { font-size: 0.86rem; color: var(--cz-muted); }
.cz-dl-spec dd { margin: 0; font-family: var(--font-mono); font-size: 0.86rem; color: var(--cz-text); }
.cz-dl-hash { word-break: break-all; user-select: all; color: var(--cz-soft) !important; }

.cz-dl-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px; font-size: 0.84rem; }
.cz-dl-links a { color: var(--cz-muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(167, 139, 250, 0.35); }
.cz-dl-links a:hover { color: var(--cz-text); }

.cz-dl-unavailable { margin-top: 24px; color: var(--cz-soft); }

.cz-dl-more {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 40px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--cz-edge);
}

.cz-dl-more h2 { margin-bottom: 10px; font-size: 1rem; font-weight: 600; color: var(--cz-text); }
.cz-dl-more p, .cz-dl-more li { font-size: 0.92rem; color: var(--cz-soft); }
.cz-dl-more ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cz-dl-more li { position: relative; padding-left: 16px; }

.cz-dl-more li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  background: var(--cz-cyan);
}

@media (max-width: 720px) {
  .cz-dl-shell { width: min(100% - 32px, 920px); }
  .cz-dl-head { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .cz-dl-action { grid-column: 1 / -1; justify-items: stretch; }
  .cz-dl-button { justify-content: center; padding: 13px 18px; }
  .cz-dl-note { text-align: center; }
  .cz-dl-spec div { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 10px 14px; }
  .cz-dl-more { grid-template-columns: minmax(0, 1fr); }
}

/* ----------------------------------------------------------------- Store -- */

/*
 * The store: a short hero, then each category as a progression of cards.
 * The page stays as sober as the rest of the section; the colour is left to
 * the grades' own artwork. The highest grade gets a touch of gold on its
 * edge, nothing louder.
 */
.cz-shop-page { --cz-gold: #f3c969; --cz-gold-soft: #fbe3a6; }

.cz-shop-hero {
  position: relative;
  isolation: isolate;
  margin-top: calc(-1 * var(--cz-top));
  padding: calc(var(--cz-top) + clamp(56px, 9vw, 120px)) 0 clamp(48px, 7vw, 88px);
  overflow: hidden;
}

.cz-shop-hero-art {
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
}
.cz-shop-hero-art img { object-position: 50% 40%; opacity: 0.55; }

.cz-shop-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 80% at 20% 60%, rgba(4, 3, 13, 0.75), transparent 100%),
    linear-gradient(180deg, rgba(4, 3, 13, 0.5), rgba(4, 3, 13, 0.2) 40%, var(--cz-void) 100%);
}

.cz-shop-hero-body { display: grid; gap: 16px; justify-items: start; }
.cz-shop-hero-body .cz-body { max-width: 56ch; color: var(--cz-text); }
.cz-shop-hero-body .cz-aside { max-width: 60ch; }

.cz-shop-body { padding: 0 0 var(--cz-gap); }

.cz-shop-category + .cz-shop-category { margin-top: clamp(56px, 8vw, 96px); }
.cz-shop-category-head { display: grid; gap: 8px; max-width: 64ch; }

.cz-shop-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.015em;
  color: var(--cz-text);
}

/* The progression: a rail of light under the cards, cyan to violet to gold. */
.cz-grades {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 18px;
  margin: 32px 0 0;
  padding: 18px 0 0;
  list-style: none;
}

.cz-grades::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cz-cyan), var(--cz-violet) 60%, var(--cz-gold));
  opacity: 0.7;
}

.cz-grade {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(8, 6, 25, 0.88);
  box-shadow: inset 0 0 0 1px var(--cz-edge);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.cz-grade:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--cz-edge-strong), 0 24px 48px rgba(0, 0, 0, 0.45); }

.cz-grade-top {
  background:
    linear-gradient(160deg, rgba(243, 201, 105, 0.1), transparent 40%),
    rgba(10, 7, 28, 0.92);
  box-shadow: inset 0 0 0 1px rgba(243, 201, 105, 0.45);
}

.cz-grade-top:hover { box-shadow: inset 0 0 0 1px rgba(243, 201, 105, 0.7), 0 24px 56px rgba(139, 92, 246, 0.25); }

/* Square, sized before it loads, and shimmering while the image arrives. */
.cz-grade-art {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background:
    linear-gradient(110deg, transparent 30%, rgba(196, 181, 253, 0.08) 50%, transparent 70%) 0 0 / 250% 100%,
    radial-gradient(70% 70% at 50% 40%, rgba(139, 92, 246, 0.22), transparent 70%),
    linear-gradient(160deg, #120d33, #070514);
}

.cz-grade-art img { display: block; width: 100%; height: 100%; object-fit: cover; }

.cz-grade-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
}

.cz-grade-placeholder span {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 700;
  color: var(--cz-text);
  text-shadow: 0 0 24px rgba(139, 92, 246, 0.8);
}

.cz-grade-placeholder small { font-family: var(--font-mono); font-size: 0.7rem; color: var(--cz-muted); letter-spacing: 0.06em; }
.cz-grade-top .cz-grade-placeholder span { color: var(--cz-gold-soft); text-shadow: 0 0 24px rgba(243, 201, 105, 0.55); }

.cz-grade-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 18px 18px 20px; }

.cz-grade-step { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--cz-cyan-soft); }
.cz-grade-step-top { color: var(--cz-gold); }

.cz-grade h3 { font-size: 1.3rem; color: var(--cz-text); }

.cz-grade-price {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--cz-text);
  font-variant-numeric: tabular-nums;
}

.cz-grade-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.cz-tag-permanent { color: var(--cz-cyan-soft); border-color: rgba(34, 211, 238, 0.4); }

.cz-grade-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  color: var(--cz-soft);
  font-size: 0.92rem;
}

.cz-grade-cta { margin-top: auto; min-height: 44px; padding: 10px 16px; font-size: 0.92rem; }

.cz-shop-upgrade { margin-top: clamp(40px, 5vw, 64px); }
.cz-shop-fine { margin-top: 16px; font-size: 0.82rem; }

/* Unavailable or empty: one calm panel where the catalogue would be. */
.cz-shop-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  max-width: 720px;
  padding: 26px clamp(20px, 3vw, 32px);
  background: rgba(8, 6, 25, 0.88);
  box-shadow: inset 0 0 0 1px var(--cz-edge);
}

.cz-shop-notice h2 { font-size: 1.2rem; color: var(--cz-text); margin-bottom: 6px; }
.cz-shop-notice p { color: var(--cz-soft); }

/* A package's own page. */
.cz-shop-item-page { padding-top: clamp(28px, 4vw, 48px); }

.cz-shop-back { display: inline-flex; gap: 8px; margin-bottom: 24px; color: var(--cz-violet-soft); font-weight: 600; font-size: 0.92rem; }
.cz-shop-back:hover { color: #fff; }

.cz-shop-item {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.cz-shop-item .cz-grade-art { clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px); box-shadow: inset 0 0 0 1px var(--cz-edge); }
.cz-shop-item-top .cz-grade-art { box-shadow: inset 0 0 0 1px rgba(243, 201, 105, 0.45); }
.cz-shop-item-body { display: grid; gap: 12px; justify-items: start; }
.cz-shop-item-body .cz-display { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.cz-shop-item-body .cz-grade-price { font-size: 1.8rem; }
.cz-shop-item-body .cz-body { max-width: 60ch; }

.cz-shop-soon {
  margin-top: 8px;
  padding: 12px 16px;
  border-left: 2px solid var(--cz-violet);
  background: rgba(139, 92, 246, 0.1);
  color: var(--cz-soft);
  font-size: 0.92rem;
}

/* Five across where they fit, joined by the rail; a vertical rail on a phone. */
@media (min-width: 1100px) {
  .cz-grades { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .cz-shop-item { grid-template-columns: minmax(0, 1fr); }
  .cz-shop-item .cz-grade-art { max-width: 420px; width: 100%; }
}

@media (max-width: 640px) {
  .cz-grades { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 0 0 0 18px; }
  .cz-grades::before { top: 0; bottom: 0; left: 0; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, var(--cz-cyan), var(--cz-violet) 60%, var(--cz-gold)); }
  .cz-grade { display: grid; grid-template-columns: 112px minmax(0, 1fr); }
  .cz-grade-art { align-self: start; }
  .cz-grade-body { padding: 12px 14px 14px; gap: 6px; }
  .cz-grade h3 { font-size: 1.15rem; }
  .cz-grade-price { font-size: 1.2rem; }
  .cz-grade-desc { -webkit-line-clamp: 2; font-size: 0.88rem; }
  .cz-grade-placeholder span { font-size: 1.1rem; }
  .cz-grade-placeholder small { display: none; }
  .cz-shop-notice { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- Motion -- */

@media (prefers-reduced-motion: no-preference) {
  /* The empty frame of a grade's artwork, while it loads. */
  .cz-grade-art:has(img) { animation: cz-shimmer 2.4s linear 3; }

  /* The hero drifts, slowly enough to be felt rather than watched. */
  .cz-hero-art img { animation: cz-drift 50s ease-in-out infinite alternate; will-change: transform; }

  .cz-voxels i { animation: cz-float 14s ease-in-out var(--d) infinite alternate; }

  .cz-hero-logo img { animation: cz-glow 7s ease-in-out infinite alternate; }

  .cz-hero-body > * { animation: cz-arrive 1s var(--ease) both; }
  .cz-hero-body > :nth-child(2) { animation-delay: 0.12s; }
  .cz-hero-body > :nth-child(3) { animation-delay: 0.2s; }
  .cz-hero-body > :nth-child(4) { animation-delay: 0.28s; }

  .cz-emblem::before { animation: cz-orbit 18s linear infinite; }


  /*
   * Scroll effects. Transform only, never opacity: something that has not
   * scrolled into view yet is already there, just a little lower, so a
   * full-page capture or a jump to an anchor shows every section whole.
   */
  @supports (animation-timeline: view()) {
    .cz-enter-art img,
    .cz-setup-art img,
    .cz-cta-art img {
      animation: cz-parallax linear both;
      animation-timeline: view();
      animation-range: cover;
    }

    /*
     * Forwards only: until an element reaches the viewport it sits where the
     * layout put it, so nothing is ever drawn out of place, overlapping what
     * follows, in a capture of the whole page.
     */
    .cz-rise {
      animation: cz-rise linear forwards;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }
  }
}

@keyframes cz-drift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-1.6%, -1.2%, 0); }
}

@keyframes cz-float {
  from { transform: translate3d(0, 0, 0) rotate(45deg); }
  to { transform: translate3d(12px, -26px, 0) rotate(135deg); }
}

@keyframes cz-glow {
  from { filter: drop-shadow(0 0 28px rgba(139, 92, 246, 0.4)) drop-shadow(0 12px 40px rgba(4, 3, 13, 0.8)); }
  to { filter: drop-shadow(0 0 48px rgba(34, 211, 238, 0.4)) drop-shadow(0 12px 40px rgba(4, 3, 13, 0.8)); }
}

@keyframes cz-arrive {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes cz-orbit { to { transform: rotate(1turn); } }

@keyframes cz-parallax {
  from { transform: scale(1.14) translate3d(0, -4%, 0); }
  to { transform: scale(1.14) translate3d(0, 4%, 0); }
}

@keyframes cz-rise {
  from { transform: translateY(36px); }
  to { transform: none; }
}

/* ------------------------------------------------------------ Responsive -- */

@media (min-width: 1800px) {
  .page-cosmoria { --cz-shell: 1360px; --cz-top: 72px; }
  .cz-body { font-size: 1.16rem; }
  .cz-hero-logo img { width: clamp(300px, min(50vh, 42vw), 620px); }
}

@media (min-width: 2400px) {
  .page-cosmoria { --cz-shell: 1560px; }
  html { font-size: 18px; }
}

@media (max-width: 1024px) {
  .cz-launcher-grid { grid-template-columns: minmax(0, 1fr); }
  .cz-launcher-intro { position: static; }
  .cz-setup-grid { grid-template-columns: minmax(0, 1fr); }
  .cz-setup-art { left: 0; opacity: 0.4; }
  .cz-pack-grid { grid-template-columns: minmax(0, 1fr); }
  .cz-faq-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .cz-faq-grid > h2 { position: static; }
  .cz-foot-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

/* Seven links just fit above the menu's breakpoint once they sit a little closer. */
@media (max-width: 1000px) {
  .cz-nav { gap: 12px; }
  .cz-nav-links a { padding: 8px 9px; }
  .cz-nav-links a::after { left: 9px; right: 9px; }
}

@media (max-width: 860px) {
  .cz-nav-links, .cz-nav > .cz-parent { display: none; }
  .cz-menu { display: block; }

  .cz-realms { grid-template-columns: minmax(0, 1fr); border-top: 0; }
  .cz-realms li,
  .cz-realms li + li { padding: 22px 0 0; border-left: 0; border-top: 1px solid var(--cz-edge-strong); }
  .cz-realms li + li { margin-top: 18px; }
  .cz-realms li + li::before { left: 0; }

  .cz-flowline { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-left: 36px; }
  .cz-flowline::before { top: 0; bottom: 0; left: 7px; right: auto; width: 1px; height: auto; background: linear-gradient(180deg, var(--cz-cyan), var(--cz-violet) 60%, transparent); }
  .cz-flowline li { padding-top: 0; }
  .cz-node { left: -36px; top: 4px; }

  .cz-enter::before {
    background: linear-gradient(180deg, rgba(4, 3, 13, 0.25) 0%, rgba(4, 3, 13, 0.55) 40%, rgba(4, 3, 13, 0.9) 70%, rgba(4, 3, 13, 0.9) 100%);
  }
}

@media (max-width: 640px) {
  .page-cosmoria { --cz-top: 58px; }
  .cz-shell, .cz-top-bar, .cz-doc { width: min(100% - 32px, var(--cz-shell)); }
  .cz-brand { font-size: 0.94rem; letter-spacing: 0.16em; }

  .cz-hero { min-height: max(620px, 100svh); padding-top: calc(var(--cz-top) + 18px); gap: 24px; }
  .cz-hero-art img { object-position: 64% 50%; }
  .cz-hero-veil {
    background:
      radial-gradient(70% 45% at 50% 48%, rgba(4, 3, 13, 0.6), transparent 100%),
      linear-gradient(180deg, rgba(4, 3, 13, 0.5) 0%, rgba(4, 3, 13, 0.15) 25%, rgba(4, 3, 13, 0.3) 60%, var(--cz-void) 100%);
  }
  .cz-hero-body { gap: 12px; }
  .cz-hero-logo { margin-bottom: 0; }
  .cz-hero-logo img { width: min(66vw, 290px); }
  .cz-hero .cz-actions { margin-top: 10px; }
  .cz-actions, .cz-call { width: 100%; }
  .cz-actions .cz-btn { width: 100%; }
  .cz-call { justify-items: stretch; }
  .cz-call-note { text-align: center; }
  .cz-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; row-gap: 8px; }
  .cz-specs div { flex-direction: column; align-items: center; gap: 0; padding: 4px 8px; }
  .cz-specs div + div { border-left: 0; }
  .cz-specs div:nth-child(even) { border-left: 1px solid var(--cz-edge-strong); }

  .cz-enter { min-height: 0; padding-top: 42vh; }
  .cz-enter-art img { object-position: 38% 30%; }

  .cz-emblem { width: 128px; height: 128px; margin: 20px 0 20px 20px; }
  .cz-ledger-item { gap: 14px; }

  .cz-setup { padding: 88px 0; }
  .cz-panel { padding: 22px 20px; font-size: 0.84rem; }
  .cz-panel div { grid-template-columns: minmax(0, 1fr); gap: 2px; }

  .cz-cta { min-height: 0; padding-top: 72vw; }
  .cz-cta-art { bottom: auto; height: 100vw; }
  .cz-cta-art img { object-position: 50% 30%; }
  .cz-cta::before { background: linear-gradient(180deg, transparent 30%, rgba(4, 3, 13, 0.9) 58%, var(--cz-void) 72%); }

  .cz-foot-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cz-foot-links div:last-child { grid-column: 1 / -1; }
  .cz-foot-bottom { flex-direction: column; align-items: flex-start; }
  .cz-facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

@keyframes cz-shimmer { from { background-position: 100% 0, 0 0, 0 0; } to { background-position: -150% 0, 0 0, 0 0; } }
