:root {
  --ink: #162019;
  --muted: #667168;
  --paper: #f2efe5;
  --paper-2: #e5dfcf;
  --night: #101713;
  --night-2: #19231c;
  --olive: #536049;
  --amber: #e3a72c;
  --red: #d71e26;
  --cyan: #69d8cf;
  --line: rgba(22, 32, 25, .18);
  --radius: 5px;
  --shadow: 0 22px 55px rgba(11, 17, 13, .17);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(22,32,25,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,32,25,.025) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px;
  font: 17px/1.6 "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
}

body[data-tone="dark"] { color: #f4f0e6; background-color: var(--night); }
a { color: #24503a; text-underline-offset: 3px; }
a:hover { color: #b71e24; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }

.skip { position: fixed; top: 8px; left: 8px; z-index: 999; padding: .65rem 1rem; color: white; background: var(--night); transform: translateY(-150%); }
.skip:focus { transform: none; }
.sitebar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 1rem;
  min-height: 58px; padding: .7rem max(1rem, calc((100vw - 1180px) / 2));
  color: #f5f1e7; background: rgba(16, 23, 19, .97); border-bottom: 3px solid var(--amber); backdrop-filter: blur(10px);
}
.sitebar__brand { color: white; font: 900 .76rem/1 "Courier New", monospace; letter-spacing: .12em; text-decoration: none; white-space: nowrap; }
.sitebar nav { display: flex; gap: .9rem; flex: 1; overflow-x: auto; scrollbar-width: none; }
.sitebar nav a { color: #d9ddd9; font-size: .78rem; text-decoration: none; white-space: nowrap; }
.sitebar nav a[aria-current="page"] { color: var(--amber); }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 42px; padding: .65rem .85rem; border: 1px solid var(--night); border-radius: 3px;
  color: white; background: var(--night); font: 900 .74rem/1 "Courier New", monospace; letter-spacing: .06em; text-decoration: none; text-transform: uppercase;
}
.button:hover { color: white; background: var(--olive); }
.button--amber { color: var(--ink); background: var(--amber); border-color: var(--amber); }
.button--ghost { color: var(--ink); background: transparent; border-color: var(--line); }
.button--danger { background: var(--red); border-color: var(--red); }

.page-hero { position: relative; overflow: hidden; padding: clamp(5rem, 10vw, 9rem) 1rem 4.5rem; color: #f5f1e7; background: var(--night); border-bottom: 8px solid var(--amber); }
.page-hero::before { content: ""; position: absolute; inset: 0; opacity: .22; background: repeating-linear-gradient(118deg, transparent 0 32px, rgba(227,167,44,.25) 32px 33px); }
.page-hero::after { content: attr(data-number); position: absolute; right: -1rem; bottom: -4rem; color: rgba(255,255,255,.045); font: 900 clamp(11rem, 30vw, 25rem)/1 Georgia, serif; }
.page-hero__inner { position: relative; z-index: 1; width: min(1180px, 100%); margin: auto; }
.eyebrow { margin: 0 0 1rem; color: var(--amber); font: 900 .75rem/1 "Courier New", monospace; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.05; }
h1 { max-width: 920px; margin: 0; font-size: clamp(3.3rem, 8vw, 7rem); font-weight: 500; letter-spacing: -.055em; }
.page-hero p:last-child { max-width: 720px; margin: 1.3rem 0 0; color: #cbd1cc; font-size: 1.15rem; }
.shell { width: min(1180px, calc(100% - 2rem)); margin: auto; padding: 4.8rem 0; }
.shell--tight { max-width: 880px; }
.section-head { display: grid; grid-template-columns: minmax(0,.8fr) minmax(280px,1fr); gap: 3rem; align-items: end; margin-bottom: 2rem; }
.section-head h2 { margin: 0; font-size: clamp(2.3rem, 5vw, 4.5rem); font-weight: 500; letter-spacing: -.045em; }
.section-head p { margin: 0; color: var(--muted); }
.dark-band { color: #f3efe6; background: var(--night); }
.dark-band .section-head p { color: #adb7af; }

.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); box-shadow: var(--shadow); }
.metric { min-height: 145px; padding: 1.2rem; background: rgba(255,255,255,.46); border-right: 1px solid var(--line); }
.metric:last-child { border: 0; }
.metric b { display: block; margin-bottom: 1.8rem; color: var(--muted); font: 900 .68rem/1 "Courier New", monospace; letter-spacing: .1em; text-transform: uppercase; }
.metric strong { display: block; font: 500 1.65rem/1.06 Georgia, serif; }
.metric small { display: block; margin-top: .45rem; color: var(--muted); }

.grid-2, .grid-3, .grid-4 { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.panel { padding: 1.35rem; border: 1px solid var(--line); background: rgba(255,255,255,.48); }
.panel--dark { color: #f4f0e6; background: var(--night-2); border-color: rgba(255,255,255,.15); }
.panel--accent { border-top: 6px solid var(--amber); }
.panel h2, .panel h3 { margin-top: 0; }
.panel h3 { font-size: 1.4rem; }
.panel p:last-child, .panel ul:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.label { color: var(--red); font: 900 .68rem/1 "Courier New", monospace; letter-spacing: .11em; text-transform: uppercase; }
.empty { padding: 2rem; border: 2px dashed var(--line); color: var(--muted); text-align: center; }
.notice { padding: 1rem 1.2rem; border-left: 7px solid var(--amber); background: #fff5d4; }

.section-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.section-card { min-height: 210px; padding: 1.2rem; color: var(--ink); background: var(--paper); text-decoration: none; transition: transform .18s ease, background .18s ease; }
.section-card:hover { position: relative; z-index: 1; color: white; background: var(--olive); transform: translateY(-5px); }
.section-card b { display: block; margin-bottom: 3.5rem; font: 900 .68rem/1 "Courier New", monospace; }
.section-card strong { display: block; font: 500 1.45rem/1.08 Georgia, serif; }
.section-card span { display: block; margin-top: .65rem; font-size: .85rem; opacity: .75; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--muted); font: 900 .68rem/1.15 "Courier New", monospace; letter-spacing: .07em; text-transform: uppercase; }
.tag { display: inline-block; padding: .3rem .5rem; color: white; background: var(--olive); font: 900 .66rem/1 "Courier New", monospace; text-transform: uppercase; }
.tag--amber { color: var(--ink); background: var(--amber); }
.tag--red { background: var(--red); }

.roster { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
.roster-card { position: relative; min-height: 500px; overflow: hidden; padding: 2rem; color: #f6f2e8; background: var(--night); box-shadow: var(--shadow); text-decoration: none; isolation: isolate; }
.roster-card::before { content: attr(data-initial); position: absolute; right: -2rem; bottom: -4rem; z-index: -1; color: rgba(255,255,255,.06); font: 900 24rem/1 Georgia, serif; }
.roster-card::after { content: ""; position: absolute; inset: auto 0 0; z-index: -2; height: 55%; background: linear-gradient(150deg, transparent, rgba(227,167,44,.25)); clip-path: polygon(0 42%,100% 0,100% 100%,0 100%); }
.roster-card:hover { color: white; transform: translateY(-5px); }
.roster-card__rank { color: var(--amber); font: 900 .7rem/1 "Courier New", monospace; letter-spacing: .12em; text-transform: uppercase; }
.roster-card h2 { margin: 1.4rem 0 .2rem; font-size: clamp(3.2rem, 7vw, 6rem); font-weight: 500; letter-spacing: -.05em; }
.roster-card__role { max-width: 360px; color: #bbc4bd; }
.roster-card__stats { position: absolute; right: 2rem; bottom: 2rem; left: 2rem; display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: rgba(255,255,255,.2); }
.roster-card__stats span { padding: .8rem; background: rgba(16,23,19,.9); font-size: .76rem; }
.roster-card__stats b { display: block; color: var(--amber); font: 900 .65rem/1 "Courier New", monospace; }

.profile-hero { min-height: 70vh; display: grid; align-items: end; padding: 7rem 1rem 4rem; color: white; background: var(--night); border-bottom: 8px solid var(--amber); overflow: hidden; }
.profile-hero__inner { position: relative; width: min(1180px, 100%); margin: auto; }
.profile-hero__glyph { position: absolute; right: -1rem; bottom: -7rem; color: rgba(255,255,255,.055); font: 900 clamp(18rem, 45vw, 36rem)/1 Georgia, serif; }
.profile-hero h1 { position: relative; }
.profile-hero__meta { position: relative; display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.profile-hero__meta span { padding: .45rem .65rem; border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.25); font: 900 .72rem/1 "Courier New", monospace; }
.profile-hero--loadout { position: relative; min-height: 82vh; align-items: center; isolation: isolate; }
.profile-hero--loadout::before { content: ""; position: absolute; inset: 0; z-index: -2; background: repeating-linear-gradient(90deg,transparent 0 79px,rgba(255,255,255,.035) 79px 80px), repeating-linear-gradient(0deg,transparent 0 79px,rgba(255,255,255,.025) 79px 80px); }
.profile-hero--loadout::after { content: "LOADOUT"; position: absolute; left: -1rem; bottom: -2.5rem; z-index: -1; color: rgba(255,255,255,.035); font: 900 clamp(8rem,22vw,18rem)/.8 "Courier New", monospace; letter-spacing: -.11em; }
.profile-loadout { position: relative; display: grid; grid-template-columns: minmax(300px,.78fr) minmax(500px,1.22fr); gap: 1.2rem; align-items: center; width: min(1280px,100%); margin: auto; }
.profile-loadout__copy { position: relative; z-index: 2; }
.profile-loadout__copy h1 { font-size: clamp(5rem,10vw,9rem); }
.profile-loadout__weapon { position: relative; min-height: 480px; display: grid; place-items: center; padding: 2rem; color: var(--ink); background: var(--paper); clip-path: polygon(8% 0,100% 0,100% 87%,92% 100%,0 100%,0 13%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.16); }
.profile-loadout__weapon::before { content: "PRIMARY / 01"; position: absolute; top: 1.1rem; left: 1.3rem; font: 900 .67rem/1 "Courier New", monospace; letter-spacing: .12em; }
.profile-loadout__weapon::after { content: "TTI × EMG"; position: absolute; right: 1.3rem; bottom: 1.1rem; color: var(--red); font: 900 .72rem/1 "Courier New", monospace; letter-spacing: .12em; }
.profile-loadout__weapon img { width: 110%; max-width: none; margin-left: -5%; filter: contrast(1.08) drop-shadow(0 22px 22px rgba(0,0,0,.22)); animation: equipment-in .9s cubic-bezier(.2,.8,.2,1) both; }
.profile-loadout__weapon a { position: absolute; inset: 0; z-index: 2; }
.profile-loadout__weapon-name { position: absolute; left: 1.3rem; bottom: 1.2rem; font: 500 1.25rem/1 Georgia, serif; }
.hud-line { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.4rem; }
.hud-line span { padding: .42rem .58rem; border-left: 3px solid var(--amber); color: #c8d0ca; background: rgba(255,255,255,.055); font: 900 .68rem/1 "Courier New", monospace; }
.operator-ribbon { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 1.2rem; border: 1px solid rgba(255,255,255,.18); }
.operator-ribbon div { padding: .8rem; border-right: 1px solid rgba(255,255,255,.18); }
.operator-ribbon div:last-child { border: 0; }
.operator-ribbon b { display: block; color: var(--amber); font: 900 .62rem/1 "Courier New", monospace; }
.operator-ribbon span { font-size: .82rem; }
.profile-layout { display: grid; grid-template-columns: minmax(260px,.62fr) minmax(0,1.38fr); gap: 1.4rem; }
.identity-card { padding: 1.5rem; color: white; background: var(--night); }
.identity-card__avatar { display: grid; place-items: center; aspect-ratio: 1; margin-bottom: 1rem; color: var(--amber); background: repeating-linear-gradient(45deg,#18231c 0 16px,#1d2a21 16px 32px); border: 1px solid rgba(255,255,255,.15); font: 900 clamp(6rem,18vw,12rem)/1 Georgia, serif; }
.identity-card dl { display: grid; grid-template-columns: 1fr 1.4fr; margin: 0; }
.identity-card dt, .identity-card dd { margin: 0; padding: .65rem 0; border-bottom: 1px solid rgba(255,255,255,.13); }
.identity-card dt { color: #9faa9f; font: 900 .66rem/1.5 "Courier New", monospace; text-transform: uppercase; }
.stat-board { padding: 1.5rem; border: 1px solid var(--line); background: rgba(255,255,255,.48); }
.stat-board h2 { margin-top: 0; }
.stat { display: grid; grid-template-columns: 132px 1fr 2.7rem; gap: .8rem; align-items: center; margin: 1rem 0; }
.stat label { font: 900 .72rem/1 "Courier New", monospace; text-transform: uppercase; }
.stat input { width: 100%; accent-color: var(--amber); }
.stat output { font: 900 .8rem/1 "Courier New", monospace; text-align: right; }
.stat-note { color: var(--muted); font-size: .84rem; }
.achievement { min-height: 140px; padding: 1rem; border-top: 5px solid var(--amber); background: var(--paper-2); }
.achievement b { display: block; color: var(--red); font: 900 .66rem/1 "Courier New", monospace; text-transform: uppercase; }
.achievement strong { display: block; margin-top: 1.2rem; font-family: Georgia, serif; font-size: 1.25rem; }

.toolbar { display: flex; flex-wrap: wrap; gap: .7rem; align-items: end; margin-bottom: 1.3rem; }
.field { display: grid; gap: .35rem; }
.field label { color: var(--muted); font: 900 .66rem/1 "Courier New", monospace; text-transform: uppercase; }
.field input, .field select, .field textarea { min-height: 42px; padding: .65rem .7rem; color: var(--ink); background: #fffdf6; border: 1px solid var(--line); border-radius: 2px; }
.field textarea { min-height: 92px; resize: vertical; }
.toolbar .field { min-width: 170px; }
.toolbar .field--search { flex: 1; min-width: 230px; }
.arsenal-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; margin-bottom: 1.3rem; background: var(--line); border: 1px solid var(--line); }
.arsenal-summary div { padding: 1rem; background: var(--paper); }
.arsenal-summary b { display: block; color: var(--muted); font: 900 .64rem/1 "Courier New", monospace; text-transform: uppercase; }
.arsenal-summary strong { display: block; margin-top: .7rem; font: 500 1.7rem/1 Georgia, serif; }
.arsenal-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.gear-card { position: relative; min-height: 260px; padding: 1.2rem 1.2rem 4.2rem; border: 1px solid var(--line); background: rgba(255,255,255,.54); }
.gear-card--visual { overflow: hidden; min-height: 430px; padding-top: 235px; }
.gear-card__image { position: absolute; inset: 0 0 auto; display: grid; place-items: center; height: 215px; overflow: hidden; background: #ece9df; border-bottom: 1px solid var(--line); }
.gear-card__image img { width: 105%; max-width: none; mix-blend-mode: multiply; filter: contrast(1.08); transition: transform .35s ease; }
.gear-card--visual:hover .gear-card__image img { transform: scale(1.045) translateX(1%); }
.gear-card__detail { display: inline-block; margin-top: .7rem; font: 900 .68rem/1 "Courier New", monospace; text-transform: uppercase; }
.gear-card__top { display: flex; justify-content: space-between; gap: .7rem; }
.gear-card h3 { margin: 1.3rem 0 .2rem; font-size: 1.55rem; }
.gear-card__model { color: var(--muted); }
.gear-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1.2rem; }
.gear-card dt { color: var(--muted); font: 900 .62rem/1 "Courier New", monospace; text-transform: uppercase; }
.gear-card dd { margin: .25rem 0 0; }
.gear-card__actions { position: absolute; right: 1rem; bottom: 1rem; display: flex; gap: .45rem; }
.icon-button { min-width: 36px; min-height: 36px; border: 1px solid var(--line); color: var(--ink); background: transparent; font: 900 .68rem/1 "Courier New", monospace; }
.icon-button:hover { color: white; background: var(--night); }

.weapon-hero { position: relative; min-height: 88vh; display: grid; align-items: center; overflow: hidden; color: white; background: var(--night); border-bottom: 9px solid var(--amber); isolation: isolate; }
.weapon-hero::before { content: "TR-1"; position: absolute; left: -2rem; bottom: -5rem; z-index: -2; color: rgba(255,255,255,.045); font: 900 clamp(13rem,35vw,30rem)/.8 Georgia,serif; letter-spacing: -.1em; }
.weapon-hero::after { content: ""; position: absolute; inset: 0; z-index: -3; background: radial-gradient(circle at 75% 45%,rgba(227,167,44,.18),transparent 36%),repeating-linear-gradient(90deg,transparent 0 89px,rgba(255,255,255,.03) 89px 90px); }
.weapon-hero__inner { width: min(1280px,calc(100% - 2rem)); margin: auto; padding: 6rem 0 3rem; }
.weapon-stage { display: grid; grid-template-columns: minmax(300px,.72fr) minmax(520px,1.28fr); gap: 1rem; align-items: center; }
.weapon-stage__copy h1 { max-width: 620px; font-size: clamp(4.5rem,9vw,8.4rem); }
.weapon-stage__copy h1 span { display: block; color: var(--amber); font-size: .38em; letter-spacing: .02em; }
.weapon-stage__image { position: relative; display: grid; place-items: center; min-height: 540px; padding: 2rem; color: var(--ink); background: var(--paper); clip-path: polygon(7% 0,100% 0,100% 90%,93% 100%,0 100%,0 10%); }
.weapon-stage__image img { width: 118%; max-width: none; mix-blend-mode: multiply; filter: contrast(1.1) drop-shadow(0 24px 18px rgba(0,0,0,.2)); animation: equipment-in .9s cubic-bezier(.2,.8,.2,1) both; }
.weapon-stage__image small { position: absolute; right: 1rem; bottom: 1rem; font: 900 .62rem/1 "Courier New",monospace; }
.weapon-badges { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.5rem; }
.weapon-badges span { padding: .45rem .62rem; border: 1px solid rgba(255,255,255,.28); font: 900 .7rem/1 "Courier New",monospace; }
.spec-rail { display: grid; grid-template-columns: repeat(6,1fr); width: min(1280px,calc(100% - 2rem)); margin: -2.8rem auto 0; position: relative; z-index: 4; color: white; background: var(--night); border: 1px solid rgba(255,255,255,.17); box-shadow: var(--shadow); }
.spec-rail div { min-height: 115px; padding: 1rem; border-right: 1px solid rgba(255,255,255,.15); }
.spec-rail div:last-child { border: 0; }
.spec-rail b { display: block; margin-bottom: 1rem; color: var(--amber); font: 900 .62rem/1 "Courier New",monospace; text-transform: uppercase; }
.spec-rail strong { font: 500 1.22rem/1.05 Georgia,serif; }
.attachment-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.attachment { min-height: 190px; padding: 1rem; background: var(--paper); }
.attachment b { display: grid; place-items: center; width: 42px; height: 42px; color: var(--ink); background: var(--amber); border-radius: 50%; font: 900 .72rem/1 "Courier New",monospace; }
.attachment h3 { margin: 2rem 0 .4rem; font-size: 1.2rem; }
.attachment p { margin: 0; color: var(--muted); font-size: .85rem; }
.reference-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.reference-grid dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.reference-grid dt,.reference-grid dd { margin: 0; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.reference-grid dt { color: var(--muted); font: 900 .64rem/1.4 "Courier New",monospace; text-transform: uppercase; }
.weapon-placeholder { min-height: 480px; display: grid; place-items: center; padding: 2rem; border: 2px dashed rgba(255,255,255,.25); color: #9fab9f; background: repeating-linear-gradient(45deg,#141e17 0 20px,#19241c 20px 40px); text-align: center; }
.weapon-placeholder strong { display: block; color: white; font: 500 clamp(3rem,8vw,7rem)/1 Georgia,serif; }
@keyframes equipment-in { from { opacity: 0; transform: translateX(7%) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

dialog { width: min(680px, calc(100% - 1.4rem)); max-height: 90vh; overflow: auto; padding: 0; border: 0; background: var(--paper); box-shadow: 0 30px 100px rgba(0,0,0,.42); }
dialog::backdrop { background: rgba(5,8,6,.78); backdrop-filter: blur(3px); }
.dialog-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1.2rem 1.4rem; color: white; background: var(--night); border-bottom: 5px solid var(--amber); }
.dialog-head h2 { margin: 0; font-size: 1.7rem; }
.dialog-body { padding: 1.4rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .field--wide { grid-column: 1 / -1; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .7rem; margin-top: 1.3rem; }

.doc-list { display: grid; gap: .7rem; }
.doc-row { display: grid; grid-template-columns: 4rem 1fr auto; gap: 1rem; align-items: center; padding: 1rem; color: var(--ink); background: rgba(255,255,255,.5); border: 1px solid var(--line); text-decoration: none; }
.doc-row:hover { color: white; background: var(--olive); }
.doc-row b { font: 900 .68rem/1 "Courier New", monospace; }
.doc-row strong { font-family: Georgia, serif; font-size: 1.2rem; }
.doc-row span { color: var(--muted); font-size: .85rem; }
.doc-row:hover span { color: rgba(255,255,255,.75); }

footer { padding: 2.4rem 1rem; color: #aab4ac; background: #080c09; text-align: center; font-size: .82rem; }
footer a { color: var(--amber); }

@media (max-width: 900px) {
  .sitebar nav { display: none; }
  .section-head, .profile-layout { grid-template-columns: 1fr; gap: 1rem; }
  .profile-loadout,.weapon-stage { grid-template-columns: 1fr; }
  .profile-loadout__weapon,.weapon-stage__image { min-height: 390px; }
  .metric-row, .section-cards, .grid-4, .arsenal-summary { grid-template-columns: 1fr 1fr; }
  .grid-3, .arsenal-grid { grid-template-columns: 1fr 1fr; }
  .spec-rail { grid-template-columns: repeat(3,1fr); margin-top: 0; }
  .attachment-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .sitebar { justify-content: space-between; }
  .sitebar .button { padding: .55rem; font-size: .65rem; }
  .shell { width: min(100% - 1.2rem, 1180px); padding: 3.6rem 0; }
  .metric-row, .section-cards, .grid-2, .grid-3, .grid-4, .roster, .arsenal-summary, .arsenal-grid, .form-grid { grid-template-columns: 1fr; }
  .profile-hero--loadout { min-height: auto; padding-top: 6rem; }
  .profile-loadout__copy h1 { font-size: 4.8rem; }
  .profile-loadout__weapon,.weapon-stage__image { min-height: 300px; }
  .profile-loadout__weapon img,.weapon-stage__image img { width: 125%; }
  .operator-ribbon { grid-template-columns: 1fr; }
  .operator-ribbon div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
  .spec-rail,.attachment-grid,.reference-grid { grid-template-columns: 1fr; }
  .spec-rail div { min-height: auto; }
  .metric { min-height: auto; }
  .metric b { margin-bottom: .6rem; }
  .roster-card { min-height: 430px; }
  .stat { grid-template-columns: 98px 1fr 2.2rem; }
  .toolbar { display: grid; grid-template-columns: 1fr 1fr; }
  .toolbar .field--search, .toolbar .button { grid-column: 1 / -1; }
  .doc-row { grid-template-columns: 3rem 1fr; }
  .doc-row span { grid-column: 2; }
}
@media print {
  @page { margin: 14mm; }
  body { color: black; background: white; font-size: 10.5pt; }
  .sitebar, .button, dialog, footer { display: none !important; }
  .page-hero, .profile-hero { min-height: 0; padding: 12mm 0; color: black; background: white; border: 3px solid black; }
  .page-hero p:last-child, .profile-hero__meta span { color: black; }
  .shell { width: 100%; padding: 10mm 0; }
  .panel, .metric, .gear-card, .stat-board { background: white; box-shadow: none; break-inside: avoid; }
}
