:root {
  --ink: #090b08;
  --panel: rgba(15, 18, 13, .88);
  --panel-solid: #12150f;
  --paper: #e9dfc5;
  --muted: #a9a38f;
  --olive: #8d9563;
  --olive-dark: #444b31;
  --signal: #e45225;
  --signal-light: #ff7445;
  --line: rgba(233, 223, 197, .18);
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--paper); background: var(--ink); font-family: var(--body); line-height: 1.55; overflow-x: hidden; }
a { color: inherit; }
button, input { font: inherit; }
#battlefield { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -3; opacity: .45; }
.noise { position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: .1; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E"); }
.shell { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 20; min-height: 78px; padding: 12px max(24px, calc((100vw - 1240px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 30px; background: rgba(9, 11, 8, .9); border-bottom: 1px solid var(--line); backdrop-filter: blur(15px); }
.brand { display: grid; grid-template-columns: 40px auto; column-gap: 10px; text-decoration: none; font: 22px/1 var(--display); letter-spacing: .07em; }
.brand-mark { grid-row: 1 / 3; width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink); background: var(--signal); transform: skew(-5deg); font-size: 17px; }
.brand small { color: var(--muted); font: 9px/1.2 var(--body); letter-spacing: .25em; }
.site-header nav { display: flex; gap: 28px; }
.site-header nav a { color: var(--muted); text-decoration: none; text-transform: uppercase; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.site-header nav a:hover, .site-header nav a.active { color: var(--paper); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 1px solid var(--signal-light); color: #fff7e8; background: var(--signal); box-shadow: 6px 6px 0 #702510; text-decoration: none; text-transform: uppercase; font-size: 12px; font-weight: 900; letter-spacing: .1em; transition: transform .18s, box-shadow .18s; }
.button:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0 #702510; }
.button-small { min-height: 40px; padding: 0 16px; font-size: 10px; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.github-link { display: inline-flex; color: var(--muted); }
.github-link:hover { color: var(--paper); }
.github-link svg { width: 20px; height: 20px; fill: currentColor; }
.eyebrow, .section-number { color: var(--olive); font-size: 11px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #9bc75b; box-shadow: 0 0 12px #9bc75b; animation: pulse 2s infinite; }

.hero { position: relative; min-height: 770px; padding-top: 92px; border-left: 1px solid var(--line); }
.hero::before { content: "OPERATION 0x4653"; position: absolute; right: -50px; top: 280px; color: rgba(233,223,197,.11); font: 13px var(--body); letter-spacing: .35em; transform: rotate(90deg); }
.hero h1, .arsenal-hero h1 { position: relative; z-index: 2; max-width: 820px; margin: 18px 0 24px; font: clamp(74px, 10vw, 148px)/.78 var(--display); letter-spacing: -.025em; text-transform: uppercase; }
.hero h1 em, .arsenal-hero h1 em { color: var(--signal); font-style: normal; }
.hero-copy { position: relative; z-index: 2; max-width: 560px; color: #d3c9ad; font-size: clamp(17px, 2vw, 21px); }
.hero-actions { position: relative; z-index: 2; display: flex; align-items: center; gap: 28px; margin-top: 32px; }
.text-link { color: var(--paper); text-transform: uppercase; font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.fine-print { max-width: 650px; margin-top: 30px; color: var(--muted); font-size: 11px; }
.hero-object { position: absolute; z-index: 1; right: -60px; bottom: 85px; width: 650px; height: 330px; filter: drop-shadow(0 35px 25px #000); transform: rotate(-7deg); }
.rifle { position: absolute; top: 135px; right: 5px; width: 580px; height: 44px; background: linear-gradient(#3d433b, #171a16); border: 2px solid #686d58; transform: perspective(600px) rotateY(-8deg); }
.rifle .barrel { position: absolute; right: -105px; top: 8px; width: 140px; height: 13px; background: #252925; border: 2px solid #575c51; }
.rifle .receiver { position: absolute; left: 80px; bottom: -42px; width: 165px; height: 55px; background: linear-gradient(145deg,#55584c,#242722); clip-path: polygon(0 0,100% 8%,82% 100%,12% 78%); }
.rifle .stock { position: absolute; left: -145px; top: 8px; width: 190px; height: 76px; background: linear-gradient(145deg,#75522f,#342315); clip-path: polygon(0 38%,100% 0,100% 58%,25% 100%); }
.rifle .mag { position: absolute; left: 245px; top: 30px; width: 62px; height: 80px; background: #292d27; clip-path: polygon(8% 0,100% 0,77% 100%,0 80%); }
.scope-ring { position: absolute; z-index: 3; left: 252px; top: 55px; width: 122px; height: 122px; border: 16px solid #252925; border-radius: 50%; box-shadow: 0 0 0 3px #666b5d, inset 0 0 30px #000; background: rgba(96,118,96,.2); }
.crosshair::before, .crosshair::after { content: ""; position: absolute; background: rgba(233,223,197,.7); }
.crosshair::before { left: 50%; top: 0; width: 1px; height: 100%; }
.crosshair::after { top: 50%; left: 0; width: 100%; height: 1px; }
.object-label { position: absolute; right: 5px; bottom: 15px; color: var(--muted); font: 9px var(--body); letter-spacing: .18em; }

.ticker { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); background: rgba(18,21,15,.8); }
.ticker div { min-height: 140px; padding: 30px; display: flex; flex-direction: column; justify-content: center; }
.ticker strong { color: var(--signal); font: 46px/1 var(--display); }
.ticker span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }

.manifesto { display: grid; grid-template-columns: 180px 1fr 300px; gap: 48px; padding-block: 130px; }
.manifesto h2, .section-heading h2, .features > h2, .arsenal-callout h2, .cta h2 { margin: 0; font: clamp(40px, 5vw, 68px)/.96 var(--display); text-transform: uppercase; }
.manifesto p, .section-heading p, .arsenal-callout p { max-width: 630px; color: var(--muted); font-size: 17px; }
.classified { align-self: start; border: 1px solid var(--line); background: var(--panel); transform: rotate(1deg); }
.classified > span { display: block; padding: 13px 18px; color: var(--signal); border-bottom: 1px solid var(--line); font: 18px var(--display); letter-spacing: .18em; text-align: center; }
.classified dl { margin: 0; padding: 12px 20px 20px; }
.classified dl div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dotted var(--line); font-size: 11px; }
.classified dt { color: var(--muted); text-transform: uppercase; }
.classified dd { margin: 0; text-align: right; }

.war-room { padding-block: 100px 130px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 34px; }
.server-badge, .data-source { min-width: 225px; padding: 15px 18px; border: 1px solid var(--line); background: var(--panel); }
.server-badge b, .data-source b { display: inline-block; vertical-align: middle; font-size: 10px; letter-spacing: .12em; }
.server-badge small, .data-source small { display: block; font-size: 10px; letter-spacing: .12em; }
.server-badge small, .data-source small { margin: 6px 0 0 16px; color: var(--muted); }
.weapon-tabs { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.weapon-tab { padding: 13px 20px; border: 1px solid var(--line); color: var(--muted); background: #0b0d0a; cursor: pointer; white-space: nowrap; text-transform: uppercase; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.weapon-tab.active { color: var(--paper); border-color: var(--signal); background: #37170d; }
.leaderboard-frame { border: 1px solid var(--line); background: var(--panel); box-shadow: 16px 16px 0 rgba(0,0,0,.3); }
.table-wrap { position: relative; min-height: 260px; overflow-x: auto; }
.table-wrap + .table-wrap { border-top: 1px solid var(--line); }
.table-wrap:has(#server-body) { min-height: 0; }
#server-body tr { cursor: pointer; }
#server-body tr:hover { background: rgba(68,75,49,.2); }
#server-body tr.selected { background: rgba(216,74,32,.14); box-shadow: inset 3px 0 0 var(--signal); }
#server-body tr.offline { color: var(--muted); opacity: .6; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 20px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; }
th { color: var(--olive); text-transform: uppercase; letter-spacing: .12em; font-size: 9px; }
td:first-child { color: var(--signal); font-family: var(--display); font-size: 18px; }
.status-alive { color: #9bc75b; }
.status-down { color: var(--signal-light); }
.empty-state { position: absolute; inset: 45px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--paper); font: 25px var(--display); letter-spacing: .08em; }
.leaderboard-frame footer { display: flex; justify-content: space-between; gap: 25px; padding: 13px 20px; color: var(--muted); border-top: 1px solid var(--line); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }

.arsenal-callout { display: flex; align-items: center; justify-content: space-between; gap: 60px; padding: 75px; border: 1px solid var(--olive-dark); background: linear-gradient(120deg, rgba(68,75,49,.55), rgba(18,21,15,.95)); }
.arsenal-callout > div { max-width: 770px; }
.features { padding-block: 130px; }
.features > h2 { margin: 18px 0 55px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.feature-grid article { min-height: 275px; padding: 30px; border-bottom: 1px solid var(--line); background: rgba(14,17,12,.72); }
.feature-grid article > b, .doctrine-grid article > b { color: var(--signal); font: 26px var(--display); }
.feature-grid h3 { margin: 35px 0 10px; font: 28px var(--display); text-transform: uppercase; }
.feature-grid p { color: var(--muted); }
.feature-grid small { color: var(--olive); }
.cta { margin-bottom: 110px; padding: 90px 30px; border-block: 1px solid var(--line); text-align: center; background: radial-gradient(circle, rgba(228,82,37,.2), transparent 60%); }
.cta h2 { margin: 16px 0 36px; font-size: clamp(60px, 9vw, 116px); }
.cta .fine-print { margin: 14px auto 0; text-align: center; }
.site-footer { min-height: 120px; display: flex; justify-content: space-between; align-items: center; gap: 25px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }

/* Arsenal */
.arsenal-hero { padding: 110px 0 70px; }
.arsenal-hero h1 { max-width: 1100px; font-size: clamp(62px, 8vw, 122px); }
.arsenal-hero > p { max-width: 750px; color: var(--muted); font-size: 18px; }
.data-source { width: max-content; max-width: 100%; margin-top: 35px; }
.arsenal-controls { padding-block: 20px; border-top: 1px solid var(--line); }
.weapon-dossier { min-height: 600px; padding-block: 55px 120px; }
.dossier-loading { padding: 100px 20px; color: var(--muted); border: 1px solid var(--line); text-align: center; letter-spacing: .15em; }
.dossier-grid { display: grid; grid-template-columns: 1.1fr 1.4fr; border: 1px solid var(--line); background: var(--panel); }
.weapon-visual { position: relative; min-height: 520px; display: flex; flex-direction: column; justify-content: space-between; padding: 45px; overflow: hidden; background: radial-gradient(circle at 55% 45%, rgba(141,149,99,.28), transparent 52%); }
.weapon-visual::before { content: attr(data-index); position: absolute; right: -15px; bottom: -70px; color: rgba(233,223,197,.05); font: 360px/1 var(--display); }
.weapon-visual h2 { position: relative; margin: 0; font: clamp(45px, 6vw, 80px)/.88 var(--display); text-transform: uppercase; }
.weapon-visual p { position: relative; color: var(--olive); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.weapon-silhouette { position: relative; height: 200px; margin-block: 25px; transform: rotate(-5deg); filter: drop-shadow(15px 25px 10px #000); }
.weapon-silhouette .body { position: absolute; left: 12%; top: 74px; width: 70%; height: 38px; background: linear-gradient(#74786a,#262924); clip-path: polygon(0 17%,95% 0,100% 63%,8% 100%); }
.weapon-silhouette .long-barrel { position: absolute; left: 66%; top: 72px; width: 35%; height: 9px; background: #555a50; }
.weapon-silhouette .wood { position: absolute; left: 0; top: 87px; width: 30%; height: 67px; background: linear-gradient(140deg,#79512d,#2b1c12); clip-path: polygon(0 25%,100% 0,90% 55%,18% 100%); }
.weapon-silhouette .grip { position: absolute; left: 40%; top: 96px; width: 42px; height: 75px; background: #2a2e28; clip-path: polygon(0 0,100% 0,70% 100%,15% 75%); }
.weapon-silhouette.shotgun .body { height: 25px; }
.weapon-silhouette.pistol .body { left: 25%; width: 55%; }
.weapon-silhouette.pistol .wood { display: none; }
.weapon-silhouette.pistol .long-barrel { display: none; }
.weapon-silhouette.pistol .grip { left: 53%; }
.weapon-silhouette.auto .grip { height: 100px; transform: rotate(-8deg); }
.weapon-silhouette.sniper::after { content: ""; position: absolute; left: 42%; top: 38px; width: 100px; height: 38px; border: 10px solid #292c27; border-radius: 30px; }
.stat-panel { padding: 38px; }
.stat-panel header { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 30px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.stat-panel header b { color: var(--signal); font: 24px var(--display); letter-spacing: .08em; }
.stat-panel header span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { min-height: 105px; padding: 18px; background: var(--panel-solid); }
.stat label { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; }
.stat strong { display: block; margin-top: 7px; font: 35px/1 var(--display); }
.stat strong small { color: var(--olive); font: 10px var(--body); letter-spacing: .08em; }
.meter { height: 4px; margin-top: 13px; background: #292d23; }
.meter i { display: block; height: 100%; width: var(--value); max-width: 100%; background: var(--signal); }
.damage-note { margin-top: 25px; padding: 16px; color: var(--muted); border-left: 3px solid var(--signal); background: rgba(228,82,37,.06); font-size: 11px; }
.damage-doctrine { padding: 100px 0 140px; border-top: 1px solid var(--line); }
.doctrine-grid { display: grid; grid-template-columns: repeat(4,1fr); margin-top: 25px; }
.doctrine-grid article { padding: 25px; border: 1px solid var(--line); background: rgba(14,17,12,.72); }
.doctrine-grid h2 { margin: 28px 0 12px; font: 25px var(--display); text-transform: uppercase; }
.doctrine-grid p { color: var(--muted); font-size: 13px; }

@keyframes pulse { 50% { opacity: .4; } }
@media (max-width: 900px) {
  .site-header nav { display: none; }
  .hero { min-height: 730px; }
  .hero-object { opacity: .42; right: -220px; }
  .manifesto { grid-template-columns: 1fr; }
  .classified { max-width: 440px; }
  .ticker { grid-template-columns: repeat(2,1fr); }
  .feature-grid { grid-template-columns: repeat(2,1fr); }
  .arsenal-callout { align-items: flex-start; flex-direction: column; padding: 45px; }
  .dossier-grid { grid-template-columns: 1fr; }
  .weapon-visual { min-height: 400px; border-bottom: 0; }
  .doctrine-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 600px) {
  .shell { width: min(100% - 28px, 1240px); }
  .site-header { min-height: 66px; padding-inline: 14px; }
  .site-header .button { display: none; }
  .hero { min-height: 680px; padding-top: 65px; }
  .hero h1 { font-size: clamp(58px, 20vw, 90px); }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .hero-object { bottom: 30px; transform: scale(.72) rotate(-7deg); transform-origin: right bottom; }
  .ticker div { min-height: 110px; padding: 20px 14px; }
  .ticker strong { font-size: 36px; }
  .manifesto, .war-room, .features { padding-block: 80px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  th:nth-child(3), td:nth-child(3), th:nth-child(4), td:nth-child(4) { display: none; }
  .leaderboard-frame footer, .site-footer { align-items: flex-start; flex-direction: column; padding-block: 25px; }
  .feature-grid { grid-template-columns: 1fr; }
  .arsenal-callout { padding: 35px 24px; }
  .arsenal-hero { padding-top: 75px; }
  .stat-panel { padding: 20px; }
  .stat-grid { grid-template-columns: 1fr; }
  .weapon-visual { min-height: 350px; padding: 28px; }
  .doctrine-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Orbitable weapon model, layered over the CSS silhouette it replaces. The
   silhouette fades out only once a model has actually drawn, so a failed
   fetch leaves the page exactly as it was. */
.weapon-stage { position: relative; flex: 1; display: grid; place-items: center; min-height: 240px; }
.weapon-stage > .weapon-silhouette { transition: opacity .35s ease; }
.weapon-stage:has(.weapon-model.ready) > .weapon-silhouette { opacity: 0; }
.weapon-model { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .35s ease; touch-action: none; cursor: grab; }
.weapon-model.ready { opacity: 1; }
.weapon-model:active { cursor: grabbing; }
@media (prefers-reduced-motion: reduce) { .weapon-model { transition: none; } }

/* Category dropdowns. A flat list of every weapon ran the height of the
   viewport, which put the act of changing weapon nowhere near the stats it
   changed. */
.weapon-group { position: relative; }
.weapon-group > summary { display: flex; align-items: baseline; gap: 10px; padding: 11px 34px 11px 16px; border: 1px solid var(--line); background: #0b0d0a; cursor: pointer; list-style: none; white-space: nowrap; }
.weapon-group > summary::-webkit-details-marker { display: none; }
.weapon-group > summary::after { content: ""; position: absolute; right: 14px; top: 50%; width: 6px; height: 6px; margin-top: -4px; border-right: 1px solid var(--muted); border-bottom: 1px solid var(--muted); transform: rotate(45deg); transition: transform .18s ease; }
.weapon-group[open] > summary::after { transform: rotate(-135deg); margin-top: -1px; }
.weapon-group.holds-selection > summary { border-color: var(--signal); background: #37170d; }
.weapon-group-label { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .18em; }
.weapon-group.holds-selection .weapon-group-label { color: var(--paper); }
.weapon-group-current { color: var(--signal); font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.weapon-group-current:empty { display: none; }
.weapon-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 100%; display: flex; flex-direction: column; border: 1px solid var(--line); background: #0b0d0a; box-shadow: 0 18px 40px rgba(0,0,0,.6); }
.weapon-menu .weapon-tab { border: 0; border-bottom: 1px solid var(--line); text-align: left; }
.weapon-menu .weapon-tab:last-child { border-bottom: 0; }
.weapon-menu .weapon-tab:hover { color: var(--paper); background: #161a13; }
