/* Site-wide War Room system derived from approved Concept #2. */
:root { --rm-red:#ef2933; --rm-green:#31df72; --rm-bg:#060809; --rm-panel:#0b0e10; --rm-panel2:#111518; --rm-line:#34393d; --rm-copy:#eef0ed; --rm-muted:#858b90; }

/* Keep shared chrome stationary without exposing a white root-layer flash. */
html { background:#060809; }
@view-transition { navigation:auto; }
::view-transition { background:#060809; }
::view-transition-group(root),
::view-transition-old(root),
::view-transition-new(root) { animation-duration:0s; mix-blend-mode:normal; }
.site-header { view-transition-name:rustmania-header; }
.site-footer { view-transition-name:rustmania-footer; }
::view-transition-old(rustmania-header),::view-transition-new(rustmania-header),
::view-transition-old(rustmania-footer),::view-transition-new(rustmania-footer) { animation:none; }

body.theme-industrial:not(.page-home) {
  background-color:#07090a;
  background-image:radial-gradient(circle at 82% 4%,rgba(132,26,22,.18),transparent 34%),repeating-linear-gradient(120deg,rgba(255,255,255,.018) 0 1px,transparent 1px 72px);
  background-attachment:fixed;
}
.theme-industrial.page-leaderboards::before {
  background:linear-gradient(rgba(5,7,8,.72),rgba(5,7,8,.94)),url("../branding/rustmania/rustmania-war-room-hero-v1.png") center top/cover fixed no-repeat;
}

.theme-industrial .site-header .brand-mark,.theme-industrial:not(.page-home) .site-header .brand-mark { display:flex; align-items:center; justify-content:flex-start; gap:8px; height:100%; padding:4px 20px; }
.theme-industrial:not(.page-home) .site-header { height:68px; grid-template-columns:minmax(235px,320px) 1fr 132px; border-color:#43474b; background:rgba(7,9,10,.98); }
.theme-industrial:not(.page-home) .site-nav a { font-size:11px; }
.theme-industrial:not(.page-home) .header-play { margin:9px 12px; }
.theme-industrial:not(.page-home) main { padding-top:10px; }

.page-servers main,.page-rules main,.page-store main,.page-leaderboards main,.page-link main,.page-privacy main { display:grid; gap:12px; }
.theme-industrial:not(.page-home) .page-hero,
.theme-industrial:not(.page-home) .store-hero {
    min-height:210px; margin:0; padding:34px 48px; display:grid; align-content:center; overflow:hidden;
    border:1px solid var(--rm-line); border-left:3px solid var(--rm-red);
    background:
      linear-gradient(90deg,#07090a 0%,rgba(7,9,10,.92) 34%,rgba(7,9,10,.25) 72%),
      url("../branding/rustmania/rustmania-war-room-hero-v1.png") 72% 48%/cover no-repeat;
    box-shadow:inset 0 -30px 70px rgba(0,0,0,.55);
}
.theme-industrial:not(.page-home) .page-hero { justify-items:start; text-align:left; }
.theme-industrial:not(.page-home) .page-hero > * { max-width:720px; text-align:left; }
.theme-industrial:not(.page-home) .page-hero::after,.theme-industrial:not(.page-home) .store-hero::after { display:none; }
.theme-industrial:not(.page-home) .page-hero .eyebrow,.theme-industrial:not(.page-home) .store-hero .eyebrow { color:#a3a8ac; letter-spacing:4px; }
.theme-industrial:not(.page-home) .page-hero h1,.theme-industrial:not(.page-home) .store-hero h1 { margin:5px 0 8px; color:var(--rm-copy); font-size:clamp(42px,4vw,68px); line-height:.9; }
.theme-industrial:not(.page-home) .page-hero h1 span,.theme-industrial:not(.page-home) .store-hero h1 span { color:var(--rm-red); }
.theme-industrial:not(.page-home) .page-hero > p:last-child,.theme-industrial:not(.page-home) .store-hero > div > p:last-child { max-width:690px; margin:0; color:#b9bec2; font-size:15px; }

/* Servers */
.page-servers .server-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:0; }
.page-servers .server-card { display:grid; grid-template-rows:48px 190px 0 66px 5px 54px; min-height:0; overflow:hidden; border:1px solid #44494d; border-left:3px solid var(--rm-red); background:var(--rm-panel); box-shadow:none; }
.page-servers .server-card::after { display:none; }
.page-servers .server-card-head { padding:8px 16px; border-bottom:1px solid #353a3e; }
.page-servers .server-kicker { display:none; }
.page-servers .server-card-head p strong { font-size:27px; }
.page-servers .server-card-visual {
  display:block;
  background:
    linear-gradient(90deg,rgba(5,7,8,.28),rgba(5,7,8,.02)),
    url("../branding/rustmania/rustmania-war-room-hero-v1.png") center 44%/cover no-repeat;
  border-bottom:1px solid #303438;
  filter:saturate(.9) contrast(1.08);
}
.page-servers .server-card:nth-child(2) .server-card-visual { background-position:72% 58%; }
.page-servers .server-name { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.page-servers .server-intel { grid-template-columns:repeat(4,1fr); padding:8px 15px; background:#0b0e10; }
.page-servers .server-intel span { font-size:9px; }
.page-servers .server-intel strong { font-size:13px; }
.page-servers .player-bar { height:5px; margin:0 15px; }
.page-servers .server-actions { display:grid; grid-template-columns:1fr auto auto; gap:8px; padding:7px 15px 10px; }
.page-servers .server-actions .button { min-height:36px; padding:7px 18px; }
.page-servers .server-actions .button-disabled { grid-column:1/-1; }
.page-servers .connection-help { min-height:142px; margin:0; padding:22px 32px; border:1px solid var(--rm-line); border-left:3px solid var(--rm-red); background:linear-gradient(145deg,#111416,#090b0d); }
.page-servers .connection-help h2 { color:var(--rm-copy); font-size:30px; }
.page-servers .connection-help .eyebrow { color:var(--rm-red); }

/* Rules and legal */
.rules-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.theme-industrial .rules-list article { grid-template-columns:50px minmax(0,1fr); gap:16px; min-height:160px; margin:0; padding:24px; border:1px solid var(--rm-line); border-left:2px solid var(--rm-red); background:linear-gradient(145deg,var(--rm-panel2),var(--rm-panel)); filter:none; }
.theme-industrial .rules-list article > span { width:auto; align-self:start; color:var(--rm-red); font-size:30px; }
.rules-list h2 { margin-bottom:8px; color:var(--rm-copy); font-size:20px; }
.rules-list p,.legal-content p,.legal-content li { color:#aeb3b7; }
.legal-content { margin:0; border-color:var(--rm-line); border-left:3px solid var(--rm-red); background:var(--rm-panel); }

/* Store */
.store-hero { grid-template-columns:1fr auto; }
.billing-toggle { align-self:end; border-color:#464b4f; background:#080a0c; }
.billing-toggle button.active { color:#fff; background:var(--rm-red); }
.package-grid { gap:12px; margin:0; }
.package-card { border-color:var(--rm-line); border-top:2px solid var(--rm-red); background:linear-gradient(160deg,#141719,#090b0d); box-shadow:none; }
.package-card.featured { border-color:var(--rm-red); box-shadow:0 0 0 1px rgba(239,41,51,.2); }
.popular-badge,.tier-emblem { color:#fff; background:var(--rm-red); }
.package-price .price { color:var(--rm-copy); }
.store-launch-notice,.tebex-trust { min-height:220px; margin:0; padding:28px 46px; border-color:var(--rm-line); border-left:3px solid var(--rm-red); background:var(--rm-panel); }
.package-dialog::backdrop,.leaderboard-dialog::backdrop { background:rgba(0,0,0,.84); }
.dialog-layout,.leaderboard-dialog { border-color:#555b60; border-left:3px solid var(--rm-red); background:#090c0e; }

/* RustMania store: enforce the current red/black package system. */
.theme-industrial.page-store .billing-toggle {
  min-width:300px;
  padding:3px;
  border:1px solid #3d4449;
  background:#080a0c;
  box-shadow:inset 0 0 0 1px #111519;
  clip-path:polygon(10px 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%,0 10px);
}
.theme-industrial.page-store .billing-toggle button { min-height:46px; color:#9da3a8; background:transparent; }
.theme-industrial.page-store .billing-toggle button.active {
  color:#fff;
  background:linear-gradient(135deg,#9d111b,#ef2933 58%,#b9141e);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.12),0 0 24px rgba(239,41,51,.18);
}
.theme-industrial.page-store .package-grid { gap:14px; padding:26px 0 34px; }
.theme-industrial.page-store .package-card {
  min-height:650px;
  padding:34px 28px 28px;
  border:1px solid #343a3f;
  border-top:3px solid var(--rm-red);
  background:linear-gradient(160deg,#14181b 0%,#090b0d 68%,#07090a 100%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.018),0 18px 45px rgba(0,0,0,.36);
  filter:none;
  clip-path:polygon(14px 0,100% 0,100% calc(100% - 14px),calc(100% - 14px) 100%,0 100%,0 14px);
}
.theme-industrial.page-store .package-card::before,
.theme-industrial.page-store .package-card::after { content:none; border:0; background:none; }
.theme-industrial.page-store .package-card.featured {
  border-color:#642027;
  border-top-color:var(--rm-red);
  box-shadow:inset 0 0 0 1px rgba(239,41,51,.14),0 18px 48px rgba(0,0,0,.42);
}
.theme-industrial.page-store .popular-badge {
  top:-12px;
  z-index:3;
  color:#fff;
  background:linear-gradient(135deg,#9d111b,#ef2933);
  box-shadow:0 8px 24px rgba(239,41,51,.22);
}
.theme-industrial.page-store .package-artwork { width:min(88%,340px); margin:-16px auto 0; }
.theme-industrial.page-store .package-artwork img,
.theme-industrial.page-store .dialog-package-artwork img { filter:drop-shadow(0 14px 16px rgba(0,0,0,.76)); }
.theme-industrial.page-store .package-card .package-artwork + p { margin-top:8px; }
.theme-industrial.page-store .package-card > p { color:#aeb4b8; }
.theme-industrial.page-store .package-price .price { color:#f2f3f1; }
.theme-industrial.page-store .package-card li { border-color:#292e32; color:#d1d4d5; }
.theme-industrial.page-store .package-card li::before,
.theme-industrial.page-store .dialog-details li::before { color:var(--rm-red); }
.theme-industrial.page-store .package-card .button,
.theme-industrial.page-store .dialog-purchase .button-gold {
  color:#fff;
  border:1px solid var(--rm-red);
  background:linear-gradient(135deg,#9d111b,#ef2933 58%,#b9141e);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.1),0 12px 28px rgba(239,41,51,.16);
}
.theme-industrial.page-store .package-card .button:hover,
.theme-industrial.page-store .dialog-purchase .button-gold:hover { filter:brightness(1.12); }
.theme-industrial.page-store .package-dialog {
  border:1px solid #51585d;
  border-left:3px solid var(--rm-red);
  background:#080b0d;
}
.theme-industrial.page-store .dialog-heading { border-bottom:1px solid #3f1519; }
.theme-industrial.page-store .dialog-details h3,
.theme-industrial.page-store .dialog-billing > span,
.theme-industrial.page-store .rich-content h2,
.theme-industrial.page-store .rich-content h3,
.theme-industrial.page-store .rich-content h4 { color:#ff555d; }
.theme-industrial.page-store .network-access-note,
.theme-industrial.page-store .checkout-steam-notice { border-left-color:var(--rm-red); background:rgba(239,41,51,.07); }
.theme-industrial.page-store .network-access-note strong,
.theme-industrial.page-store .checkout-steam-notice strong { color:#ff6a71; }
.theme-industrial.page-store .dialog-purchase { border-left-color:#30363a; background:#0d1012; }
.theme-industrial.page-store .dialog-close,
.theme-industrial.page-store .multiplier-tabs,
.theme-industrial.page-store .purchase-tabs { border:1px solid #343a3f; background:#080a0c; }
.theme-industrial.page-store .multiplier-tabs button.active,
.theme-industrial.page-store .purchase-tabs button.active,
.theme-industrial.page-store .multiplier-heading > span { color:#fff; background:var(--rm-red); }

@media (min-width:1400px) {
  .theme-industrial.page-store .package-artwork { width:min(78%,310px); }
  .theme-industrial.page-store .package-card { min-height:620px; padding-top:28px; }
}

/* Leaderboards */
.leaderboard-stage { gap:12px; }
.theme-industrial .leaderboard-command-panel { min-height:220px; border:1px solid var(--rm-line); border-left:3px solid var(--rm-red); background:linear-gradient(90deg,rgba(7,9,10,.96),rgba(7,9,10,.42)),url("../branding/rustmania/rustmania-war-room-hero-v1.png") 75% 48%/cover; }
.leaderboard-command-panel::before,.leaderboard-command-panel::after { display:none; }
.leaderboard-title-block h1 { color:var(--rm-copy); font-size:clamp(42px,4vw,66px); }
.leaderboard-title-block h1 span,.leaderboard-command-panel .eyebrow { color:var(--rm-red); }
.leaderboard-toolbar,.leaderboard-summary-strip,.leaderboard-rankings { border-color:var(--rm-line); background:var(--rm-panel); }
.theme-industrial.page-leaderboards .leaderboard-scope-tabs {
  width:min(620px,90%);
  min-height:50px;
  margin:-2px auto 0;
  padding:3px;
  border:1px solid #3d4449;
  background:#080a0c;
  box-shadow:inset 0 0 0 1px #111519,0 12px 30px rgba(0,0,0,.32);
  filter:none;
  clip-path:polygon(10px 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%,0 10px);
}
.theme-industrial.page-leaderboards .leaderboard-scope-tabs a {
  border:0;
  background:transparent;
  color:#9da3a8;
}
.theme-industrial .leaderboard-scope-tabs a.active,.theme-industrial .leaderboard-view-tabs a.active,.theme-industrial .leaderboard-category-tabs a.active { color:#fff; border-color:var(--rm-red); background:var(--rm-red); box-shadow:none; }
.theme-industrial .leaderboard-summary-actions button { color:var(--rm-red); }
.podium-card,.leaderboard-table-wrap,.leaderboard-mobile-card { border-color:var(--rm-line); background:linear-gradient(145deg,#121618,#090b0d); }
.podium-rank,.rank-number { color:var(--rm-red); }
.theme-industrial.page-leaderboards .podium-card,
.theme-industrial.page-leaderboards .podium-rank-1,
.theme-industrial.page-leaderboards .leaderboard-mobile-card,
.theme-industrial.page-leaderboards .leaderboard-rankings,
.theme-industrial.page-leaderboards .leaderboard-dialog {
  border-image:none;
  background-image:none;
}
.theme-industrial.page-leaderboards .leaderboard-dialog {
  border:1px solid #51585d;
  border-left:3px solid var(--rm-red);
  background-color:#080b0d;
}

/* Defensive cleanup for components inherited from the original site base. */
.theme-industrial.page-home .server-card-visual,
.theme-industrial.page-servers .server-card-visual {
  background-image:
    linear-gradient(90deg,rgba(5,7,8,.28),rgba(5,7,8,.02)),
    url("../branding/rustmania/rustmania-war-room-hero-v1.png");
}

/* Linking and account utilities */
.link-workbench,.link-status-panel,.link-provider-card,.link-connector,.link-reward-grid > article,.boost-instructions,.steam-group-invite { border-color:var(--rm-line); background:linear-gradient(145deg,#121618,#090b0d); }
.link-provider-card,.link-connector { box-shadow:inset 2px 0 0 var(--rm-red); }
.link-provider-card.verified,.link-connector.active { box-shadow:inset 2px 0 0 var(--rm-green); }
.panel-heading h2,.link-provider-card h3,.link-connector h3 { color:var(--rm-copy); }
.link-help { margin:0; border-color:var(--rm-line); border-left:3px solid var(--rm-red); background:var(--rm-panel); }

/* Keep the information-dense utility pages inside a 1440px desktop viewport. */
@media (min-width:901px) {
  .page-link .link-setup-notice { max-width:none; margin:0; padding:8px 16px; }
  .page-link .link-workbench { max-width:none; margin:0; }
  .page-link .link-provider-card { min-height:246px; padding:18px 22px; justify-content:flex-start; }
  .page-link .link-provider-icon { width:44px; height:44px; margin-bottom:10px; font-size:20px; }
  .page-link .link-provider-card .eyebrow { margin-bottom:4px; }
  .page-link .link-provider-card h2 { margin:0 0 7px; }
  .page-link .link-provider-card p { margin-top:4px; margin-bottom:10px; line-height:1.45; }
  .page-link .link-state { margin-bottom:10px; }
  .page-link .link-provider-actions { padding-top:8px; }
  .page-link .steam-group-invite { grid-template-columns:62px minmax(0,1fr) auto; gap:14px 20px; margin-top:10px; padding:10px 20px; }
  .page-link .steam-group-invite-art { width:62px; height:62px; }
  .page-link .steam-group-invite-copy h2 { margin:0 0 3px; font-size:24px; }
  .page-link .steam-group-invite-copy p:last-child { line-height:1.4; }
  .page-link .link-help { min-height:126px; padding:16px 30px; }
  .page-link .link-help h2 { font-size:28px; }
  .page-link .link-help ol { margin:0; }

  .page-privacy .legal-content { width:100%; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0; }
  .page-privacy .legal-content article { margin:0; padding:16px 20px; box-shadow:none; }
  .page-privacy .legal-content article h2 { margin-bottom:6px; color:var(--rm-copy); font-size:20px; }
  .page-privacy .legal-content article p { margin:0; line-height:1.5; }
  .page-privacy .legal-content article:nth-child(4) { grid-column:1 / -1; }
  .page-privacy .legal-updated { grid-column:1 / -1; margin:0; padding:4px 0; }
}

.theme-industrial:not(.page-home) .site-footer { margin-top:12px; padding:20px; border:1px solid #282c2f !important; background:#080a0b !important; }

@media (max-width:900px) {
  .theme-industrial:not(.page-home) .site-header { grid-template-columns:220px 1fr 112px; }
  .page-servers .server-grid,.rules-list { grid-template-columns:1fr; }
  .page-servers .server-card { grid-template-rows:48px 155px 0 66px 5px 54px; }
}
@media (max-width:760px) {
  .theme-industrial:not(.page-home) .site-header { grid-template-columns:1fr 78px; }
  .theme-industrial:not(.page-home) .page-hero,.theme-industrial:not(.page-home) .store-hero { min-height:260px; padding:34px 20px; background-position:64% center; }
  .store-hero { grid-template-columns:1fr; }
  .page-servers .server-intel { grid-template-columns:repeat(2,1fr); }
}

/* Final shared desktop chrome. Keep this after page-specific styles so the
   brand, navigation, and Play Now control never shift between routes. */
@media (min-width:1100px) {
  html { scrollbar-gutter:stable; }
  body.theme-industrial .site-header,
  body.theme-industrial.page-home .site-header,
  body.theme-industrial:not(.page-home) .site-header {
    height:68px;
    grid-template-columns:320px minmax(0,1fr) 132px;
  }
  body.theme-industrial .site-header .brand-mark {
    height:66px;
    padding:4px 20px;
  }
  body.theme-industrial .brand-emblem { width:56px; height:56px; }
  body.theme-industrial .brand-type { font-size:22px; }
  body.theme-industrial .site-nav {
    min-width:0;
    padding-left:0;
    justify-content:stretch;
  }
  body.theme-industrial .site-nav a,
  body.theme-industrial.page-home .site-nav a,
  body.theme-industrial:not(.page-home) .site-nav a {
    min-width:0;
    flex:1 1 0;
    padding-inline:12px;
    font-size:11px;
  }
  body.theme-industrial .header-play,
  body.theme-industrial.page-home .header-play,
  body.theme-industrial:not(.page-home) .header-play { margin:9px 12px; }
}
