:root {
  color-scheme: dark;
  --bg: #080e0c;
  --bg2: #0c1411;
  --panel: #111b17;
  --panel2: #16221d;
  --ink: #eee8d9;
  --muted: #9ca19b;
  --faint: #69716c;
  --line: rgba(231, 218, 181, .14);
  --line2: rgba(231, 218, 181, .27);
  --gold: #d8bd7b;
  --gold2: #ebd79f;
  --gold3: #90713f;
  --green: #8eb28d;
  --red: #d17d72;
  --blue: #8aa9ba;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 16px;
  --shadow: 0 24px 80px rgba(0,0,0,.35);
  --header: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 8%, rgba(86,124,90,.15), transparent 29rem),
    radial-gradient(circle at 8% 52%, rgba(144,113,63,.08), transparent 35rem),
    linear-gradient(180deg, #0a120f 0%, var(--bg) 48%, #050907 100%);
  font: 14px/1.55 var(--sans);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 119px, rgba(255,255,255,.009) 120px);
}
.noise {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .026;
  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='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
::selection { color: white; background: rgba(216,189,123,.32); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header);
  border-bottom: 1px solid var(--line);
  background: rgba(6,11,9,.84);
  backdrop-filter: blur(18px) saturate(130%);
}
.topbar-inner {
  width: min(1380px, calc(100% - 36px));
  height: 100%;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; }
