/* The world-stage treatment is confined to the header and opening. */
.topbar {
  position:sticky;
  top:0;
  z-index:20;
  gap:clamp(12px,2.8cqw,40px);
  min-height:52px;
  background:rgb(10 17 21 / .94);
  backdrop-filter:blur(10px);
  border:1px solid #39454a;
  border-radius:14px 14px 0 0;
}
section[id] { scroll-margin-top: 68px; }
.wordmark { margin-right:auto; font-size:24px; letter-spacing:-.065em; }
.topnav { display:contents; }
.topbar .section-link { display:inline-flex; order:1; white-space:nowrap; }
.nav-contact { border:0; padding:0; background:transparent; font-size:14px; line-height:1.2; cursor:pointer; }
.nav-contact:hover { color:var(--lime); }
.topbar .series-socials { order:1; }
.topbar .activity-button { order:2; white-space:nowrap; }
.topbar .language { order:3; }
.navigation-toggle { display:none; }

.opening[data-treatment="world"] {
  background:var(--paper);
  grid-template:"stage" auto "copy" auto / minmax(0,1fr);
}
.opening[data-treatment="world"]::before { display:none; }
.opening[data-treatment="world"] .opening-image { padding-top:0; }
.opening[data-treatment="world"] .opening-image img {
  aspect-ratio:2.25;
  object-fit:cover;
  object-position:center 48%;
  mask-image:linear-gradient(transparent,#000 5%,#000 88%,transparent);
}
.world-wall {
  grid-area:stage;
  align-self:start;
  z-index:2;
  display:grid;
  justify-items:center;
  gap:.65cqw;
  padding:1.85cqw 0 0;
  text-align:center;
  pointer-events:none;
}
.world-wall-caption {
  display:block;
  padding-left:.38em;
  font:600 clamp(18px,2.4cqw,35px)/1.1 "Segoe UI",Arial,sans-serif;
  letter-spacing:.38em;
  white-space:nowrap;
  color:#eef3f6;
  background:linear-gradient(#ffffff 15%,#d8e2e8 75%,#b2c0c9);
  background-clip:text;
  -webkit-text-fill-color:transparent;
  filter:drop-shadow(0 2px 7px rgb(0 0 0 / .8));
}
.world-wall-amount {
  display:block;
  width:76%;
  height:auto;
  margin:0;
  filter:drop-shadow(0 8px 18px rgb(0 0 0 / .78)) drop-shadow(0 2px 3px rgb(0 0 0 / .9));
}
.opening[data-treatment="world"] .opening-copy {
  grid-area:copy;
  position:relative;
  z-index:3;
  align-self:start;
  justify-items:center;
  width:100%;
  margin-top:clamp(-62px,-4.4cqw,-34px);
  padding:0 var(--pad) 0;
  gap:6px;
  text-align:center;
  pointer-events:none;
}
.world-story {
  color:#f4f7fa;
  font:800 italic clamp(24px,2.95cqw,42px)/1.06 "Segoe UI",Arial,sans-serif;
  letter-spacing:-.035em;
  text-shadow:0 2px 6px #031016;
}
.world-story > span, .world-decision { display:block; }
.world-decision {
  position:relative;
  width:fit-content;
  margin:2px auto 0;
  color:var(--lime);
  font-weight:800;
}
.world-decision::after {
  content:"";
  position:absolute;
  left:0;
  right:-.05em;
  bottom:-.23em;
  height:.18em;
  border-top:3px solid currentColor;
  border-radius:50%;
  transform:rotate(-2deg);
}
.opening[data-treatment="world"] .episode-control { aspect-ratio:2.25; margin-top:0; z-index:4; }
.next-step { padding:clamp(22px,2.2cqw,34px) var(--pad) 0; background:var(--paper); }
.next-step #vote-title {
  color:#f4f7fa;
  font:400 clamp(27px,3.45cqw,50px)/1.12 "Segoe UI",Arial,sans-serif;
  letter-spacing:-.02em;
  text-align:center;
  text-transform:none;
  text-shadow:none;
  text-wrap:balance;
}

@media (max-width:850px) {
  .topbar { border-radius:0; padding:4px 13px; min-height:54px; gap:7px; }
  .wordmark { font-size:21px; }
  .topbar .language { flex:none; height:38px; }
  .topbar .language select { height:100%; line-height:36px; font-size:14px; }
  .topbar .activity-button { min-width:44px; min-height:44px; justify-content:center; }
  .topbar .activity-button .icon { display:block; width:20px; height:20px; }
  .topbar .activity-button > span { display:none; }
  .navigation-toggle { display:grid; place-items:center; order:4; width:44px; min-height:44px; padding:0; background:none; border:0; }
  .navigation-toggle > span, .navigation-toggle > span::before, .navigation-toggle > span::after {
    display:block; width:20px; height:1.5px; background:#e3e9eb;
  }
  .navigation-toggle > span { position:relative; }
  .navigation-toggle > span::before, .navigation-toggle > span::after { content:""; position:absolute; left:0; }
  .navigation-toggle > span::before { top:-6px; }
  .navigation-toggle > span::after { top:6px; }
  .topnav { display:none; position:absolute; top:100%; left:-1px; right:-1px; padding:16px; flex-direction:column; align-items:stretch; gap:12px; background:#0c161b; border:1px solid #39454a; border-top:0; box-shadow:0 12px 22px #0006; }
  .topbar[data-menu-open] .topnav { display:flex; }
  .topbar .section-link { min-height:44px; align-items:center; font-size:16px; }
}
@media (max-width:370px) {
  .topbar { padding-inline:7px; gap:4px; }
  .topbar .wordmark { font-size:19px; }
  .topbar .language select { font-size:13px; }
}
@media (max-width:650px) {
  .opening[data-treatment="world"] { background:var(--paper); grid-template:"photo" auto "copy" auto / minmax(0,1fr); }
  .opening[data-treatment="world"] .opening-image { padding-top:0; }
  .opening[data-treatment="world"] .opening-image img {
    aspect-ratio:1.08/1;
    object-fit:cover;
    object-position:center 48%;
    mask-image:linear-gradient(transparent,#000 6%,#000 86%,transparent);
  }
  .world-wall { grid-area:photo; padding-top:clamp(10px,2.8cqw,20px); gap:clamp(6px,1.5cqw,10px); }
  .world-wall-caption { font-size:clamp(14px,3.85cqw,24px); letter-spacing:.32em; padding-left:.32em; }
  .world-wall-amount { width:92%; }
  .opening[data-treatment="world"] .opening-copy { grid-area:copy; width:100%; align-self:start; margin-top:-54px; padding:0 var(--pad) 6px; gap:4px; text-align:center; }
  .world-story { font-size:clamp(21px,6.4cqw,30px); line-height:1.05; }
  .world-decision { margin-inline:auto; }
  .opening[data-treatment="world"] .episode-control { aspect-ratio:1.08/1; margin-top:0; }
  .opening[data-treatment="world"] .episode-capsule { right:10px; bottom:66px; }
  .next-step { padding-top:14px; }
  .next-step #vote-title { font-size:clamp(16px,4.75cqw,28px); letter-spacing:-.025em; }
  .vote-heading { display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:10px; }
  .vote-heading .round-note { margin-top:0; white-space:nowrap; font-size:13px; }
  .deadline { display:inline-flex; align-items:baseline; justify-content:flex-end; gap:6px; text-align:end; white-space:nowrap; }
  .deadline .small-label { font-size:11px; }
  .deadline time { font-size:16px; }
}

@property --ep-orbit {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes episode-gold-snake {
  to { --ep-orbit: 360deg; }
}
.opening[data-treatment="world"] .episode-face {
  position: relative;
  min-height: 44px;
  padding: 0 20px 0 14px;
  gap: 10px;
  font-size: 15.5px;
  font-weight: 600;
  border-color: rgb(214 179 111 / .45);
  background: #141715f0;
  box-shadow: 0 0 12px rgb(229 182 90 / .28), inset 0 0 6px rgb(227 183 99 / .12);
}
.opening[data-treatment="world"] .episode-face i {
  width: 24px;
  height: 24px;
  font-size: 11px;
}
.opening[data-treatment="world"] .episode-face::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--ep-orbit),
    transparent 0deg 255deg,
    rgb(214 179 111 / .22) 285deg,
    #f2cb77 328deg,
    #fff4cf 348deg,
    #e6b655 356deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: episode-gold-snake 3.4s linear infinite;
  filter: drop-shadow(0 0 4px rgb(245 204 114 / .65));
}
@media (prefers-reduced-motion: reduce) {
  .opening[data-treatment="world"] .episode-face::before { animation: none; --ep-orbit: 35deg; }
}

/* Experimental Jade & Champagne Gold palette for voting buttons (D-012) */
.meter {
  position: relative;
  height: 9px;
  margin: 4px 4px 6px;
  background: #1c2420;
  border: 1px solid #2d3832;
  border-radius: 999px;
  overflow: visible;
}
.meter i {
  position: relative;
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width .32s ease-out;
}
.gpu .meter i {
  background: linear-gradient(90deg, #49a862, #b8f27c);
  box-shadow: 0 0 10px rgb(138 232 120 / .35);
}
.deal .meter i {
  background: linear-gradient(90deg, #bc883b, #f2d79c);
  box-shadow: 0 0 10px rgb(232 192 115 / .35);
}
.meter i::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  transform: translate(50%, -50%);
  background: #f5faf4;
  border: 2.5px solid var(--side);
  box-shadow: 0 0 10px var(--side), 0 1px 4px rgb(0 0 0 / .65);
}
.gpu .vote-button {
  --vote-top: #b8f27c;
  --vote-bottom: #52b56c;
  --vote-edge: #73cf86;
  --vote-rim: #ecffd4;
  --vote-glow: rgb(110 218 128 / .26);
  color: #0b1f12;
}
.deal .vote-button {
  --vote-top: #f2d79c;
  --vote-bottom: #c49245;
  --vote-edge: #d8ae63;
  --vote-rim: #fff2cf;
  --vote-glow: rgb(214 179 111 / .26);
  color: #211405;
}
.vote-button {
  letter-spacing: .015em;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .52), inset 0 -2px 0 rgb(0 0 0 / .18), 0 4px 12px rgb(0 0 0 / .36), 0 0 18px var(--vote-glow);
}
.footer-socials {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.footer-social-link {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #35413c;
  background: #151b18;
  color: var(--muted);
  transition: border-color .16s ease, color .16s ease, transform .16s ease;
}
.footer-social-link:hover {
  border-color: var(--lime);
  color: var(--lime);
  transform: translateY(-1px);
}
.scroll-top-btn {
  position: fixed;
  right: clamp(14px, 2vw, 28px);
  bottom: 76px;
  z-index: 6;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #59695b;
  background: rgb(16 20 19 / .9);
  backdrop-filter: blur(8px);
  color: #e8efe8;
  box-shadow: 0 6px 20px rgb(0 0 0 / .45), 0 0 10px rgb(202 255 118 / .12);
  transition: transform .16s ease, border-color .16s ease, color .16s ease;
}
.scroll-top-btn:hover {
  transform: translateY(-2px);
  border-color: var(--lime);
  color: var(--lime);
}
.footer-bottom {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.footer-chat-btn {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #8a774f;
  background: linear-gradient(145deg, #1b221e, #121714);
  color: #f0d79f;
  box-shadow: 0 0 12px rgb(214 179 111 / .2);
  transition: transform .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.footer-chat-btn:hover {
  transform: translateY(-1px) scale(1.05);
  border-color: var(--lime);
  color: var(--lime);
  box-shadow: 0 0 14px rgb(202 255 118 / .25);
}
.footer-legal a {
  color: var(--muted);
  text-decoration: none;
  text-underline-offset: .18em;
}
.footer-legal a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.backers-section {
  margin-top: clamp(28px, 3vw, 44px);
  padding-top: clamp(24px, 2.8vw, 40px);
}
.leaderboard {
  padding: 14px 16px 8px;
  border: 1px solid #2e3833;
  border-top: 2px solid var(--side);
  border-radius: 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--side) 7%, #151b18) 0%, #131816 56px);
}
.leaderboard .board-heading {
  padding-bottom: 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid #29332e;
}
.leaderboard .board-heading h3 {
  font-size: 17px;
  font-weight: 750;
  color: var(--ink);
}
.leaderboard .side-mark {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--side);
  color: #101610;
  font-weight: 800;
}
@media (max-width: 650px) {
  .opening[data-treatment="world"] .episode-face { min-height: 40px; padding: 0 16px 0 12px; gap: 8px; font-size: 14.5px; }
  .opening[data-treatment="world"] .episode-face i { width: 22px; height: 22px; font-size: 10.5px; }
  .backers-section .section-heading { justify-content: center; text-align: center; margin-bottom: 14px; }
  .leaderboard { padding: 12px 12px 6px; }
}
