/* UpQuest website stylesheet.
   System fonts only; no external resources (the CSP allows 'self' only).
   Forged follows the addon's dark parchment, bronze frames, and gold lettering.
   Shared tokens keep the existing pages and controls in the same visual family. */

:root {
  color-scheme: dark;

  /* Palette */
  --ink: #100d09;
  --navy-900: #17120d;
  --navy-800: #211a12;
  --navy-700: #2c2217;
  --navy-600: #3a2c1d;
  --slate: #66513a;
  --steel: #a8834c;
  --steel-soft: #cfb17b;
  --orange: #ff8000;
  --amber: #ebc779;
  --ember: #e0560c;
  --gold: #f0cf82;
  --bronze: #9e7843;
  --accent: #e6b857;

  --text: #f3ecdf;
  --muted: #c8baa4;
  --subtle: #b6a68d;
  --line: rgba(211, 174, 106, 0.18);
  --line-strong: rgba(211, 174, 106, 0.38);
  --surface: #211a13;
  --surface-2: #30251b;
  --surface-low: #18130e;
  --field: #140f0b;
  --line-rule: var(--line);
  --accent-ink: #1b0e00;
  --link: #efc871;
  --focus: #ffe3a0;

  --error-bg: #2a1216;
  --error-border: #83313b;
  --error-text: #ffd0d4;
  --ok-bg: #0f2419;
  --ok-border: #2f6b45;
  --ok-text: #c2f7d3;
  --info-bg: #131f38;
  --info-border: #33548f;
  --info-text: #d4e3ff;

  --grade-a: #4ade80;
  --grade-b: #a3e635;
  --grade-c: #facc15;
  --grade-d: #fb923c;
  --grade-f: #f87171;

  /* Item quality colour used in game for rare items (names in the featured cards). */
  --quality-rare: #0070dd;

  /* Gradient system */
  --grad-line: linear-gradient(90deg, var(--slate) 0%, var(--amber) 24%, #ffe7a7 50%, var(--bronze) 78%, var(--slate) 100%);
  --grad-edge: linear-gradient(140deg, #e3c780 0%, #6e542f 24%, #b8934b 49%, #4d3b24 73%, #c8a45c 100%);
  --grad-edge-soft: linear-gradient(140deg, rgba(222, 187, 117, 0.65) 0%, rgba(112, 84, 46, 0.4) 40%, rgba(190, 150, 81, 0.5) 100%);
  --grad-buy: linear-gradient(180deg, #f5d182 0%, #dba64a 52%, #c58c32 100%);
  --grad-s: linear-gradient(135deg, #f7d98c 0%, #dbad59 42%, #c08b39 72%, #a97830 100%);
  --grad-rule: linear-gradient(90deg, rgba(211, 174, 106, 0) 0%, rgba(211, 174, 106, 0.55) 22%, rgba(244, 216, 151, 0.65) 50%, rgba(211, 174, 106, 0) 100%);
  --grad-sun: radial-gradient(closest-side, rgba(173, 114, 41, 0.22) 0%, rgba(151, 97, 37, 0.12) 26%, rgba(120, 80, 32, 0.06) 52%, rgba(120, 80, 32, 0.02) 74%, rgba(120, 80, 32, 0) 100%);
  --grad-cool: radial-gradient(closest-side, rgba(116, 94, 58, 0.18) 0%, rgba(116, 94, 58, 0.08) 45%, rgba(72, 58, 40, 0.04) 72%, rgba(72, 58, 40, 0) 100%);
  --grad-card: radial-gradient(120% 90% at 0% 0%, rgba(211, 174, 106, 0.08) 0%, rgba(211, 174, 106, 0) 55%), linear-gradient(180deg, #282016 0%, #18130e 100%);
  --grad-rare: linear-gradient(150deg, rgba(255, 128, 0, 0.7) 0%, rgba(77, 163, 255, 0.55) 30%, rgba(0, 112, 221, 0.3) 62%, rgba(59, 74, 99, 0.5) 100%);

  --radius: 10px;
  --radius-sm: 6px;
  --maxw: 76rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
  background-color: var(--ink);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* No background here: html paints the canvas, so the fixed glow layers
     (z-index -2 / -1) show through. A body background would cover them. */
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

main {
  flex: 1 0 auto;
}

[hidden] {
  display: none !important;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0 0 0.6em;
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 1.3rem + 3.5vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.85rem, 1.2rem + 2.3vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}

h1,
h2 {
  color: var(--gold);
}

h3 {
  font-size: 1.25rem;
  font-weight: 750;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--focus);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

code,
kbd,
samp {
  font-family: var(--mono);
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.08em 0.38em;
}

kbd {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0.05em 0.4em;
  color: var(--text);
}

strong {
  font-weight: 700;
}

.accent {
  color: var(--gold);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--orange);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
  color: var(--accent-ink);
}

.container {
  width: min(100% - 2rem, var(--maxw));
  margin-inline: auto;
}

.narrow {
  width: min(100% - 2rem, 46rem);
  margin-inline: auto;
}

main:focus {
  outline: none;
}

/* ---------- Backdrop: a restrained parchment glow, alive while scrolling ----------
   body::before is the ember glow, body::after the softer bronze one, and
   html::before a fine grain that keeps the dark gradients smooth.
   The glows drift over the first 3000px of scrolling (so short pages move
   gently and long pages get the whole dusk-to-sunrise journey), while the
   header line shows progress through the whole page. Native CSS scroll-driven
   animations do this where supported; otherwise site.js sets --drift and
   --scroll (both 0..1) and the paused animations are scrubbed with a negative
   delay. With reduced motion everything stays still. */

html::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("/assets/art/grain.svg?v=2.2.63") repeat;
  background-size: 180px 180px;
  opacity: 0.05;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -2;
  left: 50%;
  top: 50%;
  pointer-events: none;
  border-radius: 50%;
  will-change: transform, opacity;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-fill-mode: both;
  animation-play-state: paused;
  animation-delay: calc(var(--drift, 0) * -1s);
}

body::before {
  width: 120vmax;
  height: 120vmax;
  margin: -60vmax 0 0 -60vmax;
  background: var(--grad-sun);
  transform: translate3d(20vw, -34vh, 0);
  animation-name: fx-sun;
}

body::after {
  width: 100vmax;
  height: 100vmax;
  margin: -50vmax 0 0 -50vmax;
  background: var(--grad-cool);
  transform: translate3d(-36vw, 44vh, 0);
  animation-name: fx-cool;
}

@keyframes fx-sun {
  0% {
    transform: translate3d(20vw, -34vh, 0) scale(1);
    opacity: 1;
  }
  45% {
    transform: translate3d(-30vw, 6vh, 0) scale(0.72);
    opacity: 0.55;
  }
  100% {
    transform: translate3d(14vw, 62vh, 0) scale(1.05);
    opacity: 0.9;
  }
}

@keyframes fx-cool {
  0% {
    transform: translate3d(-36vw, 44vh, 0) scale(1);
  }
  50% {
    transform: translate3d(34vw, -2vh, 0) scale(1.15);
  }
  100% {
    transform: translate3d(-24vw, -40vh, 0) scale(0.95);
  }
}

@keyframes fx-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes fx-rise {
  from {
    opacity: 0.25;
    transform: translateY(28px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fx-drift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-48px);
  }
}

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

.site-header {
  position: relative;
  z-index: 30;
  background: rgba(21, 16, 11, 0.94);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--grad-rule);
  opacity: 0.8;
}

.site-header::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--grad-line);
  transform-origin: 0 50%;
  transform: scaleX(0);
  animation: fx-progress 1s linear both paused;
  animation-delay: calc(var(--scroll, 0) * -1s);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand nav actions";
  align-items: center;
  gap: 0.5rem 1.25rem;
  min-height: 68px;
  padding-block: 0.6rem;
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

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

.brand img {
  width: 34px;
  height: 34px;
}

.brand-accent {
  color: var(--orange);
}

.site-nav {
  grid-area: nav;
  justify-self: end;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.7rem;
  border-radius: 5px;
  color: var(--muted);
  font-size: 0.97rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--gold);
  background: rgba(211, 174, 106, 0.1);
}

.header-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
  gap: 0.5rem;
}

