/* AitoFactions site, ducal theme. One stylesheet for every page.
   Look: a castle at dusk. Warm ink, gold leaf, crimson and royal blue heraldry, soft shapes. */

:root {
  color-scheme: dark;

  --bg: #090a12;
  --bg-2: #0f1120;
  --panel: rgba(18, 20, 36, 0.92);
  --panel-2: rgba(25, 27, 47, 0.95);
  --edge: rgba(217, 174, 85, 0.16);
  --edge-2: rgba(217, 174, 85, 0.38);
  --text: #efe8d8;
  --muted: #c0b79f;
  --faint: #878094;

  --gold: #d9ae55;
  --gold-hi: #f6dc94;
  --gold-lo: #9c6f22;
  --gilt: linear-gradient(180deg, #fff0c2 0%, #f1cf7a 35%, #d4a046 70%, #a87526 100%);
  --crimson: #8e1d1f;
  --crimson-hi: #b8322b;
  --royal: #1f3b6e;
  --parchment: #eadcb8;
  --ink: #2b1d10;
  --ok: #7cc576;
  --danger: #e0645a;

  /* Minecraft colour codes, warmed slightly so they sit with the gold. */
  --mc-2: #4fb05f;
  --mc-3: #3fb3ad;
  --mc-4: #d0504a;
  --mc-5: #b863c9;
  --mc-6: #f0a845;
  --mc-7: #b9b0a0;
  --mc-8: #9a9387;
  --mc-9: #8d97f0;
  --mc-a: #86d88a;
  --mc-b: #7fd6dc;
  --mc-c: #ec7a70;
  --mc-d: #e687e0;
  --mc-e: #f2df78;
  --mc-f: #f6efe0;

  --title: "Teko", "Barlow Condensed", Impact, sans-serif;
  --display: "Barlow", system-ui, sans-serif;
  --deco: var(--title);
  --body: "Barlow", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;

  --radius: 14px;
  --max: 1240px;
  --nav: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.68;
  background:
    radial-gradient(900px 700px at 92% 1500px, rgba(142, 29, 31, 0.07), transparent 70%),
    radial-gradient(900px 700px at 6% 2500px, rgba(60, 80, 170, 0.08), transparent 70%),
    radial-gradient(900px 700px at 88% 3500px, rgba(217, 174, 85, 0.04), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
}

main { flex: 1; }

/* A faint gold damask on the walls either side of the content, fading out toward the middle. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background: url("damask.svg") 0 0 / 120px 160px repeat;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 28%, transparent 72%, #000 100%);
  mask-image: linear-gradient(90deg, #000 0%, transparent 28%, transparent 72%, #000 100%);
}
@media (max-width: 1100px) {
  body::before { display: none; }
}

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

a { color: var(--gold-hi); text-decoration-color: rgba(217, 174, 85, 0.5); text-underline-offset: 3px; }
a:hover { color: #fff3c9; }

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 { margin: 0; line-height: 1.1; font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
li { text-wrap: pretty; }

code {
  font-family: var(--mono);
  font-size: 0.78em;
  background: rgba(217, 174, 85, 0.08);
  border: 1px solid var(--edge);
  border-radius: 6px;
  padding: 0.08em 0.4em;
  color: var(--gold-hi);
  white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }

/* Big monitors: scale the whole type system (everything is in rem) and widen the column with it. */
@media (min-width: 1800px) {
  html { font-size: 17px; }
  :root { --max: 82rem; }
}
@media (min-width: 2300px) {
  html { font-size: 18.5px; }
  :root { --max: 84rem; }
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  background: var(--gold);
  color: var(--ink);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-family: var(--display);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.kicker {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}
.kicker.center { text-align: center; }

.fine { color: var(--faint); font-size: 0.98rem; }
.meta { color: var(--muted); font-size: 1rem; }
.meta b { color: var(--text); font-weight: 600; }

/* ---------- Sky: dusk gradient, warm haze, canvas stars and fireflies ---------- */

.sky {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(60% 45% at 50% 0%, rgba(80, 96, 190, 0.18), transparent 70%),
    linear-gradient(180deg, #04050c 0%, #0a0d24 35%, #161838 65%, #231f42 100%);
}

.sky-canvas, .aurora { position: absolute; pointer-events: none; }
.sky-canvas { inset: 0; width: 100%; height: 100%; z-index: -2; }

/* Soft moonlit haze drifting across the sky. */
.aurora {
  z-index: -3;
  left: -10%;
  right: -10%;
  top: -10%;
  height: 80%;
  opacity: 0.6;
  filter: blur(60px);
  background:
    radial-gradient(36% 40% at 22% 40%, rgba(120, 70, 140, 0.45), transparent 70%),
    radial-gradient(30% 36% at 55% 18%, rgba(70, 90, 160, 0.35), transparent 70%),
    radial-gradient(34% 40% at 82% 44%, rgba(160, 60, 70, 0.32), transparent 70%);
  animation: drift 40s ease-in-out infinite alternate;
}
@keyframes drift {
  0% { transform: translate3d(-2%, 0, 0); }
  100% { transform: translate3d(3%, 1.5%, 0); }
}



/* Film grain over everything, very faint, so flat shapes read as painted rather than vector. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -0.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Darken the corners of every painted sky a touch. */
.sky::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(3, 4, 10, 0.55) 100%);
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(9, 10, 18, 0.96);
  border-bottom: 1px solid var(--edge);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav.over { position: fixed; left: 0; right: 0; background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transition: background-color 0.3s, border-color 0.3s; }
.nav.over.scrolled { background: rgba(9, 10, 18, 0.97); border-color: var(--edge); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

.nav-in { height: var(--nav); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--title);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.nav-brand img { width: 48px; height: auto; }
.nav-brand b { color: var(--gold); font-weight: inherit; }
.nav-brand:hover { color: var(--text); }

.nav nav { display: flex; align-items: center; gap: 0.1rem; }
.nav nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  transition: color 0.2s;
}
.nav nav a:hover, .nav nav a[aria-current="page"] { color: var(--gold-hi); }
.nav nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}
.nav nav .nav-play { margin-left: 0.8rem; color: var(--ink); }
.nav nav .nav-play:hover { color: var(--ink); }

.menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  color: var(--gold-hi);
  background: rgba(217, 174, 85, 0.06);
  border: 1px solid var(--edge-2);
  border-radius: 12px;
  box-shadow: none;
  cursor: pointer;
}
.menu:hover { background: rgba(217, 174, 85, 0.12); transform: none; filter: none; box-shadow: none; }
.menu svg { width: 22px; height: 22px; }

/* ---------- Buttons: gilded and leather ---------- */

.btn, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid #f6dc94;
  border-radius: 12px;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  color: var(--ink);
  background: linear-gradient(180deg, #fbe7ac 0%, #e2b65e 48%, #b88430 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 0 rgba(120, 80, 20, 0.35), 0 8px 22px -10px rgba(217, 174, 85, 0.7);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s, background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover, button:hover { color: var(--ink); transform: translateY(-1px); filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 0 rgba(120, 80, 20, 0.35), 0 12px 28px -10px rgba(217, 174, 85, 0.85); }
.btn:active, button:active { transform: translateY(1px); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

.btn.dark {
  color: var(--parchment);
  background: linear-gradient(180deg, rgba(34, 37, 64, 0.95), rgba(17, 19, 34, 0.95));
  border-color: var(--edge-2);
  box-shadow: inset 0 1px 0 rgba(246, 220, 148, 0.12), 0 8px 22px -14px rgba(0, 0, 0, 0.9);
}
.btn.dark:hover { color: var(--gold-hi); border-color: var(--gold); filter: none; }
.btn.small { font-size: 0.8rem; padding: 0.62rem 1.15rem; border-radius: 10px; }

.row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Home hero ---------- */

.hero {
  min-height: max(100vh, 780px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav) + 1.5rem) 0 clamp(10rem, 28vh, 17rem);
  text-align: center;
}
/* The hero painting is 2880x760, so its box is at least width / 3.79 tall and never crops the peaks. */

/* The hero is a real screenshot of the server, lifted out of the shadows and blended into the page. */
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: -4;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 72%;
  filter: brightness(1.9) contrast(1.06) saturate(1.2);
  /* The shot has falling snow, and blown up the flakes read as glitches behind the nav, so the top fades into the sky. */
  -webkit-mask-image: linear-gradient(180deg, transparent calc(var(--nav) * 0.6), #000 calc(var(--nav) * 2.4));
  mask-image: linear-gradient(180deg, transparent calc(var(--nav) * 0.6), #000 calc(var(--nav) * 2.4));
}
.hero-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32%;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(9, 10, 18, 0.7) 60%, var(--bg));
}

/* Heraldic banners at the sides of the hero. On wide screens they hang from the top edge, outside the
   content column; narrower, there's no room beside the nav, so they hang from a rod just under it. */
.banners {
  --w1: clamp(64px, 6.2vw, 112px);
  --w2: calc(var(--w1) * 0.82);
  --x: 1.6vw;
  --gap: 1.2vw;
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.banner {
  position: absolute;
  top: calc(var(--nav) + 8px);
  height: auto;
  transform-origin: 50% 0;
  animation: sway 7s ease-in-out infinite alternate;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.5));
}
.banner.b1, .banner.b3 { width: var(--w1); }
.banner.b2, .banner.b4 { width: var(--w2); }
.banner.b1 { left: var(--x); }
.banner.b2 { left: calc(var(--x) + var(--w1) + var(--gap)); animation-delay: -3s; }
.banner.b3 { right: var(--x); animation-delay: -1.5s; }
.banner.b4 { right: calc(var(--x) + var(--w1) + var(--gap)); animation-delay: -4.5s; }
@keyframes sway {
  0% { transform: rotate(-1.4deg); }
  100% { transform: rotate(1.4deg); }
}
@media (min-width: 1900px) {
  .banners { --w1: clamp(100px, 5.2vw, 150px); --gap: 22px; --x: calc((100% - var(--max)) / 2 - 26px - var(--w2) - var(--gap) - var(--w1)); }
  .banner { top: -12px; }
  .banner.b2, .banner.b4 { top: -36px; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  /* Crest on its own row, plaques side by side under it, so the banners have room beside the crest. */
  .hero-top { grid-template-columns: auto auto; justify-content: center; gap: 1.1rem 3rem; }
  .hero-crest { grid-column: 1 / -1; order: -1; justify-self: center; }
  .banners { --w1: clamp(52px, 7vw, 76px); }
}
@media (max-width: 760px) {
  .banners { --w1: min(10vw, 52px); --x: 2.4vw; --gap: 2vw; }
  .banner { top: calc(var(--nav) + 4px); }
}

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 2.4rem;
}

