/* ============================================================
   MetaOne — global styles
   Dark slate base · CS2 orange accent
   ============================================================ */
:root {
  --bg:        #0d1117;
  --bg-2:      #131922;
  --panel:     #161d28;
  --panel-2:   #1b2430;
  --border:    #232c3a;
  --border-2:  #2c3647;
  --text:      #e7ecf3;
  --text-dim:  #9aa7b8;
  --text-mute: #6b7888;
  --accent:    #f0a020; /* CS2 orange */
  --accent-2:  #ffb845;
  --accent-dim:#3a2c12;
  --good:      #2dd4a7;
  --bad:       #ff5d6c;
  --radius:    14px;
  --radius-sm: 9px;
  --maxw:      1170px;
  --font:      'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:      'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; gap: 28px; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand-logo {
  width: 28px; height: 28px; border-radius: 7px; object-fit: cover; display: block;
}
.brand-mark .one { color: var(--accent); }
.primary-nav { display: flex; gap: 4px; margin-right: auto; }
.primary-nav a {
  padding: 8px 13px; border-radius: 8px; font-size: 14.5px; font-weight: 500;
  color: var(--text-dim); transition: background .15s, color .15s; white-space: nowrap;
}
.primary-nav a:hover { background: var(--panel); color: var(--text); }
.primary-nav a.is-active { color: var(--accent); }
.header-search {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 9px; padding: 7px 12px; color: var(--text-mute);
}
.header-search input {
  background: none; border: 0; outline: 0; color: var(--text);
  font: inherit; font-size: 14px; width: 190px;
}
.header-search input::placeholder { color: var(--text-mute); }

/* ---------- Search (dropdown + results page) ---------- */
.search-results {
  position: absolute; top: calc(100% + 8px); right: 0; width: min(420px, 92vw);
  background: var(--panel); border: 1px solid var(--border-2); border-radius: 12px;
  box-shadow: 0 18px 44px -12px rgba(0,0,0,.7); padding: 6px; z-index: 60;
  max-height: 70vh; overflow-y: auto;
}
.search-result { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; text-decoration: none; color: inherit; }
.search-result.is-active { background: var(--panel-2); }
.search-badge { flex: 0 0 auto; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; padding: 3px 6px; border-radius: 5px; color: var(--text-mute); background: var(--bg-2); border: 1px solid var(--border); }
.search-badge-player, .search-badge-tool { color: var(--accent); border-color: rgba(240,160,32,.3); background: rgba(240,160,32,.08); }
.search-text { min-width: 0; display: flex; flex-direction: column; }
.search-name { font-size: 14px; font-weight: 600; color: var(--text); }
.search-meta { font-size: 12px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-results mark, .search-page mark { background: rgba(240,160,32,.28); color: inherit; border-radius: 2px; padding: 0 1px; }
.search-empty { padding: 14px; font-size: 13.5px; color: var(--text-dim); text-align: center; }

.search-page { max-width: 680px; padding-bottom: 50px; }
.search-page-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.search-page-list .search-result { background: var(--panel); border: 1px solid var(--border); transition: border-color .15s; }
.search-page-list .search-result:hover { border-color: var(--text-mute); }
.search-page .search-empty { text-align: left; padding: 12px 0; }
.search-page-box { position: relative; margin: 4px 0 20px; }
.search-page-box svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-mute); }
.search-page-box input { width: 100%; background: var(--bg-2); border: 1px solid var(--border); color: var(--text); font: inherit; font-size: 16px; padding: 13px 16px 13px 44px; border-radius: 11px; }
.search-page-box input:focus { outline: none; border-color: var(--accent); }
#search-page-title .accent { color: var(--accent); }
/* Burger button (mobile only; injected by main.js) */
.nav-toggle { display: none; margin-left: auto; width: 40px; height: 38px; padding: 0; background: none; border: 0; cursor: pointer; align-items: center; justify-content: center; color: var(--text); }
.nav-toggle-bars { position: relative; width: 22px; height: 16px; }
.nav-toggle-bars span { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease, top .2s ease; }
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 7px; }
.nav-toggle-bars span:nth-child(3) { top: 14px; }
.site-header.nav-open .nav-toggle-bars span:nth-child(1) { top: 7px; transform: rotate(45deg); }
.site-header.nav-open .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle-bars span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

