/* Gun Wiki wiki. Dark bench look shared with the Gunsmith; 5.11-style orange is the only accent. */
:root {
  --bg: #0e1013;
  --bg-2: #13161a;
  --card: #171a1f;
  --card-2: #1d2127;
  --line: #262a31;
  --line-2: #363c47;
  --fg: #ebe7de;
  --muted: #a29e94;
  --faint: #6f6d67;
  --brass: #ff6a13;
  --brass-ink: #1a0b02;
  --glow: 0 0 14px rgb(255 106 19 / 0.45);
  --fit: #7cc49a;
  --display: "Saira Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --side: 232px;
  --head: 60px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.55 var(--body); }
a { color: inherit; text-decoration: none; }
p a, .prose a, .sources a { color: var(--brass); text-decoration: underline; text-decoration-color: rgb(255 106 19 / 0.4); text-underline-offset: 2px; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: 0.01em; line-height: 1.05; margin: 0; text-transform: uppercase; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: 1.45rem; margin: 2.2rem 0 0.9rem; }
h3 { font-size: 1.1rem; }
.eyebrow { font: 600 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

/* ---------- shell ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); border-right: 1px solid var(--line); background: rgb(11 12 15 / 0.96); display: flex; flex-direction: column; z-index: 40; }
.brand { height: var(--head); display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.brand .mark { width: 30px; height: 30px; border-radius: 7px; background: var(--brass); color: var(--brass-ink); display: grid; place-items: center; font: 800 17px/1 var(--display); box-shadow: var(--glow); }
.brand b { font: 800 1.35rem/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; }
.brand b span { color: var(--brass); text-shadow: 0 0 12px rgb(255 106 19 / 0.4); }
.nav { padding: 14px 12px 24px; overflow-y: auto; flex: 1; }
.nav p { margin: 18px 10px 6px; font: 600 10px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.nav p:first-child { margin-top: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 14px; position: relative; }
.nav a:hover { background: var(--card); color: var(--fg); }
.nav a[aria-current] { background: var(--card-2); color: var(--fg); }
.nav a[aria-current]::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brass); box-shadow: var(--glow); }
.nav svg { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav a[aria-current] svg { color: var(--brass); }
.nav .n { margin-left: auto; font: 500 11px var(--mono); color: var(--faint); }

.top { position: sticky; top: 0; z-index: 30; height: var(--head); margin-left: var(--side); display: flex; align-items: center; gap: 12px; padding: 0 28px; background: rgb(14 16 19 / 0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top .brand { display: none; border: 0; padding: 0; }
.menu-btn { display: none; width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card); color: var(--fg); align-items: center; justify-content: center; cursor: pointer; }
.menu-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.search { position: relative; flex: 1; max-width: 560px; }
.search input { width: 100%; height: 38px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--card); color: var(--fg); font: inherit; font-size: 14px; padding: 0 40px 0 38px; }
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgb(255 106 19 / 0.18); }
.search > svg { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; stroke: var(--faint); fill: none; stroke-width: 2; }
.search kbd { position: absolute; right: 10px; top: 9px; font: 500 11px/18px var(--mono); padding: 0 6px; border: 1px solid var(--line-2); border-radius: 5px; color: var(--faint); }
.results { position: absolute; left: 0; right: 0; top: 44px; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; padding: 6px; box-shadow: 0 18px 44px -12px rgb(0 0 0 / 0.7); max-height: min(70vh, 460px); overflow-y: auto; }
.results a { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px; border-radius: 7px; }
.results a.on, .results a:hover { background: var(--card-2); }
.results a.on b { color: var(--brass); }
.results b { font-weight: 600; font-size: 14px; }
.results span { color: var(--faint); font-size: 12px; margin-left: auto; white-space: nowrap; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }
.results .none { padding: 10px; color: var(--muted); font-size: 14px; }
.top .cta { margin-left: auto; }

main { margin-left: var(--side); padding: 28px 28px 80px; max-width: calc(1240px + var(--side)); }
.foot { margin-left: var(--side); padding: 24px 28px 40px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.foot p { margin: 0 0 6px; max-width: 900px; }

.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--card); color: var(--fg); font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer; }
.btn:hover { border-color: var(--muted); }
.btn.hot { background: var(--brass); border-color: var(--brass); color: var(--brass-ink); }
.btn.hot:hover { box-shadow: var(--glow); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- home ---------- */
.hero { position: relative; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; padding: 44px 40px; background:
  radial-gradient(60% 120% at 100% 0%, rgb(255 106 19 / 0.16), transparent 60%),
  linear-gradient(180deg, var(--bg-2), var(--bg)); }
.hero h1 span { color: var(--brass); text-shadow: 0 0 22px rgb(255 106 19 / 0.35); }
.hero p { max-width: 560px; color: var(--muted); font-size: 16px; margin: 14px 0 22px; }
.hero .row { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .stats { display: flex; gap: 28px; margin-top: 30px; flex-wrap: wrap; }
.hero .stats div { font: 800 1.9rem/1 var(--display); }
.hero .stats small { display: block; font: 500 11px var(--mono); color: var(--faint); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 5px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tile { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: rgb(255 106 19 / 0.6); transform: translateY(-2px); }
.tile svg { width: 26px; height: 26px; stroke: var(--brass); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tile h3 { font-size: 1.25rem; }
.tile p { margin: 0; color: var(--muted); font-size: 13px; }
.tile .n { font: 500 12px var(--mono); color: var(--faint); margin-top: auto; }
.smith { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); margin-top: 12px; }
.smith .txt { padding: 30px; }
.smith .txt p { color: var(--muted); margin: 10px 0 18px; }
.smith .pic { background: radial-gradient(70% 70% at 50% 50%, #262b33, #121418); display: grid; place-items: center; padding: 20px; min-height: 200px; }
.smith .pic svg { width: 100%; max-width: 420px; }

/* ---------- lists ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 8px 0 0; color: var(--muted); max-width: 640px; }
.crumbs { font: 500 12px var(--mono); color: var(--faint); margin-bottom: 12px; letter-spacing: 0.04em; }
.crumbs a:hover { color: var(--fg); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; align-items: center; }
.chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--muted); font: 500 13px var(--body); cursor: pointer; }
.chip:hover { color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--brass); border-color: var(--brass); color: var(--brass-ink); font-weight: 600; }
.filters select { height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card); color: var(--fg); font: 13px var(--body); padding: 0 8px; margin-left: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.card:hover { border-color: rgb(255 106 19 / 0.6); transform: translateY(-2px); }
.card .pic { aspect-ratio: 16 / 9; background: radial-gradient(80% 90% at 50% 55%, #242931, #121418); display: grid; place-items: center; overflow: hidden; }
.card .pic img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.card .pic svg { width: 62%; opacity: 0.9; }
.card .body { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .maker { font: 600 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass); }
.card h3 { font-size: 1.2rem; }
.card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin: 6px 0 0; }
.card dl div { min-width: 0; }
.card dt { font: 500 10px var(--mono); color: var(--faint); letter-spacing: 0.1em; text-transform: uppercase; }
.card dd { margin: 0; font-size: 13px; }
.card .price { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.card .price b { color: var(--fg); font-family: var(--mono); font-weight: 500; }
.empty { color: var(--muted); padding: 30px 0; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font: 600 10px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); padding: 10px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:hover td { background: var(--card); }
.table td a b { font-weight: 600; }
.table td a:hover b { color: var(--brass); }
.scroll-x { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }

/* ---------- entry ---------- */
.entry { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.entry .lead { font-size: 17px; color: var(--fg); margin: 14px 0 0; max-width: 720px; }
.entry .sub { color: var(--muted); margin-top: 8px; font-size: 14px; }
.entry .sub a { color: var(--brass); }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.facts li { padding-left: 18px; position: relative; color: var(--fg); }
.facts li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 7px; height: 7px; transform: rotate(45deg); background: var(--brass); }
.infobox { position: sticky; top: calc(var(--head) + 20px); border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.infobox .pic { aspect-ratio: 4 / 3; background: radial-gradient(80% 90% at 50% 55%, #262b33, #121418); display: grid; place-items: center; }
.infobox .pic img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.infobox .pic svg { width: 66%; }
.infobox .credit { font-size: 11px; color: var(--faint); padding: 6px 14px 0; }
.infobox .credit a { text-decoration: underline; }
.spec { margin: 0; padding: 8px 14px 4px; display: grid; grid-template-columns: auto 1fr; }
.spec dt, .spec dd { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.spec dt { color: var(--faint); font: 500 11px/1.9 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; padding-right: 14px; }
.spec dd { margin: 0; text-align: right; }
.spec dd a { color: var(--brass); }
.spec > :nth-last-child(-n+2) { border-bottom: 0; }
.infobox .buy { padding: 12px 14px 14px; display: grid; gap: 8px; }
.infobox .buy .btn { justify-content: center; }
.fine { font-size: 12px; color: var(--faint); margin: 0; }
.variants { display: grid; gap: 8px; }
.variants div { border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; background: var(--card); }
.variants b { display: block; margin-bottom: 2px; }
.variants span { color: var(--muted); font-size: 14px; }
.note { border-left: 3px solid var(--line-2); padding: 4px 0 4px 12px; color: var(--muted); font-size: 14px; margin: 6px 0; }
.sources { font-size: 13px; color: var(--muted); padding-left: 20px; }
.sources li { margin: 4px 0; word-break: break-word; }
.mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.mini a { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 11px 13px; display: block; }
.mini a:hover { border-color: rgb(255 106 19 / 0.6); }
.mini small { display: block; font: 600 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass); margin-bottom: 3px; }
.mini b { font-weight: 600; font-size: 14px; }
.mini span { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }
.callout { border: 1px solid rgb(255 106 19 / 0.4); background: rgb(255 106 19 / 0.07); border-radius: 12px; padding: 16px 18px; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 22px; }
.callout p { margin: 0; color: var(--fg); }

/* ---------- compare ---------- */
.pickers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.pickers select { height: 40px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--card); color: var(--fg); font: 14px var(--body); padding: 0 10px; width: 100%; }
.cmp td:first-child, .cmp th:first-child { color: var(--faint); font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.cmp td.best { color: var(--brass); }

/* ---------- phones / tablets ---------- */
@media (max-width: 1100px) {
  .entry { grid-template-columns: 1fr; }
  .infobox { position: static; max-width: 520px; }
  .entry > .infobox { order: -1; }
}
@media (max-width: 900px) {
  .side { transform: translateX(-100%); transition: transform .2s; width: 270px; box-shadow: 0 0 60px rgb(0 0 0 / 0.6); }
  body.menu .side { transform: none; }
  body.menu::after { content: ""; position: fixed; inset: 0; background: rgb(0 0 0 / 0.5); z-index: 35; }
  .top, main, .foot { margin-left: 0; }
  .top { padding: 0 16px; gap: 10px; }
  .top .brand { display: flex; }
  .top .brand b { display: none; }
  .menu-btn { display: inline-flex; }
  .top .cta { display: none; }
  .search kbd { display: none; }
  main { padding: 20px 16px 60px; }
  .foot { padding: 20px 16px 36px; }
  .hero { padding: 28px 20px; }
  .smith { grid-template-columns: 1fr; }
  .pickers { grid-template-columns: 1fr; }
  .filters select { margin-left: 0; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; }
  .card .pic { aspect-ratio: 2.4 / 1; }
  .hero .stats { gap: 20px; }
}