/* Warm halo behind the crest */
.hero-crest { position: relative; }
.hero-crest::before {
  content: "";
  position: absolute;
  inset: -22% -18%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(246, 220, 148, 0.22), rgba(217, 174, 85, 0.08) 55%, transparent 75%);
}
/* The crest lights the sky around it like a moon. */
.hero-crest::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1400px;
  height: 900px;
  margin: -450px 0 0 -700px;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(150, 165, 255, 0.13), rgba(120, 130, 220, 0.05) 50%, transparent 80%);
}
.hero-logo {
  width: clamp(180px, 15vw, 320px);
  height: auto;
  animation: float 8s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Readouts either side of the crest: server status, and the IP (click to copy). */
.plaque {
  position: relative;
  display: grid;
  gap: 0.4rem;
  min-width: 15rem;
  padding: 0 0 0.9rem;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-family: var(--display);
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  white-space: nowrap;
}
.plaque::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.plaque::before {
  content: "";
  position: absolute;
  bottom: -3.5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}
.plaque.left { justify-self: end; justify-items: end; text-align: right; }
.plaque.left::before { right: -4px; }
.plaque.right { justify-self: start; justify-items: start; text-align: left; }
.plaque.right::after { background: linear-gradient(90deg, var(--gold), transparent); }
.plaque.right::before { left: -4px; }
.plaque-label { font-size: clamp(0.72rem, 0.6vw, 0.9rem); font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.plaque-value { display: inline-flex; align-items: center; gap: 0.55rem; font-size: clamp(1.25rem, 1.3vw, 1.9rem); font-weight: 600; letter-spacing: 0.04em; color: var(--parchment); }
.plaque-value b { color: var(--gold-hi); font-weight: 700; }
.plaque .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); flex: none; }
.plaque[data-state="online"] .dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(124, 197, 118, 0.6); animation: pulse 2.6s infinite; }
.plaque[data-state="offline"] .dot { background: var(--danger); }
button.plaque { cursor: pointer; transition: none; }
button.plaque:hover { transform: none; filter: none; box-shadow: none; }
button.plaque:hover .plaque-value { color: var(--gold-hi); }

/* Text sits on a photo here: a soft shadow keeps the small type crisp against stars and builds. */
.hero .plaque, .hero .tagline, .hero .season, .scroll-cue { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 18px rgba(0, 0, 0, 0.6); }
.hero .plaque-label, .hero .season-name, .scroll-cue { font-weight: 700; }
.hero .tagline { color: #d9cfb8; font-weight: 600; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(124, 197, 118, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(124, 197, 118, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 197, 118, 0); }
}