/* Mobile header: hide the search, swap the nav for a burger dropdown. */
@media (max-width: 720px) {
  .header-row { gap: 14px; }
  .header-search { display: none; }
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 2px; padding: 8px 20px 14px;
    background: rgba(13, 17, 23, 0.97); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border); box-shadow: 0 14px 30px -14px rgba(0,0,0,.7);
  }
  .site-header.nav-open .primary-nav { display: flex; }
  .primary-nav a { padding: 11px 12px; font-size: 15px; border-radius: 8px; }
  .primary-nav a:hover, .primary-nav a.is-active { background: var(--panel); }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { border-bottom: 1px solid var(--border); background: var(--bg-2); }
.breadcrumb ol { list-style: none; display: flex; gap: 8px; margin: 0; padding: 11px 0; font-size: 13px; color: var(--text-mute); }
.breadcrumb li::after { content: '/'; margin-left: 8px; color: var(--border-2); }
.breadcrumb li:last-child::after { content: ''; }
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current] { color: var(--text); }

/* ---------- Layout ---------- */
.page { padding: 28px 0 70px; }
/* offset jump targets so the sticky header doesn't cover them */
.xhair-hero, .panel, .about { scroll-margin-top: 78px; }
.layout { display: grid; grid-template-columns: 1fr 250px; gap: 32px; align-items: start; }
/* min-width:0 lets the 1fr track shrink below its content's min-content width,
   so wide children (code blocks, share code) scroll internally instead of
   stretching the column past the viewport on mobile. */
.content { min-width: 0; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } .sidebar { display: none; } }

/* ---------- Hero: crosshair over map ---------- */
.xhair-hero {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 26px;
}
.xhair-hero-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.xhair-hero-title { display: flex; align-items: center; gap: 13px; margin: 0; }
.xhair-hero-title .avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border-2);
}
@media (min-width: 700px) {
  .xhair-hero-title .avatar { width: 60px; height: 60px; }
}
.xhair-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.xhair-hero-title h1 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.xhair-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 11px; }
.xhair-hero-title .sub { font-size: 12.5px; color: var(--text-mute); font-weight: 500; }
.xhair-updated { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--text-mute); white-space: nowrap; }
.xhair-updated svg { flex: 0 0 auto; opacity: .8; }

/* stage on top (full width, short banner), specs stacked below */
.hero-grid { display: block; }

/* stage = map bg + crosshair overlay.
   width:100% keeps width container-driven so aspect-ratio only sets height
   (a min-height here would make the browser derive width from height instead). */
.xhair-stage { position: relative; width: 100%; aspect-ratio: 12 / 5; background: #0a0d12; border-bottom: 1px solid var(--border); }
@media (max-width: 700px) { .xhair-stage { aspect-ratio: 16 / 9; } }
.xhair-stage-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.xhair-stage::after { /* subtle vignette */
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(60% 60% at 50% 50%, transparent 40%, rgba(0,0,0,.55));
  pointer-events: none;
}
.xhair-stage-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.map-dots {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  display: flex; gap: 7px; z-index: 3;
}
.map-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.3); padding: 0; transition: background .15s, transform .15s;
}
.map-dots button.is-active { background: var(--accent); transform: scale(1.25); }
.map-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%;
  cursor: pointer; color: #fff; background: rgba(0,0,0,.42);
  backdrop-filter: blur(4px); opacity: .55;
  transition: opacity .15s, background .15s;
}
.map-nav:hover { background: rgba(0,0,0,.7); opacity: 1; }
.xhair-stage:hover .map-nav { opacity: 1; }
.map-nav-prev { left: 10px; }
.map-nav-next { right: 10px; }
@media (hover: none) { .map-nav { opacity: 1; } }
.map-name {
  position: absolute; left: 12px; bottom: 11px; z-index: 3;
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.7); background: rgba(0,0,0,.4);
  padding: 3px 9px; border-radius: 6px; backdrop-filter: blur(4px);
}

