/* SkinAPI Corp: brutalist chaos world. Black, white, one yellow. */

:root {
    --bg: #111;
    --surface: #111;
    --surface-2: #151515;
    --surface-3: #262626;
    --border: #fafafa;
    --border-strong: #fafafa;
    --text: #fafafa;
    --text-2: #e0e0e0;
    --text-3: #b8b8b8;
    --accent: #fafafa;
    --accent-hover: #111;
    --accent-ink: #111;
    --accent-soft: rgba(250, 250, 250, 0.14);
    --success: #4ADE80;
    --success-soft: rgba(74, 222, 128, 0.14);
    --danger: #FF5C5C;
    --danger-soft: rgba(255, 92, 92, 0.14);

    /* Functional data colors, kept as-is on skin cards. */
    --wear-fn: #22C55E;
    --wear-mw: #84CC16;
    --wear-ft: #F59E0B;
    --wear-ww: #FB923C;
    --wear-bs: #FF5C5C;

    --font-ui: 'Space Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
    --font-display: 'Anton', Impact, 'Arial Narrow Bold', sans-serif;
    --font-mono: 'Space Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

    --radius-sm: 0;
    --radius: 0;
    --radius-lg: 0;
    --gutter: 24px;
    --topbar-h: 60px;
    --yellow: #FFFF00;
    --ink: #111;
    --paper: #fafafa;
    --bw: 3px;
    --shadow: 6px 6px 0 var(--accent);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    color-scheme: dark;
    scrollbar-color: var(--accent) #111;
    accent-color: var(--accent);
}
::selection { background: var(--yellow); color: #111; }
input, textarea { caret-color: var(--accent); }
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: #111; border-left: 2px solid #fafafa; }
::-webkit-scrollbar-thumb { background: var(--accent); border: 2px solid #111; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.55;
    min-height: 100vh;
    overflow-x: clip;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

/* Default underlined links, on purpose. */
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { background: var(--accent); color: #111; }

/* Accent discipline: yellow lives in three places only: headline highlighter, primary buttons, ticker tape. */
mark, .hl { background: #fafafa; color: #111; padding: 0 0.15em; }
/* The one yellow highlighter: the Home headline. */
.mega mark { background: var(--yellow); color: #111; padding: 0 0.08em; display: inline-block; line-height: 0.86; } /* inline-block keeps the block inside its own line instead of painting over the line above */

h1, h2, h3, .logo-text, .topnav-link, .slot-title, .side-label, .btn-search, .btn-apply,
.btn-optimize, .modal h2, .win-bar { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.02em; }

.mono, .skin-price, .skin-price-alt, .summary-value, .results-count, .loadout-total,
.slot-budget-tag, .skin-listings-badge, .price-field input { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.sr-only {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
    position: absolute; left: 8px; top: -60px; z-index: 300;
    background: var(--accent); color: #111; padding: 10px 14px; font-weight: 700; border: var(--bw) solid #111;
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.win-bar :focus-visible, .btn-search:focus-visible, .btn-apply:focus-visible, .btn-optimize:focus-visible,
.topnav-link.active:focus-visible, .logo:focus-visible { outline-color: #fafafa; outline-style: dashed; }

/* ─── Window: the title-barred box used all over ────────── */
.win { background: #111; color: var(--paper); border: var(--bw) solid #fafafa; box-shadow: var(--shadow); position: relative; min-width: 0; }
.win-bar {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    background: var(--accent); color: #111; padding: 4px 8px; font-size: 15px; line-height: 1.3;
    border-bottom: var(--bw) solid #fafafa;
}
.win-bar .ctl { font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.2em; }
.win-body { padding: 14px 16px 16px; }
.win.white { background: #fafafa; color: #111; border-color: #111; box-shadow: 6px 6px 0 #888; }
.win.white :focus-visible { outline-color: #111; }
.win.white .win-bar { background: #111; color: #fafafa; border-bottom-color: #111; }
.win.white a { color: #111; }
.win.white a:hover { background: #111; color: #fafafa; }

/* ─── Demo banner ───────────────────────────────────────── */
#demoBanner {
    background: #fafafa; color: #111; border-bottom: var(--bw) solid #fafafa;
    font-size: 14px; font-weight: 700;
    padding: 8px var(--gutter);
}

/* ─── Topbar ────────────────────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 50; background: #111; border-bottom: 5px solid #fafafa; }
.topbar-inner {
    max-width: 1440px; margin: 0 auto; min-height: var(--topbar-h);
    padding: 8px var(--gutter); display: flex; align-items: center; gap: 14px 16px; flex-wrap: wrap;
}
.logo {
    display: flex; align-items: center; gap: 8px; background: var(--accent); color: #111;
    border: var(--bw) solid #fafafa; padding: 2px 10px 2px 6px; box-shadow: 4px 4px 0 #fafafa;
    transform: rotate(-2deg);
}
.logo:hover { background: #fafafa; color: #111; }
.logo-icon { width: 22px; height: 22px; }
.logo-text { font-size: 24px; line-height: 1.1; color: inherit; }
.logo-corp { font-family: var(--font-mono); font-size: 9px; font-weight: 700; align-self: flex-end; margin-bottom: 4px; }

.topnav { display: flex; gap: 8px; }
.topnav-link {
    background: #111; border: var(--bw) solid #fafafa; color: #fafafa;
    padding: 4px 12px; font-size: 17px; line-height: 1.2;
}
.topnav-link:nth-child(even) { transform: translateY(4px); }
.topnav-link:hover { background: #fafafa; color: #111; }
.topnav-link.active { background: var(--accent); color: #111; box-shadow: 4px 4px 0 #fafafa; }

.search-inline { margin-left: auto; display: flex; align-items: stretch; background: #111; border: var(--bw) solid #fafafa; box-shadow: 4px 4px 0 var(--accent); }
.search-inline:focus-within { border-color: var(--accent); }
.weapon-select { background: #111; border: 0; padding: 8px 10px; min-width: 150px; color: #fafafa; }
.weapon-select:focus-visible { outline-offset: -3px; }

.btn-search, .btn-apply, .btn-optimize {
    background: var(--yellow); color: #111; border: 0; font-size: 18px; padding: 6px 18px;
    text-decoration: none;
}
.btn-search:hover, .btn-apply:hover, .btn-optimize:hover { background: #111; color: #fafafa; box-shadow: inset 0 0 0 3px #fafafa; }
.btn-optimize { display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px; border: var(--bw) solid #fafafa; box-shadow: var(--shadow); }
.btn-optimize:hover { box-shadow: inset 0 0 0 3px #fafafa; }
.btn-apply { flex: 1; border: var(--bw) solid #fafafa; }
.btn-reset { background: #111; border: var(--bw) solid #fafafa; padding: 6px 16px; color: #fafafa; text-transform: uppercase; font-weight: 700; }
.btn-reset:hover { background: #fafafa; color: #111; }

select, input[type="number"] { background: #111; border: var(--bw) solid #fafafa; padding: 8px 10px; }
select:hover, input[type="number"]:hover { border-color: var(--accent); }
select option, select optgroup { background: #111; color: #fafafa; }

/* ─── Pages & layout ────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

.layout {
    max-width: 1440px; margin: 0 auto; padding: 28px var(--gutter);
    display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 28px; align-items: start;
}
.sidebar { grid-column: 2; grid-row: 1; background: #111; border: var(--bw) solid #fafafa; box-shadow: var(--shadow); position: sticky; top: calc(var(--topbar-h) + 22px); margin-top: 18px; }
.results-panel { grid-column: 1; grid-row: 1; min-width: 0; }
.sidebar-title {
    list-style: none; cursor: pointer; padding: 6px 12px; font-family: var(--font-display); font-size: 18px;
    text-transform: uppercase; background: var(--accent); color: #111;
}
.sidebar[open] .sidebar-title { border-bottom: var(--bw) solid #fafafa; }
.sidebar-title::-webkit-details-marker { display: none; }
.sidebar-title::after { content: '[–]'; float: right; font-family: var(--font-mono); font-weight: 700; }
.sidebar:not([open]) .sidebar-title::after { content: '[+]'; }
.sidebar-title:focus-visible { outline-color: #fafafa; outline-offset: -5px; }
.sidebar-body { padding: 16px; display: grid; gap: 18px; }
fieldset { border: 0; min-width: 0; }
.sidebar-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; color: #fafafa; margin-bottom: 8px; padding: 0; }
.toggle-row .sidebar-label { margin-bottom: 0; }

.price-row { display: flex; align-items: center; gap: 8px; }
.price-sep { color: var(--text-3); }
.price-field { display: flex; align-items: center; flex: 1; min-width: 0; background: #111; border: var(--bw) solid #fafafa; padding-left: 10px; }
.price-field:focus-within { border-color: var(--accent); outline: 3px solid var(--accent); outline-offset: 2px; }
.price-prefix { color: var(--accent); font-family: var(--font-mono); font-weight: 700; }
.price-field input { background: transparent; border: 0; width: 100%; min-width: 0; padding: 8px 10px 8px 6px; outline: none; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.wear-group { display: flex; flex-wrap: wrap; gap: 6px; }
.wear-chip { position: relative; cursor: pointer; }
.wear-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.wear-chip span { display: inline-block; min-width: 42px; text-align: center; padding: 4px 10px; border: 2px solid #fafafa; background: #111; font-weight: 700; color: #fafafa; }
.wear-chip:hover span { background: #fafafa; color: #111; }
.wear-chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #111; }
.wear-chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.toggle-wrap { position: relative; width: 44px; height: 24px; flex: none; }
.toggle-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; }
.toggle-track { position: absolute; inset: 0; background: #111; border: var(--bw) solid #fafafa; }
.toggle-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: #fafafa; }
.toggle-input:checked + .toggle-track { background: var(--accent); }
.toggle-input:checked + .toggle-track::after { transform: translateX(20px); background: #111; }
.toggle-input:focus-visible + .toggle-track { outline: 3px solid var(--accent); outline-offset: 2px; }

.sidebar-actions { display: flex; gap: 8px; }

/* ─── Results header ────────────────────────────────────── */
.results-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; min-height: 36px; border-bottom: var(--bw) solid #fafafa; padding-bottom: 10px; }
.results-count { color: #111; background: var(--accent); font-weight: 700; padding: 2px 8px; }
.results-count:empty { display: none; }
.results-tools { display: flex; align-items: center; gap: 12px; }
.sort-label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12px; text-transform: uppercase; font-weight: 700; }
.sort-select { padding: 6px 8px; font-size: 13px; }
.view-toggle { display: flex; border: var(--bw) solid #fafafa; }
.view-btn { background: #111; border: 0; padding: 7px 10px; color: #fafafa; display: grid; place-items: center; }
.view-btn:hover { background: #fafafa; color: #111; }
.view-btn.active { background: var(--accent); color: #111; }
.view-btn:focus-visible { outline-offset: -3px; }

/* ─── Skin cards ────────────────────────────────────────── */
.skin-grid { display: grid; gap: 20px 18px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.skin-card {
    --rarity: #fafafa;
    position: relative; display: block; background: #111; border: var(--bw) solid #fafafa;
    border-top: 8px solid var(--rarity); box-shadow: 5px 5px 0 #fafafa; overflow: hidden;
}
.skin-card:hover { border-color: var(--accent); border-top-color: var(--rarity); box-shadow: 8px 8px 0 var(--accent); transform: translate(-3px, -3px); }

.skin-img-wrap { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 14px; background: var(--surface-2); border-bottom: 2px solid #fafafa; }
.skin-img-wrap img { max-height: 100%; width: auto; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.6)); }
.skin-img-placeholder { font-size: 34px; color: var(--text-3); }
.st-badge {
    position: absolute; top: 8px; left: 8px; background: #111; border: 2px solid #FF9B5E;
    color: #FF9B5E; font-size: 11px; font-weight: 700; padding: 1px 6px;
}

.skin-body { padding: 10px 14px 14px; position: relative; }
.skin-wear-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; min-height: 24px; }
.skin-wear-badge { font-size: 12px; font-weight: 700; padding: 0 7px; border: 2px solid currentColor; background: #111; }
.wear-fn { color: var(--wear-fn); }
.wear-mw { color: var(--wear-mw); }
.wear-ft { color: var(--wear-ft); }
.wear-ww { color: var(--wear-ww); }
.wear-bs { color: var(--wear-bs); }
.skin-listings-badge { font-size: 11.5px; color: var(--text-2); }
.skin-name { font-weight: 700; font-size: 13.5px; line-height: 1.35; margin-bottom: 10px; overflow-wrap: anywhere; min-height: 2.7em; }
.skin-price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.skin-price { font-size: 18px; font-weight: 700; color: #111; background: var(--accent); padding: 0 6px; }
.btn-buy { font-size: 12px; color: var(--text-2); text-decoration: underline; }
.skin-card:hover .btn-buy { color: var(--accent); }

.skin-grid.list-mode { grid-template-columns: 1fr; gap: 12px; }
.list-mode .skin-card { border-top-width: var(--bw); border-left: 10px solid var(--rarity); }
.list-mode .skin-img-wrap { aspect-ratio: auto; height: 76px; padding: 6px 8px; border-bottom: 0; border-right: 2px solid #fafafa; }
.list-mode .skin-body { padding: 8px 14px; }
.list-mode .skin-name { min-height: 0; margin-bottom: 4px; }

/* ─── Skeletons ─────────────────────────────────────────── */
.skin-card.skeleton { border-top-color: #fafafa; pointer-events: none; box-shadow: none; border-style: dashed; }
.sk-img, .sk-line {
    background: repeating-linear-gradient(45deg, #1b1b1b 0 8px, #2a2a2a 8px 16px);
    animation: shimmer 1s linear infinite; background-size: 22.6px 22.6px;
}
.sk-img { aspect-ratio: 4 / 3; margin: 14px; }
.sk-line { height: 12px; margin: 0 14px 10px; }
.sk-line.w60 { width: 60%; }
.sk-line.w40 { width: 40%; margin-bottom: 14px; }
@keyframes shimmer { to { background-position: 22.6px 0; } }

/* ─── Messages ──────────────────────────────────────────── */
.msg-error, .msg-loading { grid-column: 1 / -1; padding: 24px; background: #111; border: var(--bw) dashed #fafafa; color: #fafafa; font-weight: 700; }
.msg-error { border-color: var(--danger); color: #FFB0B0; }

/* ─── Budget & loadout pages ────────────────────────────── */
.budget-wrap { max-width: 1200px; margin: 0 auto; padding: 30px var(--gutter) 56px; }
.budget-header h1 { display: inline-block; font-size: clamp(38px, 6vw, 72px); line-height: 1; background: var(--accent); color: #111; padding: 2px 14px; margin-bottom: 14px; transform: rotate(-1deg); box-shadow: 6px 6px 0 #fafafa; }
.budget-header p { color: var(--text-2); max-width: 62ch; margin-bottom: 26px; }
.budget-form { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; background: #111; border: var(--bw) solid #fafafa; box-shadow: var(--shadow); padding: 20px; margin: 0 0 30px 3%; }
.budget-field { display: grid; gap: 6px; min-width: 160px; flex: 1; }
.budget-field > label { font-size: 12px; font-weight: 700; text-transform: uppercase; color: #fafafa; }
.budget-weapon { flex: 2; }
.budget-submit { flex: 0 0 auto; min-width: 0; }
.field-hint { font-size: 12px; color: var(--text-3); }
.optional-tag { font-size: 10px; color: #111; background: #fafafa; padding: 0 5px; margin-left: 4px; }
.loadout-total { font-size: 13px; color: var(--accent); margin-bottom: 8px; text-align: right; font-weight: 700; }

.budget-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.summary-card { background: #111; border: var(--bw) solid #fafafa; padding: 12px 14px; }
.summary-card:nth-child(odd) { background: #fafafa; color: #111; border-color: #111; box-shadow: 4px 4px 0 var(--accent); }
.summary-label { font-size: 12px; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }
.summary-value { font-size: 22px; font-weight: 700; }
.summary-value.positive { color: var(--success); }
.summary-card:nth-child(odd) .summary-value.positive { color: #006B2E; }

.side-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; max-width: 540px; }
.side-btn { text-align: left; background: #111; border: var(--bw) solid #fafafa; padding: 12px 14px; display: grid; gap: 2px; }
.side-btn:hover { background: #fafafa; color: #111; }
.side-btn:hover .side-sub { color: #222; }
.side-label { font-size: 22px; }
.side-sub { font-size: 12px; color: var(--text-2); }
.side-btn.t-active { background: #EAB308; color: #111; box-shadow: 5px 5px 0 #fafafa; }
.side-btn.ct-active { background: #60A5FA; color: #111; box-shadow: 5px 5px 0 #fafafa; }
.side-btn.t-active .side-sub, .side-btn.ct-active .side-sub { color: #111; }

.loadout-slots { display: grid; gap: 34px; }
.slot-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; border-bottom: var(--bw) solid #fafafa; padding-bottom: 6px; }
.slot-icon { display: inline-flex; color: var(--accent); }
.slot-title { font-size: 22px; flex: 1; min-width: 0; }
.slot-budget-tag { font-size: 12px; font-weight: 700; color: #111; background: var(--accent); padding: 1px 8px; }

/* ─── SkinsTrack: card extras, chip, detail modal ───────── */
.blk { display: block; }
button.skin-card { width: 100%; text-align: left; color: inherit; font: inherit; padding: 0; cursor: pointer; }
button.skin-card:focus-visible { outline-offset: 4px; }
.list-mode .skin-card { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; }
.skin-price-row.alt { margin-top: 8px; padding-top: 8px; border-top: 2px dashed #fafafa; align-items: center; }
.skin-price-alt { font-size: 12px; color: var(--text-2); }

.meter { display: inline-block; width: 54px; height: 10px; border: 2px solid #fafafa; background: #111; overflow: hidden; vertical-align: middle; }
.meter-fill { display: block; height: 100%; }
.meter.high .meter-fill { background: var(--success); }
.meter.mid .meter-fill { background: var(--wear-ft); }
.meter.low .meter-fill { background: var(--danger); }

.discount-badge { position: absolute; top: 8px; right: 8px; z-index: 1; font-family: var(--font-mono); font-size: 11px; font-weight: 700; padding: 0 6px; border: 2px solid currentColor; background: #111; }
.discount-badge.good { color: var(--success); }
.discount-badge.bad { color: #FF8A8A; }
.modal-tags .discount-badge { position: static; }

.st-chip { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; color: #fafafa; border: 2px solid #fafafa; padding: 1px 8px; white-space: nowrap; }
.st-chip.on { color: #111; background: var(--success); border-color: #111; }
.st-chip.err { color: #111; background: var(--danger); }
.st-chip[hidden] { display: none; }

.modal {
    --rarity: #fafafa; margin: auto; padding: 0; border: var(--bw) solid #fafafa; border-top: 10px solid var(--rarity);
    background: #111; color: #fafafa; box-shadow: 10px 10px 0 var(--accent);
    width: min(580px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); overflow: auto;
}
.modal::backdrop { background: rgba(0, 0, 0, 0.82); }
.modal-card { position: relative; padding: 22px; display: grid; gap: 18px; }
.modal-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; background: var(--accent); color: #111; border: var(--bw) solid #fafafa; font-size: 22px; line-height: 1; font-weight: 700; }
.modal-close:hover { background: #fafafa; }
.modal-head { display: flex; gap: 16px; align-items: center; padding-right: 44px; }
.modal-head img { width: 110px; flex: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.6)); }
.modal-head h2 { font-size: 24px; line-height: 1.15; margin-bottom: 8px; overflow-wrap: anywhere; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.st-badge.static { position: static; }
.rarity-tag { font-size: 12px; font-weight: 700; color: #fafafa; border: 2px solid var(--rarity); padding: 0 8px; }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cmp-col { background: #111; border: var(--bw) solid #fafafa; padding: 12px; min-width: 0; }
.cmp-col h3 { font-size: 15px; background: #fafafa; color: #111; margin: -12px -12px 10px; padding: 2px 10px; }
.cmp-price { font-family: var(--font-mono); font-size: 22px; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.cmp-none { color: var(--text-2); font-size: 13px; }
.cmp-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; border-top: 2px dashed #fafafa; font-size: 13px; }
.cmp-row dt { color: var(--text-2); }
.cmp-row dd { font-family: var(--font-mono); }
.modal-link { justify-content: center; text-decoration: none; }

/* ─── Home: brutalist stage, tape, windows ─────────────── */
.win-title { font-family: var(--font-display); }
.win-close { background: #111; color: #fafafa; border: 2px solid #fafafa; font-family: var(--font-mono); font-weight: 700; line-height: 1; padding: 2px 8px; }
.win-close:hover { background: #fafafa; color: #111; }
.win-bar .win-close { border-color: #111; }
.win-bar .win-close:hover { background: #111; color: #fafafa; }
.btn-guilt {
    background: none; border: 0; color: inherit; font-weight: 700; text-decoration: underline;
    text-underline-offset: 3px; padding: 6px 4px; text-align: left;
}
.btn-guilt:hover { background: #111; color: #fafafa; }
.win:not(.white) .btn-guilt:hover { background: #fafafa; color: #111; }
.tiny, .tiny-label { font-size: 13px; line-height: 1.4; }
.tiny-label { font-weight: 700; text-transform: uppercase; }
.big-num { font-family: var(--font-display); font-size: clamp(34px, 5vw, 60px); line-height: 1; word-break: break-all; margin: 4px 0 8px; }

.h-stage { position: relative; max-width: 1360px; margin: 0 auto; padding: 28px var(--gutter) 40px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
/* Compact hero: the trending tape above it shows the skins first; the headline
   is loud but no longer fills the screen. */
.mega { grid-column: 1 / 8; grid-row: 1 / 3; align-self: center; font-size: clamp(40px, 6vw, 96px); line-height: 0.95; letter-spacing: -0.02em; padding-top: 0.04em; }
.win-cta { grid-column: 8 / 13; grid-row: 1; margin: 0; transform: rotate(1deg); z-index: 3; }
.win-tracker { grid-column: 9 / 13; grid-row: 2; margin: 0; transform: rotate(-1deg); z-index: 2; }
.cta-copy { font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.win.white .btn-optimize { border-color: #111; box-shadow: 6px 6px 0 #111; }
.win.white .btn-optimize:hover { background: #111; color: #fafafa; box-shadow: 2px 2px 0 #111; }

.h-stage-2 { padding-top: 34px; }
.win-count { grid-column: 1 / 5; transform: rotate(-1.5deg); align-self: start; }
.win-about { grid-column: 5 / 13; margin-top: 56px; margin-left: 24px; }
.win-about h2 { font-size: 34px; line-height: 1; margin-bottom: 10px; }
.win-about p { margin-bottom: 10px; max-width: 70ch; }

/* Premium picks: stark white tiles, huge mono price, nothing else. */
.premium-grid { gap: 3px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); background: #fafafa; border: 3px solid #fafafa; }
.prem-tile { position: relative; display: grid; gap: 10px; align-content: start; width: 100%; text-align: left; background: #fafafa; color: #111; border: 0; padding: 36px 18px 20px; }
.prem-tile:hover { background: #111; color: #fafafa; }
.prem-tile:focus-visible { outline: 3px solid #111; outline-offset: -6px; }
.prem-tile:hover:focus-visible { outline-color: #fafafa; }
.prem-no { position: absolute; top: 10px; left: 12px; font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
.prem-tile img, .prem-img-empty { width: 100%; height: 150px; object-fit: contain; }
.prem-name { font-weight: 700; font-size: 16px; line-height: 1.3; min-height: 2.6em; overflow-wrap: anywhere; }
.prem-price { font-family: var(--font-mono); font-weight: 700; font-size: clamp(28px, 3.4vw, 40px); line-height: 1; letter-spacing: -0.04em; }

/* Trending tape: a hard yellow strip with a label block. */
.tape { display: flex; align-items: stretch; border-top: 5px solid #fafafa; border-bottom: 5px solid #fafafa; background: var(--yellow); color: #111; }
.tape-label { flex: none; background: #111; color: var(--yellow); padding: 8px 14px; font-family: var(--font-display); font-size: 22px; line-height: 1; text-transform: uppercase; display: grid; align-content: center; gap: 4px; border-right: 5px solid #fafafa; z-index: 1; }
.tape-label small { font-family: var(--font-mono); font-size: 9.5px; color: #fafafa; text-transform: none; max-width: 14ch; }
.ticker { position: relative; overflow: hidden; padding: 14px 0; flex: 1; min-width: 0; }
.ticker-track { display: flex; gap: 14px; width: max-content; list-style: none; padding-left: 14px; animation: ticker var(--ticker-duration, 60s) linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track, .ticker.is-paused .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
.ticker.is-static { overflow-x: auto; scroll-snap-type: x mandatory; }
.ticker.is-static .ticker-track { animation: none; padding: 0 var(--gutter); }
.ticker.is-static li { scroll-snap-align: start; }
.ticker[hidden] { display: none; }
.tape:has(.ticker[hidden]) { display: none; }

.trend-tile {
    --rarity: #111; display: grid; gap: 6px; width: 200px; padding: 10px 12px 12px; text-align: left;
    background: #111; color: #fafafa; border: var(--bw) solid #111; border-top: 8px solid var(--rarity); box-shadow: 4px 4px 0 #111;
}
.trend-tile:hover { background: #fafafa; color: #111; }
.trend-tile:hover .trend-weapon, .trend-tile:hover .trend-liq { color: #222; }
.trend-tile img, .trend-img-empty { width: 100%; height: 96px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,0.6)); }
.trend-name { display: grid; font-weight: 700; font-size: 13.5px; line-height: 1.3; min-height: 2.6em; }
.trend-weapon { font-size: 12px; font-weight: 400; color: var(--text-2); }
.trend-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trend-price { font-family: var(--font-mono); font-weight: 700; color: #fafafa; }
.trend-tile:hover .trend-price { color: #111; }
.trend-liq { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); }

/* WHAT'S MOVING: plain default-blue links on a paper panel. */
.moving { max-width: 1360px; margin: 40px auto 0; padding: 18px var(--gutter) 22px; background: #fafafa; color: #111; border: 3px solid #fafafa; }
.moving[hidden] { display: none; }
.moving h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1; margin-bottom: 12px; border-bottom: 3px solid #111; padding-bottom: 6px; }
.moving-list { list-style: none; columns: 2 420px; column-gap: 32px; font-size: 16px; line-height: 1.5; text-transform: uppercase; }
.moving-list li { break-inside: avoid; padding: 2px 0; overflow-wrap: anywhere; }
.moving a { color: #0000EE; text-decoration: underline; }
.moving a:visited { color: #551A8B; }
.moving a:hover { background: #0000EE; color: #fafafa; }
.moving :focus-visible { outline-color: #111; }

.home-section { max-width: 1360px; margin: 0 auto; padding: 44px var(--gutter) 40px; }
.home-section h2 { font-size: clamp(34px, 5vw, 64px); line-height: 1; margin-bottom: 12px; }
.home-section > p { color: var(--text-2); margin-bottom: 22px; max-width: 60ch; }

@media (max-width: 900px) {
    .h-stage { display: flex; flex-direction: column; gap: 18px; }
    .win-tracker, .win-cta, .win-count, .win-about { margin: 0; transform: none; }
}
@media (max-width: 520px) { .trend-tile { width: 168px; } .tape-label { font-size: 17px; padding: 6px 8px; } .tape-label small { display: none; } }

/* ─── Footer ────────────────────────────────────────────── */
.legal { max-width: 1440px; margin: 40px auto 0; padding: 14px var(--gutter) 28px; border-top: 5px solid #fafafa; font-size: 10.5px; line-height: 1.4; color: var(--text-3); }
.legal strong { color: #fafafa; }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
    :root { --gutter: 16px; }
    .layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .sidebar, .results-panel { grid-column: 1; grid-row: auto; }
    .sidebar { position: static; margin-top: 0; }
    .search-inline { margin-left: 0; width: 100%; }
    .weapon-select { flex: 1; min-width: 0; }
    .budget-form { margin-left: 0; }
}
@media (max-width: 520px) {
    .skin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
    .skin-body { padding: 6px 8px 10px; }
    .skin-price { font-size: 15px; }
    .btn-buy { display: none; }
    .skin-grid.list-mode { grid-template-columns: 1fr; }
    .budget-form { padding: 16px; }
    .budget-field { min-width: 100%; }
    .budget-submit { width: 100%; }
    .btn-optimize { width: 100%; justify-content: center; }
    .side-selector { max-width: none; }
    .topnav { order: 3; width: 100%; }
    .topnav-link { flex: 1; text-align: center; padding: 4px 4px; }
    .results-tools { width: 100%; justify-content: space-between; }
    .st-chip { order: 2; }
    .modal-head img { width: 80px; }
    .cmp { grid-template-columns: 1fr; }
}

/* ─── Chaos motion (decorative layers only) ─────────────── */
@keyframes jitter {
    0% { transform: translate(0, 0) skew(0); } 20% { transform: translate(-2px, 1px) skew(-2deg); }
    40% { transform: translate(2px, -1px) skew(2deg); } 60% { transform: translate(-1px, -2px) skew(-1deg); }
    80% { transform: translate(1px, 2px) skew(1deg); } 100% { transform: translate(0, 0) skew(0); }
}
@media (prefers-reduced-motion: no-preference) {
    .logo:hover, .topnav-link:hover { animation: jitter 0.18s steps(2) infinite; }
}
/* Tool pages: hover is an instant hard invert, never a transition. */
.page:not(#page-home) *, .page:not(#page-home) *::before, .page:not(#page-home) *::after { transition: none !important; }
.wear-chip input:checked + span:hover, .view-btn.active:hover { background: #111; color: #fafafa; }

/* Reduced motion removes movement and keeps color feedback. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
    .skin-card:hover, .btn-optimize:hover { transform: none; }
    .toggle-track::after { transition: none; }
}