.brand img { filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); }
.brand > span { display: flex; flex-direction: column; line-height: 1; }
.brand strong { color: var(--gold2); font: 600 16px/1 var(--serif); letter-spacing: .11em; }
.brand small { margin-top: 7px; color: var(--faint); font-size: 8px; font-weight: 800; letter-spacing: .23em; }
.nav { display: flex; align-items: center; gap: 3px; }
.nav a { padding: 10px 13px; border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 700; transition: .15s ease; }
.nav a:hover { color: var(--ink); background: rgba(255,255,255,.035); }
.nav a.active { color: var(--gold2); background: rgba(216,189,123,.09); }
.collector-pill { justify-self: end; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.collector-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 4px rgba(105,113,108,.1); }
.collector-pill.online i { background: var(--green); box-shadow: 0 0 0 4px rgba(142,178,141,.1), 0 0 17px rgba(142,178,141,.55); }
.collector-pill.degraded i { background: var(--gold); }
.menu-button { display: none; width: 40px; height: 40px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.menu-button span { display: block; height: 1px; margin: 5px 0; background: var(--ink); }

#app { min-height: calc(100vh - var(--header)); }
.container { width: min(1220px, calc(100% - 38px)); margin-inline: auto; }
.page { padding: 50px 0 88px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--gold); font-size: 9px; font-weight: 850; letter-spacing: .2em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 25px; height: 1px; background: var(--gold3); }
h1, h2, h3 { margin-top: 0; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.page-head h1 { margin: 9px 0 0; font: 500 clamp(42px, 6vw, 68px)/1 var(--serif); letter-spacing: -.025em; }
.page-head p { max-width: 680px; margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head h2 { margin: 5px 0 0; font: 500 clamp(28px, 4vw, 39px)/1.05 var(--serif); }
.section-head p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.text-link { color: var(--gold); font-size: 11px; font-weight: 800; }
.text-link:hover { color: var(--gold2); }

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,14,12,.98) 0%, rgba(8,14,12,.82) 48%, rgba(8,14,12,.35)); }
.hero-inner { position: relative; min-height: 590px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 45px; align-items: center; padding: 70px 0 60px; }
.hero-copy { position: relative; z-index: 2; }
.hero h1 { max-width: 800px; margin: 18px 0 0; font: 500 clamp(58px, 8vw, 102px)/.98 var(--serif); letter-spacing: -.04em; }
.hero h1 em { color: var(--gold2); font-weight: 500; }
.hero-copy > p { max-width: 630px; margin: 23px 0 0; color: #b7bab3; font-size: clamp(16px, 2vw, 18px); line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 30px; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border: 1px solid var(--gold3); border-radius: 9px; background: linear-gradient(180deg, #dfc990, #b89657); color: #10130d; font-size: 12px; font-weight: 850; cursor: pointer; box-shadow: 0 12px 28px rgba(144,113,63,.16); transition: .15s ease; }
.button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.button.secondary { color: var(--ink); background: rgba(255,255,255,.025); border-color: var(--line2); box-shadow: none; }
.button.small { min-height: 36px; padding-inline: 13px; font-size: 10px; }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.hero-art { position: relative; min-height: 420px; display: grid; place-items: center; }
.crest-orbit { width: min(390px, 100%); aspect-ratio: 1; position: relative; display: grid; place-items: center; }
.crest-orbit::before, .crest-orbit::after { content: ""; position: absolute; border-radius: 50%; }
.crest-orbit::before { inset: 4%; border: 1px solid rgba(216,189,123,.14); box-shadow: inset 0 0 80px rgba(216,189,123,.035); }
.crest-orbit::after { inset: 19%; border: 1px dashed rgba(142,178,141,.2); animation: spin 45s linear infinite; }
.crest-orbit img { width: 180px; transform: translateY(-10px); filter: drop-shadow(0 34px 48px rgba(0,0,0,.58)); }
@keyframes spin { to { transform: rotate(360deg); } }
.live-card { position: absolute; right: 0; bottom: 30px; width: min(330px, 95%); padding: 17px; border: 1px solid var(--line2); border-radius: 14px; background: rgba(14,23,19,.92); box-shadow: var(--shadow); backdrop-filter: blur(15px); }
.live-card-top { display: flex; justify-content: space-between; gap: 15px; color: var(--faint); font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.live-card-main { display: grid; grid-template-columns: 1fr 43px 1fr; gap: 9px; align-items: center; margin-top: 13px; }
.live-card-main > div:last-child { text-align: right; }
.live-card-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.live-card-main small { color: var(--faint); font-size: 9px; }
.weapon-circle { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: rgba(216,189,123,.05); }
.weapon-circle img { width: 29px; height: 29px; }
.live-card-foot { margin-top: 12px; padding-top: 10px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.live-card-foot b { color: var(--green); }

.metrics { position: relative; border-top: 1px solid var(--line); background: rgba(7,12,10,.63); }
.metrics-inner { display: grid; grid-template-columns: repeat(4,1fr); }
.metric { min-height: 88px; padding: 20px 22px; border-left: 1px solid var(--line); }
.metric:last-child { border-right: 1px solid var(--line); }
.metric span { display: block; color: var(--faint); font-size: 8px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.metric strong { display: block; margin-top: 5px; font: 500 24px/1.2 var(--serif); }
.metric small { color: var(--muted); font-size: 9px; }
.home-section { padding: 66px 0; }
.home-section + .home-section { border-top: 1px solid var(--line); }
.two-col { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; }
.three-col { display: grid; grid-template-columns: repeat(3,1fr); gap: 17px; }

.panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(18,28,23,.92), rgba(11,18,15,.94)); box-shadow: 0 18px 55px rgba(0,0,0,.14); }
.panel-head { min-height: 61px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { margin: 0; font: 500 20px/1 var(--serif); }
.panel-body { padding: 18px; }
.panel-note { padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.badge { min-height: 22px; display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.018); font-size: 8px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.badge.gold, .badge.sovereign, .badge.warden { color: var(--gold2); border-color: rgba(216,189,123,.32); background: rgba(216,189,123,.07); }
.badge.green, .badge.champion, .badge.rated { color: var(--green); border-color: rgba(142,178,141,.3); background: rgba(142,178,141,.06); }
.badge.red { color: var(--red); border-color: rgba(209,125,114,.3); }
.badge.reduced { color: var(--gold2); border-color: rgba(216,189,123,.3); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--faint); text-align: left; font-size: 8px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid rgba(231,218,181,.075); font-size: 11px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,255,255,.02); }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.rank { color: var(--muted); font: 500 17px/1 var(--serif); }
.rank.top { color: var(--gold2); }
.player { min-width: 160px; display: flex; align-items: center; gap: 10px; }
.avatar { flex: 0 0 33px; width: 33px; height: 33px; display: grid; place-items: center; border: 1px solid var(--line2); border-radius: 50%; background: radial-gradient(circle at 35% 25%, rgba(216,189,123,.18), rgba(13,22,18,.3)); color: var(--gold2); font: 500 11px/1 var(--serif); }
.player a { font-weight: 750; }
.player a:hover { color: var(--gold2); }
.player small, .sub { display: block; margin-top: 2px; color: var(--faint); font-size: 8px; }
.rating { font: 500 18px/1 var(--serif); }
.pos { color: var(--green) !important; }
.neg { color: var(--red) !important; }
.neutral { color: var(--faint) !important; }

.kill-list { display: flex; flex-direction: column; }
.kill-row { min-height: 66px; display: grid; grid-template-columns: minmax(120px,1fr) 40px minmax(120px,1fr) auto; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid rgba(231,218,181,.075); }
.kill-row:last-child { border-bottom: 0; }
.kill-row:hover { background: rgba(255,255,255,.018); }
.kill-meta { min-width: 90px; text-align: right; font-size: 9px; }
.kill-meta time { display: block; margin-top: 3px; color: var(--faint); }
.weapon-box { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: rgba(216,189,123,.04); }
.weapon-box img { width: 27px; height: 27px; }

.feature { min-height: 210px; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(15,23,19,.63); }
.feature > b { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--line2); border-radius: 50%; color: var(--gold); font: 500 12px/1 var(--serif); }
.feature h3 { margin: 18px 0 8px; font: 500 22px/1.1 var(--serif); }
.feature p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.upset { position: relative; min-height: 245px; overflow: hidden; padding: 30px; border: 1px solid var(--line2); border-radius: var(--radius); background: radial-gradient(circle at 88% 15%, rgba(216,189,123,.13), transparent 24rem), var(--panel); }
.upset::after { content: "UPSET"; position: absolute; right: -9px; bottom: -24px; color: rgba(216,189,123,.034); font: 500 110px/1 var(--serif); letter-spacing: -.08em; }
.upset-match { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; margin-top: 25px; }
.upset-match strong { display: block; font: 500 clamp(22px,4vw,35px)/1 var(--serif); }
.upset-match small { color: var(--muted); font-size: 9px; }
.upset-match em { color: var(--faint); font-family: var(--serif); }

.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 17px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: rgba(15,23,19,.68); }
.search { position: relative; flex: 1 1 250px; }
.search::before { content: "⌕"; position: absolute; left: 12px; top: 9px; color: var(--faint); font-size: 17px; }
.field, .select { height: 40px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: #0b1310; color: var(--ink); padding: 0 12px; font-size: 11px; }
.field { width: 100%; padding-left: 35px; }
.select { min-width: 145px; }
.field:focus, .select:focus { border-color: rgba(216,189,123,.45); box-shadow: 0 0 0 3px rgba(216,189,123,.06); }
.result-count { margin-left: auto; align-self: center; color: var(--faint); font-size: 9px; padding-inline: 5px; }
.ladder-table { min-width: 850px; }

.player-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; }
.player-card { position: relative; min-height: 210px; overflow: hidden; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(21,32,27,.86), rgba(10,17,14,.95)); transition: .16s ease; }
.player-card:hover { transform: translateY(-2px); border-color: var(--line2); }
.player-card::after { content: attr(data-rank); position: absolute; right: 9px; bottom: -24px; color: rgba(216,189,123,.04); font: 500 95px/1 var(--serif); }
.player-card-top { position: relative; z-index: 1; display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.player-card h3 { margin: 12px 0 0; font: 500 24px/1 var(--serif); }
.player-card-rating { text-align: right; }
.player-card-rating b { display: block; color: var(--gold2); font: 500 27px/1 var(--serif); }
.player-card-rating small { color: var(--faint); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.card-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,1fr); margin-top: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.card-stat { padding: 10px 8px; background: rgba(5,9,7,.3); }
.card-stat span { display: block; color: var(--faint); font-size: 7px; letter-spacing: .1em; text-transform: uppercase; }
.card-stat b { display: block; margin-top: 4px; font-size: 12px; }
.card-weapon { position: relative; z-index: 1; display: flex; align-items: center; gap: 7px; margin-top: 14px; color: var(--muted); font-size: 9px; }
.card-weapon img { width: 25px; height: 25px; }

.profile-hero { position: relative; overflow: hidden; padding: 47px 0 34px; border-bottom: 1px solid var(--line); }
.profile-hero::after { content: ""; position: absolute; right: -80px; top: -300px; width: 500px; height: 500px; border: 1px solid rgba(216,189,123,.08); border-radius: 50%; }
.back { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 22px; color: var(--muted); font-size: 10px; font-weight: 750; }
.back:hover { color: var(--gold2); }
.profile-title { position: relative; z-index: 1; display: flex; align-items: end; justify-content: space-between; gap: 26px; }
.profile-title h1 { margin: 8px 0 0; font: 500 clamp(46px,7vw,80px)/.95 var(--serif); letter-spacing: -.03em; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.profile-rating { text-align: right; }
.profile-rating strong { display: block; color: var(--gold2); font: 500 60px/.9 var(--serif); }
.profile-rating small { color: var(--muted); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.profile-body { padding: 30px 0 85px; }
.profile-stats { display: grid; grid-template-columns: repeat(6,1fr); gap: 10px; margin-bottom: 20px; }
.profile-stat { min-height: 88px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: rgba(15,23,19,.68); }
.profile-stat span { display: block; color: var(--faint); font-size: 7px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.profile-stat b { display: block; margin-top: 8px; font: 500 22px/1 var(--serif); }
.profile-layout { display: grid; grid-template-columns: 1.13fr .87fr; gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.chart-wrap { padding: 16px; }
.rating-chart { width: 100%; height: 230px; overflow: visible; }
.chart-grid { stroke: rgba(231,218,181,.09); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-line { fill: none; stroke: var(--gold); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.chart-area { fill: url(#area); opacity: .55; }
.chart-label { fill: var(--faint); font: 8px var(--sans); }
.chart-dot { fill: var(--gold2); stroke: var(--bg); stroke-width: 2; }
.highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
.highlight { min-height: 115px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: rgba(5,9,7,.24); }
.highlight span { color: var(--faint); font-size: 7px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.highlight b { display: block; margin-top: 10px; font: 500 19px/1.15 var(--serif); }
.highlight small { color: var(--muted); font-size: 8px; }
.mastery-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 13px 16px; border-bottom: 1px solid rgba(231,218,181,.075); }
.mastery-row:last-child { border-bottom: 0; }
.mastery-icon { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: rgba(216,189,123,.04); }
.mastery-icon img { width: 29px; height: 29px; }
.mastery-info { min-width: 0; }
.mastery-info > div { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; }
.mastery-info small { color: var(--muted); font-size: 8px; }
.progress { height: 4px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.055); }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--gold3),var(--gold2)); }
.mastery-level { text-align: right; }
.mastery-level b { display: block; color: var(--gold2); font: 500 17px/1 var(--serif); }
.mastery-level small { color: var(--faint); font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }
.encounter { display: grid; grid-template-columns: 29px minmax(0,1fr) auto auto; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid rgba(231,218,181,.075); }
.encounter:last-child { border-bottom: 0; }
.result { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 6px; font-size: 9px; font-weight: 900; }
.result.W { color: var(--green); background: rgba(142,178,141,.1); }
.result.L { color: var(--red); background: rgba(209,125,114,.1); }
.result.D { color: var(--muted); background: rgba(255,255,255,.04); }
.encounter strong { font-size: 10px; }
.encounter small { display: block; color: var(--faint); font-size: 8px; }
.encounter-score { font: 500 17px/1 var(--serif); }

.armory-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; }
.weapon-card { min-height: 250px; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(21,32,27,.86), rgba(10,17,14,.95)); }
.weapon-card-top { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.weapon-card-icon { width: 61px; height: 61px; display: grid; place-items: center; border: 1px solid var(--line2); border-radius: 14px; background: rgba(216,189,123,.05); }
.weapon-card-icon img { width: 45px; height: 45px; }
.weapon-share { text-align: right; }
.weapon-share b { display: block; color: var(--gold2); font: 500 27px/1 var(--serif); }
.weapon-share small { color: var(--faint); font-size: 7px; letter-spacing: .1em; text-transform: uppercase; }
.weapon-card h3 { margin: 20px 0 2px; font: 500 24px/1 var(--serif); }
.weapon-card > small { color: var(--muted); font-size: 9px; }
.weapon-stats { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 19px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.weapon-stats div { padding: 9px; background: rgba(5,9,7,.28); }
.weapon-stats span { display: block; color: var(--faint); font-size: 7px; text-transform: uppercase; }
.weapon-stats b { display: block; margin-top: 3px; font-size: 11px; }
.weapon-top { display: flex; justify-content: space-between; gap: 12px; margin-top: 15px; color: var(--muted); font-size: 9px; }
.weapon-top a { color: var(--ink); font-weight: 750; }

.rules-layout { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 24px; align-items: start; }
.rules-nav { position: sticky; top: calc(var(--header) + 18px); padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(15,23,19,.68); }
.rules-nav a { display: block; padding: 9px 10px; border-radius: 7px; color: var(--muted); font-size: 10px; font-weight: 700; }
.rules-nav a:hover { color: var(--ink); background: rgba(255,255,255,.025); }
.rule-stack { display: flex; flex-direction: column; gap: 18px; }
.rule { scroll-margin-top: calc(var(--header) + 20px); padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(15,23,19,.64); }
.rule h2 { margin: 0; font: 500 29px/1.05 var(--serif); }
.rule p, .rule li { color: var(--muted); font-size: 12px; line-height: 1.75; }
.rule ul { padding-left: 19px; }
.formula { margin: 17px 0; padding: 18px; overflow-x: auto; border: 1px solid var(--line2); border-radius: 10px; background: #09100d; color: var(--gold2); text-align: center; font: 500 clamp(17px,3vw,26px)/1.35 var(--serif); }
.rule-table th, .rule-table td { border: 1px solid var(--line); }

.diagnostics { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 18px; }
.diagnostic { padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: rgba(15,23,19,.68); }
.diagnostic span { display: block; color: var(--faint); font-size: 7px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.diagnostic b { display: flex; align-items: center; gap: 7px; margin-top: 7px; font-size: 11px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.dot.ok { background: var(--green); box-shadow: 0 0 12px rgba(142,178,141,.5); }
.console-grid { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 18px; align-items: start; }
.code { margin: 0; overflow-x: auto; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: #070c0a; color: #b7c2b7; font: 10px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.form { display: flex; flex-direction: column; gap: 11px; }
.form label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 7px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.form .select { width: 100%; }

.empty { min-height: 210px; display: grid; place-content: center; justify-items: center; padding: 28px; text-align: center; }
.empty img { width: 48px; opacity: .45; }
.empty h3 { margin: 11px 0 4px; font: 500 21px/1 var(--serif); }
.empty p { max-width: 400px; margin: 0; color: var(--muted); font-size: 10px; }
.loading { min-height: calc(100vh - var(--header)); display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.loading img { width: 68px; animation: breathe 1.8s ease-in-out infinite; }
.loading > span { width: 135px; height: 2px; overflow: hidden; background: rgba(255,255,255,.055); }
.loading > span::after { content: ""; display: block; width: 42%; height: 100%; background: var(--gold); animation: load 1.15s ease-in-out infinite; }
.loading p { margin: 0; font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
@keyframes load { from { transform: translateX(-120%); } to { transform: translateX(340%); } }
@keyframes breathe { 50% { transform: translateY(-4px); filter: drop-shadow(0 14px 18px rgba(216,189,123,.16)); } }
.error { min-height: 67vh; display: grid; place-content: center; justify-items: center; padding: 35px; text-align: center; }
.error img { width: 72px; }
.error h1 { margin: 14px 0 6px; font: 500 44px/1 var(--serif); }
.error p { color: var(--muted); }

.footer { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding: 31px clamp(18px,4vw,54px); border-top: 1px solid var(--line); background: #050907; color: var(--faint); }
.footer-logo { color: var(--gold2); font: 500 17px/1 var(--serif); }
.footer p { max-width: 650px; margin: 9px 0 0; font-size: 8px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: end; gap: 15px; font-size: 9px; }
.footer-links a:hover { color: var(--gold2); }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 120; width: min(340px,calc(100vw - 36px)); display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 14px; border: 1px solid var(--line2); border-radius: 10px; background: rgba(16,25,21,.97); box-shadow: var(--shadow); font-size: 10px; animation: toast .17s ease-out; }
.toast b { display: block; margin-bottom: 2px; color: var(--gold2); }
.toast.fail b { color: var(--red); }
@keyframes toast { from { opacity: 0; transform: translateY(7px); } }

@media (max-width: 1040px) {
  .topbar-inner { grid-template-columns: 1fr auto; }
  .nav { position: absolute; left: 18px; right: 18px; top: calc(var(--header) - 3px); display: none; flex-direction: column; align-items: stretch; padding: 9px; border: 1px solid var(--line2); border-radius: 12px; background: rgba(7,12,10,.98); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { border-radius: 7px; padding: 11px 12px; }
  .menu-button { display: block; justify-self: end; }
  .collector-pill { display: none; }
  .player-grid, .armory-grid { grid-template-columns: repeat(2,1fr); }
  .profile-stats { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 790px) {
  :root { --header: 67px; }
  .brand img { width: 34px; }
  .brand strong { font-size: 14px; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 56px; }
  .hero-art { min-height: 290px; margin-top: -20px; }
  .crest-orbit { width: 300px; }
  .crest-orbit img { width: 135px; }
  .live-card { right: 50%; transform: translateX(50%); bottom: 5px; }
  .metrics-inner { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(3), .metric:nth-child(4) { border-top: 1px solid var(--line); }
  .two-col, .profile-layout, .console-grid { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr; }
  .profile-title { align-items: start; flex-direction: column; }
  .profile-rating { text-align: left; }
  .rules-layout { grid-template-columns: 1fr; }
  .rules-nav { position: static; display: flex; overflow-x: auto; }
  .rules-nav a { white-space: nowrap; }
  .diagnostics { grid-template-columns: 1fr 1fr; }
  .footer { align-items: start; flex-direction: column; }
  .footer-links { justify-content: start; }
}
@media (max-width: 560px) {
  .container { width: calc(100% - 24px); }
  .topbar-inner { width: calc(100% - 24px); }
  .brand small { display: none; }
  .page { padding-top: 35px; }
  .page-head, .section-head { align-items: start; flex-direction: column; }
  .hero h1 { font-size: 49px; }
  .hero-copy > p { font-size: 14px; }
  .hero-actions .button { flex: 1; }
  .metric { padding: 15px 12px; }
  .metric strong { font-size: 19px; }
  .home-section { padding: 47px 0; }
  .kill-row { grid-template-columns: 1fr 35px 1fr; padding-inline: 11px; }
  .kill-meta { grid-column: 1/-1; display: flex; justify-content: space-between; align-items: center; text-align: left; padding-left: 2px; }
  .kill-meta time { display: inline; margin: 0; }
  .player-grid, .armory-grid { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: 1fr 1fr; }
  .profile-rating strong { font-size: 48px; }
  .highlights { grid-template-columns: 1fr; }
  .filters { flex-direction: column; }
  .select { width: 100%; }
  .result-count { margin-left: 0; }
  .diagnostics { grid-template-columns: 1fr; }
  .upset { padding: 22px; }
  .upset-match { gap: 10px; }
  .upset-match strong { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