/* spec panel below the stage */
.hero-specs { padding: 20px 22px 22px; display: flex; flex-direction: column; }
.spec-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
@media (max-width: 560px) { .spec-list { grid-template-columns: repeat(2, 1fr); } }
.spec {
  background: var(--panel); padding: 11px 13px;
}
.spec dt { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 3px; }
.spec dd { margin: 0; font-size: 15px; font-weight: 700; }
.spec dd .swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; border: 1px solid rgba(255,255,255,.2); }

/* ---------- Share code / code blocks ---------- */
.copy-card {
  margin-top: 16px; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 13px 15px;
}
.copy-card-label {
  display: block; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-mute); margin-bottom: 8px; font-weight: 600;
}
.copy-row { display: flex; align-items: center; gap: 10px; }
.copy-row code {
  flex: 1; font-family: var(--mono); font-size: 13.5px; color: var(--accent-2);
  overflow-x: auto; white-space: nowrap; letter-spacing: .01em;
}
.code-block { position: relative; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 10px; }
.code-block pre { margin: 0; overflow-x: auto; }
.code-block code { font-family: var(--mono); font-size: 13px; color: var(--text-dim); line-height: 1.7; white-space: pre; }

/* ---------- Gear showcase (affiliate) ---------- */
.gear-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gear-product-link { display: flex; flex-direction: column; gap: 14px; height: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-decoration: none; color: inherit; transition: border-color .15s, background .15s; }
.gear-product-link:hover { border-color: var(--text-mute); background: var(--panel); }
.gear-product-top { display: flex; align-items: center; gap: 13px; }
.gear-thumb { position: relative; flex: 0 0 auto; width: 56px; height: 56px; border-radius: 9px; background: #0e141d; border: 1px solid var(--border); overflow: hidden; display: grid; place-items: center; }
.gear-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.gear-thumb-ic { width: 26px; height: 26px; color: var(--text-mute); }
.gear-info { flex: 1 1 auto; min-width: 0; }
.gear-cat { display: block; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-mute); }
.gear-name { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.3; margin-top: 2px; }
.gear-badge { display: inline-block; font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); background: rgba(240,160,32,.12); border: 1px solid rgba(240,160,32,.3); padding: 1px 5px; border-radius: 5px; margin-left: 4px; vertical-align: middle; }
.gear-cta { margin-top: auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--accent); background: rgba(240,160,32,.1); border: 1px solid rgba(240,160,32,.28); transition: background .15s; }
.gear-product-link:hover .gear-cta { background: rgba(240,160,32,.18); }
.gear-cta svg { transition: transform .15s; }
.gear-product-link:hover .gear-cta svg { transform: translateX(2px); }
.gear-disclosure { font-size: 10.5px; color: var(--text-mute); margin: 12px 2px 0; }
@media (max-width: 600px) { .gear-grid { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: 1px solid var(--border-2); background: var(--panel-2); color: var(--text);
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  padding: 8px 15px; border-radius: 9px; transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--text-mute); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent; color: #1a1206;
  box-shadow: 0 4px 16px -6px rgba(240,160,32,.6);
}
.btn-primary:hover { filter: brightness(1.07); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-block { width: 100%; margin-top: 14px; }
.btn-copy { background: var(--panel); }
.btn-copy.copied { color: var(--good); border-color: var(--good); }

/* ---------- Panels ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; margin-bottom: 22px;
}
.panel-head { margin-bottom: 16px; }
.panel-head h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.panel-sub { font-size: 13px; color: var(--text-mute); }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin: 0; }
@media (min-width: 560px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-grid > div { background: var(--panel); padding: 12px 14px; }
.stat-grid dt { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 3px; }
.stat-grid dd { margin: 0; font-size: 15.5px; font-weight: 700; }

/* ---------- Info box (intro / callout prose) ---------- */
.info-box {
  background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 18px 22px; margin-bottom: 22px;
  color: var(--text-dim); font-size: 15px;
}
.info-box p { margin: 0; }
.info-box strong { color: var(--text); }

/* ---------- Settings reference table ---------- */
.settings-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.settings-table th, .settings-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.settings-table thead th { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-mute); font-weight: 600; }
.settings-table tbody tr:last-child td { border-bottom: 0; }
.settings-table td:first-child { font-weight: 600; }
.settings-table .cvar { font-family: var(--mono); font-size: 12.5px; color: var(--accent-2); }
.settings-table td:last-child { font-weight: 700; }
.settings-table .swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; border: 1px solid rgba(255,255,255,.2); }
@media (max-width: 560px) { .settings-table .cvar { display: none; } .settings-table th:nth-child(2), .settings-table td:nth-child(2) { display: none; } }

