/* ==========================================================================
   DROP BEARS: /tools/ pages
   Sits on top of db.css + mobile.css + board.css and only adds what the tools
   need: filter chips, stat deltas, sliders, result readouts and the map.
   Same rules as the rest of the site: hairlines, mono labels, ember used
   sparingly, square corners on surfaces, 8px rhythm.
   ========================================================================== */

:root {
  --good: #4FA355;
  --bad:  #E05453;
}

/* ------------------------------------------------------------ chip row -- */
/* Filter chips: text toggles, ember underline when on (matches .tabs). */
.t-chips { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); margin-bottom: var(--s4); border-bottom: 1px solid var(--line-soft); }
.t-chip {
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--mute); cursor: pointer;
  font-family: var(--mono); font-size: .75rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  min-height: 44px; padding: 0; margin-bottom: -1px;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.t-chip:hover { color: var(--bone); }
.t-chip[aria-pressed="true"], .t-chip[aria-selected="true"] { color: var(--bone); border-bottom-color: var(--ember); }
.t-chip small { color: var(--faint); font-weight: 500; margin-left: 4px; letter-spacing: .06em; }

/* -------------------------------------------------------------- toolbar -- */
.t-bar { display: grid; gap: var(--s2) var(--s3); grid-template-columns: 1fr; margin-bottom: var(--s4); }
@media (min-width: 700px) { .t-bar { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; } }
.t-bar .field { margin: 0; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.field input[type="number"] { font-variant-numeric: tabular-nums; }

/* range slider */
.t-range { display: flex; align-items: center; gap: var(--s2); min-height: 52px; }
.t-range input[type="range"] { flex: 1; accent-color: var(--ember); min-height: 0; padding: 0; border: 0; background: none; }
.t-range output { min-width: 64px; text-align: right; font-family: var(--mono); font-weight: 700; color: var(--bone); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------- table extras --- */
table.data td.t-num b { color: var(--bone); font-weight: 700; }
table.data td .t-sub { display: block; font-size: .6875rem; color: var(--faint); letter-spacing: .06em; }
table.data th button { all: unset; cursor: pointer; }
table.data th button:hover, table.data th button[aria-sort] { color: var(--bone); }
table.data th button[aria-sort]::after { content: ' ↓'; color: var(--ember); }
table.data th button[aria-sort="ascending"]::after { content: ' ↑'; }
table.data th button:focus-visible { outline: 2px solid var(--lens); outline-offset: 3px; }
table.data td.t-bar-cell { position: relative; }
table.data td.t-bar-cell i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  height: 20px; width: calc((100% - 24px) * var(--pct, 0) / 100);
  background: rgba(240, 98, 26, .22); pointer-events: none;
}
table.data td.t-bar-cell span { position: relative; }
table.data td a { color: var(--bone); text-decoration-color: var(--line); text-underline-offset: 3px; }
table.data td a:hover { color: var(--ember); }
/* dense tables: many numeric columns at 1200px */
table.data.t-tight th, table.data.t-tight td { padding: var(--s2) 12px; }
table.data.t-tight th:first-child, table.data.t-tight td:first-child { padding-left: var(--s3); }
table.data.t-tight td.name { white-space: nowrap; }
.t-class { white-space: nowrap; font-family: var(--mono); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.t-count { font-family: var(--mono); font-size: .75rem; letter-spacing: .1em; color: var(--faint); }

/* --------------------------------------------------------- stat deltas -- */
/* "-18% vertical recoil" chips. Green helps, red hurts, grey just changes. */
.t-deltas { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.t-delta {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-family: var(--mono); font-size: .75rem; letter-spacing: .04em;
  padding: 4px 8px; border: 1px solid var(--line); color: var(--soft); background: var(--ink);
  white-space: nowrap;
}
.t-delta b { font-weight: 700; font-variant-numeric: tabular-nums; }
.t-delta--good { border-color: rgba(79, 163, 85, .45); }
.t-delta--good b { color: var(--good); }
.t-delta--bad { border-color: rgba(224, 84, 83, .45); }
.t-delta--bad b { color: var(--bad); }
.t-delta--info b { color: var(--bone); }

/* ------------------------------------------------------ loadout builder -- */
.t-build { display: grid; gap: var(--s5); grid-template-columns: 1fr; }
@media (min-width: 1000px) { .t-build { grid-template-columns: 1.15fr 1fr; gap: var(--s6); align-items: start; } }
.t-slots { border-top: 1px solid var(--line); }
.t-slot { padding-block: var(--s3); border-bottom: 1px solid var(--line-soft); }
.t-slot__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); margin-bottom: var(--s1); }
.t-slot__k { font-family: var(--mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.t-slot__meta { font-family: var(--mono); font-size: .6875rem; color: var(--faint); letter-spacing: .06em; }
.t-slot .field { margin: 0 0 var(--s2); }
.t-slot .t-deltas:empty::before { content: 'No stat changes'; font-family: var(--mono); font-size: .75rem; color: var(--faint); }

.t-sum { position: relative; }
@media (min-width: 1000px) { .t-sum { position: sticky; top: 96px; } }
.t-sum__n { font-family: var(--display); font-weight: 900; font-stretch: 92%; font-size: clamp(2rem, 5vw, 3rem); line-height: .9; color: var(--bone); }
.t-sum__cls { margin-top: var(--s1); }
.t-meter { display: grid; grid-template-columns: 120px 1fr 64px; gap: var(--s2); align-items: center; padding-block: 10px; border-bottom: 1px solid var(--line-soft); }
.t-meter:first-child { border-top: 1px solid var(--line); }
.t-meter__k { font-family: var(--mono); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.t-meter__v { font-family: var(--mono); font-size: .875rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; color: var(--soft); }
.t-meter__v.good { color: var(--good); }
.t-meter__v.bad { color: var(--bad); }
/* base sits at 50%; the fill grows left (better) or right (worse) from the tick */
.t-meter__track { position: relative; height: 8px; background: var(--raise); }
.t-meter__track::after { content: ''; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--faint); }
.t-meter__fill { position: absolute; top: 0; bottom: 0; background: var(--faint); transition: left .2s var(--ease), width .2s var(--ease); }
.t-meter__fill.good { background: var(--good); }
.t-meter__fill.bad { background: var(--bad); }

.t-kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); margin-top: var(--s4); }
@media (min-width: 560px) { .t-kv { grid-template-columns: repeat(4, 1fr); } }
.t-kv > div { background: var(--ink); padding: var(--s2); }
.t-kv dt { font-family: var(--mono); font-size: .625rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.t-kv dd { margin: 4px 0 0; font-family: var(--display); font-weight: 800; font-size: 1.125rem; font-variant-numeric: tabular-nums; }

.t-share { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s4); }

/* ------------------------------------------------------------ results --- */
.t-results { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); grid-template-columns: 1fr; }
@media (min-width: 700px) { .t-results { grid-template-columns: repeat(var(--cols, 3), 1fr); } }
.t-res { background: var(--char); padding: var(--s4) var(--s3); }
.t-res__name { font-family: var(--display); font-weight: 800; font-size: 1.125rem; text-transform: uppercase; letter-spacing: .02em; }
.t-res__big { display: flex; gap: var(--s4); margin-top: var(--s3); flex-wrap: wrap; }
.t-res__big div { min-width: 96px; }
.t-res__n { font-family: var(--display); font-weight: 900; font-stretch: 92%; font-size: clamp(2.5rem, 6vw, 3.75rem); line-height: .86; color: var(--ember); font-variant-numeric: tabular-nums; }
.t-res__n small { font-size: .4em; color: var(--mute); margin-left: 2px; }
.t-res__l { font-family: var(--mono); font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-top: var(--s1); }
.t-res__d { font-size: .875rem; color: var(--soft); margin-top: var(--s3); font-family: var(--mono); letter-spacing: .02em; }
.t-res--best .t-res__name::after { content: 'FASTEST'; font-family: var(--mono); font-size: .625rem; letter-spacing: .14em; color: var(--ember); border: 1px solid var(--ember-dim); padding: 2px 6px; margin-left: var(--s2); vertical-align: 3px; }