.title {
  margin-top: 1.4rem;
  font-family: var(--title);
  font-weight: 600;
  font-size: clamp(2.9rem, 7.2vw, 8.6rem);
  line-height: 1;
  letter-spacing: 0.03em;
  background: linear-gradient(180deg, #fff6d8 10%, #f1cf7a 45%, #c8923b 80%, #9c6f22 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 rgba(20, 14, 6, 0.85)) drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6));
  text-transform: uppercase;
}

.tagline {
  margin-top: 0.7rem;
  font-family: var(--display);
  font-size: clamp(0.95rem, 1vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Hero countdown, set like a title card: the season name between gilt rules, then a large gilded
   number with its unit and the date beside it. No box: it sits directly on the sky. */
.season { display: grid; justify-items: center; gap: 0.7rem; margin: 1.8rem auto 2rem; }
.season-name {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0;
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}
.season-name::before, .season-name::after { content: ""; width: 56px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.season-name::after { background: linear-gradient(90deg, var(--gold), transparent); }
.season-count { display: flex; align-items: center; justify-content: center; gap: 1.1rem; margin: 0; min-height: 4.2rem; }
.count-cell { display: grid; justify-items: center; gap: 0.35rem; }
.count-cell + .count-cell { padding-left: 1.1rem; border-left: 1px solid rgba(217, 174, 85, 0.35); }
.count-cell b {
  font-family: var(--body);
  font-weight: 600;
  font-size: clamp(4.2rem, 5.4vw, 6.8rem);
  line-height: 0.8;
  letter-spacing: 0.01em;
  font-variant-numeric: lining-nums tabular-nums;
  text-shadow: none;
  background: linear-gradient(180deg, #fff6d8 10%, #f1cf7a 50%, #c8923b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(20, 14, 6, 0.85)) drop-shadow(0 6px 18px rgba(0, 0, 0, 0.55));
}
.count-cell i { font-style: normal; font-family: var(--display); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); }
.count-note {
  display: grid;
  gap: 0.25rem;
  padding-left: 1.1rem;
  border-left: 1px solid rgba(217, 174, 85, 0.45);
  text-align: left;
  font-family: var(--body);
  font-style: normal;
  font-size: clamp(1.15rem, 1.15vw, 1.45rem);
  line-height: 1.15;
  color: var(--parchment);
}
.count-note small { font-family: var(--display); font-style: normal; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.count-text { font-family: var(--title); font-size: clamp(1.4rem, 1.6vw, 2rem); font-weight: 600; letter-spacing: 0.03em; color: var(--parchment); }
.season-when { font-family: var(--display); font-size: clamp(1.4rem, 1.4vw, 2rem); font-weight: 600; letter-spacing: 0.04em; color: var(--parchment); font-variant-numeric: tabular-nums; }
.season-when small { font-size: 0.62em; color: var(--gold); margin: 0 0.3em 0 0.1em; letter-spacing: 0.1em; }

.hero .row { justify-content: center; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
}
.scroll-cue:hover { color: var(--gold-hi); }
.scroll-cue svg { width: 20px; height: 20px; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(5px); } }

/* Gilt ornament between the home page's sections. */
.sep { height: 24px; margin: 1.5rem auto 0; width: min(420px, 70%); background: url("divider.svg") center / 100% 24px no-repeat; opacity: 0.9; }

/* ---------- Headings with flourishes ---------- */

.section { padding: 4.5rem 0; position: relative; }

.h-orn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  font-family: var(--title);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  letter-spacing: 0.03em;
  text-align: center;
  color: var(--parchment);
}
.h-orn::before, .h-orn::after {
  content: "";
  flex: 0 1 210px;
  height: 28px;
  background: url("flourish.svg") center / contain no-repeat;
}
.h-orn::before { transform: scaleX(-1); }
.h-orn::before, .h-orn::after { background-size: 100% 100%; }
.h-sub { text-align: center; color: var(--muted); max-width: 42rem; margin: 0.8rem auto 0; font-size: 1.1rem; font-style: normal; }

.h-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--title);
  font-weight: 600;
  font-size: 1.75rem;
  letter-spacing: 0.03em;
  color: var(--parchment);
  margin-bottom: 1.3rem;
}
.h-bar::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--edge-2), transparent); }

/* ---------- Heraldic shields ---------- */