/* ---------- CTA note ---------- */
.cta-note {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--accent-dim); border: 1px solid #5a4418;
  border-radius: var(--radius-sm); padding: 13px 15px; margin-top: 16px;
  font-size: 13.5px; color: #f3d9a8;
}
.cta-note svg { flex: none; color: var(--accent); margin-top: 2px; }
.cta-note a { color: var(--accent-2); font-weight: 600; text-decoration: underline; }

/* ---------- Sensitivity calculator ---------- */
.sens-calc {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
}
.sens-input label {
  display: block;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-mute); margin-bottom: 8px;
}
.dpi-row { display: flex; flex-direction: column; gap: 10px; }
.dpi-row input[type=number] {
  width: 100%; padding: 13px 16px;
  font-family: var(--mono); font-size: 22px; font-weight: 600;
  color: var(--text); background: var(--bg-2);
  border: 2px solid var(--border-2); border-radius: var(--radius-sm);
  outline: none; transition: border-color .15s;
}
.dpi-row input[type=number]:focus { border-color: var(--accent); }
.dpi-row input::-webkit-outer-spin-button,
.dpi-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dpi-row input[type=number] { -moz-appearance: textfield; }

.dpi-presets { display: flex; gap: 6px; }
.dpi-presets button {
  flex: 1; padding: 7px 10px;
  background: var(--panel-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); color: var(--text-dim);
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.dpi-presets button:hover { color: var(--text); border-color: var(--text-mute); }
.dpi-presets button.is-active {
  background: var(--accent-dim); color: var(--accent-2); border-color: var(--accent);
}

.sens-arrow { color: var(--text-mute); }

.sens-output {
  padding: 18px;
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); text-align: center;
}
.sens-output-label {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-mute); margin: 0 0 4px;
}
.sens-output-num {
  font-family: var(--mono); font-size: 38px; font-weight: 700;
  line-height: 1.1; margin: 0; color: var(--accent);
}
.sens-output-meta { margin: 6px 0 0; font-size: 12px; color: var(--text-mute); }

.sens-note {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 16px; padding: 11px 14px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12.5px; line-height: 1.5; color: var(--text-dim);
}
.sens-note svg { flex: none; color: var(--text-mute); margin-top: 2px; }
.sens-note strong { color: var(--text); font-weight: 600; white-space: nowrap; }

@media (max-width: 560px) {
  .sens-calc { grid-template-columns: 1fr; gap: 14px; }
  .sens-arrow { transform: rotate(90deg); justify-self: center; }
}

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; background: var(--bg-2); }
.faq summary { cursor: pointer; padding: 13px 16px; font-weight: 600; font-size: 14.5px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: '\2013'; }
.faq-body { padding: 0 16px 14px; color: var(--text-dim); font-size: 14px; }
.faq-body p { margin: 0; }

/* ---------- Related ---------- */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.related-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; text-align: center; transition: border-color .15s, transform .15s;
}
.related-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.related-card .mini-stage { position: relative; aspect-ratio: 16/10; border-radius: 8px; overflow: hidden; margin-bottom: 10px; background: #0a0d12; }
.related-card .mini-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.related-card .mini-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.related-card .mini-stage::after { content: ''; position: absolute; inset: 0; background: radial-gradient(70% 70% at 50% 50%, transparent 45%, rgba(0,0,0,.45)); z-index: 1; }
.related-card .name { display: block; margin: 0; font-size: 14.5px; font-weight: 700; }
.related-card p { margin: 2px 0 0; font-size: 12px; color: var(--text-mute); }

/* ---------- Home ---------- */
.home-hero { text-align: center; padding: 64px 0 40px; }
.home-hero h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -0.03em; margin: 0 0 14px; }
.home-hero h1 .accent { color: var(--accent); }
.home-hero p { font-size: 17px; color: var(--text-dim); max-width: 560px; margin: 0 auto 26px; }
.home-hero .btn { font-size: 15px; padding: 11px 22px; }
.pro-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; padding-bottom: 70px; }