/* chart */
.t-chart { margin-top: var(--s5); }
.t-chart svg { width: 100%; height: auto; overflow: visible; }
.t-chart text { font-family: var(--mono); font-size: 11px; fill: var(--faint); letter-spacing: .06em; }
.t-chart .grid { stroke: var(--line-soft); }
.t-chart .axis { stroke: var(--line); }
.t-legend { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); margin-top: var(--s2); font-family: var(--mono); font-size: .75rem; color: var(--soft); }
.t-legend i { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 8px; }

/* ---------------------------------------------------------------- maps -- */
.t-map { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 1000px) { .t-map { grid-template-columns: 1fr 320px; gap: var(--s5); align-items: start; } }
.t-map__view { position: relative; background: #0F100F; border: 1px solid var(--line-soft); aspect-ratio: 1 / 1; overflow: hidden; touch-action: none; }
.t-map__view svg { width: 100%; height: 100%; cursor: grab; }
.t-map__view svg:active { cursor: grabbing; }
.t-map__zoom { position: absolute; right: var(--s2); top: var(--s2); display: flex; flex-direction: column; gap: 1px; background: var(--line); }
.t-map__zoom button { width: 44px; height: 44px; border: 0; background: var(--char); color: var(--bone); font: 700 1.25rem/1 var(--display); cursor: pointer; }
.t-map__zoom button:hover { background: var(--ember); color: #0B0B10; }
.t-map__scale { position: absolute; left: var(--s2); bottom: var(--s2); font-family: var(--mono); font-size: .6875rem; color: var(--mute); letter-spacing: .08em; }
.t-map__scale i { display: block; height: 4px; border: 1px solid var(--mute); border-top: 0; margin-bottom: 4px; }
.t-map .grid { fill: none; stroke: rgba(236, 229, 216, .06); stroke-width: 1; vector-effect: non-scaling-stroke; }
.t-map .num { font-family: var(--mono); font-weight: 800; fill: var(--ember); }
.t-map__views { position: absolute; left: var(--s2); top: var(--s2); border: 0; margin: 0; background: rgba(15, 16, 15, .85); padding: 0 var(--s2); }
.t-map .bld { fill: #4A4C44; stroke: #6A6C62; stroke-width: 1; vector-effect: non-scaling-stroke; }
.t-map .zone { fill: rgba(240, 98, 26, .07); stroke: var(--ember); stroke-width: 1.5; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.t-map .zone.on { fill: rgba(240, 98, 26, .09); stroke-dasharray: none; stroke-width: 2.5; }
.t-map .zone.off { opacity: .25; }
.t-map .hot { fill: rgba(240, 98, 26, .45); stroke: #FFE3D0; stroke-width: 1; vector-effect: non-scaling-stroke; }
.t-map .safe { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.t-map .safe--a { stroke: #3E86C9; } .t-map .safe--b { stroke: #E05453; } .t-map .safe--n { stroke: var(--mute); }
.t-map .pin { stroke: #0B0B10; stroke-width: 1; vector-effect: non-scaling-stroke; }
.t-map .lbl { font-family: var(--display); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; fill: var(--bone); paint-order: stroke; stroke: #0B0B10; stroke-width: 3px; vector-effect: non-scaling-stroke; }

.t-zones { border-top: 1px solid var(--line); }
.t-zone { display: grid; grid-template-columns: 1fr auto; gap: 4px var(--s2); padding-block: var(--s2); border-bottom: 1px solid var(--line-soft); cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; color: inherit; font: inherit; }
.t-zone:hover .t-zone__n, .t-zone[aria-pressed="true"] .t-zone__n { color: var(--ember); }
.t-zone__n { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .03em; transition: color .16s var(--ease); }
.t-zone__p { font-family: var(--mono); font-weight: 700; color: var(--bone); font-variant-numeric: tabular-nums; }
.t-zone__d { grid-column: 1 / -1; font-family: var(--mono); font-size: .75rem; color: var(--faint); letter-spacing: .04em; }
.t-keys { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; gap: var(--s1); font-family: var(--mono); font-size: .75rem; color: var(--soft); }
.t-keys li { display: flex; align-items: center; gap: var(--s2); }
.t-keys svg { width: 18px; height: 18px; flex: none; }

/* ---------------------------------------------------------------- roles -- */
.t-skills { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
@media (min-width: 800px) { .t-skills { grid-template-columns: repeat(2, 1fr); } }
.t-skill { background: var(--char); padding: var(--s3); }
.t-skill h4 { font-size: 1rem; line-height: 1.25; }
.t-skill p { font-size: .875rem; color: var(--soft); margin: var(--s1) 0 0; }
.t-skill__ring { font-family: var(--mono); font-size: .625rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: var(--s1); }
.t-skill .t-deltas { margin-top: var(--s2); }
.t-xp { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); grid-template-columns: repeat(2, 1fr); margin-top: var(--s4); }
@media (min-width: 800px) { .t-xp { grid-template-columns: repeat(4, 1fr); } }
.t-xp > div { background: var(--char); padding: var(--s3); }
.t-xp .t-res__n { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.t-progress { height: 6px; background: var(--raise); margin-top: var(--s2); }
.t-progress i { display: block; height: 100%; background: var(--ember); width: calc(var(--pct, 0) * 1%); }

/* ---------------------------------------------------------------- misc --- */
.t-src { margin-top: var(--s5); padding-top: var(--s3); border-top: 1px solid var(--line-soft); }
.t-src a { color: var(--mute); }
.t-src a:hover { color: var(--ember); }
.t-cd { border-left: 2px solid var(--ember); padding: var(--s2) var(--s3); background: var(--char); margin-bottom: var(--s4); }
.t-cd p { font-size: .9375rem; color: var(--soft); margin: 0; max-width: 80ch; }
.t-hidden { display: none !important; }

/* tools hub cards reuse .cats/.cat; this is the small index number */
.cat .t-idx { font-family: var(--mono); font-size: .75rem; font-weight: 700; letter-spacing: .18em; color: var(--ember); margin-bottom: var(--s2); display: block; }

@media (max-width: 719px) {
  .t-meter { grid-template-columns: 96px 1fr 56px; }
  .t-res { padding: var(--s3) var(--s2); }
}
@media (prefers-reduced-motion: reduce) {
  .t-meter__fill { transition: none; }
}

/* ------------------------------------------------- round two additions -- */
.t-cd--warn { border-left-color: var(--wattle, #FFCD00); }
.t-cd--warn b { color: var(--wattle, #FFCD00); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: .8125rem; margin-right: 6px; }

/* hit zones and armour */
.t-armour { display: grid; gap: var(--s5); grid-template-columns: 1fr; }
.t-armour > *, .split > *, .t-build > * { min-width: 0; }
@media (min-width: 900px) { .t-armour { grid-template-columns: minmax(280px, 380px) 1fr; gap: var(--s6); align-items: start; } }
.t-body { background: var(--char); border: 1px solid var(--line-soft); padding: var(--s3); }
.t-body > svg { width: 100%; max-width: 300px; height: auto; margin: 0 auto; }
.t-body__n { font-family: var(--mono); font-size: 11px; font-weight: 700; fill: #0B0B10; paint-order: stroke; stroke: rgba(236, 229, 216, .7); stroke-width: 3px; }
.t-body .t-keys { margin-top: var(--s3); }

/* earnings: big paydays */
.t-top { margin-bottom: var(--s2); }
.t-top .fact__n { font-size: clamp(2rem, 5vw, 3rem); }

/* server meta: busy-hours heatmap */
.t-heat__tbl { border-collapse: separate; border-spacing: 2px; width: 100%; min-width: 560px; table-layout: fixed; }
.t-heat__tbl th { font-family: var(--mono); font-size: .625rem; font-weight: 500; letter-spacing: .08em; color: var(--faint); text-align: left; padding: 0 0 4px; white-space: nowrap; }
.t-heat__tbl tbody th { width: 40px; padding: 0 6px 0 0; text-transform: uppercase; }
.t-heat__tbl td { height: 22px; padding: 0; }
.t-heat__tbl td:hover { outline: 1px solid var(--bone); }
.t-facts-sm .fact__n { font-size: clamp(1.75rem, 8vw, 4rem); }
.facts > * { min-width: 0; }

/* map picture under the zones, when the site has one */
.t-map svg.has-img .bld { display: none; }
.t-map svg.has-img .zone { fill: rgba(240, 98, 26, .10); }
.t-map svg.has-img .grid { stroke: rgba(236, 229, 216, .10); }
.t-map .mapimg { image-rendering: auto; }

/* ------------------------------------------------ visual gunsmith ------ */
.t-rackwrap { margin-bottom: var(--s5); }
.t-rackwrap .t-chips { margin-bottom: var(--s2); }
.t-rack { display: flex; gap: 1px; overflow-x: auto; background: var(--line-soft); border: 1px solid var(--line-soft); scroll-snap-type: x proximity; }
.t-gun { flex: 0 0 148px; display: grid; gap: 6px; justify-items: center; align-content: center; padding: var(--s2) var(--s1);
  background: var(--char); border: 0; border-bottom: 2px solid transparent; color: var(--soft); cursor: pointer; scroll-snap-align: start;
  font-family: var(--mono); font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; transition: background .16s var(--ease); }
.t-gun img { width: 120px; height: 48px; object-fit: contain; filter: grayscale(.35) brightness(.85); transition: filter .16s var(--ease); }
.t-gun:hover { background: var(--steel); color: var(--bone); }
.t-gun:hover img, .t-gun[aria-pressed="true"] img { filter: none; }
.t-gun[aria-pressed="true"] { background: var(--raise); color: var(--bone); border-bottom-color: var(--ember); }
.t-gunsel { margin: var(--s2) 0 0; max-width: 320px; }
.t-gunsel label { font-size: .625rem; }
.t-gunsel select { min-height: 44px; }

.t-hero { position: relative; background: radial-gradient(ellipse 70% 60% at 50% 55%, #26281F 0, var(--char) 70%); border: 1px solid var(--line-soft);
  aspect-ratio: 16 / 7; display: grid; place-items: center; overflow: hidden; }
.t-hero::after { content: ''; position: absolute; left: 8%; right: 8%; bottom: 18%; height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.t-hero__img { width: 84%; height: 72%; display: grid; place-items: center; }
.t-hero__img img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .55)); }
.t-hero { padding-top: 64px; }
.t-lotw-hero { padding-top: 0; aspect-ratio: 16 / 5; }
.t-hero__cap { position: absolute; left: var(--s3); top: var(--s2); }
.t-hero__n { font-size: clamp(1.75rem, 4vw, 2.75rem); margin-top: 4px; }

.t-slotrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-top: 0; }
.t-slottile { display: grid; grid-template-rows: auto 64px auto; gap: 6px; padding: var(--s2); text-align: left; cursor: pointer;
  background: var(--ink); border: 0; border-top: 2px solid transparent; color: var(--bone); transition: background .16s var(--ease); }
.t-slottile:hover { background: var(--char); }
.t-slottile.is-open { background: var(--char); border-top-color: var(--ember); }
.t-slottile__k { font-family: var(--mono); font-size: .625rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.t-slottile__img { display: grid; place-items: center; }
.t-slottile__img img { max-width: 100%; max-height: 64px; object-fit: contain; }
.t-slottile__img i { font-style: normal; font-family: var(--display); font-size: 1.75rem; color: var(--faint); width: 44px; height: 44px; border: 1px dashed var(--line); display: grid; place-items: center; }
.t-slottile__n { font-size: .8125rem; line-height: 1.25; }
.t-slottile.is-empty .t-slottile__n { color: var(--faint); }

.t-picker { margin-top: var(--s4); }
.t-picker:empty { display: none; }
.t-picker__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); margin-bottom: var(--s2); }
.t-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.t-card { display: grid; align-content: start; gap: var(--s1); padding: var(--s2); text-align: left; cursor: pointer;
  background: var(--char); border: 0; border-left: 2px solid transparent; color: var(--bone); transition: background .16s var(--ease); }
.t-card:hover { background: var(--steel); }
.t-card[aria-pressed="true"] { background: var(--raise); border-left-color: var(--ember); }
.t-card__img { height: 72px; display: grid; place-items: center; background: radial-gradient(ellipse at center, #26281F, transparent 70%); }
.t-card__img img { max-width: 90%; max-height: 68px; object-fit: contain; }
.t-card__img i { font-style: normal; color: var(--faint); font-size: 1.5rem; }
.t-card__n { font-family: var(--display); font-weight: 800; font-size: .9375rem; line-height: 1.2; }
.t-card__m { font-family: var(--mono); font-size: .6875rem; color: var(--faint); letter-spacing: .04em; }
.t-card .t-deltas { margin-top: 2px; }
.t-card .t-delta { font-size: .6875rem; padding: 2px 6px; }

.t-fitted { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s2); }
.t-fitted span { width: 52px; height: 40px; display: grid; place-items: center; background: var(--ink); border: 1px solid var(--line); }
.t-fitted img { max-width: 46px; max-height: 34px; object-fit: contain; }

/* pictures elsewhere */
table.data td .t-thumb { display: inline-block; width: 72px; height: 26px; object-fit: contain; vertical-align: middle; margin-right: 10px; }
.t-lotw-hero { margin-bottom: var(--s4); }
@media (max-width: 719px) {
  .t-hero { aspect-ratio: 4 / 3; }
  .t-gun { flex-basis: 116px; } .t-gun img { width: 96px; height: 40px; }
  table.data td .t-thumb { width: 48px; margin-right: 6px; }
}

.t-res__img { display: block; height: 44px; max-width: 220px; object-fit: contain; margin-top: var(--s2); }

/* armour page: the real kit pictures */
.t-kitrow { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); margin-bottom: var(--s3); }
.t-kit { display: grid; justify-items: center; gap: 2px; padding: var(--s2); background: radial-gradient(ellipse at 50% 40%, #2A2B26, var(--ink) 75%); text-align: center; }
.t-kit img { height: 96px; max-width: 100%; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0,0,0,.5)); }
.t-kit__n { font-family: var(--display); font-weight: 800; font-size: .875rem; }
.t-kit__m { font-family: var(--mono); font-size: .6875rem; color: var(--mute); letter-spacing: .04em; }

/* checkbox toggle (vehicles: Infantry mode only) */
.t-check { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; cursor: pointer; font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--bone); }
.t-check input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 0; border: 1px solid var(--line); background: var(--ink); display: grid; place-items: center; cursor: pointer; }
.t-check input::after { content: ''; width: 12px; height: 12px; background: var(--ember); transform: scale(0); transition: transform .12s var(--ease); }
.t-check input:checked { border-color: var(--ember); }
.t-check input:checked::after { transform: scale(1); }
.t-check input:focus-visible { outline: 2px solid var(--lens); outline-offset: 3px; }
.t-checkrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); margin-bottom: var(--s2); }

/* mortar calculator */
.t-mortar .cover { fill: none; stroke: rgba(236, 229, 216, .25); stroke-dasharray: 8 6; stroke-width: 1; vector-effect: non-scaling-stroke; }
.t-mortar .ring { fill: none; stroke: rgba(79, 163, 85, .7); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.t-mortar .line { stroke: var(--ember); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.t-mortar .line.old { stroke: rgba(236, 229, 216, .45); stroke-width: 1.5; stroke-dasharray: 6 5; }
.t-mortar .zone { fill: none; stroke: rgba(240, 98, 26, .5); }
.t-mortar svg { cursor: crosshair; }
.t-mortar__facts { grid-template-columns: repeat(2, 1fr) !important; }
.t-mortar__facts .fact { padding: var(--s3) var(--s2); }
.t-mortar__facts .fact__n { font-size: clamp(1.5rem, 2.6vw, 2.25rem); white-space: nowrap; }

/* equipment, building, rewards */
.t-section { font-size: 1.25rem; margin: var(--s5) 0 var(--s2); display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }
.t-section .t-count { font-family: var(--mono); font-size: .6875rem; color: var(--faint); font-weight: 400; letter-spacing: .04em; }
.t-cards--gear { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.t-card--static { cursor: default; }
.t-card--static:hover { background: var(--char); }
.t-bullets { margin: 2px 0 0; padding-left: 1.1em; font-size: .8125rem; line-height: 1.4; color: var(--soft); }
.t-bullets li + li { margin-top: 2px; }
.t-card__unlock { color: var(--ember); }
.t-skin__set { font-family: var(--mono); font-size: .625rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.t-skin--hero { border-left-color: var(--ember); background: var(--raise); }
.t-skin--hero:hover { background: var(--raise); }
.t-gold { font-size: .8125rem; color: var(--soft); }
.t-gold b { color: #E8B931; font-family: var(--display); font-size: 1rem; }
.t-ach { width: 36px; height: 36px; display: grid; place-items: center; background: var(--ink); border: 1px solid var(--line); color: #E8B931; font-size: 1.1rem; }

/* tier list */
.t-tiers { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.t-tier { display: grid; grid-template-columns: 64px minmax(0, 1fr); background: var(--char); }
.t-tier__l { display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 2rem; color: var(--ink); }
.t-tier--s .t-tier__l { background: var(--ember); }
.t-tier--a .t-tier__l { background: #E8B931; }
.t-tier--b .t-tier__l { background: #9FB06B; }
.t-tier--c .t-tier__l { background: #6E7180; }
.t-tier__guns { display: flex; flex-wrap: wrap; gap: 6px; padding: var(--s2); min-width: 0; }
.t-tier__gun { display: grid; justify-items: center; gap: 2px; width: 104px; padding: 6px 4px; background: var(--ink); border: 1px solid var(--line); color: var(--bone); text-decoration: none; text-align: center; }
.t-tier__gun:hover { border-color: var(--ember); }
.t-tier__gun img { width: 92px; height: 34px; object-fit: contain; }
.t-tier__gun span { font-size: .75rem; font-weight: 700; line-height: 1.15; }
.t-tier__gun small { font-family: var(--mono); font-size: .625rem; color: var(--faint); }
@media (max-width: 560px) { .t-tier { grid-template-columns: 44px minmax(0, 1fr); } .t-tier__gun { width: calc(50% - 3px); } }
@media (max-width: 560px) { .t-cards--gear { grid-template-columns: repeat(2, minmax(0, 1fr)); } .t-cards--gear .t-bullets { font-size: .75rem; } }

/* --- tools hub (Joel, 2026-10-19): grouped cards that lead with a real
   number from the game files, plus the loadout of the week band. --- */
.t-hub { padding-top: var(--s6); }
.t-week {
  display: grid; gap: var(--s4); align-items: end;
  padding: var(--s5) var(--s4); background: var(--char);
  border: 1px solid var(--line-soft); border-left: 4px solid var(--ember);
  text-decoration: none; color: inherit; transition: background .16s var(--ease);
}
.t-week:hover { background: var(--steel); }
@media (min-width: 900px) { .t-week { grid-template-columns: 1.2fr 1.4fr auto; padding: var(--s6) var(--s5); gap: var(--s5); } }
.t-week__h { font-size: clamp(2rem, 4.4vw, 3.5rem); line-height: 1; }
.t-week__p { color: var(--mute); margin: var(--s2) 0 0; max-width: 42ch; }
.t-week__nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin: 0; }
.t-week__nums dt { font-family: var(--mono); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.t-week__nums dd { margin: 6px 0 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1; color: var(--ember); font-variant-numeric: tabular-nums; }
.t-week__go { font-family: var(--mono); font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--bone); white-space: nowrap; padding-block: var(--s1); border-bottom: 2px solid var(--ember); justify-self: start; }

.t-group { margin-top: var(--s6); }
.t-group__h { display: flex; align-items: center; gap: var(--s3); font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: var(--s3); }
.t-group__h::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.t-cards { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); grid-template-columns: 1fr; }
@media (min-width: 640px) { .t-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .t-cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.t-card { display: flex; flex-direction: column; background: var(--char); padding: var(--s4); text-decoration: none; color: inherit; transition: background .16s var(--ease); }
.t-card:hover { background: var(--steel); }
.t-card__n { font-family: var(--display); font-weight: 800; font-size: clamp(2.5rem, 4vw, 3.5rem); line-height: 1; font-variant-numeric: tabular-nums; color: var(--bone); transition: color .16s var(--ease); }
.t-card:hover .t-card__n { color: var(--ember); }
.t-card__u { font-family: var(--mono); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-top: var(--s1); }
.t-card h3 { font-size: 1.1875rem; margin-top: var(--s4); }
.t-card h3::after { content: ' →'; color: var(--ember); opacity: 0; transition: opacity .16s var(--ease); }
.t-card:hover h3::after { opacity: 1; }
.t-card p { font-size: .9375rem; color: var(--mute); margin: var(--s2) 0 0; }
.t-hub .t-src { margin-top: var(--s5); }
@media (max-width: 559px) { .t-week__nums { gap: var(--s2); } .t-week__nums dd { font-size: 1.375rem; } }

/* dark scrollbars on horizontal scrollers (the gun rack, wide tables) */
.t-rack, .tablewrap { scrollbar-color: var(--line) transparent; scrollbar-width: thin; }
.t-rack::-webkit-scrollbar, .tablewrap::-webkit-scrollbar { height: 6px; }
.t-rack::-webkit-scrollbar-track, .tablewrap::-webkit-scrollbar-track { background: transparent; }
.t-rack::-webkit-scrollbar-thumb, .tablewrap::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

/* Where the numbers come from (Joel: make it obvious which stats are ours).
   Orange = live from the Drop Bears servers. Grey = the game files. */
.t-origin { display: inline-flex; align-items: center; gap: 10px; margin: var(--s4) 0 0; padding: 7px 12px; border: 1px solid var(--line); font-family: var(--mono); font-size: .75rem; letter-spacing: .04em; color: var(--mute); line-height: 1.4; }
.t-origin i { flex: none; width: 9px; height: 9px; border: 1.5px solid var(--faint); }
.t-origin--server { border-color: var(--ember); color: var(--bone); }
.t-origin--server i { background: var(--ember); border-color: var(--ember); }
.t-week .t-origin { margin-top: var(--s3); }
.t-card__src { margin-top: auto; padding-top: var(--s3); font-family: var(--mono); font-size: .6875rem; letter-spacing: .08em; color: var(--faint); display: flex; align-items: center; gap: 8px; }
.t-card__src::before { content: ''; width: 7px; height: 7px; border: 1.5px solid var(--faint); }

.t-group__h--week { margin-top: 0; }

/* Live stats from our players, orange, top of every tools page */
.t-srv { margin-bottom: var(--s5); padding: var(--s4); background: var(--char); border: 1px solid var(--ember-dim, var(--line)); border-left: 4px solid var(--ember); }
@media (min-width: 900px) { .t-srv { padding: var(--s5); } }
.t-srv .t-origin { margin-top: 0; }
.t-srv__h { font-size: clamp(1.375rem, 2.4vw, 2rem); margin: var(--s3) 0 var(--s3); }
.t-srv__nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin: 0; }
@media (min-width: 720px) { .t-srv__nums { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.t-srv__nums dt { font-family: var(--mono); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.t-srv__nums dd { margin: 6px 0 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1; color: var(--ember); font-variant-numeric: tabular-nums; }
.t-srv__line { margin: var(--s4) 0 0; color: var(--bone); max-width: 60ch; }
.t-srv__line a { color: var(--ember); }
.t-srv__h3 { font-size: 1.125rem; margin: var(--s5) 0 var(--s2); }
.t-srv__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.t-srv__list li { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr auto; gap: var(--s2); align-items: center; }
.t-srv__n a, .t-srv__n span { color: var(--bone); font-weight: 700; text-decoration: none; }
.t-srv__n a:hover { color: var(--ember); }
.t-srv__bar { height: 8px; background: var(--line-soft); }
.t-srv__bar i { display: block; height: 100%; background: var(--ember); }
.t-srv__v { font-family: var(--mono); font-size: .8125rem; color: var(--mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 559px) { .t-srv__list li { grid-template-columns: 1fr auto; } .t-srv__bar { grid-column: 1 / -1; order: 3; } }

/* Members-only gate on the loadout tools (served by _middleware.js) */
.t-gate { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); counter-reset: gate; }
@media (min-width: 760px) { .t-gate { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.t-gate li { background: var(--char); padding: var(--s5) var(--s4); counter-increment: gate; }
.t-gate li::before { content: counter(gate); display: block; font-family: var(--display); font-weight: 800; font-size: 3rem; line-height: 1; color: var(--ember); margin-bottom: var(--s3); }
.t-gate h2 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); }
.t-gate p { color: var(--mute); margin: var(--s2) 0 var(--s4); max-width: 40ch; }

/* Sign-in pop-up on members-only pages (served by _middleware.js) */
.t-signin { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; overflow-y: auto; background: rgba(8, 8, 12, .86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.t-signin__card { width: 100%; max-width: 440px; text-align: center; background: var(--char); border: 1px solid var(--line); border-top: 4px solid var(--ember); padding: var(--s5) var(--s4) var(--s4); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.t-signin__logo { width: 140px; height: 140px; margin: 0 auto; display: block; border-radius: 50%; }
.t-signin__brand { font-family: var(--display); font-weight: 800; font-size: 1.125rem; letter-spacing: .12em; text-transform: uppercase; margin: var(--s2) 0 0; color: var(--bone); }
.t-signin__h { font-size: clamp(1.5rem, 4.5vw, 2rem); line-height: 1.1; margin: var(--s3) 0 0; }
.t-signin__p { color: var(--mute); margin: var(--s2) auto 0; max-width: 34ch; }
.t-signin__steam { display: flex; justify-content: center; width: 100%; margin-top: var(--s4); min-height: 48px; align-items: center; }
.t-signin__alt { display: inline-block; margin-top: var(--s3); color: var(--ember); font-weight: 700; padding: 8px; }
.t-signin__note { font-size: .8125rem; color: var(--faint); margin: var(--s2) auto 0; max-width: 36ch; }
.t-signin__back { display: inline-block; margin-top: var(--s3); font-family: var(--mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); padding: 8px; }
.t-week__meta { margin: var(--s3) 0 0; } .t-week__meta a { color: var(--ember); font-weight: 700; } .t-week__meta a::after { content: " \2192"; }
.t-own { margin-top: var(--s6); padding: var(--s5) var(--s4); background: var(--char); border: 1px solid var(--line-soft); border-top: 4px solid var(--ember); }
.t-own h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
.t-own p { color: var(--mute); max-width: 58ch; margin: var(--s2) 0 var(--s4); }
