/* sites.pulsedmc.net theme for the main site's pages. nginx adds this file and
   v2/shell.js to every page it passes through; the shell draws the new header and
   footer, and this restyles everything else by overriding the old site's tokens. */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800;900&family=Public+Sans:wght@400;500;600;700&display=swap');

:root {
  /* new palette */
  --line: #2e2e3d; --card: #20202b; --card-2: #262634;
  --yellow-2: #c79c00; --ok: #22c55e;
  --head: 'Montserrat', system-ui, sans-serif;
  --body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Roboto, system-ui, sans-serif;
  /* the old site's tokens, remapped so its pages pick up the new look */
  --bg: #15151c; --bg-2: #1b1b24; --bg-card: #20202b; --bg-3: #262634; --bg-hover: #2d2d3d;
  --border: #2e2e3d; --border-str: #3a3a4c; --border-soft: #26263a;
  --text: #e9e9f1; --text-2: #b8b8c8; --muted: #8a8a9c;
  --radius: 14px; --radius-sm: 10px; --radius-xs: 8px;
  --font-display: var(--head); --font-body: var(--body);
}
body.v2 { background: var(--bg) !important; font-family: var(--body); overflow-x: clip; }
body.v2 h1, body.v2 h2, body.v2 h3 { font-family: var(--head); }

/* the old chrome, the seasonal layer, animation curtain and ads are not used here */
body.v2 > .nav-wrapper, body.v2 > header.nav-wrapper, body.v2 footer.footer,
body.v2 .fx-curtain, body.v2 .sitebar, body.v2 .hw-banner, body.v2 .hw-pop, body.v2 .hw-float,
body.v2 .gads, body.v2 .ad-rail, body.v2 .ads-rail, body.v2 .ad-gate { display: none !important; }