/* ---------- Homepage ---------- */
.home-hero-badge { display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: rgba(240,160,32,.1); border: 1px solid rgba(240,160,32,.28); padding: 5px 13px; border-radius: 999px; margin-bottom: 18px; }
.home-hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.home-hero-cta .btn { font-size: 15px; padding: 11px 22px; }
.home-section { padding: 12px 0 44px; }
.home-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.home-section-head h2 { font-size: 22px; }
.home-section-head p { font-size: 14px; color: var(--text-dim); margin-top: 4px; }
.home-section-link { flex: 0 0 auto; font-size: 13.5px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.home-section .pro-grid { padding-bottom: 0; grid-template-columns: repeat(5, 1fr); }
@media (max-width: 980px) { .home-section .pro-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 680px) { .home-section .pro-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 460px) { .home-section .pro-grid { grid-template-columns: repeat(2, 1fr); } }
.home-cta-center { text-align: center; margin-top: 26px; }
.home-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.home-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.home-feature { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.home-feature-ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); color: var(--accent); margin-bottom: 13px; }
.home-feature-ic svg { width: 20px; height: 20px; }
.home-feature h3 { font-size: 15px; margin-bottom: 6px; }
.home-feature p { font-size: 13.5px; color: var(--text-dim); line-height: 1.55; }
@media (max-width: 760px) {
  .home-tools, .home-features { grid-template-columns: 1fr; }
  .home-section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ---------- Crosshairs hub ---------- */
.hub-head { padding: 48px 0 26px; max-width: 640px; }
.hub-head h1 { font-size: clamp(28px, 4.5vw, 42px); font-weight: 800; letter-spacing: -0.03em; margin: 0 0 12px; }
.hub-head > p { font-size: 16px; color: var(--text-dim); margin: 0 0 22px; }
.hub-head > p #xh-count { color: var(--accent); font-weight: 700; }
.hub-filter { position: relative; max-width: 380px; }
.hub-filter svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-mute); pointer-events: none; }
.hub-filter input {
  width: 100%; box-sizing: border-box; padding: 11px 14px 11px 38px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-size: 14.5px; font-family: inherit;
  transition: border-color .15s, background .15s;
}
.hub-filter input:focus { outline: none; border-color: var(--accent); background: var(--panel); }
.hub-filter input::placeholder { color: var(--text-mute); }
.hub-empty { text-align: center; color: var(--text-dim); padding: 30px 0 80px; }

/* ---------- Sidebar ---------- */
.sidebar { position: sticky; top: 80px; }
.toc { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.toc-title { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mute); margin: 0 0 10px; font-weight: 600; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 6px 0; font-size: 13.5px; color: var(--text-dim); border-left: 2px solid transparent; padding-left: 11px; margin-left: -11px; transition: color .15s, border-color .15s; }
.toc a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 40px 0 26px; margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid p { color: var(--text-mute); font-size: 13.5px; }
.foot-title { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); font-weight: 600; margin: 0 0 10px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li a { display: block; padding: 4px 0; font-size: 13.5px; color: var(--text-mute); }
.footer-grid li a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 26px; padding-top: 18px; color: var(--text-mute); font-size: 12.5px; }
.footer-bottom-flush { border: 0; margin: 0; padding-top: 0; }
.foot-affiliate { margin: 7px 0 0; font-size: 11.5px; color: var(--text-mute); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--panel-2); border: 1px solid var(--border-2); color: var(--text);
  padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,.6);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Tool pages (shared head) ---------- */