.shield { position: relative; display: grid; place-items: center; width: 112px; aspect-ratio: 100 / 120; }
.shield .shield-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55)); }
.shield .field { fill: var(--t, var(--crimson)); }
.shield .sheen { fill: url(#sheen); }
.shield .trim { fill: none; stroke: url(#gilt); stroke-width: 4.5; }
.shield .trim-in { fill: none; stroke: #f1cf7a; stroke-opacity: 0.35; stroke-width: 1.4; }
.shield > svg:not(.shield-art) {
  position: relative;
  width: 40%;
  height: 40%;
  margin-top: -10%;
  fill: none;
  stroke: #f6dc94;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6));
}

/* ---------- Realms (game modes) ---------- */

.realms { padding: 1.5rem 0 3rem; }
.realms .kicker { margin-top: 1rem; }

.orbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.6rem 1rem; margin-top: 2.8rem; }

.realm {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.35rem;
  padding: 0.6rem 0.4rem 1rem;
  text-align: center;
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background-color 0.25s;
}
.realm .shield { margin-bottom: 0.8rem; transition: transform 0.3s ease; }
.realm:hover { color: inherit; background: rgba(217, 174, 85, 0.04); }
.realm:hover .shield { transform: translateY(-5px) scale(1.03); }
.realm-name { font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.01em; color: var(--parchment); }
.realm:hover .realm-name { color: var(--gold-hi); }
.realm-sub { color: var(--muted); font-size: 0.94rem; line-height: 1.45; max-width: 13rem; }

/* Game modes as hanging heraldic banners: a gilt rod, gold trim, cloth with folds, swallowtail end. */
.pennants { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.5rem; margin-top: 3rem; align-items: start; }
.pennant {
  --cut: polygon(0 0, 100% 0, 100% 100%, 50% 87%, 0 100%);
  position: relative;
  display: grid;
  /* 330px at the base type size; grows with the type on big monitors. */
  min-height: 20.625rem;
  color: inherit;
  text-decoration: none;
}
.pennant:hover { color: inherit; }
/* The cloth hangs from the rod and sways on its own (site.js sets --swing): a skew keeps the top edge on the rod
   while the hem moves, and the rod stays on the rail. */
.cloth {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.5rem;
  padding: 2.6rem 1.1rem 4.4rem;
  text-align: center;
  transform-origin: 50% 0;
  transform: skewX(var(--swing, 0deg));
  filter: drop-shadow(0 22px 26px rgba(0, 0, 0, 0.55));
}
.cloth::before, .cloth::after { content: ""; position: absolute; clip-path: var(--cut); transition: bottom 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.4s ease; }
.cloth::before { inset: 8px 0 0; z-index: -2; background: linear-gradient(180deg, #f6dc94, #c99a45 60%, #9c6f22); }
.cloth::after {
  inset: 11px 3px 4px;
  z-index: -1;
  /* The first layer is a band of light that crosses the cloth on hover. */
  background:
    linear-gradient(105deg, transparent 40%, rgba(255, 236, 190, 0.16) 50%, transparent 60%) 100% 0 / 250% 100% no-repeat,
    linear-gradient(90deg, rgba(0, 0, 0, 0.32), rgba(255, 255, 255, 0.07) 22%, rgba(0, 0, 0, 0.14) 46%, rgba(255, 255, 255, 0.06) 70%, rgba(0, 0, 0, 0.32)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 22%, transparent 75%, rgba(0, 0, 0, 0.25)),
    var(--t);
}
.rod {
  position: absolute;
  top: 0;
  left: -14px;
  right: -14px;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(180deg, #fff0c2, #d9ae55 50%, #8a6020);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.rod::before, .rod::after { content: ""; position: absolute; top: -3px; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #fff3c6, #d9ae55 55%, #8a6020); }
.rod::before { left: -6px; }
.rod::after { right: -6px; }
.pennant .medal {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 0.6rem;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.35));
  box-shadow: 0 0 0 2px #e2b65e, 0 0 0 5px rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(246, 220, 148, 0), inset 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}
.pennant .medal svg { width: 30px; height: 30px; fill: none; stroke: #f6dc94; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.4s ease; }
.pennant .realm-name { font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.01em; color: #fbf1d8; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); transition: color 0.4s ease; }
.pennant .realm-sub { color: rgba(248, 236, 210, 0.86); font-size: 0.93rem; line-height: 1.4; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.realm-more {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #f6dc94;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.realm-more::before, .realm-more::after { content: ""; width: 12px; height: 1px; background: currentColor; opacity: 0.7; }
/* Hover and keyboard focus: the cloth drops a little lower and brightens, light crosses it, the medal lights up. */
.pennant:is(:hover, :focus-visible) .cloth::before { bottom: -12px; }
.pennant:is(:hover, :focus-visible) .cloth::after {
  bottom: -8px;
  filter: brightness(1.14) saturate(1.08);
  background-position: 0% 0, 0 0, 0 0;
  transition: bottom 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.4s ease, background-position 1.1s ease;
}
.pennant:is(:hover, :focus-visible) .medal {
  transform: scale(1.06);
  box-shadow: 0 0 0 2px #f6dc94, 0 0 0 5px rgba(0, 0, 0, 0.25), 0 0 26px 4px rgba(246, 220, 148, 0.32), inset 0 2px 6px rgba(0, 0, 0, 0.5);
}
.pennant:is(:hover, :focus-visible) .medal svg { stroke: #fff6d8; }
.pennant:is(:hover, :focus-visible) .realm-name { color: #f6dc94; }
.pennant:is(:hover, :focus-visible) .realm-more { opacity: 1; transform: none; }
.pennant:focus-visible { outline: none; }
.pennant:focus-visible .cloth::before { background: linear-gradient(180deg, #fff6d8, #f1cf7a 60%, #c99a45); }

.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 3rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
  background: radial-gradient(60% 100% at 50% 50%, rgba(217, 174, 85, 0.06), transparent 70%);
}
.stat { position: relative; display: grid; justify-items: center; gap: 0.35rem; text-align: center; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: var(--gold); opacity: 0.6; }
.stat b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  background: var(--gilt);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { font-family: var(--display); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }

/* ---------- Panels ---------- */

.box {
  position: relative;
  padding: 1.4rem 1.45rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--edge-2);
  box-shadow: inset 0 0 0 4px rgba(9, 10, 18, 0.55), inset 0 0 0 5px rgba(217, 174, 85, 0.1), 0 20px 40px -24px rgba(0, 0, 0, 0.9);
}
.box-h {
  line-height: 1.3;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--gold-hi);
  padding-bottom: 0.7rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--edge);
}
.box-sub { margin: -0.6rem 0 0.8rem; font-style: normal; color: var(--faint); }
.box > p { color: var(--muted); }
.box .row { margin-top: 1.1rem; }

/* ---------- News board with sidebar ---------- */

.board { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2.2rem; align-items: start; }

.news { display: grid; gap: 1rem; }

.news-card {
  position: relative;
  display: grid;
  gap: 0.55rem;
  padding: 1.35rem 1.55rem 1.45rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--edge);
}
.news-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.3rem;
  bottom: 1.3rem;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--c, var(--gold));
}
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; font-family: var(--display); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.tag { color: var(--c, var(--gold)); border: 1px solid color-mix(in srgb, var(--c, var(--gold)) 45%, transparent); border-radius: 999px; padding: 0.22rem 0.7rem; }
.news-card h3 { font-family: var(--display); font-weight: 700; font-size: 1.45rem; letter-spacing: 0.01em; color: var(--parchment); }
.news-card p { color: var(--muted); }

/* The season proclamation: parchment, ink and a wax seal. */
.news-card.featured {
  padding: 2rem 2.2rem 2.1rem;
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(120, 80, 30, 0.35) 100%),
    radial-gradient(40% 30% at 20% 15%, rgba(255, 250, 230, 0.55), transparent 70%),
    linear-gradient(180deg, #efe2bf, #e2cf9f);
  border: 1px solid #b8955a;
  box-shadow: inset 0 0 0 5px rgba(239, 226, 191, 0.6), inset 0 0 0 6px rgba(140, 100, 40, 0.45), 0 26px 50px -24px rgba(0, 0, 0, 0.95);
}
.news-card.featured::before { display: none; }
.news-card.featured .news-meta { color: #7b6440; }
.news-card.featured .tag { color: #7a1a1a; border-color: rgba(122, 26, 26, 0.45); }
.news-card.featured h3 { font-family: var(--display); font-weight: 700; font-size: 2.3rem; letter-spacing: 0.03em; color: #5a1414; padding-right: 5rem; }
.news-card.featured p { color: #4a3826; font-size: 1.2rem; }
.news-card.featured a { color: #7a1a1a; }
.news-card.featured .fine { color: #7b6440; }
.featured-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem; }
.featured-when .season-when { color: #7a1a1a; font-size: 1.6rem; }
.featured-when .season-when small { color: #9c6f22; }
.seal {
  position: absolute;
  top: -18px;
  right: 26px;
  width: 92px;
  height: 92px;
  padding: 20px 14px 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #c43a32, #8e1d1f 55%, #5a0f12 100%);
  box-shadow: 0 0 0 4px rgba(142, 29, 31, 0.35), inset 0 -4px 8px rgba(0, 0, 0, 0.45), inset 0 3px 6px rgba(255, 180, 160, 0.3), 0 8px 18px rgba(0, 0, 0, 0.5);
  transform: rotate(-8deg);
  object-fit: contain;
}

/* The decree: one parchment sheet holding the season announcement and what it brings. */
.decree {
  position: relative;
  display: grid;
  gap: 0.6rem;
  padding: 2.3rem 2.5rem 2.4rem;
  border-radius: 6px;
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 50% 50%, transparent 52%, rgba(120, 80, 30, 0.38) 100%),
    radial-gradient(40% 30% at 18% 12%, rgba(255, 250, 230, 0.6), transparent 70%),
    radial-gradient(50% 40% at 85% 90%, rgba(160, 110, 50, 0.18), transparent 70%),
    linear-gradient(180deg, #f1e4c2, #e2cf9f);
  box-shadow: inset 0 0 0 6px rgba(241, 228, 194, 0.6), inset 0 0 0 7px rgba(140, 100, 40, 0.45), 0 30px 60px -28px rgba(0, 0, 0, 0.95);
}
.decree .news-meta { color: #7b6440; }
.decree .tag { color: #7a1a1a; border-color: rgba(122, 26, 26, 0.45); }
.decree h3 { font-family: var(--title); font-weight: 600; font-size: 2.4rem; letter-spacing: 0.03em; color: #5a1414; padding-right: 5rem; }
.decree .featured-when .season-when { color: #7a1a1a; font-size: 1.55rem; }
.decree .featured-when .season-when small { color: #9c6f22; }
.decree .fine { color: #7b6440; }
.decree a { color: #7a1a1a; }
.decree code { color: #5a1414; background: rgba(122, 26, 26, 0.07); border-color: rgba(122, 26, 26, 0.22); }
.decree-lede { font-size: 1.12rem; color: #3f2f1e; max-width: 42rem; }
.decree-rule { height: 22px; margin: 0.6rem 0 0.2rem; background: url("divider.svg") center / min(100%, 420px) 22px no-repeat; }
.decree-sub { font-family: var(--display); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: #8a6a3a; text-align: center; }
.decree-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; margin-top: 0.4rem; }
.decree-items section { padding-top: 0.2rem; }
.decree-items section + section { border-left: 1px solid rgba(140, 100, 40, 0.3); padding-left: 1.4rem; }
.decree-items h4 { font-family: var(--body); font-weight: 600; font-size: 1.1rem; letter-spacing: 0; color: #5a1414; margin-bottom: 0.3rem; }
.decree-items p { color: #4a3826; font-size: 0.96rem; line-height: 1.58; }
/* Launch-day box before the update log is out: one centred entry. */
.decree-items.decree-tba { grid-template-columns: minmax(0, 1fr); text-align: center; }

.keeps { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.3rem; }
.keeps span { font-family: var(--display); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.35rem 0.75rem; border-radius: 999px; border: 1px solid; }
.keeps .keep { color: #2f5e2a; border-color: rgba(47, 94, 42, 0.5); background: rgba(47, 94, 42, 0.08); }
.keeps .lose { color: #7a1a1a; border-color: rgba(122, 26, 26, 0.45); background: rgba(122, 26, 26, 0.06); }

.subhead { display: flex; align-items: center; gap: 0.9rem; margin: 1.8rem 0 0.8rem; font-family: var(--display); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase; color: var(--faint); }
.subhead::after { content: ""; flex: 1; height: 1px; background: var(--edge); }

.mini-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.mini-notes a {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.1rem;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--edge);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s;
}
.mini-notes a:hover { border-color: var(--edge-2); background: var(--panel-2); color: var(--gold-hi); }
.mini-notes time { font-family: var(--display); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
/* Long titles use the text face; Teko is for short, big titles. */
.mini-notes strong { font-family: var(--body); font-weight: 600; font-size: 1.06rem; letter-spacing: 0; }
.mini-notes span { color: var(--faint); font-size: 0.95rem; white-space: nowrap; }

.side { display: grid; gap: 1.2rem; position: sticky; top: calc(var(--nav) + 16px); }

.stat-rows { display: grid; gap: 0.55rem; margin: 0; }
.stat-rows div { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.stat-rows dt { color: var(--muted); }
.stat-rows dd { margin: 0; font-family: var(--display); font-weight: 700; font-size: 0.95rem; text-align: right; }
.stat-rows dd.on { color: var(--ok); }
.stat-rows dd.off { color: var(--danger); }

.timers { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.timers li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; }
.timers i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--gold)); box-shadow: 0 0 8px var(--c, var(--gold)); }
.timers span { color: var(--text); }
.timers b { font-family: var(--body); font-weight: 500; font-style: normal; font-size: 1rem; letter-spacing: 0; color: var(--gold-hi); white-space: nowrap; }

/* ---------- Classes: arched stained-glass windows ---------- */

.classes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.9rem; margin-top: 2.6rem; }

.class {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.3rem;
  padding: 2.2rem 0.8rem 1.2rem;
  text-align: center;
  color: inherit;
  text-decoration: none;
  /* A round-topped window: the top corners are half the card wide, so the arch meets in the middle. */
  border-radius: 50% 50% 14px 14px / 76px 76px 14px 14px;
  background:
    radial-gradient(80% 50% at 50% 12%, color-mix(in srgb, var(--c) 48%, transparent), transparent 78%),
    linear-gradient(180deg, rgba(26, 28, 50, 0.95), rgba(13, 15, 28, 0.98));
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--edge-2));
  box-shadow: inset 0 0 0 4px rgba(9, 10, 18, 0.6), inset 0 0 0 5px color-mix(in srgb, var(--c) 18%, transparent);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.class:hover { color: inherit; transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 60%, var(--gold)); box-shadow: inset 0 0 0 4px rgba(9, 10, 18, 0.6), inset 0 0 0 5px color-mix(in srgb, var(--c) 35%, transparent), 0 20px 40px -22px color-mix(in srgb, var(--c) 70%, transparent); }
.class i {
  display: grid;
  place-items: center;
  width: 3.6rem;
  height: 3.6rem;
  margin: 0.4rem 0 0.6rem;
  border-radius: 50%;
  font-style: normal;
  font-family: var(--deco);
  font-weight: 900;
  font-size: 1.9rem;
  line-height: 1;
  color: #2a1a08;
  background: radial-gradient(circle at 38% 30%, #fff3c6, #e2b65e 55%, #a87526 100%);
  box-shadow: 0 0 0 3px rgba(9, 10, 18, 0.7), 0 0 0 4px rgba(217, 174, 85, 0.5), 0 0 22px color-mix(in srgb, var(--c) 60%, transparent);
}
.class i svg { width: 1.9rem; height: 1.9rem; fill: none; stroke: #3a2508; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.class strong { font-family: var(--display); font-weight: 700; font-size: clamp(0.9rem, 1vw, 1.08rem); letter-spacing: 0.01em; color: color-mix(in srgb, var(--c) 72%, var(--parchment)); }
.class span { color: var(--muted); font-size: 0.88rem; line-height: 1.4; }

.races-h { margin: 2.8rem 0 1rem; }
.races { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; }
.race {
  position: relative;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--edge);
  overflow: hidden;
}
.race::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c); opacity: 0.85; }
.race strong { display: block; font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.01em; color: color-mix(in srgb, var(--c) 72%, var(--parchment)); }
.race span { color: var(--muted); font-size: 0.95rem; }

.center-link { text-align: center; margin-top: 2rem; }
.center-link .btn { display: inline-flex; }

/* ---------- Client download ---------- */

.client {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2.6rem;
  align-items: center;
  padding: 2.6rem 2.8rem;
  border-radius: 18px;
  background:
    radial-gradient(60% 120% at 100% 50%, rgba(217, 174, 85, 0.1), transparent 70%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--edge-2);
  box-shadow: inset 0 0 0 5px rgba(9, 10, 18, 0.55), inset 0 0 0 6px rgba(217, 174, 85, 0.12);
}
.client-mark { position: absolute; right: -30px; bottom: -50px; width: 380px; opacity: 0.08; pointer-events: none; }
.client h2 { font-family: var(--title); font-weight: 600; font-size: clamp(1.9rem, 3.4vw, 2.7rem); letter-spacing: 0.03em; color: var(--parchment); }
.client p { color: var(--muted); margin-top: 0.8rem; max-width: 34rem; }
.client .row { margin-top: 1.5rem; }
.client .btn.is-yours { order: -1; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; position: relative; }
.checks li { display: flex; gap: 0.75rem; align-items: flex-start; color: var(--muted); }
.checks svg { flex: none; width: 20px; height: 20px; margin-top: 0.3rem; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.checks b { color: var(--text); font-weight: 600; }

/* ---------- Closing band ---------- */

.final { padding: 7rem 0 15rem; text-align: center; margin-top: 0; -webkit-mask-image: linear-gradient(180deg, transparent, #000 110px); mask-image: linear-gradient(180deg, transparent, #000 110px); }
.final .h-orn { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.final-ip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1.9rem auto 1.3rem;
  padding: 0.4rem 0.4rem 0.4rem 1.4rem;
  border-radius: 999px;
  background: rgba(9, 10, 18, 0.8);
  border: 1px solid var(--edge-2);
  box-shadow: 0 0 40px -14px rgba(217, 174, 85, 0.5);
}
.final-ip code { border: 0; background: none; padding: 0; font-size: 1.15rem; color: var(--parchment); }
.final-ip .btn { border-radius: 999px; }
.final .row { justify-content: center; }

/* ---------- Inner page header ---------- */

.page-hero { padding: 3.8rem 0 4.6rem; }
.page-hero .hero-photo { object-position: center 62%; }
.page-hero-in { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.page-hero-text { min-width: 0; }
.page-hero h1 {
  font-family: var(--title);
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  line-height: 1.05;
  background: linear-gradient(180deg, #fff6d8 10%, #f1cf7a 50%, #c8923b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(20, 14, 6, 0.85));
}
.page-hero p:not(.kicker) { color: var(--muted); max-width: 44rem; margin-top: 0.9rem; font-size: 1.12rem; font-style: normal; }
.crest { width: clamp(110px, 8vw, 160px); margin-right: clamp(0px, 3vw, 72px); flex: none; animation: float 8s ease-in-out infinite; }

/* ---------- Guide ---------- */

.guide { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2.8rem; padding: 2.5rem 0 4.5rem; }

.toc { position: sticky; top: calc(var(--nav) + 20px); align-self: start; padding: 1.1rem 0.9rem; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--edge); }
.toc p { font-family: var(--display); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); margin: 0 0 0.6rem 0.6rem; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.toc a {
  display: block;
  padding: 0.42rem 0.7rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
}
.toc a:hover { color: var(--gold-hi); background: rgba(217, 174, 85, 0.05); }
.toc a.is-active { color: var(--ink); background: linear-gradient(180deg, #f6dc94, #d9ae55); }

.gsec { padding: 0 0 2.8rem; }
.gsec + .gsec { border-top: 1px solid var(--edge); padding-top: 2.6rem; }
.gsec > h2 { display: flex; align-items: center; gap: 0.9rem; font-family: var(--title); font-weight: 600; font-size: 1.9rem; letter-spacing: 0.03em; color: var(--parchment); }
.gsec > p { color: var(--muted); margin-top: 0.7rem; max-width: 48rem; }

/* Round gold medallion with the section's icon */
.icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #f6dc94;
  background: radial-gradient(circle at 40% 32%, color-mix(in srgb, var(--tint, var(--gold)) 55%, #1b1e36), #0c0e1a 80%);
  box-shadow: 0 0 0 2px rgba(9, 10, 18, 0.8), 0 0 0 3px rgba(217, 174, 85, 0.6), 0 6px 14px rgba(0, 0, 0, 0.5);
}
.icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; margin-top: 1.3rem; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.item { padding: 1.1rem 1.2rem; border-radius: 12px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--edge); }
.item h3 { line-height: 1.3; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; font-family: var(--display); font-weight: 700; font-size: 1.08rem; letter-spacing: 0.01em; color: var(--parchment); }
.item h3 code { font-size: 0.75rem; letter-spacing: 0; color: var(--muted); }
.item p { color: var(--muted); margin-top: 0.35rem; }
.item ul { margin: 0.45rem 0 0; padding-left: 1.15rem; color: var(--muted); }
.item li + li { margin-top: 0.15rem; }
.item li::marker { color: var(--gold); }

.class-item h3 { justify-content: flex-start; align-items: center; gap: 0.6rem; }
.ci {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #fff3c6, #e2b65e 55%, #a87526 100%);
  box-shadow: 0 0 0 2px rgba(9, 10, 18, 0.7), 0 0 0 3px rgba(217, 174, 85, 0.45);
}
.ci svg { width: 17px; height: 17px; fill: none; stroke: #3a2508; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.chips { list-style: none; margin: 0.8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chips li { font-family: var(--display); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; padding: 0.38rem 0.8rem; border-radius: 999px; color: var(--c, var(--parchment)); background: rgba(217, 174, 85, 0.05); border: 1px solid var(--edge); }
.chips code { font-size: 0.9em; margin-right: 0.3em; }

.table-wrap { overflow-x: auto; margin-top: 1.3rem; border-radius: 12px; border: 1px solid var(--edge); background: var(--panel); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.75rem 1.05rem; border-bottom: 1px solid var(--edge); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-family: var(--display); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); background: rgba(217, 174, 85, 0.06); }
td { color: var(--muted); }
td:first-child { color: var(--text); font-family: var(--display); font-weight: 700; font-size: 0.98rem; white-space: nowrap; }
td.num { font-family: var(--display); font-variant-numeric: tabular-nums; color: var(--gold-hi); font-weight: 700; text-align: right; }
th.num { text-align: right; }

.keep-lose { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; margin-top: 1.3rem; }
.keep-lose .item { border-top: 3px solid var(--ok); }
.keep-lose .item h3 { color: var(--ok); }
.keep-lose .item.lose { border-top-color: var(--danger); }
.keep-lose .item.lose h3 { color: var(--danger); }

.note { margin-top: 1.2rem; padding: 0.95rem 1.15rem; border-radius: 12px; border: 1px solid rgba(217, 174, 85, 0.3); background: rgba(217, 174, 85, 0.06); color: var(--text); }

/* ---------- Two-column pages (appeals) ---------- */

.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 2.2rem; align-items: start; padding: 2.5rem 0 4.5rem; }

.aside-box { position: sticky; top: calc(var(--nav) + 20px); }
.aside-box ul { margin: 0; padding-left: 1.15rem; color: var(--muted); }
.aside-box li + li { margin-top: 0.45rem; }
.aside-box li::marker { color: var(--gold); }
.aside-box li b { color: var(--text); }
/* Appeals page: appeals go through Discord, so the page is one centred box. */
.appeal-discord { max-width: 38rem; margin: 2.5rem auto 4.5rem; text-align: center; }
.appeal-discord .row { justify-content: center; }

/* ---------- Rules ---------- */

.rules { counter-reset: r; display: grid; gap: 0.95rem; max-width: 52rem; padding: 2.5rem 0 4.5rem; }
.rules-layout .rules { padding: 0; max-width: none; }
.side-stack { display: grid; gap: 1rem; align-content: start; position: sticky; top: calc(var(--nav) + 20px); }
/* The rules as one parchment charter, each law numbered in red ink. */
.rules {
  position: relative;
  padding: 2.6rem 2.8rem 2.4rem !important;
  gap: 0 !important;
  border-radius: 6px;
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 50% 50%, transparent 52%, rgba(120, 80, 30, 0.38) 100%),
    radial-gradient(40% 30% at 18% 8%, rgba(255, 250, 230, 0.6), transparent 70%),
    radial-gradient(50% 40% at 85% 92%, rgba(160, 110, 50, 0.18), transparent 70%),
    linear-gradient(180deg, #f1e4c2, #e2cf9f);
  box-shadow: inset 0 0 0 6px rgba(241, 228, 194, 0.6), inset 0 0 0 7px rgba(140, 100, 40, 0.45), 0 30px 60px -28px rgba(0, 0, 0, 0.95);
}
.rules::before {
  content: "The Laws of the Realm";
  display: block;
  text-align: center;
  font-family: var(--title);
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 2rem;
  color: #5a1414;
  padding-bottom: 1.2rem;
  margin-bottom: 0.4rem;
  background: url("divider.svg") center bottom / 300px 22px no-repeat;
}
.rule {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.1rem;
  padding: 1.3rem 0.2rem;
  border-top: 1px solid rgba(140, 100, 40, 0.3);
}
.rule:first-of-type { border-top: 0; }
.rule::before {
  counter-increment: r;
  content: counter(r, upper-roman);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1.1;
  color: #8e1d1f;
  text-align: center;
}
.rule h2 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: 0.01em; color: #5a1414; margin-top: 0.2rem; }
.rule p, .rule li { color: #4a3826; }
.rule p { margin-top: 0.4rem; }
.rule a { color: #7a1a1a; }
.rule ul { margin: 0.5rem 0 0; padding-left: 1.15rem; }
.rule li + li { margin-top: 0.25rem; }
.rule li::marker { color: #8e1d1f; }

/* ---------- Forms ---------- */

form { display: grid; gap: 1.1rem; }
/* The appeal form framed as a petition. */
.with-aside > form {
  padding: 2rem 2.1rem 2.2rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--edge-2);
  box-shadow: inset 0 0 0 4px rgba(9, 10, 18, 0.55), inset 0 0 0 5px rgba(217, 174, 85, 0.1), 0 20px 40px -24px rgba(0, 0, 0, 0.9);
}
.with-aside > form::before {
  content: "Your petition";
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--gold-hi);
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--edge);
}
.field { display: grid; gap: 0.4rem; font-family: var(--display); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.06em; color: var(--parchment); }
.field small { font-family: var(--body); color: var(--faint); font-weight: 400; font-size: 0.95rem; letter-spacing: 0; }

.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.65rem; border: 0; padding: 0; margin: 0; }
.choices legend { font-family: var(--display); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.06em; margin-bottom: 0.45rem; padding: 0; color: var(--parchment); }
.choices label {
  position: relative;
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--edge);
  cursor: pointer;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--parchment);
  transition: border-color 0.2s, background-color 0.2s;
}
.choices label span { font-family: var(--body); font-weight: 400; font-size: 0.95rem; letter-spacing: 0; color: var(--faint); }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices label:has(input:checked) { border-color: var(--gold); background: linear-gradient(180deg, rgba(217, 174, 85, 0.14), rgba(217, 174, 85, 0.04)); box-shadow: 0 0 0 1px var(--gold); }
.choices label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

input, select, textarea {
  width: 100%;
  background: rgba(7, 8, 16, 0.75);
  color: var(--text);
  border: 1px solid var(--edge-2);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  font: inherit;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 174, 85, 0.2); }
textarea { min-height: 10rem; resize: vertical; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
form button[type="submit"] { justify-self: start; }

/* ---------- Patch notes ---------- */

.launch {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: center;
  margin: 2.5rem 0 2rem;
  padding: 1.9rem 2.1rem;
  border-radius: 18px;
  background: radial-gradient(60% 140% at 0% 0%, rgba(142, 29, 31, 0.22), transparent 70%), linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--edge-2);
  box-shadow: inset 0 0 0 5px rgba(9, 10, 18, 0.55), inset 0 0 0 6px rgba(217, 174, 85, 0.12);
}
.launch h2 { font-family: var(--title); font-weight: 600; letter-spacing: 0.03em; font-size: clamp(1.9rem, 3.6vw, 2.6rem); color: var(--gold-hi); }
.launch .season-when { display: block; margin-top: 0.5rem; font-size: 1.5rem; color: var(--parchment); }
.launch ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.launch li { display: grid; gap: 0.1rem; padding: 0.75rem 1rem; border-radius: 10px; background: rgba(9, 10, 18, 0.5); border-left: 3px solid var(--c, var(--gold)); }
.launch li strong { font-family: var(--body); font-weight: 600; font-size: 1.06rem; letter-spacing: 0; color: var(--parchment); }
.launch li span { color: var(--muted); font-size: 0.94rem; }

.patch-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; margin-bottom: 1.8rem; }
.patch-tools input { flex: 1 1 320px; max-width: 460px; }
.year-filter { display: flex; gap: 0.35rem; }
.year-filter button {
  font-size: 0.8rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--edge);
  box-shadow: none;
}
.year-filter button:hover { color: var(--gold-hi); transform: none; filter: none; box-shadow: none; }
.year-filter button[aria-pressed="true"] { color: var(--ink); background: linear-gradient(180deg, #f6dc94, #d9ae55); border-color: transparent; }
#patch-count { margin-left: auto; font-family: var(--display); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }

.patch-list { position: relative; padding: 0 0 4rem 2.6rem; }
.patch-list::before { content: ""; position: absolute; left: 0.85rem; top: 0.6rem; bottom: 4rem; width: 2px; border-radius: 2px; background: linear-gradient(180deg, var(--gold), rgba(217, 174, 85, 0.08)); }

.patch-year { position: relative; font-family: var(--title); font-weight: 600; letter-spacing: 0.03em; font-size: 2rem; line-height: 1.1; margin: 1.8rem 0 1rem; color: var(--gold-hi); }
.patch-year:first-child { margin-top: 0; }
/* Wax seal on the timeline for each year */
.patch-year::before {
  content: "";
  position: absolute;
  left: -2.6rem;
  top: 50%;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: -0.875rem;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #c43a32, #8e1d1f 55%, #5a0f12 100%);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px rgba(217, 174, 85, 0.5);
}

.patch { position: relative; margin-bottom: 0.75rem; }
.patch::before { content: ""; position: absolute; left: -2.15rem; top: 1.35rem; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--bg); border: 2px solid var(--gold); }
.patch details { border-radius: var(--radius); background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--edge); }
.patch details[open] { border-color: var(--edge-2); }
.patch summary {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.3rem;
  border-radius: var(--radius);
  cursor: pointer;
  list-style: none;
}
.patch summary::-webkit-details-marker { display: none; }
.patch summary:hover { background: rgba(217, 174, 85, 0.04); }
.patch summary time { font-family: var(--display); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.patch summary h3 { font-family: var(--body); font-weight: 600; font-size: 1.2rem; letter-spacing: 0; color: var(--parchment); }
.patch summary .n { display: inline-flex; align-items: center; gap: 0.7rem; font-family: var(--display); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.patch summary .n::after {
  content: "";
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d9ae55' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.25s;
}
.patch details[open] summary .n::after { transform: rotate(180deg); }
.patch-body { padding: 0.2rem 1.3rem 1.3rem 10.8rem; columns: 2; column-gap: 2rem; }
.patch-body section { break-inside: avoid; margin-bottom: 1.35rem; }
.patch-body h4 { line-height: 1.45; margin: 0 0 0.35rem; font-family: var(--display); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.patch-body ul { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.98rem; }
.patch-body li + li { margin-top: 0.25rem; }
.patch-body li::marker { color: var(--gold-lo); }
.patch-body .wide { column-span: all; }
.patch-body section + .wide { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--edge); }
.patch-body mark { background: rgba(217, 174, 85, 0.3); color: #fff; padding: 0 0.12em; border-radius: 3px; }

/* ---------- Message pages (sent, 404) ---------- */

.message { min-height: calc(100vh - var(--nav)); display: grid; place-items: center; text-align: center; padding: 4rem 0 14rem; }
.message .wrap { position: relative; isolation: isolate; }
/* A drop-shadow glow on the logo leaves a faint square around it, so the halo is a separate round gradient. */
.message .wrap::before { content: ""; position: absolute; left: 50%; top: -70px; width: min(340px, 100vw); height: 240px; transform: translateX(-50%); z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(217, 174, 85, 0.16), transparent); }
.message .wrap > img { width: 130px; margin: 0 auto 1.3rem; }
.message h1 {
  font-family: var(--title);
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1.05;
  background: linear-gradient(180deg, #fff6d8 10%, #f1cf7a 50%, #c8923b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.message p:not(.kicker) { color: var(--muted); margin: 1.1rem auto 1.9rem; max-width: 30rem; font-size: 1.1rem; font-style: normal; }
.message .row { justify-content: center; }

/* ---------- Footer ---------- */

footer { position: relative; margin-top: 3rem; padding-top: 1rem; background: linear-gradient(180deg, transparent, #06070d 70%); }
footer .sep { margin: 0 auto 2.4rem; }
footer.flat { margin-top: 0; padding-top: 2.8rem; }

.foot { position: relative; isolation: isolate; display: grid; justify-items: center; text-align: center; gap: 1rem; padding-bottom: 2.2rem; }
.foot::before { content: ""; position: absolute; left: 50%; top: -64px; width: min(300px, 100vw); height: 200px; transform: translateX(-50%); z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(217, 174, 85, 0.14), transparent); }
.foot img { width: 96px; }
.foot-name { font-family: var(--title); font-weight: 600; font-size: 1.6rem; letter-spacing: 0.03em; text-transform: uppercase;}
.foot-name b { color: var(--gold); font-weight: inherit; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.foot-links a { font-family: var(--display); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--gold-hi); }
.foot-bottom { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; padding: 1.1rem 0 1.6rem; border-top: 1px solid var(--edge); }

/* ---------- Back to top and toast ---------- */

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: 50px;
  height: 50px;
  padding: 0;
  border-radius: 50%;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.to-top svg { width: 20px; height: 20px; color: var(--ink); stroke-width: 2.6; }
.to-top { background: radial-gradient(circle at 38% 30%, #fff3c6, #e2b65e 55%, #a87526 100%); border-color: #f6dc94; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top.show:hover { transform: translateY(-2px); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  transform: translate(-50%, 20px);
  opacity: 0;
  padding: 0.75rem 1.2rem;
  border-radius: 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  background: #141729;
  border: 1px solid var(--gold);
  color: var(--parchment);
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.9);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */

/* Short laptop screens: tighten the hero so the crest, title and buttons clear the castle. */
@media (max-height: 860px) and (min-width: 761px) {
  .hero { min-height: 100vh; padding-top: calc(var(--nav) + 0.5rem); padding-bottom: max(10rem, 30vh); }
  .hero-logo { width: clamp(140px, 11vw, 200px); }
  .title { font-size: min(6.4vw, 6.2rem); margin-top: 0.9rem; }
  .tagline { margin-top: 0.5rem; }
  .season { margin: 1.1rem auto 1.4rem; }
  .scroll-cue { bottom: 0.8rem; }
}

@media (max-width: 1180px) {
  .classes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .orbs, .pennants { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2.4rem; }
}

@media (max-width: 1120px) {
  .menu { display: inline-flex; }
  .nav nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 16px 1rem;
    background: #0c0e1a;
    border-bottom: 1px solid var(--edge);
    box-shadow: 0 24px 40px -10px rgba(0, 0, 0, 0.85);
  }
  .nav nav.open { display: flex; }
  .nav nav a { padding: 0.85rem 0.4rem; border-bottom: 1px solid var(--edge); border-radius: 0; }
  .nav nav a[aria-current="page"]::after { left: auto; right: 0.6rem; top: 50%; bottom: auto; margin: -2.5px 0 0; }
  .nav nav .nav-play { margin: 0.9rem 0 0; border-radius: 12px; border-bottom: 1px solid #f6dc94; }
  .nav.over.open-menu { background: #0c0e1a; }
}

@media (max-width: 960px) {
  .board, .client, .with-aside, .launch { grid-template-columns: minmax(0, 1fr); }
  .side, .aside-box, .side-stack { position: relative; top: auto; }
  .guide { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { position: static; margin-bottom: 2rem; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 0.35rem; }
  .toc a { border: 1px solid var(--edge); border-radius: 999px; }
  .patch-body { padding-left: 1.3rem; }
}

@media (max-width: 760px) {
  body { font-size: 1rem; }
  .hero { padding-bottom: 8rem; }
  .hero-top { grid-template-columns: minmax(0, 1fr); gap: 1rem; justify-items: center; }
  .hero-crest { order: -1; }
  .hero-logo { width: 160px; }
  .hero { padding-bottom: 7rem; }
  .hero-photo { object-position: 50% 80%; }
  /* The wordmark is about 5.3em wide in Teko capitals, so 15vw always fits the screen. */
  .title { font-size: 15vw; margin-top: 1rem; }
  .tagline { letter-spacing: 0.18em; font-size: 0.82rem; }
  .season-name { letter-spacing: 0.2em; font-size: 0.72rem; gap: 0.6rem; }
  .season-name::before, .season-name::after { width: 28px; }
  .count-note { font-size: 1rem; }
  .count-cell b { font-size: 3.4rem; }
  .season-count { gap: 0.7rem; }
  .count-cell + .count-cell { padding-left: 0.7rem; }
  .count-cell:nth-child(n + 2) b { font-size: 2.5rem; }
  .count-cell i { font-size: 0.6rem; letter-spacing: 0.16em; }
  .news-card.featured .news-meta, .decree .news-meta { padding-right: 64px; }
  .decree { padding: 1.8rem 1.4rem; }
  .decree h3 { font-size: 1.8rem; padding-right: 3.6rem; }
  .decree-items { grid-template-columns: minmax(0, 1fr); }
  .decree-items section + section { border-left: 0; padding-left: 0; border-top: 1px solid rgba(140, 100, 40, 0.3); padding-top: 1rem; }
  .plaque, .plaque.left, .plaque.right { justify-self: center; justify-items: center; text-align: center; min-width: min(100%, 320px); }
  .plaque::after, .plaque.right::after { background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent); }
  .plaque::before, .plaque.left::before, .plaque.right::before { left: 50%; right: auto; margin-left: -4px; }
  .plaque-value { font-size: 1.3rem; }
  .scroll-cue { display: none; }
  .hero .row { gap: 0.5rem; flex-wrap: nowrap; }
  .hero .row .btn { padding: 0.72rem 0.85rem; font-size: 0.76rem; letter-spacing: 0.08em; }
  .hero .row .btn svg { display: none; }
  .h-orn::before, .h-orn::after { display: none; }
  .crest { display: none; }
  .grid, .grid.three, .keep-lose, .two, .choices { grid-template-columns: minmax(0, 1fr); }
  .with-aside > form { padding: 1.5rem 1.2rem 1.6rem; }
  .classes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .races { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .orbs, .pennants { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.1rem; }
  .pennant { min-height: 290px; }
  .cloth { padding: 2.2rem 0.7rem 3.8rem; }
  .realm-more { display: none; }
  .rod { left: -7px; right: -7px; }
  .rod::before { left: -3px; }
  .rod::after { right: -3px; }
  .shield { width: 92px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 1.2rem; }
  .stat:nth-child(4)::before { display: none; }
  .stat b { font-size: 2.1rem; }
  .client { padding: 1.7rem 1.4rem; gap: 1.6rem; }
  .rule { grid-template-columns: 2.2rem minmax(0, 1fr); gap: 0.6rem; }
  .rules { padding: 1.8rem 1.3rem 1.6rem !important; }
  .rules::before { font-size: 1.5rem; }
  .final { padding: 4rem 0 11rem; }
  .final-ip code { font-size: 0.95rem; }
  .news-card.featured { padding: 1.7rem 1.4rem; }
  .news-card.featured h3 { font-size: 1.8rem; padding-right: 3.6rem; }
  .seal { width: 70px; height: 70px; padding: 15px 10px 12px; right: 14px; }
  .patch-list { padding-left: 2rem; }
  .patch-list::before { left: 0.55rem; }
  .patch-year::before { left: -2.05rem; width: 1.4rem; height: 1.4rem; margin-top: -0.7rem; }
  .patch::before { left: -1.75rem; }
  .patch summary { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
  .patch-body { columns: 1; }
  .mini-notes a { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
  #patch-count { margin-left: 0; }
}

@media (max-width: 420px) {
  body { font-size: 0.98rem; }
  .btn, button { padding: 0.75rem 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