@media (min-width: 60rem) {
  .site-header {
    position: sticky;
    top: 0;
  }

  html {
    scroll-padding-top: 5.5rem;
  }
}

@media (max-width: 59.99rem) {
  .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand actions"
      "nav nav";
    gap: 0.15rem 0.75rem;
    padding-block: 0.5rem 0.25rem;
  }

  .site-nav {
    justify-self: stretch;
  }

  .site-nav ul {
    justify-content: space-between;
    gap: 0;
  }

  .site-nav a {
    padding: 0.3rem 0.45rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 26rem) {
  .brand {
    gap: 0.45rem;
    font-size: 1.12rem;
  }

  .brand img {
    width: 28px;
    height: 28px;
  }

  .header-actions {
    gap: 0.35rem;
    max-width: calc(100vw - 10rem);
  }

  .header-actions .btn {
    padding-inline: 0.6rem;
    font-size: 0.82rem;
  }

  .site-nav a {
    padding-inline: 0.3rem;
    font-size: 0.86rem;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.72rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-lg {
  min-height: 56px;
  padding: 0.9rem 1.65rem;
  font-size: 1.08rem;
}

.btn-sm {
  min-height: 38px;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

.btn-buy,
.btn-primary {
  color: var(--accent-ink);
  background: var(--grad-buy);
  border-color: #edcf87;
  box-shadow: 0 10px 24px -16px #000, inset 0 1px 0 #fff0bf, inset 0 -2px 0 rgba(101, 63, 17, 0.32);
}

.btn-buy:hover,
.btn-primary:hover {
  color: var(--accent-ink);
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -16px #000, inset 0 1px 0 #fff0bf, inset 0 -2px 0 rgba(101, 63, 17, 0.32);
}

.btn-buy-forever {
  color: #03141f !important;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 50%, #00e676 100%) !important;
  box-shadow: 0 10px 28px -6px rgba(0, 242, 254, 0.8), 0 0 20px rgba(79, 172, 254, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  border-color: rgba(0, 242, 254, 0.6) !important;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-buy-forever:hover {
  color: #010d14 !important;
  filter: brightness(1.1);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 38px -6px rgba(0, 242, 254, 0.95), 0 0 28px rgba(0, 230, 118, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

.btn-buy-forever:active {
  transform: translateY(0) scale(0.99);
}

.btn-free,
.btn-quiet {
  color: var(--gold);
  background: linear-gradient(180deg, #493b2c, #2c2117) padding-box, var(--grad-edge) border-box;
  box-shadow: inset 0 1px 0 rgba(246, 218, 162, 0.12), inset 0 -2px 0 rgba(0, 0, 0, 0.22), 0 10px 24px -20px #000;
}

.btn-free:hover,
.btn-quiet:hover {
  color: var(--focus);
  transform: translateY(-1px);
  background: linear-gradient(180deg, #584630, #35271a) padding-box, var(--grad-line) border-box;
}

.btn-curseforge {
  color: #f16436;
  background: linear-gradient(180deg, #181320, #0f0c16) padding-box, linear-gradient(135deg, rgba(241, 100, 54, 0.5), rgba(241, 100, 54, 0.15)) border-box;
  box-shadow: 0 10px 24px -12px rgba(241, 100, 54, 0.35);
}

.btn-curseforge:hover {
  color: #ff7d54;
  transform: translateY(-1px);
  background: linear-gradient(180deg, #221b30, #141020) padding-box, linear-gradient(135deg, rgba(241, 100, 54, 0.8), rgba(241, 100, 54, 0.3)) border-box;
  box-shadow: 0 12px 28px -10px rgba(241, 100, 54, 0.55);
}

.plan-subnote {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  filter: none;
}

.btn-price {
  font-weight: 600;
  opacity: 0.8;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 1rem;
}

@media (max-width: 30rem) {
  .cta-row .btn {
    flex: 1 1 100%;
  }
}

.cta-note {
  color: var(--subtle);
  font-size: 0.93rem;
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(100% - 2rem, var(--maxw));
  height: 1px;
  transform: translateX(-50%);
  background: var(--grad-rule);
  opacity: 0.7;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.section-head h2 {
  margin: 0;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.lead {
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.3rem);
  line-height: 1.5;
}

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

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: clamp(2.25rem, 5vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -12% -8% 0 -8%;
  pointer-events: none;
  background: url("/assets/art/contours.svg?v=2.2.63") 70% 20% / cover no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 70% 30%, #000 20%, transparent 75%);
  filter: sepia(1) saturate(0.65);
  opacity: 0.55;
}

.hero-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

/* One question, asked once, above the reward examples. */
.ask {
  max-width: 34rem;
  margin: 0 0 0.6rem;
  color: var(--amber);
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.12rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.5;
}

.edition-toggle {
  display: inline-flex;
  background: var(--field);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 4px;
  margin-block: 1rem 1.25rem;
  gap: 4px;
}

.edition-btn {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.edition-btn.active, .edition-btn:hover {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255, 235, 177, 0.45);
}

/* Real in-game screenshots, framed with the addon's bronze and gold edge.
   The <img> keeps its width/height attributes (no layout shift) and scales down. */
.shot {
  position: relative;
  min-width: 0;
  margin: 0;
}

.shot img {
  width: 100%;
  height: auto;
  margin-inline: auto;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--grad-edge) border-box;
  box-shadow: 0 0 0 3px #100c08, 0 0 0 4px rgba(199, 157, 82, 0.28), 0 28px 55px -28px #000;
}

.shot figcaption {
  margin-top: 0.75rem;
  color: var(--subtle);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
}

.hero-shot {
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
}

.hero-shot > a {
  display: block;
  border-radius: 8px;
}

@media (min-width: 60rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .hero-shot {
    max-width: none;
  }
}

/* The screenshots are real client captures, with full-size files one click away. */
.build-gallery .section-head {
  align-items: end;
}

.build-gallery .section-head p {
  max-width: 43ch;
  font-size: .95rem;
}

.screenshot-grid {
  display: grid;
  gap: 1.1rem;
}

.screenshot-card {
  min-width: 0;
  margin: 0;
  padding: .45rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--grad-card) padding-box, var(--grad-edge-soft) border-box;
  box-shadow: inset 0 0 0 1px rgba(246, 218, 162, 0.04), 0 20px 35px -28px #000;
}

.screenshot-link {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: calc(var(--radius) - .4rem);
  background: #100d09;
  text-decoration: none;
}

.screenshot-link img {
  width: 100%;
  height: clamp(14rem, 48vw, 20rem);
  object-fit: contain;
  transition: filter .2s ease;
}

.screenshot-open {
  position: absolute;
  right: .6rem;
  bottom: .6rem;
  padding: .28rem .55rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text);
  background: rgba(21, 16, 11, .94);
  font-size: .7rem;
  font-weight: 650;
}

.screenshot-link:hover img {
  filter: brightness(1.08);
}

.screenshot-link:hover .screenshot-open {
  border-color: var(--orange);
  color: var(--amber);
}

.screenshot-card figcaption {
  padding: 1rem .7rem .7rem;
}

.screenshot-card h3 {
  margin: 0 0 .35rem;
  color: var(--gold);
  font-size: 1.18rem;
}

.screenshot-card p {
  margin: 0;
  color: var(--muted);
  font-size: .87rem;
  line-height: 1.55;
}

@media (min-width: 40rem) {
  .screenshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .screenshot-link img {
    height: clamp(12rem, 26vw, 18rem);
  }
}

@media (min-width: 68rem) {
  .screenshot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .screenshot-link img {
    height: 16rem;
  }
}

/* ---------- Feature beats: three waypoints on one route ---------- */

.beats {
  padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 7vw, 5rem);
}

.beat-list {
  position: relative;
  display: grid;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.beat-list::before {
  content: "";
  position: absolute;
  background: var(--grad-line);
  pointer-events: none;
}

.beat {
  position: relative;
  min-width: 0;
}

.beat h3 {
  margin: 0 0 0.3rem;
  font-size: 1.3rem;
}

.beat p {
  margin: 0;
  color: var(--muted);
}

.beat-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: none;
  width: 88px;
  height: 88px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #44331f, #18130e 70%) padding-box, var(--grad-edge) border-box;
  box-shadow: 0 16px 40px -18px rgba(255, 128, 0, 0.7);
}

.beat-node img {
  width: 44px;
  height: 44px;
}

@media (min-width: 48rem) {
  .beat-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    text-align: center;
  }

  .beat-list::before {
    top: 44px;
    left: 16.67%;
    right: 16.67%;
    height: 2px;
    -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 16px);
    mask-image: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 16px);
  }

  .beat-node {
    margin: 0 auto 1.25rem;
  }

  .beat p {
    max-width: 17rem;
    margin-inline: auto;
  }
}

@media (max-width: 47.99rem) {
  .beat-list {
    gap: 1.5rem;
  }

  .beat-list::before {
    top: 44px;
    bottom: 44px;
    left: 43px;
    width: 2px;
    background: linear-gradient(180deg, var(--amber), var(--orange) 40%, var(--steel));
    -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 8px, transparent 8px 16px);
    mask-image: repeating-linear-gradient(180deg, #000 0 8px, transparent 8px 16px);
  }

  .beat {
    display: grid;
    grid-template-columns: 88px 1fr;
    column-gap: 1.1rem;
    align-items: center;
  }

  .beat-node {
    grid-row: span 2;
  }

  .beat h3 {
    align-self: end;
  }

  .beat p {
    align-self: start;
  }
}

/* ---------- Featured items: rare quest rewards with their route ---------- */

.reward-heading {
  margin: 2.75rem 0 1.25rem;
}

.reward-heading h3 {
  margin: 0 0 .45rem;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
}

.reward-heading p {
  margin: 0;
  color: var(--subtle);
  font-size: .9rem;
}

.feat-grid {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feat {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  grid-template-areas:
    "head"
    "stats";
  gap: 0.9rem;
  align-items: start;
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #201a13 0%, #140f0b 100%) padding-box, var(--grad-rare) border-box;
  box-shadow: 0 24px 50px -36px rgba(0, 112, 221, 0.9);
}

.feat-head {
  grid-area: head;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  min-width: 0;
}

.feat-head-text {
  min-width: 0;
}

/* The item's own icon, served by Wowhead; the rare border matches the name. Hovering the icon shows the item's tooltip. */
.feat-icon-link,
.legend-icon-link {
  display: block;
  flex: none;
  border-radius: 10px;
  line-height: 0;
}

.feat-icon-link:focus-visible,
.legend-icon-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.feat-icon {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  border: 1.5px solid var(--quality-rare);
  border-radius: 10px;
  background: #140f0b;
  box-shadow: 0 0 14px rgba(0, 112, 221, 0.45);
  object-fit: cover;
}

.feat-head p {
  margin: 0;
}

.feat-tag {
  margin-bottom: 0.3rem !important;
  color: var(--subtle);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Rare names are 20px+ bold (large text), which keeps #0070dd above 3:1 on these cards. */
.feat h3 {
  margin: 0 0 0.2rem;
  font-size: 1.3rem;
  font-weight: 800;
}

.q-rare {
  color: var(--quality-rare);
}

.feat-src {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.feat-stats {
  grid-area: stats;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.6rem;
  margin: 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.feat-stats dt {
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.feat-stats dd {
  display: flex;
  align-items: center;
  min-height: 1.75rem;
  margin: 0.1rem 0 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 750;
}

.feat-stats > div {
  flex: none;
}

.feat-stats > .feat-route {
  flex-basis: 100%;
}

.feat-route dd {
  gap: 0.5rem;
  color: var(--amber);
}

.feat-route dd::before {
  content: "";
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
  background: url("/assets/art/icon-route.svg?v=2.2.63") center / contain no-repeat;
}

.chip-grade {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  color: #0b1022;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.chip-b {
  background: var(--grade-b);
  box-shadow: 0 0 16px rgba(163, 230, 53, 0.35);
}

@media (max-width: 39.99rem) {
  .feat {
    gap: 0.75rem;
    padding: 0.9rem;
  }

  .feat-stats {
    flex-wrap: nowrap;
    gap: 0.4rem 1rem;
    padding-top: 0.7rem;
  }

  .feat-stats dt {
    font-size: 0.68rem;
  }

  .feat-stats > .feat-route {
    flex: 1 1 0;
    min-width: 0;
  }

  .feat-route dd {
    font-size: 0.95rem;
    line-height: 1.3;
  }

  .feat-route dd::before {
    display: none;
  }
}

@media (min-width: 60rem) {
  .feat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .feat {
    padding: 1.25rem;
  }
}

/* ---------- Profit & Mission Allocation Ring Chart & Obsidian HUD ---------- */

#grades {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.alloc-widget-card {
  margin-top: 2rem;
  background: radial-gradient(circle at 50% 0%, #302418 0%, #140f0b 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  box-shadow: 0 18px 40px -30px #000, inset 0 1px 0 rgba(246, 218, 162, 0.08);
  position: relative;
  overflow: hidden;
}

.alloc-hud-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 2rem;
}

.alloc-toolbar-col {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.alloc-toolbar-label {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.alloc-tabs,
.alloc-scale-btns {
  display: inline-flex;
  flex-wrap: wrap;
  background: rgba(16, 12, 8, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 3px;
  gap: 3px;
}

.alloc-tab-btn,
.alloc-scale-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.alloc-tab-btn:hover,
.alloc-scale-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.alloc-tab-btn.active,
.alloc-scale-btn.active {
  background: #ff8c00;
  color: #060913;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(255, 140, 0, 0.5);
}

/* Verified impact: one calendar year at a time, or every sale ever made. */
.alloc-year-btns {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: rgba(16, 12, 8, 0.65);
  border: 1px solid rgba(255, 140, 0, 0.35);
  border-radius: 9999px;
}

.alloc-year-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.alloc-year-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.alloc-year-btn.active {
  background: rgba(255, 140, 0, 0.18);
  color: #ffb347;
  box-shadow: inset 0 0 0 1px rgba(255, 140, 0, 0.6);
}

/* The verified view covers every product: the edition tabs rest. */
.alloc-tab-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.alloc-tab-btn:disabled:hover,
.alloc-tab-btn.active:disabled {
  background: transparent;
  color: #cbd5e1;
  box-shadow: none;
}

/* Money flow strip: paid, minus sales tax and fees, equals the net the ring splits */
.alloc-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.65rem;
}

.alloc-flow-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1 1 9.5rem;
  max-width: 15rem;
  padding: 0.65rem 0.95rem;
  background: rgba(34, 25, 17, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
}

.alloc-flow-item[hidden] {
  display: none;
}

.alloc-flow-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.alloc-flow-value {
  font-size: 1.15rem;
  font-weight: 900;
  color: #f1f5f9;
  font-feature-settings: "tnum";
}

.alloc-flow-minus .alloc-flow-value {
  color: #fca5a5;
}

.alloc-flow-net {
  border-color: rgba(255, 140, 0, 0.55);
  box-shadow: 0 0 14px rgba(255, 140, 0, 0.18);
}

.alloc-flow-net .alloc-flow-value {
  color: #ffb347;
}

.alloc-flow-note {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #94a3b8;
}

.alloc-fee-details {
  margin: 0.6rem auto 0;
  max-width: 26rem;
  font-size: 0.8rem;
  color: #cbd5e1;
}

.alloc-fee-details[hidden] {
  display: none;
}

.alloc-fee-title {
  margin: 0;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.alloc-fee-lines {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.alloc-fee-lines li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.alloc-fee-lines strong {
  font-feature-settings: "tnum";
  color: #f1f5f9;
}

.alloc-fee-details + .alloc-hud-layout {
  margin-top: 2rem;
}

/* HUD Main Layout Grid (Side-by-Side: Ring on Left, Bullet Points on Right) */
.alloc-hud-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 60rem) {
  .alloc-hud-layout {
    grid-template-columns: minmax(320px, 380px) 1fr;
    gap: 2.75rem;
    align-items: center;
  }
}

.alloc-ring-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.donut-chart-wrapper {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.65));
}

.donut-slice {
  cursor: pointer;
  stroke: #060b14;
  stroke-width: 3.5px;
  stroke-linejoin: round;
  transform-origin: 200px 200px;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), filter 0.22s ease, opacity 0.2s ease;
}

.slice-taxes { fill: #1d4ed8; }
.slice-care { fill: #15803d; }
.slice-ops { fill: #c2410c; }
.slice-housing { fill: #d97706; }
.slice-food { fill: #7c3aed; }
.slice-cure { fill: #db2777; }
.slice-stjude { fill: #0284c7; }
.slice-reserve { fill: #059669; }

.donut-slice:hover,
.donut-slice:focus,
.donut-slice.active-slice {
  transform: scale(1.045);
  filter: brightness(1.28) drop-shadow(0 0 12px rgba(255, 255, 255, 0.45));
  outline: none;
}

.donut-hint {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
  color: #94a3b8;
  font-size: 0.8rem;
  text-align: center;
}

.donut-hint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(255, 140, 0, 0.15);
  border: 1px solid rgba(255, 140, 0, 0.35);
  color: #ff8c00;
  font-weight: 800;
  font-size: 0.85rem;
}

/* Right Column: Side-by-Side Bullet Point Breakdown */
.alloc-bullets-col {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.alloc-bullet-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  width: 100%;
}

@media (min-width: 48rem) {
  .alloc-bullet-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

.alloc-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(34, 25, 17, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 0.75rem 0.95rem;
  cursor: pointer;
  transition: all 0.18s ease;
  color: #cbd5e1;
  text-align: left;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  font-family: inherit;
}

.alloc-bullet-item:hover,
.alloc-bullet-item:focus,
.alloc-bullet-item.active-bullet {
  background: rgba(49, 37, 23, 0.96);
  border-color: rgba(255, 140, 0, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), 0 0 14px rgba(255, 140, 0, 0.22);
  outline: none;
}

.bullet-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.35rem;
}

.dot-taxes { background: #3b82f6; box-shadow: 0 0 8px #3b82f6; }
.dot-care { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.dot-ops { background: #f97316; box-shadow: 0 0 8px #f97316; }
.dot-housing { background: #eab308; box-shadow: 0 0 8px #eab308; }
.dot-food { background: #a855f7; box-shadow: 0 0 8px #a855f7; }
.dot-cure { background: #ec4899; box-shadow: 0 0 8px #ec4899; }
.dot-stjude { background: #06b6d4; box-shadow: 0 0 8px #06b6d4; }
.dot-reserve { background: #10b981; box-shadow: 0 0 8px #10b981; }

.bullet-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.bullet-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.bullet-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
}

.bullet-pct {
  font-size: 0.72rem;
  font-weight: 800;
  color: #ff9d2e;
  background: rgba(255, 140, 0, 0.14);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.bullet-amt {
  font-size: 0.92rem;
  font-weight: 900;
  color: #ffb347;
  font-feature-settings: "tnum";
  margin-left: auto;
}

.bullet-desc {
  font-size: 0.76rem;
  color: #94a3b8;
  margin: 0.25rem 0 0;
  line-height: 1.35;
}

/* Footer status */
.alloc-footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.alloc-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.status-dot-pulse {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  display: inline-block;
}

/* Grade chips (HTML) */

.chip-s {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1.5px solid transparent;
  border-radius: 9px;
  background: var(--grad-s) padding-box, linear-gradient(135deg, #ffe0b8, rgba(177, 138, 72, 0.8)) border-box;
  box-shadow: 0 0 18px rgba(255, 128, 0, 0.5);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: none;
}

/* ---------- Legendaries ---------- */

.legend-layout {
  display: grid;
  gap: 1.5rem 2.5rem;
  align-items: center;
}

.legend-shot {
  width: 100%;
  max-width: 777px;
  margin-inline: auto;
}

.legend-grid {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend {
  position: relative;
  min-width: 0;
  padding: 1.15rem 1.3rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--grad-card) padding-box, var(--grad-edge) border-box;
}

/* Each legendary's own icon, served by Wowhead, in the card's top right corner; hovering it shows the item's tooltip. */
.legend-icon-link {
  float: right;
  margin: 0 0 0.5rem 0.9rem;
}

.legend-icon {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  border: 1.5px solid #ff8000;
  border-radius: 10px;
  background: #140f0b;
  box-shadow: 0 0 14px rgba(255, 128, 0, 0.45);
  object-fit: cover;
}

.legend h3 {
  margin: 0 0 0.1rem;
  color: #ffa347;
  font-size: 1.4rem;
}

.legend p {
  margin: 0;
  color: var(--muted);
}

.legend .legend-sub {
  margin-bottom: 0.55rem;
  color: var(--subtle);
  font-size: 0.93rem;
}

.legend-grade {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem !important;
  color: var(--subtle) !important;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legend-grade .chip-s {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.95rem;
  letter-spacing: 0;
}

@media (min-width: 44rem) and (max-width: 59.99rem) {
  .legend-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 60rem) {
  .legend-layout {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}

/* ---------- Pricing ---------- */

.pricing .section-head {
  justify-content: center;
  text-align: center;
}

.plans {
  display: grid;
  gap: 1.25rem;
  max-width: 68rem;
  margin-inline: auto;
}

@media (min-width: 44rem) {
  .plans {
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    align-items: stretch;
  }
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(1.5rem, 3vw, 2.1rem);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #282016, #18130e) padding-box, var(--grad-edge-soft) border-box;
}

.plan-premium {
  background: radial-gradient(120% 80% at 100% 0%, rgba(255, 128, 0, 0.22), rgba(255, 128, 0, 0) 60%), linear-gradient(180deg, #30251b, #18130e) padding-box, var(--grad-edge) border-box;
  box-shadow: 0 30px 70px -40px rgba(255, 128, 0, 0.65);
}

.plan-bundle {
  background: radial-gradient(120% 80% at 50% 0%, rgba(51, 204, 255, 0.22), rgba(255, 128, 0, 0.15) 60%), linear-gradient(180deg, #30251b, #19140f) padding-box, var(--grad-edge) border-box;
  box-shadow: 0 30px 70px -30px rgba(51, 204, 255, 0.5);
  border: 1px solid rgba(51, 204, 255, 0.4);
}

.plan h3 {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.plan-premium h3 {
  color: var(--orange);
}

/* A plan card that is the main heading's first section (the Workbook page) uses an h2 that looks the same. */
.plan .plan-title {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.plan-price {
  margin: 0.4rem 0 0.15rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 2rem + 2vw, 3.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.plan-tag {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 600;
}

.plan-premium .plan-tag {
  color: var(--text);
}

.plan-list {
  display: grid;
  gap: 0.6rem;
  margin: 0 0 1.75rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.plan-list li {
  position: relative;
  padding-left: 1.7rem;
}

.plan-list li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.42em;
  width: 0.95rem;
  height: 0.55rem;
  border-left: 2.5px solid var(--steel-soft);
  border-bottom: 2.5px solid var(--steel-soft);
  transform: rotate(-45deg);
}

.plan-premium .plan-list li::before {
  border-color: var(--orange);
}

.plan .btn {
  margin-top: auto;
}

.plan-foot {
  margin: 0.9rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}

.plan-foot a {
  color: var(--subtle);
}

.plan-foot a:hover {
  color: var(--text);
}

/* One card on its own row (the Guild Hall card on the home page and the price card on /guild-hall). */
.plans-hall {
  max-width: 32rem;
  margin: 1.25rem auto 0;
}

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

.faq-grid {
  display: grid;
  gap: 1.5rem 3rem;
}

@media (min-width: 60rem) {
  .faq-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    align-items: start;
  }
}

.faq-grid h2 {
  margin: 0;
}

.faq {
  display: grid;
  gap: 0.7rem;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(40, 31, 21, 0.8);
  transition: border-color 0.2s ease;
}

.faq details[open] {
  border-color: rgba(255, 128, 0, 0.4);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  padding: 0.85rem 1.2rem;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  margin-right: 0.2rem;
  border-right: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.faq summary:focus-visible {
  outline-offset: -3px;
  border-radius: var(--radius-sm);
}

.faq .answer {
  padding: 0 1.2rem 1.1rem;
  color: var(--muted);
}

.faq .answer p:last-child {
  margin-bottom: 0;
}

/* ---------- Inner pages ---------- */

.page-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(1.5rem, 4vw, 2.25rem);
}

.page-hero h1 {
  font-size: clamp(2.3rem, 1.4rem + 3.4vw, 3.8rem);
  margin-bottom: 0.9rem;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.page-body {
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

/* Activation: three numbered steps on one dashed route */

.page-hero .same-code {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 100%;
  margin-top: 1.1rem;
  padding: 0.5rem 1rem 0.5rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(48, 37, 27, 0.96), rgba(28, 21, 15, 0.96)) padding-box, var(--grad-edge) border-box;
  box-shadow: 0 14px 34px -22px rgba(255, 128, 0, 0.8);
  color: var(--text);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
}

.page-hero .same-code::before {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 128, 0, 0.18), 0 0 14px rgba(255, 128, 0, 0.85);
}

@media (max-width: 26rem) {
  .page-hero .same-code {
    border-radius: 16px;
  }
}

.act-steps {
  position: relative;
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The dashed route between the step numbers shows in the gaps between cards. */
.act-steps::before {
  content: "";
  position: absolute;
  top: 2rem;
  bottom: 2rem;
  left: calc(clamp(1.1rem, 4vw, 1.9rem) + 1.2rem - 1px);
  width: 2px;
  background: linear-gradient(180deg, var(--amber), var(--orange) 40%, var(--steel));
  -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 7px, transparent 7px 14px);
  mask-image: repeating-linear-gradient(180deg, #000 0 7px, transparent 7px 14px);
  pointer-events: none;
}

.act-step {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: clamp(1.1rem, 4vw, 1.9rem);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #282016, #18130e) padding-box, var(--grad-edge-soft) border-box;
}

.act-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 0.75rem;
  font-size: clamp(1.18rem, 1.05rem + 0.55vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.act-text {
  min-width: 0;
}

.act-title kbd {
  font-size: 0.85em;
}

.act-step kbd {
  white-space: nowrap;
  overflow-wrap: normal;
}

.act-num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--grad-buy);
  box-shadow: 0 10px 24px -10px rgba(255, 128, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  color: var(--accent-ink);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0;
}

.act-sub {
  margin: 0 0 1.1rem;
  color: var(--muted);
}

.act-shot {
  margin: 0;
}

.act-shot img {
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--line-strong), 0 14px 30px -16px rgba(0, 0, 0, 0.95);
}

.act-shot figcaption {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.97rem;
}

/* A real screenshot with our highlight ring over the thing to click. */
.shot-mark {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.shot-ring {
  position: absolute;
  /* Around "Unlock Premium" (x 176-292 of the 298px-wide screenshot). */
  top: -12%;
  left: 58.7%;
  width: 40%;
  height: 124%;
  border: 2px solid var(--orange);
  border-radius: 8px;
  box-shadow: 0 0 0 3px rgba(255, 128, 0, 0.22), 0 0 18px rgba(255, 128, 0, 0.6);
  pointer-events: none;
}

.act-result {
  margin-top: 1.4rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: radial-gradient(120% 80% at 100% 0%, rgba(255, 128, 0, 0.16), rgba(255, 128, 0, 0) 60%), linear-gradient(180deg, #30251b, #18130e) padding-box, var(--grad-edge) border-box;
}

/* Big Copy button with a clear "Copied" state (set by activate.js). */
.btn-copy {
  min-width: 14rem;
  min-height: 60px;
  font-size: 1.15rem;
}

.btn-copy[data-state="copied"],
.btn-copy[data-state="copied"]:hover {
  color: #04160c;
  background: linear-gradient(135deg, #8af5b4 0%, #34d399 55%, #20a870 100%);
  box-shadow: 0 12px 30px -12px rgba(52, 211, 153, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-copy[data-state="copied"]::before {
  content: "";
  width: 0.95rem;
  height: 0.5rem;
  margin: -0.25rem 0.15rem 0 0;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(-45deg);
}

.copy-status {
  margin: 0.7rem 0 0;
  min-height: 1.5em;
}

@media (max-width: 30rem) {
  .act-step .btn-lg {
    width: 100%;
  }
}

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 700;
}

.hint {
  margin: 0.5rem 0 0;
  color: var(--subtle);
  font-size: 0.93rem;
}

.input,
.code-box {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--field);
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.45;
}

.input::placeholder {
  color: #a19178;
  opacity: 1;
}

.input:focus-visible,
.code-box:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--orange);
}

.input[aria-invalid="true"] {
  border-color: #ff7b86;
}

.code-box {
  min-height: 7.5rem;
  resize: vertical;
  word-break: break-all;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.status-text {
  color: var(--muted);
  font-size: 0.95rem;
}

.alert {
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
}

.alert:empty {
  margin: 0;
  padding: 0;
  border: 0;
}

.alert-error {
  border-color: var(--error-border);
  background: var(--error-bg);
  color: var(--error-text);
}

.alert-info {
  border-color: var(--info-border);
  background: var(--info-bg);
  color: var(--info-text);
}

.result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.result-head h3 {
  margin: 0;
  font-size: 1.35rem;
}

.result-head h3:focus {
  outline: none;
}

.result-head h3:focus-visible {
  outline: 3px solid var(--focus);
}

.badge-ok {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--ok-border);
  border-radius: 999px;
  background: var(--ok-bg);
  color: var(--ok-text);
  font-size: 0.8rem;
  font-weight: 700;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 1rem 0 0;
  color: var(--subtle);
  font-size: 0.9rem;
}

.meta-list div {
  display: flex;
  gap: 0.4rem;
}

.meta-list dt {
  font-weight: 700;
}

.meta-list dd {
  margin: 0;
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

.help-row {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (min-width: 40rem) {
  .help-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.help {
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(40, 31, 21, 0.75);
}

.help h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.help p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.help .btn {
  margin-top: 0.85rem;
}

/* Legal / prose pages */

.prose {
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.prose h2 {
  margin-top: 2.2rem;
  font-size: 1.4rem;
  letter-spacing: -0.015em;
}

.prose p,
.prose li {
  color: #ded3c2;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.template-banner {
  margin: 0 0 1.75rem;
  padding: 1rem 1.15rem;
  border: 2px dashed var(--orange);
  border-radius: var(--radius-sm);
  background: rgba(255, 128, 0, 0.1);
  color: var(--text);
}

.template-banner strong {
  color: var(--focus);
}

.placeholder {
  padding: 0 0.25em;
  border-radius: 4px;
  background: rgba(255, 215, 0, 0.14);
  color: #ffe58a;
  font-style: normal;
}

.updated,
.prose .updated {
  color: var(--subtle);
  font-size: 0.95rem;
}

/* 404 */

.not-found {
  padding-block: clamp(3rem, 9vw, 6rem);
  text-align: center;
}

.not-found .lost-mark {
  width: 96px;
  height: 96px;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 12px 30px rgba(255, 128, 0, 0.45));
}

.not-found p {
  color: var(--muted);
  font-size: 1.1rem;
}

.not-found .cta-row {
  justify-content: center;
}

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

.site-footer {
  position: relative;
  margin-top: auto;
  background: rgba(17, 13, 9, 0.94);
  color: var(--subtle);
  font-size: 0.93rem;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--grad-rule);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1.75rem 1rem;
}

.footer-brand {
  display: inline-block;
  min-height: 44px;
}

.footer-brand img {
  width: 150px;
  height: 38px;
}

.footer-id {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.1rem;
}

.credit {
  margin: 0;
  color: var(--subtle);
  font-size: 0.9rem;
}

.credit strong {
  color: #e7dbc7;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0.5rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
}

.footer-legal {
  padding-block: 0.9rem 1.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}

.footer-legal p {
  margin-bottom: 0.3rem;
}

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

/* A brief checkout destination cue; no modal, layout jump or fake progress. */
.checkout-feedback {
  position: fixed;
  z-index: 100;
  inset: auto 1rem max(1rem, env(safe-area-inset-bottom)) auto;
  max-width: calc(100vw - 2rem);
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--orange, #ff8000);
  border-radius: 12px;
  background: #211a13;
  color: #f6e8d4;
  box-shadow: 0 8px 32px #0008;
  font-weight: 600;
  pointer-events: none;
}
.checkout-feedback[hidden] { display: none; }
[data-buy][aria-busy="true"] { filter: brightness(1.12); }

/* Native scroll-driven animations (kept last so they win the cascade).
   Browsers without them use the --scroll fallback from site.js. */
@supports (animation-timeline: scroll()) {
  body::before,
  body::after,
  .site-header::before {
    animation-play-state: running;
    animation-delay: 0s;
    animation-timeline: scroll(root block);
  }

  /* Keep in step with DRIFT_PX in site.js. */
  body::before,
  body::after {
    animation-range: 0px 3000px;
  }

  .legend-shot img {
    animation: fx-rise 1s linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }

  .hero-shot img {
    animation: fx-drift 1s linear both;
    animation-timeline: view();
    animation-range: exit 0% exit 100%;
  }
}

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

  .site-header::before {
    transform: scaleX(1);
    opacity: 0.6;
  }
}

/* ---------- Print ---------- */

@media print {
  html,
  body {
    background: #fff;
    color: #000;
  }

  html::before,
  body::before,
  body::after,
  .site-header,
  .site-footer,
  .skip-link,
  .cta-row {
    display: none;
  }
}

/* ---------- Discord bar (top of every page) ---------- */
.discord-bar {
  display: block;
  position: relative;
  z-index: 30;
  color: #ffffff;
  text-decoration: none;
  background: linear-gradient(90deg, #4450c9 0%, #3c43b5 38%, #2a3170 72%, var(--navy-800) 100%);
  box-shadow: inset 0 -2px 0 0 rgba(255, 128, 0, 0.55), 0 6px 22px -10px rgba(88, 101, 242, 0.75);
}
.discord-bar:hover,
.discord-bar:focus-visible {
  background: linear-gradient(90deg, #4d59d8 0%, #444bc4 38%, #30387f 72%, var(--navy-700) 100%);
}
.discord-bar:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: -3px;
}
.discord-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 46px;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  font-size: 0.98rem;
  line-height: 1.3;
}
.discord-icon {
  flex: none;
  color: #ffffff;
}
.discord-text strong {
  font-weight: 800;
  letter-spacing: 0.01em;
}
.discord-sub {
  color: #e3e6ff;
}
.discord-cta {
  flex: none;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: #ffffff;
  color: #3238a0;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 0 0 2px rgba(255, 128, 0, 0.55);
}
.discord-bar:hover .discord-cta,
.discord-bar:focus-visible .discord-cta {
  background: #fff4e8;
}
@media (max-width: 560px) {
  .discord-sub {
    display: none;
  }
  .discord-bar-inner {
    font-size: 0.92rem;
    gap: 0.55rem;
  }
}

/* ---------- Partners Section ---------- */
.partners-section {
  position: relative;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 128, 0, 0.08), transparent 70%);
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.partner-card {
  padding: 1.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(33, 26, 18, 0.9);
  box-shadow: 0 16px 40px -20px #000;
}

.partner-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.partner-badge {
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.partner-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #68d391;
  font-size: 0.75rem;
  font-weight: 600;
}

.partner-live-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #68d391;
  box-shadow: 0 0 8px #68d391;
}

.partner-preview-box {
  padding: 1.25rem;
  border: 1px solid var(--orange);
  border-radius: 12px;
  background: radial-gradient(ellipse at 10% 0%, rgba(255, 128, 0, 0.12), transparent 70%), rgba(40, 30, 20, 0.95);
  box-shadow: 0 12px 30px -15px rgba(255, 128, 0, 0.4);
  margin-bottom: 1.5rem;
}

.partner-preview-title {
  margin: 0 0 0.4rem;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
}

.partner-preview-sub {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.partner-preview-url {
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 600;
}

.partner-form .field-row {
  margin-bottom: 1rem;
}

.partner-form label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--subtle);
  font-size: 0.8rem;
  font-weight: 600;
}

.partner-form input,
.partner-form select,
.portal-row input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(20, 15, 10, 0.8);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.15s ease;
}

.partner-form input:focus,
.partner-form select:focus,
.portal-row input:focus {
  outline: none;
  border-color: var(--orange);
}

.partner-tier-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.partner-tier {
  padding: 1rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(20, 15, 10, 0.6);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.partner-tier.active,
.partner-tier:hover {
  border-color: var(--orange);
  background: rgba(255, 128, 0, 0.06);
  transform: translateY(-2px);
}

.partner-tier[data-tier="grade-s"].active {
  border-color: #ffd700;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.25);
  background: rgba(255, 170, 0, 0.08);
}

.partner-tier[data-tier="grade-a"].active {
  border-color: #38b2ac;
  box-shadow: 0 0 16px rgba(56, 178, 172, 0.25);
  background: rgba(56, 178, 172, 0.08);
}

.partner-tier[data-tier="grade-b"].active {
  border-color: #8fa9e6;
  box-shadow: 0 0 16px rgba(211, 174, 106, 0.25);
  background: rgba(211, 174, 106, 0.08);
}

.tier-grade-chip {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.4rem;
}

.grade-b-chip {
  background: rgba(211, 174, 106, 0.2);
  color: #cbd5e0;
  border: 1px solid rgba(211, 174, 106, 0.4);
}

.grade-a-chip {
  background: rgba(56, 178, 172, 0.2);
  color: #81e6d9;
  border: 1px solid rgba(56, 178, 172, 0.4);
}

.grade-s-chip {
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.35), rgba(255, 94, 0, 0.35));
  color: #ffd700;
  border: 1px solid #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.35);
}

.grade-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 0.5rem;
  display: inline-block;
}

.grade-pill.grade-b {
  background: rgba(211, 174, 106, 0.25);
  color: #cbd5e0;
  border: 1px solid rgba(211, 174, 106, 0.5);
}

.grade-pill.grade-a {
  background: rgba(56, 178, 172, 0.25);
  color: #81e6d9;
  border: 1px solid rgba(56, 178, 172, 0.5);
}

.grade-pill.grade-s {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 128, 0, 0.25));
  color: #ffd700;
  border: 1px solid #ffd700;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.partner-perks-box {
  background: rgba(31, 23, 16, 0.8);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
}

.partner-perks-box h4 {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--amber);
}

.tier-perks-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

.tier-perks-list li {
  margin-bottom: 0.25rem;
}

.application-action-box {
  margin-bottom: 1.25rem;
}

.partner-review-note {
  margin: 0.65rem 0 0;
  font-size: 0.76rem;
  color: var(--subtle);
  line-height: 1.45;
  text-align: center;
}

.portal-row-spaced {
  margin-top: 0.75rem;
}

.approved-checkout-box {
  margin-top: 1rem;
  padding: 1.15rem;
  border: 1px solid #48bb78;
  border-radius: 10px;
  background: rgba(72, 187, 120, 0.08);
  box-shadow: 0 4px 14px rgba(72, 187, 120, 0.12);
}

.tier-label {
  margin: 0 0 0.3rem;
  color: var(--subtle);
  font-size: 0.8rem;
  font-weight: 650;
}

.tier-info {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.partner-checkout-desc {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.partner-portal {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-strong);
}

.partner-portal h3,
.partner-portal h4 {
  margin: 0 0 0.4rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.partner-portal p {
  margin: 0 0 0.85rem;
  color: var(--subtle);
  font-size: 0.82rem;
  line-height: 1.5;
}

.portal-row {
  display: flex;
  gap: 0.5rem;
}

.portal-row input {
  flex: 1;
}

.portal-feedback {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.portal-feedback.success {
  color: #68d391;
}

.portal-feedback.error {
  color: #fc8181;
}

.btn-check-status {
  background: rgba(211, 174, 106, 0.15);
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.btn-check-status:hover {
  background: rgba(211, 174, 106, 0.25);
}

.partner-admin-wrapper {
  margin-top: 2.5rem;
  border-radius: 16px;
  background: var(--surface-low);
  border: 1px solid var(--line);
  overflow: hidden;
}

.partner-admin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.85rem;
}

.admin-shield-icon {
  font-size: 1.1rem;
}

.admin-bar-title {
  color: var(--muted);
  font-weight: 600;
}

.admin-bar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.btn-twitch-sm {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  background: #9146FF;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn-twitch-sm:hover {
  background: #772ce8;
  color: #fff;
}

.user-session-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(145, 70, 255, 0.15);
  border: 1px solid rgba(145, 70, 255, 0.4);
}

.user-session-name {
  color: #d6bbfb;
  font-size: 0.8rem;
  font-weight: 700;
}

.btn-logout-link {
  background: none;
  border: none;
  color: var(--subtle);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.btn-logout-link:hover {
  color: var(--text);
}

.btn-link {
  background: none;
  border: none;
  color: var(--subtle);
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.admin-passcode-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.admin-passcode-form input {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  width: 140px;
}

.partner-admin-console {
  padding: 1.5rem;
  border-top: 1px solid var(--line);
}

.admin-console-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line-strong);
}

.admin-console-head h3 {
  margin: 0;
  color: var(--amber);
  font-size: 1.2rem;
  font-weight: 800;
}

.admin-user-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-size: 0.85rem;
}

.admin-console-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 50rem) {
  .admin-console-content {
    grid-template-columns: 1fr 1fr;
  }
}

/* A long link or contact in a card never widens the column past a phone's screen. */
.admin-console-content > * {
  min-width: 0;
}

.admin-active-box,
.admin-queue-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
}

.admin-queue-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-active-box h4,
.admin-queue-box h4 {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

.admin-queue-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-queue-item {
  background: var(--surface-low);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 1rem;
  overflow-wrap: anywhere;
}

.admin-queue-item-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--subtle);
  margin-bottom: 0.5rem;
}

.admin-queue-preview {
  background: #000;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0.85rem;
  margin-bottom: 0.75rem;
}

.admin-queue-preview h5 {
  margin: 0 0 0.25rem;
  color: var(--amber);
  font-size: 0.95rem;
}

.admin-queue-preview p {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.admin-queue-preview a {
  color: var(--orange);
  font-size: 0.75rem;
  text-decoration: underline;
}

/* The owner's list of every live ad: grade, end date, the ad, and its payment check. */
.admin-active-box > h4 {
  margin-bottom: 1rem;
}

.admin-live-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.admin-live-item .admin-queue-item-meta {
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-live-item .grade-pill {
  margin-left: 0;
}

.admin-live-payment {
  margin: 0;
  color: var(--ok-text);
  font-size: 0.8rem;
  line-height: 1.45;
}

.admin-live-payment.is-failing {
  color: #fc8181;
}

.admin-active-display > .btn {
  align-self: flex-start;
}

.admin-item-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.reject-reason-input {
  width: 100%;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
}

.admin-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-approve {
  background: #2f855a;
  color: #fff;
  border: none;
}

.btn-approve:hover {
  background: #276749;
}

.btn-reject {
  background: #9b2c2c;
  color: #fff;
  border: none;
}

.btn-reject:hover {
  background: #742a2a;
}

/* Twitch Authentication Button for Ad Submissions */
.btn-twitch-auth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, #9146ff 0%, #772ce8 100%) !important;
  color: #ffffff !important;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 10px 28px -8px rgba(145, 70, 255, 0.75), 0 0 16px rgba(145, 70, 255, 0.35) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
}

.btn-twitch-auth:hover {
  background: linear-gradient(135deg, #a25eff 0%, #8235f5 100%) !important;
  color: #ffffff !important;
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -8px rgba(145, 70, 255, 0.9), 0 0 24px rgba(145, 70, 255, 0.5) !important;
}

.btn-twitch-auth:active {
  transform: translateY(0);
}

.twitch-svg-icon {
  flex-shrink: 0;
}

/* Advertiser Account Portal */
.advertiser-portal-section {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 14px;
  background: var(--surface-low);
  border: 1px solid var(--line-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.advertiser-profile-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.advertiser-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.advertiser-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #9146ff;
  object-fit: cover;
  background: #18181b;
}

.advertiser-user-text {
  display: flex;
  flex-direction: column;
}

.advertiser-welcome {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.advertiser-username {
  font-size: 1.05rem;
  color: #d6bbfb;
  font-weight: 800;
}

.advertiser-my-ads-container {
  margin-top: 1.25rem;
}

.advertiser-ads-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.advertiser-ads-head h3,
.advertiser-ads-head h4 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
}

.editing-ad-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: rgba(255, 140, 0, 0.12);
  border: 1px solid rgba(255, 140, 0, 0.4);
  border-radius: 8px;
  color: var(--amber);
  font-size: 0.88rem;
}

.editing-ad-banner strong {
  color: #fff;
}

.advertiser-ads-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.advertiser-ad-card {
  padding: 1.25rem;
  border-radius: 10px;
  background: rgba(31, 23, 16, 0.8);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.advertiser-ad-card:hover {
  border-color: var(--line-strong);
}

.ad-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.ad-card-tier-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.ad-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ad-status-chip.status-pending {
  background: rgba(255, 170, 0, 0.15);
  color: #ffaa00;
  border: 1px solid rgba(255, 170, 0, 0.4);
}

.ad-status-chip.status-approved {
  background: rgba(72, 187, 120, 0.15);
  color: #68d391;
  border: 1px solid rgba(72, 187, 120, 0.4);
}

.ad-status-chip.status-active,
.ad-status-chip.status-live {
  background: rgba(0, 242, 254, 0.15);
  color: #00f2fe;
  border: 1px solid rgba(0, 242, 254, 0.4);
}

.ad-status-chip.status-rejected {
  background: rgba(245, 101, 101, 0.15);
  color: #fc8181;
  border: 1px solid rgba(245, 101, 101, 0.4);
}

.ad-card-body h5 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 800;
}

.ad-card-body p {
  margin: 0 0 0.6rem;
  font-size: 0.88rem;
  color: var(--subtle);
  line-height: 1.45;
}

.ad-card-link {
  display: inline-block;
  font-size: 0.82rem;
  color: #4facfe;
  text-decoration: underline;
  word-break: break-all;
}

.ad-card-rejection {
  margin-top: 0.65rem;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  background: rgba(245, 101, 101, 0.1);
  border: 1px solid rgba(245, 101, 101, 0.3);
  color: #feb2b2;
  font-size: 0.82rem;
}

.ad-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.ad-approved-purchase-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.85rem;
  border-radius: 8px;
  background: rgba(72, 187, 120, 0.08);
  border: 1px solid rgba(72, 187, 120, 0.3);
}

.ad-approved-purchase-row p {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #68d391;
  width: 100%;
}

.ad-approved-purchase-row .portal-row {
  width: 100%;
}

/* Workbook Section */
.workbook-section {
  position: relative;
}

.workbook-eyebrow {
  color: #38bdf8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.workbook-lead {
  max-width: 65ch;
  margin-top: 0.5rem;
}

.workbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  align-items: start;
}

.workbook-story {
  background: linear-gradient(155deg, rgba(48, 36, 23, 0.65), rgba(24, 18, 12, 0.94));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 2rem;
}

.workbook-story-title {
  font-size: 1.35rem;
  margin-top: 0;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.workbook-story-quote {
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.workbook-story-text {
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.workbook-framework-box {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-rule);
}

.workbook-framework-title {
  color: #f1f5f9;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.workbook-framework-list {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  padding-left: 1.25rem;
}

.framework-tag-left {
  color: #38bdf8;
}

.framework-tag-right {
  color: #fb923c;
}

.framework-tag-arcs {
  color: #a855f7;
}

.workbook-card {
  background: linear-gradient(155deg, rgba(51, 39, 26, 0.8), rgba(26, 19, 13, 0.96));
  border: 2px solid rgba(59, 130, 246, 0.4);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 20px 40px -20px rgba(10, 132, 255, 0.3);
}

.workbook-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.workbook-badge {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.workbook-pages-count {
  font-size: 0.85rem;
  color: #94a3b8;
}

.workbook-card-title {
  font-size: 1.6rem;
  color: #fff;
  margin: 0 0 0.5rem 0;
}

.workbook-card-price {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  margin: 0 0 1rem 0;
}

.workbook-price-orig {
  font-size: 0.95rem;
  font-weight: 400;
  color: #94a3b8;
  text-decoration: line-through;
}

.workbook-price-save {
  font-size: 0.85rem;
  color: #4ade80;
  font-weight: 700;
  background: rgba(34, 197, 94, 0.15);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}

.workbook-perks {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  list-style: none;
  padding-left: 0;
}

.workbook-perk-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.workbook-check {
  color: #4ade80;
}

.workbook-card-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.workbook-btn-center {
  text-align: center;
  justify-content: center;
}

.workbook-buy-btn {
  text-align: center;
  justify-content: center;
  font-size: 1.1rem;
  padding: 0.85rem;
}

.workbook-card-note {
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 1rem;
  margin-bottom: 0;
}

.workbook-plans-wrap {
  max-width: 32rem;
  margin: 0 auto;
}

/* ---------- "Also from UpQuest": the one line on the home page that leads to the other products ---------- */
.also-from {
  max-width: 68rem;
  margin: 1.75rem auto 0;
  color: var(--subtle);
  font-size: 0.95rem;
  text-align: center;
}

.also-from a {
  white-space: nowrap;
}

/* ---------- Sponsor spots ----------
   sponsors.js fills them from /api/ads/placements, once per page view. Each one stays hidden while it has
   nothing to show. Grade S: a wide banner with a gold frame near the top of the page. The sponsor row: up to
   three cards (Grade A with a silver frame, Grade B standard). */
.sponsor-slot {
  position: relative;
  padding-block: 0.75rem 1.75rem;
}

/* The home page's banner sits first, under the menu, so Grade S is on the first screen everywhere. */
.sponsor-slot-top {
  padding-block: 1rem 0;
}

.sponsor-label {
  margin: 0 0 0.45rem;
  color: var(--amber);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sponsor-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 1.5rem;
  padding: clamp(1rem, 2.5vw, 1.5rem) clamp(1rem, 3vw, 2rem);
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: radial-gradient(110% 160% at 0% 0%, rgba(255, 196, 0, 0.16), rgba(255, 196, 0, 0) 58%) padding-box, linear-gradient(180deg, #292014, #18130e) padding-box, linear-gradient(135deg, #ffe7a3 0%, #ffc400 42%, #b8860b 100%) border-box;
  box-shadow: 0 18px 44px -24px rgba(255, 196, 0, 0.7);
  color: var(--text);
  text-decoration: none;
}

.sponsor-banner:hover {
  color: var(--text);
  filter: brightness(1.06);
}

.sponsor-banner-text {
  display: grid;
  flex: 1 1 16rem;
  gap: 0.2rem;
  min-width: 0;
}

.sponsor-banner-badge {
  color: #ffd76a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sponsor-banner-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
}

.sponsor-banner-sub {
  color: var(--muted);
  font-size: 0.98rem;
}

.sponsor-banner-sub:empty,
.sponsor-banner-badge:empty {
  display: none;
}

.sponsor-banner-go {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe7a3, #ffc400 55%, #d99a00);
  color: #241800;
  font-weight: 800;
}

.sponsor-row-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sponsor-row-item {
  display: flex;
  min-width: 0;
}

.sponsor-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
  min-width: 0;
  padding: 1rem 2.6rem 1.05rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(33, 26, 18, 0.85);
  box-shadow: 0 12px 28px -18px rgba(0, 0, 0, 0.8);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.sponsor-card:hover {
  border-color: var(--orange);
  background: rgba(28, 21, 15, 0.96);
  color: var(--text);
}

.sponsor-card[data-tier="grade-a"] {
  border: 2px solid #c9d3df;
  box-shadow: 0 0 0 1px rgba(201, 211, 223, 0.12), 0 14px 32px -20px rgba(201, 211, 223, 0.6);
}

.sponsor-card[data-tier="grade-s"] {
  border: 2px solid #ffc400;
}

.sponsor-card-badge {
  color: var(--amber);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sponsor-card[data-tier="grade-a"] .sponsor-card-badge {
  color: #e2e8f0;
}

.sponsor-card-title {
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.3;
}

.sponsor-card-sub {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.sponsor-card-arrow {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  color: var(--amber);
}

/* ---------- Partners page ---------- */
.page-hero .partner-badge,
.page-hero .workbook-eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-hero .partner-badge {
  color: var(--amber);
}

.page-hero .workbook-eyebrow {
  color: #38bdf8;
}

.partner-how {
  margin-top: 1rem !important;
  color: var(--text) !important;
  font-weight: 650;
}

.partner-grades {
  display: grid;
  gap: 1rem;
  margin: 0 0 2rem;
}

@media (min-width: 48rem) {
  .partner-grades {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.partner-grades .partner-tier {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  min-width: 0;
  padding: 1.25rem;
  text-align: left;
}

.tier-name {
  margin: 0;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 800;
}

.tier-length {
  margin: 0;
  color: var(--amber);
  font-size: 0.95rem;
  font-weight: 700;
}

.tier-perks {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.tier-perks li {
  margin-bottom: 0.25rem;
}

/* Each grade card ends with its radio button: "Pick Grade S". A click anywhere on the card picks it too. */
.tier-pick {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  margin-top: auto;
  padding-top: 0.6rem;
  color: var(--subtle);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.tier-pick input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--orange);
  cursor: pointer;
}

.partner-tier.active .tier-pick {
  color: var(--amber);
}

.partner-tier:focus-within {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* The line under the Partners heading: log in to see your ads, or who is logged in. */
.partner-signin {
  margin-top: 1.1rem !important;
}

.partner-signin .btn {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.partner-signin-note {
  margin-top: 1rem !important;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(72, 187, 120, 0.45);
  border-radius: 10px;
  background: rgba(72, 187, 120, 0.08);
  color: var(--text) !important;
  font-weight: 650;
}

.partner-signin-note.error {
  border-color: rgba(245, 101, 101, 0.55);
  background: rgba(245, 101, 101, 0.08);
}

/* The ad preview is drawn with the real spot's classes (banner for Grade S, row card for A and B). */
.partner-preview-where {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.partner-preview-where .grade-pill {
  margin-left: 0;
}

.partner-preview-live {
  margin-bottom: 0.6rem;
  pointer-events: none;
}

.partner-preview-flat {
  display: contents;
}

p.partner-preview-url {
  margin: 0 0 1.5rem;
  color: var(--subtle);
  font-weight: 600;
  overflow-wrap: anywhere;
}

#preview-url {
  color: var(--amber);
}

/* Tablets and small laptops: the sticky header's menu can wrap to two rows, so in-page jumps stop lower. */
@media (min-width: 60rem) and (max-width: 79.99rem) {
  html {
    scroll-padding-top: 7.5rem;
  }
}

.partner-picked {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(31, 23, 16, 0.8);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 650;
}

.approved-price,
.ad-approved-purchase-row .ad-card-price {
  margin: 0 0 0.75rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
}

.ad-approved-purchase-row .ad-card-price {
  text-align: left;
}

/* Phone widths: the partner forms and rows never push the page sideways. */
.portal-row input,
.portal-row .btn {
  min-width: 0;
}

.partner-card-head {
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.editing-ad-banner {
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.editing-ad-banner span,
.admin-queue-item-meta,
.partner-admin-bar {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 30rem) {
  .partner-card {
    padding: 1.25rem;
  }

  .partner-admin-console,
  .advertiser-portal-section {
    padding: 1rem;
  }

  .admin-passcode-form {
    flex-wrap: wrap;
  }
}