.tool-head { padding: 26px 0 18px; }
.tool-head h1 { font-size: 30px; line-height: 1.15; }
.tool-head p { color: var(--text-dim); font-size: 15px; max-width: 660px; margin-top: 10px; line-height: 1.6; }
.tool-head code { font-family: var(--mono); font-size: .9em; color: var(--accent-2); }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 72px 0 96px; }
.notfound .nf-code { font-size: clamp(64px, 12vw, 96px); font-weight: 800; line-height: 1; letter-spacing: -.04em; color: var(--accent); }
.notfound h1 { font-size: 26px; margin: 14px 0 8px; }
.notfound p { color: var(--text-dim); font-size: 15px; max-width: 460px; margin: 0 auto 24px; line-height: 1.6; }
.notfound .nf-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Doc / legal pages ---------- */
.doc { max-width: 760px; margin: 0 auto; padding-bottom: 56px; }
.doc-updated { font-size: 13px; color: var(--text-mute); margin: -6px 0 6px; }
.doc h2 { font-size: 19px; margin: 30px 0 10px; }
.doc h3 { font-size: 15.5px; margin: 20px 0 6px; }
.doc p, .doc li { color: var(--text-dim); font-size: 15px; line-height: 1.7; }
.doc p { margin-bottom: 12px; }
.doc ul { margin: 0 0 14px; padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--accent); }
.doc strong { color: var(--text); }
.doc .doc-note { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; font-size: 14px; color: var(--text-dim); line-height: 1.65; margin: 8px 0 16px; }

.contact-methods { display: grid; gap: 12px; margin: 10px 0 20px; }
.contact-method { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.contact-method .cm-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-mute); margin-bottom: 5px; }
.contact-method a { font-family: var(--mono); font-size: 16px; font-weight: 600; color: var(--accent); }
.contact-method p { font-size: 13px; color: var(--text-dim); margin: 5px 0 0; line-height: 1.55; }
.tool-prose .howto { margin: 0; padding-left: 20px; }
.tool-prose .howto li { color: var(--text-dim); font-size: 14.5px; line-height: 1.7; margin-bottom: 8px; }
.tool-prose .howto code, .tool-prose .howto em { font-style: normal; }
.tool-prose .howto code { font-family: var(--mono); color: var(--accent-2); font-size: .92em; }

/* ---------- Crosshair generator (single column) ---------- */
/* Constrain the whole tool page to a focused, centered column so the heading,
   preview and controls all share one width (avoids a wide header over a thin tool). */
.container.gen-page { max-width: 880px; }
.gen-page .tool-head { text-align: center; }
.gen-page .tool-head p { margin-left: auto; margin-right: auto; }
.gen { margin: 0 0 30px; display: flex; flex-direction: column; gap: 14px; }
.gen-stage { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.gen-panel { padding: 15px 18px; }

.gen-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 13px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.gen-toolbar-label { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-mute); }
.gen-toolbar-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.gen-toolbar-actions .btn { padding: 6px 13px; }

.gen-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 24px; }
.gen-field { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 30px; }
.gen-field > label { flex: 0 0 auto; width: 86px; font-size: 13px; color: var(--text-dim); }
.gen-field .gen-range { flex: 1 1 auto; min-width: 0; accent-color: var(--accent); cursor: pointer; }
.gen-range:disabled { opacity: .4; cursor: not-allowed; }
.gen-range-r { accent-color: #ff5b5b; }
.gen-range-g { accent-color: #46d369; }
.gen-range-b { accent-color: #4aa3ff; }
.gen-select { flex: 1 1 auto; min-width: 0; background: var(--bg-2); border: 1px solid var(--border); color: var(--text); font: inherit; font-size: 13px; padding: 6px 9px; border-radius: 8px; }
.gen-num { flex: 0 0 auto; width: 50px; background: var(--bg-2); border: 1px solid var(--border); color: var(--text); font-family: var(--mono); font-size: 12.5px; text-align: center; padding: 5px 4px; border-radius: 7px; -moz-appearance: textfield; }
.gen-num::-webkit-outer-spin-button, .gen-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gen-num:focus, .gen-select:focus, .gen-hex:focus { outline: none; border-color: var(--accent); }

.gen-field-check { justify-content: space-between; }
.gen-field-check > label { width: auto; flex: 1 1 auto; }

.gen-toggle { position: relative; width: 38px; height: 22px; flex: 0 0 auto; }
.gen-toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.gen-toggle-track { position: absolute; inset: 0; background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px; transition: background .15s, border-color .15s; pointer-events: none; }
.gen-toggle-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-mute); transition: transform .15s, background .15s; }
.gen-toggle input:checked + .gen-toggle-track { background: rgba(240,160,32,.22); border-color: var(--accent); }
.gen-toggle input:checked + .gen-toggle-track::after { transform: translateX(16px); background: var(--accent); }

.gen-field-rgb { grid-column: 1 / -1; }
.gen-color-start { margin-top: 6px; padding-top: 13px; border-top: 1px solid var(--border); }
.gen-field-color { grid-column: 1 / -1; margin-top: 2px; }
.gen-hex { flex: 0 0 auto; width: 92px; background: var(--bg-2); border: 1px solid var(--border); color: var(--text); font-family: var(--mono); font-size: 13px; padding: 6px 10px; border-radius: 8px; text-transform: uppercase; }
.gen-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.gen-swatches button { width: 24px; height: 24px; border-radius: 6px; background: var(--sw); border: 1px solid rgba(255,255,255,.18); cursor: pointer; transition: transform .12s; }
.gen-swatches button:hover { transform: scale(1.12); }

.copy-card-hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-mute); margin-left: 6px; }
.gen-commands-head { display: block; margin-bottom: 8px; }
.gen-commands .code-block { margin-top: 0; }
.gen-presets-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px; }
.gen-presets-label { font-size: 12.5px; color: var(--text-mute); }
.gen-presets-row .btn { padding: 6px 13px; }