/* ── old-site components in the new style ─────────────── */
body.v2 .btn { border-radius: 10px; font-family: var(--body); font-weight: 700; }
body.v2 .btn-primary { background: var(--yellow); color: #17130a; border: 0; box-shadow: 0 5px 0 var(--yellow-2) !important; }
body.v2 .btn-primary:hover { filter: brightness(1.06); }
body.v2 .btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--yellow-2) !important; }
body.v2 .btn-ghost, body.v2 .btn-outline { background: var(--card-2); color: var(--text); border: 0; box-shadow: 0 4px 0 #101016; }
body.v2 .btn-ghost:hover, body.v2 .btn-outline:hover { background: #2d2d3d; color: #fff; }
body.v2 .btn-ghost:active, body.v2 .btn-outline:active { transform: translateY(3px); box-shadow: 0 1px 0 #101016; }
body.v2 input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), body.v2 select, body.v2 textarea {
  background-color: var(--bg-2); border-color: var(--border-str); border-radius: 10px; font-family: var(--body);
}
body.v2 input:focus, body.v2 select:focus, body.v2 textarea:focus { border-color: var(--yellow) !important; }

/* ── buttons ───────────────────────────────────────────── */
#hdr .btn, .ftr .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 15px/1 var(--body); text-decoration: none;
  padding: 15px 18px; border-radius: 10px; border: 0; cursor: pointer;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}
.btn:active { transform: translateY(3px); }
.btn-yellow { background: var(--yellow); color: #17130a; box-shadow: 0 5px 0 var(--yellow-2); text-transform: uppercase; }
.btn-yellow:hover { filter: brightness(1.06); }
.btn-yellow:active { box-shadow: 0 2px 0 var(--yellow-2); }
.btn-light { background: #e6e6ee; color: #17171f; box-shadow: 0 5px 0 #b2b2c0; text-transform: uppercase; }
.btn-light:active { box-shadow: 0 2px 0 #b2b2c0; }
.btn-dark { background: var(--card-2); color: var(--text); box-shadow: 0 4px 0 #101016; }
.btn-dark:hover { background: #2d2d3d; }
.btn-dark:active { box-shadow: 0 1px 0 #101016; }
.btn-lg { padding: 18px 22px; font-size: 15.5px; }
.btn-sm { padding: 11px 16px; font-size: 14px; box-shadow: 0 4px 0 var(--yellow-2); }

/* ── top update bar ────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 10px; padding: 14px 20px;
  background: var(--bg-2); border-bottom: 2px solid var(--yellow);
  text-decoration: none; font-size: 15.5px; color: var(--text-2);
}
.topbar:hover .topbar-text { color: var(--text); }
.topbar-pill { background: #2563eb; color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .02em; padding: 3px 8px; border-radius: 7px; flex: none; }
.topbar-arrow { flex: none; }

/* ── header ────────────────────────────────────────────── */
.hdr { position: sticky; top: 0; z-index: 50; background: rgba(27,27,36,.96); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.hdr.is-scrolled { border-bottom-color: var(--line); }
.hdr-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 22px/1 var(--head); letter-spacing: .01em; color: var(--yellow); flex: none; }
.brand b { color: #fff; font-weight: 800; }
.brand img { width: 40px; height: 40px; }
.hnav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-item { position: relative; }
.nav-btn { display: flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--text-2); font: 500 17px/1 var(--body); padding: 12px 10px; cursor: pointer; border-radius: 8px; }
.nav-btn:hover, .nav-item.is-open .nav-btn { color: #fff; }
.nav-btn svg { transition: transform .15s; }
.nav-item.is-open .nav-btn svg { transform: rotate(180deg); }
.mega {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translate(-50%, 6px);
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.45); display: flex; gap: 22px; min-width: 300px;
  opacity: 0; visibility: hidden; transition: opacity .15s, transform .15s, visibility .15s;
}
.mega-wide { min-width: 460px; }
.nav-item.is-open .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.mega-col { display: flex; flex-direction: column; gap: 2px; min-width: 200px; }
.mega-col h3 { font: 700 12px/1 var(--body); text-transform: uppercase; letter-spacing: .1em; color: var(--yellow); margin: 2px 8px 10px; }
.mega-col a { display: block; text-decoration: none; padding: 9px 10px; border-radius: 9px; }
.mega-col a:hover { background: var(--card-2); }
.mega-col a b { display: block; font-weight: 600; font-size: 15.5px; color: #fff; }
.mega-col a span { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.mega-all { color: var(--yellow) !important; font-weight: 600; font-size: 14.5px; }
.hdr-right { display: flex; align-items: center; gap: 16px; flex: none; }
.hdr-link { color: var(--text-2); text-decoration: none; font-weight: 500; }
.hdr-link:hover { color: #fff; }
.burger { display: none; background: none; border: 0; width: 42px; height: 42px; padding: 9px; cursor: pointer; }
.burger span { display: block; height: 2.5px; background: #fff; border-radius: 2px; margin: 5px 0; transition: transform .2s, opacity .2s; }

/* footer */
.ftr { background: var(--bg-2); padding: 70px 0 40px; margin-top: 40px; }
.totop { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 600 19px/1 var(--head); margin-bottom: 70px; }
.ftr-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 50px 30px; }
.ftr-brand { grid-row: span 2; }
.ftr-brand p { color: var(--text-2); font-size: 16px; max-width: 380px; margin: 18px 0 0; }
.socials { display: flex; gap: 16px; margin-top: 26px; }
.socials a { color: #fff; opacity: .85; }
.socials a:hover { opacity: 1; color: var(--yellow); }
.ftr-col { display: flex; flex-direction: column; gap: 12px; }
.ftr-col h4 { font: 600 20px/1.2 var(--body); color: #fff; margin-bottom: 6px; }
.ftr-col a { color: var(--muted); text-decoration: none; font-size: 17px; }
.ftr-col a:hover { color: #fff; }
.ftr-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 70px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 15.5px; }


@media (max-width: 1240px) { .nav-btn { font-size: 16px; padding: 12px 8px; } .hdr-link { display: none; } }
@media (max-width: 1040px) {
  .hnav { position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 10px 20px 20px; max-height: calc(100vh - 72px); overflow: auto; display: none; }
  .hdr.is-menu .hnav { display: flex; }
  .nav-btn { width: 100%; justify-content: space-between; padding: 16px 4px; font-size: 18px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .mega, .nav-item.is-open .mega { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: 0; padding: 6px 0 12px; min-width: 0; flex-direction: column; gap: 8px; background: transparent; }
  .mega { display: none; }
  .nav-item.is-open .mega { display: flex; }
  .burger { display: block; }
  .hdr-right { margin-left: auto; }
  .hdr.is-menu .burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .hdr.is-menu .burger span:nth-child(2) { opacity: 0; }
  .hdr.is-menu .burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .ftr-grid { grid-template-columns: 1fr 1fr 1fr; }
  .ftr-brand { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 700px) {
  .topbar { font-size: 14px; padding: 11px 16px; }
  .ftr .wrap, #hdr .wrap { padding: 0 16px; }
  .brand { font-size: 19px; }
  .hdr-right .btn { display: none; }
  .ftr-grid { grid-template-columns: 1fr 1fr; }
}
.mega-col a.is-here b { color: var(--yellow); }
#hdr .wrap, .ftr .wrap { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.ftr { font-size: 17px; line-height: 1.6; }
.topbar, #hdr, .ftr { font-family: var(--body); }
.ftr h4 { font-family: var(--body); }

/* old pages use a 1160px column; line them up with the new header and footer */
body.v2 .container { max-width: 1400px; padding: 0 20px; }
@media (max-width: 700px) { body.v2 .container { padding: 0 16px; } }
@media (max-width: 700px) { #hdr .hdr-right .btn { display: none !important; } #hdr .hdr-inner { gap: 12px; } }
/* the plan/shop hero stat rows wrap on phones instead of running off the side */
@media (max-width: 700px) {
  body.v2 .hero-panel-stats { flex-wrap: wrap; row-gap: 14px; }
  body.v2 .hero-panel-stats .hero-stat-sep { display: none; }
  body.v2 .hero-panel-stats .hero-stat { flex: 1 1 40%; padding-left: 0; padding-right: 0; }
}
/* nothing on the new site may push the page sideways */
html:has(body.v2) { overflow-x: clip; }

/* rotating update bar */
.topbar-text { transition: opacity .25s ease, transform .25s ease; min-width: 0; }
.topbar-text.is-out { opacity: 0; transform: translateY(-4px); }
.topbar-dots { display: inline-flex; gap: 6px; margin-left: auto; padding-left: 14px; }
.topbar-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--text-2); opacity: .35; cursor: pointer; }
.topbar-dots button.is-on { opacity: .95; background: var(--yellow); }
@media (max-width: 700px) { .topbar-dots { display: none; } }

.topbar-pill { transition: opacity .25s ease; }
.topbar-pill.is-out { opacity: 0; }
.topbar-pill[hidden] { display: none; }
.topbar-pill[data-tone="gold"] { background: #f5c518; color: #17130a; }
.topbar-pill[data-tone="green"] { background: #16a34a; }
.topbar-pill[data-tone="red"] { background: #dc2626; }

/* maintenance notices: fixed, under the menu, never rotating */
.maint-stack { position: relative; z-index: 40; }
.maint { --m-bg: rgba(251,146,60,.13); --m-line: #fb923c; --m-text: #fde2c8; background: var(--m-bg); border-bottom: 1px solid rgba(255,255,255,.06); border-left: 0; }
.maint[data-tone="gold"]  { --m-bg: rgba(245,197,24,.12); --m-line: #f5c518; --m-text: #fbe7a1; }
.maint[data-tone="blue"]  { --m-bg: rgba(96,165,250,.13); --m-line: #60a5fa; --m-text: #d6e7ff; }
.maint[data-tone="green"] { --m-bg: rgba(74,222,128,.12); --m-line: #4ade80; --m-text: #d3f9e0; }
.maint[data-tone="red"]   { --m-bg: rgba(248,113,113,.15); --m-line: #f87171; --m-text: #ffdcdc; }
.maint-inner { max-width: 1400px; margin: 0 auto; padding: 13px 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--m-text); font: 500 15.5px/1.45 var(--body, system-ui); box-shadow: inset 4px 0 0 var(--m-line); }
.maint-ico { color: var(--m-line); flex: none; }
.maint-tag { background: var(--m-line); color: #17130a; font-size: 12.5px; font-weight: 800; letter-spacing: .03em; padding: 3px 8px; border-radius: 6px; }
.maint-msg { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.maint-link { color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.maint-link:hover { text-decoration: underline; }
@media (max-width: 700px) { .maint-inner { padding: 11px 16px; font-size: 14.5px; } }

/* on /account the header button is Sign Out, and phones keep it (it is the way out) */
@media (max-width: 700px) { #hdr .hdr-right .btn.is-signout { display: inline-flex !important; padding: 9px 12px; font-size: 13px; } }

/* Header on pages with their own stylesheet (the guides): their tokens don't
   include --yellow, so the button went transparent, and their link styles let
   "Game Panel" wrap. Fixed values here, scoped to our header. */
#hdr .btn-yellow { background: var(--yellow, #f5c518); color: #17130a; box-shadow: 0 4px 0 var(--yellow-2, #c79c00); border: 0; }
#hdr .btn-yellow:hover { background: var(--yellow, #f5c518); color: #17130a; filter: brightness(1.06); }
#hdr .hdr-link { white-space: nowrap; }