@media (max-width: 620px) {
  .gen-fields { grid-template-columns: 1fr; gap: 4px 0; }
  .gen-field-color { flex-wrap: wrap; }
}

/* ---------- Aim trainer ---------- */
.aim { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.aim-arena {
  position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 68vh;
  background: radial-gradient(120% 120% at 50% 0%, #141c28 0%, #0a0e15 70%);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  cursor: none; user-select: none; touch-action: none;
}
.aim-arena.aim-flash { animation: aim-miss .2s ease; }
@keyframes aim-miss { 0% { box-shadow: inset 0 0 0 2px rgba(255,80,80,.6); } 100% { box-shadow: inset 0 0 0 2px rgba(255,80,80,0); } }

.aim-target {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe4b0, var(--accent) 55%, #b86c12);
  box-shadow: 0 0 0 2px rgba(0,0,0,.35), 0 3px 12px rgba(0,0,0,.5), 0 0 18px -4px var(--accent);
  cursor: none; animation: aim-spawn .12s ease;
}
@keyframes aim-spawn { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.aim-target.aim-pop { transition: transform .09s ease, opacity .09s ease; transform: scale(1.5); opacity: 0; }

.aim-cursor { position: absolute; top: 0; left: 0; width: 200px; height: 200px; pointer-events: none; z-index: 5; opacity: 0; will-change: transform; }

.aim-fs-btn { position: absolute; top: 10px; right: 10px; z-index: 8; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: rgba(10,14,20,.72); border: 1px solid var(--border); color: var(--text-dim); cursor: pointer; backdrop-filter: blur(4px); transition: color .12s, border-color .12s; }
.aim-fs-btn:hover { color: var(--text); border-color: var(--text-mute); }
.aim-fs-btn svg { width: 16px; height: 16px; }

/* Fill the screen in fullscreen — drop the aspect ratio/size caps. */
.aim-arena:fullscreen { width: 100vw; height: 100vh; max-height: none; aspect-ratio: auto; border: 0; border-radius: 0; }
.aim-arena:-webkit-full-screen { width: 100vw; height: 100vh; max-height: none; aspect-ratio: auto; border: 0; border-radius: 0; }

.aim-hud {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 6;
  display: flex; gap: 22px; padding: 7px 18px; pointer-events: none;
  background: rgba(10,14,20,.72); border: 1px solid var(--border); border-radius: 11px; backdrop-filter: blur(5px);
}
.aim-hud-item { text-align: center; }
.aim-hud-item span { display: block; font-family: var(--mono); font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.1; }
.aim-hud-item label { font-size: 9.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-mute); }

.aim-overlay { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; background: rgba(8,11,16,.62); backdrop-filter: blur(3px); cursor: default; }
.aim-overlay.aim-hidden { display: none; }
.aim-card { text-align: center; max-width: 420px; padding: 10px 24px; }
.aim-card-kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.aim-card-title { font-size: 30px; margin: 6px 0 4px; }
.aim-card-sub { font-size: 14px; color: var(--text-dim); line-height: 1.6; margin-bottom: 18px; }
.aim-card .btn-primary { padding: 11px 30px; font-size: 15px; }
.aim-stats { display: flex; justify-content: center; gap: 26px; margin: 16px 0 20px; }
.aim-stat span { display: block; font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--accent-2); }
.aim-stat span i { font-size: 13px; font-style: normal; color: var(--text-mute); margin-left: 1px; }
.aim-stat label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-mute); }

.aim-controls { padding: 16px 20px; display: flex; flex-direction: column; gap: 13px; }
.aim-row { display: flex; align-items: center; gap: 16px; }
.aim-row-label { flex: 0 0 92px; font-size: 13px; color: var(--text-dim); }
.aim-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.aim-seg button { padding: 7px 16px; background: var(--bg-2); color: var(--text-dim); border: 0; border-left: 1px solid var(--border); font: inherit; font-size: 13px; cursor: pointer; transition: background .12s, color .12s; }
.aim-seg button:first-child { border-left: 0; }
.aim-seg button:hover { color: var(--text); }
.aim-seg button.is-active { background: var(--accent); color: #1a1206; font-weight: 600; }

.aim-sens { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.aim-sens-field { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-dim); }
.aim-sens-field input { width: 74px; background: var(--bg-2); border: 1px solid var(--border); color: var(--text); font-family: var(--mono); font-size: 13px; text-align: center; padding: 6px 6px; border-radius: 8px; -moz-appearance: textfield; }
.aim-sens-field input::-webkit-outer-spin-button, .aim-sens-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.aim-sens-field input:focus { outline: none; border-color: var(--accent); }
.aim-sens-edpi { font-size: 12.5px; color: var(--text-mute); }
.aim-sens-edpi strong { color: var(--accent-2); font-family: var(--mono); }
.aim-row-pros .aim-presets { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.aim-presets-hint { font-size: 11.5px; color: var(--text-mute); margin-left: 2px; }

.aim-row-xhair { align-items: flex-start; }
.aim-xhair-controls { display: flex; gap: 14px; flex: 1; min-width: 0; }
.aim-xhair-preview-box { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 9px; background: #0b0f16; border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; }
.aim-xhair-preview-box svg { width: 100%; height: 100%; }
.aim-xhair-inputs { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.aim-code-row { display: flex; gap: 8px; }
.aim-code-row input { flex: 1; min-width: 0; background: var(--bg-2); border: 1px solid var(--border); color: var(--text); font-family: var(--mono); font-size: 13px; padding: 8px 11px; border-radius: 9px; }
.aim-code-row input:focus { outline: none; border-color: var(--accent); }
.aim-code-row input.aim-bad { animation: aim-miss .3s ease; border-color: #ff6b6b; }
.aim-presets { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.aim-presets-label { font-size: 12px; color: var(--text-mute); }
.aim-chip { background: var(--bg-2); border: 1px solid var(--border); color: var(--text-dim); font: inherit; font-size: 12.5px; padding: 5px 11px; border-radius: 7px; cursor: pointer; transition: border-color .12s, color .12s; }
.aim-chip:hover { border-color: var(--accent); color: var(--text); }
.aim-presets-link { font-size: 12.5px; color: var(--accent); font-weight: 600; margin-left: 2px; }

@media (max-width: 620px) {
  .aim-arena { aspect-ratio: 4 / 3; }
  .aim-row { flex-wrap: wrap; gap: 8px 16px; }
  .aim-xhair-controls { flex-wrap: wrap; }
}

/* ---------- Tools hub ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 6px 0 40px; }
.tool-card { display: flex; flex-direction: column; gap: 10px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s, background .15s; }
a.tool-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool-card.is-soon { opacity: .72; cursor: default; }
.tool-card-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); color: var(--accent); }
.tool-card-ic svg { width: 22px; height: 22px; }
.tool-card h2 { font-size: 16.5px; display: flex; align-items: center; gap: 8px; }
.tool-card p { font-size: 13.5px; color: var(--text-dim); line-height: 1.55; flex: 1; }
.tool-card .soon-tag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-mute); background: var(--bg-2); border: 1px solid var(--border); padding: 2px 7px; border-radius: 6px; }
.tool-card-cta { font-size: 13px; font-weight: 600; color: var(--accent); }
