/* cyrillic */
@font-face {
  font-family: 'Exo 2';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(/assets/fonts/exo2-cyrillic.46d63ddf50.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Exo 2';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(/assets/fonts/exo2-latin.e5c082e035.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Exo 2';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(/assets/fonts/exo2-latin-ext.9ad8e9d980.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Boom Arsenal -- chromatic dark, card-first.
   Ground, surface and raised panels step up in lightness with a blue bias
   (all three sit near hue 230) instead of neutral grey/black; a hairline
   border does the rest of the separation, so depth reads as layering, not
   shadow. Two accents split by job -- warm --accent for value/emphasis,
   cool --link for anything interactive -- plus a --rarity-* scale that is
   its own axis, never an alias of --accent. Dark is the only world this
   page ships: no prefers-color-scheme block, no [data-theme] override.
   Every colour anywhere below is a token defined once in :root. */
:root {
  --bg: #0f1428;
  --bg-rgb: 15, 20, 40;   /* the ground at low alpha: glass over art, the sticky bar */
  --scrim-rgb: 8, 11, 24; /* a shade darker than the ground: over pictures, behind the lightbox */
  --surface: #161c36;
  --raised: #1f2747;
  --line: #2c3560;
  --line-soft: #252d55;   /* rules between the builder tree's columns */
  --line-strong: #626c93; /* a control's rim on hover, the compare box's rim; 3.55:1, not for text */
  --line-hover: #3a4370;  /* scrollbar thumb on hover, an off hex node's rim */
  --sunken: #1a2140;      /* closed and inactive: a locked builder tile, a tree node's fill */
  --hover: #232c50;       /* a builder card's ground under the pointer */
  --ink: #eef0f8;
  --ink-rgb: 238, 240, 248;
  --dim: #98a2c8;
  --faint: #8b97c0;

  --accent: #f7a21b;      /* warm: value, emphasis, the top rarity's kin */
  --accent-rgb: 247, 162, 27;
  --link: #36d1ff;        /* cool: interactive -- links, controls, focus */
  --link-rgb: 54, 209, 255;
  --brand: #7b2ff2;       /* primary button, wordmark rule; never as text -- 2.45:1 */
  --pos: #b8ec1e;
  --pos-rgb: 184, 236, 30;
  --neg: #ff5c5c;
  --neg-rgb: 255, 92, 92;
  --warn: #f9e21c;
  --level: #e8207c;       /* level accents on the dark page (the tooltip's lock line) */
  --level-rgb: 232, 32, 124;
  --level-fill: #d81b72;  /* the level badge's fill: white 14px on it is 4.87:1, on --level 4.26 */
  --on-fill: #fff;        /* text on a solid fill (--brand, --level-fill) or on a picture */
  --node: #7b5cff;        /* a tech node's ring until its maker's colour is set */
  --node-ring: #c9d2f2;   /* the rim of a shared (hex) tech node */

  /* Rarity is its own ascending scale, independent of --accent and of
     --link -- blue -> violet -> gold, the handoff's values. Rare used to be
     the link cyan, which made every rare tank's name read as a link. The
     build ships three tiers on tanks; Common stays only as a fallback.
     -rgb siblings exist so chip/hero backgrounds can tint at low alpha
     instead of a solid fill. */
  --rarity-common: #98a2c8;
  --rarity-common-rgb: 152, 162, 200;
  --rarity-rare: #4f8ef7;
  --rarity-rare-rgb: 79, 142, 247;
  --rarity-superrare: #b06cff;
  --rarity-superrare-rgb: 176, 108, 255;
  --rarity-supersuperrare: #f7a21b;
  --rarity-supersuperrare-rgb: 247, 162, 27;

  /* Exo 2, inlined as a data: URI by render.py's font_faces() -- the Artifact
     host's CSP blocks font CDNs, so a <link> would give Vercel the typeface
     and the artifact the system fallback. Not the mockup's Saira: Saira has
     no Cyrillic at all, and on a Russian page that sets 'DPS' in Saira and
     'Прочность' in the system font beside it. ui-monospace still carries the
     figures. */
  --font: 'Exo 2', ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
}
/* Exo 2 has no CJK at all, and no one face covers all twelve languages and
   looks like it. For Japanese, Korean and Chinese the page adds Noto Sans
   of that script (app.js CJK_FONTS, loaded on first pick) behind Exo 2:
   Latin and digits stay Exo 2, the ideographs come from Noto. */
:root:lang(ja) { --font: 'Exo 2', 'Noto Sans JP', ui-sans-serif, system-ui, sans-serif; }
:root:lang(ko) { --font: 'Exo 2', 'Noto Sans KR', ui-sans-serif, system-ui, sans-serif; }
:root:lang(zh-Hans) { --font: 'Exo 2', 'Noto Sans SC', ui-sans-serif, system-ui, sans-serif; }
:root:lang(zh-Hant) { --font: 'Exo 2', 'Noto Sans TC', ui-sans-serif, system-ui, sans-serif; }
:root {

  --radius: 4px;      /* cards, panels, art bands */
  --radius-sm: 3px;     /* controls -- buttons, selects, tags */
  --radius-md: 6px;     /* the builder's icon tiles, enhancement buttons, hero arrows */
  --radius-lg: 8px;     /* panels, the tank hero, catalogue rows, empty states */
  --radius-pill: 999px; /* chips */
  --ease: .16s ease;
  --shadow-lift: 0 14px 28px -16px rgba(0, 0, 0, .6);
  --shadow-tip: 0 14px 32px -12px rgba(0, 0, 0, .75);
  --ring-on: 0 0 0 3px rgba(var(--link-rgb), .18); /* the halo of a picked tile */

  /* Layers. 2 and 3 stay literal: they only order siblings inside one
     component (a card, the hero, a stuck table head over its own cells). */
  --z-raise: 1;   /* over a card's own art */
  --z-sticky: 5;  /* the top bar, the builder's totals bar */
  --z-scrim: 25;  /* behind the open drawer */
  --z-menu: 30;   /* drawer, tank picker, sort menu */
  --z-tip: 40;    /* tooltips */
  --z-modal: 60;  /* the lightbox */

  /* Control heights: 44 is the touch minimum on a phone. */
  --ctl-sm: 32px;
  --ctl: 36px;
  --ctl-lg: 40px;
  --ctl-xl: 44px;

  /* Spacing is plain px on the scale 0 2 4 6 8 10 12 14 16 20 24 28 32 40 48
     56 64; only spacings with a role that must move together are tokens. */
  --gutter: 16px;          /* the page's side margin, phone included */
  --panel-pad: 16px 20px;  /* inside a panel */
  --panel-gap: 14px;       /* between blocks inside a panel */
  --stack-gap: 16px;       /* between panels and cards */
  --bar-clear: 72px;       /* below the sticky top bar: what stops under it */

  /* Type sizes with a role; the rest are plain numbers on the scale
     (10 11 12 13 14 15 16 18 20 22 24 32 40 48 56; 19 only for the wordmark). */
  --fs-hero: 56px;     /* the tank's name */
  --fs-section: 32px;  /* a page's title */
  --fs-group: 24px;    /* a section's title */
  --fs-figure: 22px;   /* a big number in a stat block */
  --fs-wordmark: 19px; /* the brand in the top bar */
}

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

/* The page may be embedded by a host that composites its own ground behind
   a transparent body -- painting --bg explicitly here means this page never
   borrows someone else's background. */
/* The prerendered page is short and hidden (render.PRE_STYLE) until app.js
   draws the real one. Without these the footer sat inside the first screen
   and jumped out of it, and the scrollbar the long page brings moved
   everything 7 px left: CLS 0.97 on desktop. The view is a screen tall
   from the start, and the scrollbar's room is kept whether it shows or not. */
html { background: var(--bg); scrollbar-gutter: stable; scroll-padding-top: var(--bar-clear); }
main#view { min-height: 100vh; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.5; }

h1, h2, h3 { text-wrap: balance; }

/* ---------------------------------------------------------------- topbar */
/* The bar itself is full-bleed -- its background and the accent rule reach
   both edges -- but what is in it lines up with the page column below, so
   the wordmark sits above the section title rather than out at the window
   edge. Same max-width and gutter as main. */
.topbar {
  border-bottom: 1px solid var(--line); background: var(--surface);
  /* Stays at the top while the page scrolls (Mikhail, 2026-11-05). What
     else sticks keeps clear of it: the builder's side column (--bar-clear),
     a long table's head (stickyPaint in shell.js), a jump to ?at= (route.js),
     and focus moved by the keyboard (scroll-padding-top on html). */
  position: sticky; top: 0; z-index: var(--z-sticky);
}
.topbar__inner {
  max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); min-height: 56px;
  display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
}
.brand {
  color: var(--ink); text-decoration: none;
  letter-spacing: .01em; font-weight: 800; font-style: italic; font-size: var(--fs-wordmark);
}
.ctl { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--dim); }
input[type="range"] { accent-color: var(--accent); }
#level-out {
  font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent);
  background: rgba(var(--accent-rgb), .14); border-radius: var(--radius-sm);
  min-width: 1.4em; padding: 2px 8px; display: inline-block; text-align: center;
}
/* Lang and view are both two-button toggle groups, same shape, different
   job -- kept as one rule set. Selected state is a --link-tinted translucent
   panel (~14% alpha) rather than a solid fill, per the page's panel
   language; --link because a toggle is an interactive control, not a value. */
.lang, .view { gap: 6px; }
.view button {
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
  border: 1px solid var(--line); background: transparent; color: var(--dim);
  padding: 6px 8px; cursor: pointer; font: inherit; font-size: 12px;
  border-radius: var(--radius-sm);
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.view button svg { display: block; fill: currentColor; }
/* Language list: a native <select> dressed as the bar's controls -- twelve
   languages do not fit as buttons, and the native list is keyboard- and
   touch-ready on every platform. */
/* The language switch: a button like "Sort by" with the page's own list
   (popList); a globe in front says "language" before any name is read. */
.ctl.lang { position: relative; }
.lang-btn { height: var(--ctl); font-size: 12px; } /* level with Compare beside it */
.lang-btn .lang-globe { flex: none; fill: none; stroke: currentColor; stroke-width: 1.3; }
.lang-btn__name { color: var(--ink); }
.lang-btn[aria-expanded="true"] .filters__chev { transform: rotate(180deg); }
.sort-ctl__menu.sort-ctl__menu--end { left: auto; right: 0; }
.sort-ctl__menu.sort-ctl__menu--up { top: auto; bottom: calc(100% + 6px); max-height: 60vh; overflow-y: auto; }
.view button.on {
  background: var(--link); border-color: var(--link); color: var(--bg);
}
.view button:hover:not(.on) { color: var(--ink); border-color: var(--dim); }

/* Footer on every page, in two zones as the redesign mockup has it: who runs
   the site (and the Player Content Policy notice) on the left, aligned with
   the page column; the game's store links on the right as secondary buttons.
   On a phone the buttons come first, the text under them. */
.site-foot {
  max-width: 1320px; margin: 48px auto 0; padding: 24px var(--gutter) 32px;
  border-top: 1px solid var(--line); color: var(--faint); font-size: 12px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: start;
}
.site-foot__about { display: flex; flex-direction: column; gap: 6px; max-width: 72ch; min-width: 0; }
.site-foot__about p { margin: 0; }
.site-foot__line { color: var(--dim); }

/* The game's store links, in the footer: secondary buttons, --link text. */
.play__label { color: var(--dim); }
.site-foot__play {
  margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  justify-content: flex-end; font-size: 12px;
}
.site-foot__play .play__label { width: 100%; text-align: right; }
.play__link {
  display: inline-flex; align-items: center; min-height: var(--ctl-lg); padding: 0 14px;
  color: var(--link); font-size: 13px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.play__link:hover { background: var(--raised); border-color: var(--faint); }
.play__link:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
@media (max-width: 600px) {
  .site-foot { grid-template-columns: minmax(0, 1fr); }
  .site-foot__play { order: -1; justify-content: flex-start; }
  .site-foot__play .play__label { text-align: left; }
  .play__link { min-height: var(--ctl-xl); flex: 1 1 0; justify-content: center; }
}

/* ------------------------------------------------------------ page frame */
main {
  container: page / inline-size;
  max-width: 1320px; margin: 0 auto; padding: 20px var(--gutter);
  display: flex; flex-direction: column; gap: 20px; min-width: 0;
}
.foot {
  max-width: 1320px; margin: 0 auto; padding: 24px var(--gutter) 40px;
  color: var(--faint); font-size: 12px; border-top: 1px solid var(--line);
}

/* ---------------------------------------------------------------- app bar
   Wordmark, section tabs, compare pill, language. Only what is true on every
   section: the level slider and the roster's view toggle moved into the
   section header, next to the thing they act on. */
.brand span { color: var(--link); }

/* A hairline of the two accents under the app bar. The one ornament on the
   page: it marks where the chrome ends without costing a rule's worth of
   contrast anywhere text has to be read. */
/* The rule sits on the TOP edge, as in the mockup -- it reads as the page's
   own edge rather than as an underline for the tabs, which have their own. */
.topbar::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--link) 50%, var(--pos));
}

.tabs { display: flex; gap: 0; flex-wrap: wrap; align-self: stretch; }
/* Per the handoff: tabs as tall as the bar (padding 0 10px, was 12 -- the
   row has to fit one line, see below); the active one
   is marked by a 2px rule along the bar's bottom edge across the whole tab
   (inset 0 -2px 0 0), not by an underline under the word. */
.tabs a {
  display: flex; align-items: center; padding: 0 10px; white-space: nowrap;
  color: var(--dim); text-decoration: none;
  font-size: 14px; font-weight: 600; font-style: italic;
  text-transform: uppercase; letter-spacing: .02em;
  transition: color var(--ease), box-shadow var(--ease);
}
.tabs a:hover { color: var(--ink); }
/* Section glyphs: the phone drawer only (shown under 1100px below). */
.tabs .nav-ico { display: none; flex: none; }
.tabs a.on { color: var(--ink); box-shadow: inset 0 -2px 0 0 var(--link); }

.topbar__right { margin-left: auto; display: flex; gap: 12px; align-items: center; }

/* A wide window: the tabs stay one row so the sticky bar stays one row. What
   does not fit scrolls sideways (shell.js: fades, wheel, the current section
   in view) -- a long language at 1101-1250px; English fits from 1101. */
@media (min-width: 1101px) {
  .topbar__inner { flex-wrap: nowrap; gap: 20px; }
  .brand, .topbar__right { flex: none; }
  .tabs {
    flex-wrap: nowrap; min-width: 0; overflow-x: auto;
    scrollbar-width: none; scroll-padding-inline: 32px;  /* focus clears the fades */
  }
  .tabs::-webkit-scrollbar { display: none; }
  /* Inside the scrolling row an outside ring would be clipped. */
  .tabs a:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
  .tabs--after { mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); }
  .tabs--before { mask-image: linear-gradient(90deg, transparent, #000 32px); }
  .tabs--before.tabs--after {
    mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent);
  }
}

/* The handoff's secondary button at header height (34px there; 36 = --ctl
   since 2026-11-05, the control scale), radius 4, with a
   20px count pill. The label keeps the page's own small caps, not the
   spec's 14px italic -- the user's call (2026-10-03). */
.cmp-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: var(--ctl); padding: 0 10px 0 14px; border-radius: var(--radius);
  border: 1px solid rgba(var(--link-rgb), .5); color: var(--link);
  text-decoration: none; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; line-height: 1;
  transition: background var(--ease), border-color var(--ease);
}
.cmp-pill:hover { background: rgba(var(--link-rgb), .12); }
.cmp-pill.on, .cmp-pill:active { background: rgba(var(--link-rgb), .22); }
.cmp-pill__n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px 2px; border-radius: var(--radius-sm);
  background: var(--link); color: var(--bg); line-height: 1;
  font-size: 11px; font-weight: 700; font-style: normal; font-variant-numeric: tabular-nums;
}
/* Nothing ticked: still reachable, just not shouting a zero. */
.cmp-pill--empty { border-color: rgba(var(--link-rgb), .4); color: var(--dim); }
/* Zero is muted the way a disabled favourites button is. */
.cmp-pill--empty .cmp-pill__n { opacity: .45; }

/* ---------------------------------------------------------- section head */
.sect { display: flex; flex-direction: column; gap: 6px; }
.sect__line { display: flex; flex-wrap: wrap; gap: 16px; align-items: baseline; }
/* A section's glyph from the bar before its title, at the height of its
   letters, in the title's colour (the bar hides .nav-ico on a desktop;
   this one always shows). */
.sect__title .sect__ico { display: inline-block; width: .9em; height: .9em; vertical-align: -.08em; margin-right: .35em; color: var(--ink); }
.sect__title {
  margin: 0; font-size: var(--fs-section); font-weight: 800; font-style: italic;
  letter-spacing: -.01em; text-transform: uppercase; color: var(--ink);
}
/* Two thirds of the title's cap height, measured off the mockup rather than
   guessed -- at the size it was, the count read as a footnote instead of as
   part of the heading. */
.sect__count {
  margin-left: 8px; font-size: 20px; font-weight: 700; font-style: normal;
  font-family: var(--mono); color: var(--faint); letter-spacing: 0;
}
.sect__sub { margin: 0; color: var(--dim); font-size: 13px; max-width: 70ch; }
.sect__controls { margin-left: auto; display: flex; gap: 16px; align-items: center; }

/* The level control reads as one object: bordered, label in caps, value in
   an accent badge -- so the number you are looking at is the loudest thing
   in the group rather than a bare digit beside a slider. */
.ctl--level {
  gap: 10px; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px 12px; background: var(--surface);
}
.ctl__label {
  font-size: 11px; font-weight: 600; color: var(--dim);
  text-transform: uppercase; letter-spacing: .06em;
}
/* Handoff: 34x26, radius 3, 14px/700 tabular, always two digits ('08'). */
.level-badge {
  font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700;
  font-size: 14px; line-height: 1; color: var(--on-fill); background: var(--level-fill);
  border-radius: var(--radius-sm); min-width: 34px; height: 26px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
/* The slider runs in the interactive colour, not the value colour: it is a
   control, and --accent is reserved for figures. */
.ctl--level input[type="range"] { accent-color: var(--link); width: 140px; margin: 0; }
/* In the tank page's Characteristics header the handoff gives it 160px. */
.panel__head .ctl--level input[type="range"] { width: 160px; }

/* ------------------------------------------------------------- filters */
.filters-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px; border-radius: var(--radius-lg);
}
.filters__top, .filters__facets { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; }
.filters__reset { margin-left: auto; }
.filters__facets[hidden] { display: none; }
/* The fold button sits beside the search box at its height. */
.filters__toggle {
  display: inline-flex; align-items: center; gap: 8px; height: var(--ctl); padding: 0 12px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--dim);
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; transition: color var(--ease), border-color var(--ease), background var(--ease);
}
.filters__toggle:hover { color: var(--ink); border-color: var(--faint); background: var(--raised); }
.filters__toggle[aria-expanded="true"], .filters__toggle--on { color: var(--link); border-color: var(--link); }
.filters__chev { transition: transform var(--ease); }
.filters__toggle[aria-expanded="true"] .filters__chev { transform: rotate(180deg); }
.filters__count {
  /* Counters are small squares in one colour, here and in the compare pill.
     The 2px at the bottom lifts the figure to the optical centre: Exo 2 sets
     digits about 1px low in a centred line box. */
  min-width: 20px; height: 20px; padding: 0 6px 2px; border-radius: var(--radius-sm); line-height: 1;
  background: var(--link); color: var(--bg); font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.search-box { position: relative; display: flex; align-items: center; }
.search-box__icon {
  position: absolute; left: 11px; color: var(--faint); pointer-events: none;
}
input.search {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius);
  height: var(--ctl); padding: 0 10px 0 34px; /* scale: off — room for the magnifier */ width: 240px;
}
input.search::placeholder { color: var(--faint); }

.pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pills__label {
  font-size: 11px; font-weight: 600; color: var(--faint);
  text-transform: uppercase; letter-spacing: .06em; margin-right: 4px;
}
/* Chip-toggle, per the handoff: one pressed look for every facet, rarity
   included -- the tier's colour rides on the square, not on the pill, so a
   pressed pill always reads as "a control that is on". */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: var(--ctl-sm); padding: 0 12px;
  border: 1px solid var(--line); background: transparent; color: var(--dim);
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1;
  border-radius: var(--radius-pill); cursor: pointer;
  transition: color var(--ease), border-color var(--ease), background var(--ease);
}
.pill:hover { color: var(--ink); border-color: var(--faint); background: var(--raised); }
.pill.on, .pill.on:hover {
  background: rgba(var(--link-rgb), .16); border-color: var(--link); color: var(--link);
}
.pill:has(.pill__mark) { padding-left: 8px; }

.pill__mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: var(--radius-sm);
  border: 1px solid currentColor;
  font-size: 10px; font-weight: 700; font-style: italic;
}
.pill__mark .mfr-glyph { width: 80%; height: 80%; }
/* Reputation: the maker's mark beside its name, the same 24px monogram box
   the roster card puts in its corner. */
.rep-title { display: flex; align-items: center; gap: 10px; }
.rep-mark {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 24px; height: 24px; border-radius: var(--radius); color: var(--ink);
  border: 1px solid rgba(var(--ink-rgb), .5); background: rgba(var(--bg-rgb), .55);
  font-size: 12px; font-weight: 700; font-style: italic;
}
.pill__dot { width: 8px; height: 8px; border-radius: 2px; background: var(--dim); }
.pill__dot[data-rarity="Common"]         { background: var(--rarity-common); }
.pill__dot[data-rarity="Rare"]           { background: var(--rarity-rare); }
.pill__dot[data-rarity="SuperRare"]      { background: var(--rarity-superrare); }
.pill__dot[data-rarity="SuperSuperRare"] { background: var(--rarity-supersuperrare); }

/* --------------------------------------------------------- roster card */
.card-rarity, .card-mfr {
  position: absolute; top: 8px; z-index: var(--z-raise);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; line-height: 1;
}
.card-rarity {
  left: 8px; padding: 4px 8px; border-radius: 2px;
  --rarity-color: var(--dim); --rarity-color-rgb: 152, 162, 200;
  background: rgba(var(--rarity-color-rgb), .18);
  border: 1px solid rgba(var(--rarity-color-rgb), .5);
  color: var(--rarity-color);
}
.card-rarity[data-rarity="Common"]         { --rarity-color: var(--rarity-common); --rarity-color-rgb: var(--rarity-common-rgb); }
.card-rarity[data-rarity="Rare"]           { --rarity-color: var(--rarity-rare); --rarity-color-rgb: var(--rarity-rare-rgb); }
.card-rarity[data-rarity="SuperRare"]      { --rarity-color: var(--rarity-superrare); --rarity-color-rgb: var(--rarity-superrare-rgb); }
.card-rarity[data-rarity="SuperSuperRare"] { --rarity-color: var(--rarity-supersuperrare); --rarity-color-rgb: var(--rarity-supersuperrare-rgb); }
.card-mfr {
  top: 10px; right: 10px; width: 24px; height: 24px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--bg-rgb), .55); border: 1px solid rgba(var(--ink-rgb), .5); color: var(--ink);
  font-size: 12px; font-style: italic;
}
/* The game's glyph, white on transparent, used as a mask so it is painted in
   the mark's own colour -- one asset serves the card corner, the pressed and
   unpressed pill. */
.mfr-glyph {
  display: block; width: 72%; height: 72%; background: currentColor;
  -webkit-mask: var(--glyph) center / contain no-repeat;
  mask: var(--glyph) center / contain no-repeat;
}

.tank-card__name {
  margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3;
  font-style: italic; text-transform: uppercase; letter-spacing: -.01em;
  color: var(--ink);
}
.tank-card__name[data-rarity="Common"]         { color: var(--rarity-common); }
.tank-card__name[data-rarity="Rare"]           { color: var(--rarity-rare); }
.tank-card__name[data-rarity="SuperRare"]      { color: var(--rarity-superrare); }
.tank-card__name[data-rarity="SuperSuperRare"] { color: var(--rarity-supersuperrare); }
.card.scroll tbody td.roster-name[data-rarity="Common"]         { color: var(--rarity-common); }
.card.scroll tbody td.roster-name[data-rarity="Rare"]           { color: var(--rarity-rare); }
.card.scroll tbody td.roster-name[data-rarity="SuperRare"]      { color: var(--rarity-superrare); }
.card.scroll tbody td.roster-name[data-rarity="SuperSuperRare"] { color: var(--rarity-supersuperrare); }
.tank-card:hover .tank-card__name, .tank-card:focus-visible .tank-card__name { color: var(--link); }
.tank-card__tags { display: flex; flex-wrap: wrap; gap: 4px; }

.roster-empty {
  margin: 0; padding: 32px; text-align: center; color: var(--dim);
  border: 1px dashed var(--line); border-radius: var(--radius-lg);
}
.tank-card__tags .tag { margin: 0; font-size: 11px; padding: 4px 8px; }

/* The tick now sits beside the name instead of over the art, where the
   rarity badge went. */
.tank-card__head .cmp-toggle { position: static; width: 28px; height: 28px; margin: -4px -6px -4px 0; flex: 0 0 auto; }

/* ------------------------------------------------------ catalogue lists
   Chips and modifications: one row per item, opened in place to show what
   it does and which tanks take it. */
.cat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; }
.cat-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.cat-row.open { border-color: var(--link); }
.cat-row__head {
  width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 20px; gap: 12px; align-items: center;
  padding: 10px 12px; background: transparent; border: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: background var(--ease);
}
.cat-row__head:hover { background: var(--raised); }
.cat-row__icon { width: 40px; height: 40px; border-radius: var(--radius); background: var(--raised); overflow: hidden; }
.cat-row__icon img { width: 40px; height: 40px; display: block; object-fit: contain; }
.cat-row__text { display: flex; flex-direction: column; min-width: 0; }
.cat-row__name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-row__meta { font-size: 12px; color: var(--dim); }
.cat-row__meta[data-tier="Golden"]    { color: var(--rarity-supersuperrare); }
.cat-row__meta[data-tier="Prismatic"] { color: var(--rarity-superrare); }
.cat-row__count { font-size: 12px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cat-row__chev { font-size: 18px; color: var(--dim); text-align: center; line-height: 1; }
.cat-row__body { padding: 0 12px 12px 64px; display: flex; flex-direction: column; gap: 8px; }
.cat-row__desc { margin: 0; font-size: 13px; color: var(--dim); }
@media (max-width: 760px) { .cat-list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .cat-row__head { grid-template-columns: 40px minmax(0, 1fr) 20px; }
  .cat-row__count { display: none; }
  .cat-row__body { padding-left: 12px; }
}

/* ------------------------------------------------ catalogue owner lists */
.owners { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; align-items: baseline; }
.owners__n {
  font-size: 10px; font-weight: 700; color: var(--faint);
  text-transform: uppercase; letter-spacing: .08em;
}
.owners__tank { font-size: 12px; color: var(--link); text-decoration: none; }
.owners__tank:hover { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 760px) {
  .topbar__inner { gap: 12px; }
  .sect__title { font-size: 24px; }
  .sect__controls { margin-left: 0; }
}

/* -------------------------------------------------------- operator page */
.ops { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.ops__side { display: flex; flex-direction: column; gap: var(--stack-gap); }
.ops__list { display: flex; flex-direction: column; gap: 8px; }
.ops__row {
  display: flex; gap: 12px; align-items: center; padding: 8px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--ink);
  transition: border-color var(--ease), background var(--ease);
}
.ops__row:hover { border-color: var(--faint); }
.ops__row.on { border-color: var(--link); box-shadow: inset 3px 0 0 0 var(--link); }
.ops__thumb { width: 56px; height: 56px; border-radius: var(--radius); background: var(--raised); overflow: hidden; flex: 0 0 auto; }
.ops__thumb img { width: 56px; height: 56px; display: block; object-fit: cover; }
.ops__rowtext { display: flex; flex-direction: column; min-width: 0; }
.ops__name { font-size: 18px; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .02em; }
.ops__row.on .ops__name { color: var(--link); }
.ops__skill { font-size: 12px; color: var(--dim); }
.ops__main { display: flex; flex-direction: column; gap: var(--stack-gap); min-width: 0; }
.ophero {
  display: grid; grid-template-columns: minmax(0, 1fr) 200px; min-height: 300px; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line);
  background: radial-gradient(ellipse 50% 100% at 85% 50%, rgba(var(--link-rgb), .22), transparent 65%), var(--surface);
}
.ophero__text { padding: 24px 28px; display: flex; flex-direction: column; gap: 14px; }
.ophero__name {
  margin: 0; font-size: 48px; line-height: 1; font-weight: 800; font-style: italic;
  text-transform: uppercase; letter-spacing: .02em; color: var(--ink);
}
.ophero__portrait { position: relative; }
.ophero__portrait img { position: absolute; right: 0; bottom: 0; width: 160px; height: auto; display: block; }
/* The large portrait (a file, 640px source): half its width, the hero's full height. */
.ophero--art { grid-template-columns: minmax(0, 1fr) 320px; min-height: 372px; }
.ophero__portrait img.ophero__art { width: 320px; }
.ophero__unlock { margin: 0; font-size: 12px; color: var(--faint); }
.opskill { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; }
.opskill__icon { width: 48px; height: 48px; border-radius: var(--radius); background: rgba(var(--link-rgb), .16); }
.opskill__mastery { margin: 6px 0 0; font-size: 12px; color: var(--faint); }
.optrack { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 6px; }
.optrack__tile { background: var(--raised); border: 1px solid transparent; border-radius: var(--radius); padding: 8px 4px; text-align: center; }
.optrack__tile--key { background: rgba(var(--link-rgb), .1); border-color: rgba(var(--link-rgb), .5); }
.optrack__lv { font-size: 11px; color: var(--dim); }
.optrack__exp { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.optrack__tile--key .optrack__exp { color: var(--link); }
.optrack__reward {
  /* One height for every reward -- a currency line or a profile item's
     picture -- so every tile is the same size. */
  height: 36px; margin-top: 4px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--dim); overflow-wrap: anywhere;
}
.optrack__reward .element-icon { width: 14px; height: 14px; }
/* One column once the page's column is too narrow for the 280px list
   beside the hero: there the portrait squeezed the perk's text to a word
   a line, and up to a tablet one column left the list 950px wide. The
   page's width decides (853 = what the old 900px window rule gave). */
@container page (max-width: 853px) {
  .ops { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .optrack { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
/* A phone: the skill's text takes the card's whole width -- a portrait
   column squeezed it, so each operator's card had its own height. The
   portrait sits behind, bottom right, fading out towards the text; one
   minimum height keeps the cards alike. */
@media (max-width: 600px) {
  .ophero, .ophero--art { position: relative; display: block; min-height: 200px; }
  .ophero__text { position: relative; z-index: var(--z-raise); padding: 16px; }
  .ophero__name { font-size: 32px; }
  .ophero__portrait { position: absolute; inset: 0; pointer-events: none; }
  .ophero__portrait img, .ophero__portrait img.ophero__art {
    width: 150px; opacity: .45;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 60%);
    mask-image: linear-gradient(to right, transparent, #000 60%);
  }
}

/* -------------------------------------------------------------- operators */
.operator__head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 16px; }
.operator__icon {
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: var(--radius-sm);
  background: var(--raised); border: 1px solid var(--line); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.operator__icon img { width: 56px; height: 56px; object-fit: contain; display: block; }
.operator__text { flex: 1 1 auto; min-width: 0; }
.operator__text h2 { margin-top: 0; }

/* ------------------------------------------------------------- tech nodes
   Same row shape as .mod-item: fixed icon track, then text that may wrap.
   Steps are inline chips rather than a nested table -- a node has two to four
   of them and they read as one sentence about the node, not as their own
   dataset. */
.tech-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2px 24px;
}
.tech-node {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px;
  padding: 8px 0; border-bottom: 1px dotted var(--line); align-items: start;
}
.tech-node__icon {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--raised); border: 1px solid var(--line); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.tech-node__icon img { width: 32px; height: 32px; object-fit: contain; display: block; }
.tech-node__text { min-width: 0; }
.tech-node__name { color: var(--ink); font-weight: 600; font-size: 14px; }
/* Two lines, the way the game states it: what the node gives across its four
   steps, then what the steps cost. The values run together on a slash so the
   progression reads as one figure instead of four separate facts. */
.tech-node__gain { font-size: 13px; color: var(--dim); margin-top: 2px; }
.tech-node__cost {
  font-size: 12px; color: var(--faint);
  font-variant-numeric: tabular-nums; margin-top: 2px;
}

/* Tank links in a reward cell. The roster table has no anchors of its own --
   its rows are clickable as rows -- so this only reaches the operator reward
   column, where an unstyled link is near-invisible on this
   ground. */
table a { color: var(--link); text-decoration: none; font-weight: 600; }
table a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ------------------------------------------------------------- compare
   The tick rides in the corner of a roster card, which is itself one big
   link -- hence the stopPropagation in compareToggle. Kept at 20px with a
   44px hit area so it is reachable on a touch screen without growing the
   art band. */
.cmp-toggle {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: var(--ctl-xl); height: var(--ctl-xl); margin: -12px; cursor: pointer;
}
/* Drawn, not native: the handoff's 18x18 box -- radius 3, --line-strong rim when
   off; filled #36d1ff with a #0f1428 tick when on. A native box renders
   white on this dark card. The input itself is 24x24, the minimum touch
   target (WCAG 2.5.8): a transparent 3 px border around the drawn box, the
   rim an inset shadow, the fill clipped to the inside. */
.cmp-toggle input {
  appearance: none; -webkit-appearance: none; margin: 0; flex: 0 0 auto;
  width: 24px; height: 24px; border: 3px solid transparent; border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  background: transparent center / 12px 12px no-repeat padding-box; cursor: pointer;
  transition: box-shadow var(--ease), background-color var(--ease);
}
.cmp-toggle input:hover { box-shadow: inset 0 0 0 1px var(--link); }
.cmp-toggle input:checked {
  box-shadow: inset 0 0 0 1px var(--link); background-color: var(--link);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%230f1428' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.cmp-toggle input:disabled { opacity: .4; cursor: not-allowed; }
.cmp-toggle input:focus-visible { outline: 2px solid var(--link); outline-offset: -1px; }
.roster-icon { position: relative; white-space: nowrap; padding: 6px 8px; }
/* Checkbox, star and picture in one row whatever the column's width: they
   were floats, and a language with longer headings (German) squeezed the
   column until the picture dropped under them. */
.roster-icon .cmp-toggle {
  position: static; display: inline-flex; width: 24px; height: 24px; margin: 0 6px 0 0; vertical-align: middle;
}

/* ------------------------------------------------------------ compare grid
   A label column and three tank columns, one panel; an empty column offers
   the tanks not yet in it. Text rows sit on a darker band so the numbers
   below read as their own block. */
.cmpx {
  display: grid; grid-template-columns: 220px repeat(3, minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
}
.cmpx > * { border-bottom: 1px solid var(--line); min-width: 0; }
.cmpx > :nth-child(4n+2), .cmpx > :nth-child(4n+3), .cmpx > :nth-child(4n+4) { border-left: 1px solid var(--line); }
.cmpx__cell { padding: 10px 20px; font-size: 15px; }
.cmpx__label { color: var(--dim); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.cmpx__text { font-size: 13px; background: #131a30; }
.cmpx__num { font-variant-numeric: tabular-nums; }
.cmpx__num.cmp-best { color: var(--pos); font-weight: 700; }
.cmpx__head { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.cmpx__art {
  height: 96px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  --tier-rgb: 152, 162, 200;
  background: radial-gradient(ellipse 80% 70% at 50% 100%, rgba(var(--tier-rgb), .28), transparent 70%), var(--raised);
}
.cmpx__art[data-rarity="Rare"]           { --tier-rgb: var(--rarity-rare-rgb); }
.cmpx__art[data-rarity="SuperRare"]      { --tier-rgb: var(--rarity-superrare-rgb); }
.cmpx__art[data-rarity="SuperSuperRare"] { --tier-rgb: var(--rarity-supersuperrare-rgb); }
.cmpx__art img { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .5)); }
.cmpx__art img.tank-render { width: 160px; height: auto; }
.cmpx__nameline { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cmpx__name {
  font-size: 20px; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .02em;
  color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cmpx__name[data-rarity="Rare"]           { color: var(--rarity-rare); }
.cmpx__name[data-rarity="SuperRare"]      { color: var(--rarity-superrare); }
.cmpx__name[data-rarity="SuperSuperRare"] { color: var(--rarity-supersuperrare); }
.cmpx__drop {
  flex: 0 0 auto; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: var(--radius);
  background: transparent; color: var(--dim); font-size: 16px; line-height: 1; cursor: pointer;
}
.cmpx__drop:hover { color: var(--ink); border-color: var(--faint); }
.cmpx__head--empty { justify-content: center; }
.cmpx__add {
  border: 1px dashed var(--line); border-radius: var(--radius); min-height: 126px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--dim); font-size: 13px; padding: 12px;
}
/* The add-a-tank picker: a button, then a searchable list in the page's
   own surface, line and rarity colours. */
.tank-pick { position: relative; }
.tank-pick__open {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--link); cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 14px;
}
.tank-pick__open:hover, .tank-pick__open[aria-expanded="true"] { border-color: var(--link); background: var(--raised); }
.tank-pick__open:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.tank-pick__pop {
  position: fixed; z-index: var(--z-menu); width: 280px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lift); padding: 8px; text-align: left;
}
.tank-pick__search {
  width: 100%; box-sizing: border-box; height: var(--ctl); padding: 0 10px;
  font: inherit; font-size: 13px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.tank-pick__search:focus { outline: none; border-color: var(--link); }
.tank-pick__list {
  list-style: none; margin: 6px 0 0; padding: 0; max-height: min(320px, 50vh); overflow-y: auto;
  overscroll-behavior: contain;
}
/* Scrollbars in the page's own colours: a thin --line thumb on the panel,
   not the browser's light default. */
.tank-pick__list, .sort-ctl__menu, .bld__side { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.tank-pick__list::-webkit-scrollbar, .sort-ctl__menu::-webkit-scrollbar, .bld__side::-webkit-scrollbar { width: 8px; }
.tank-pick__list::-webkit-scrollbar-track, .sort-ctl__menu::-webkit-scrollbar-track, .bld__side::-webkit-scrollbar-track { background: transparent; }
.tank-pick__list::-webkit-scrollbar-thumb, .sort-ctl__menu::-webkit-scrollbar-thumb, .bld__side::-webkit-scrollbar-thumb {
  background: var(--line); border-radius: 4px; border: 2px solid var(--surface);
}
.tank-pick__list::-webkit-scrollbar-thumb:hover, .sort-ctl__menu::-webkit-scrollbar-thumb:hover, .bld__side::-webkit-scrollbar-thumb:hover { background: var(--line-hover); }
.tank-pick__opt {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px;
  border-radius: var(--radius-sm); cursor: pointer;
}
.tank-pick__opt.on { background: var(--raised); }
.tank-pick__art { flex: 0 0 32px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.tank-pick__art img { width: 32px; height: 32px; object-fit: contain; display: block; }
.tank-pick__text { display: flex; flex-direction: column; min-width: 0; }
.tank-pick__name {
  font-size: 13px; font-weight: 700; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tank-pick__name[data-rarity="Common"]         { color: var(--rarity-common); }
.tank-pick__name[data-rarity="Rare"]           { color: var(--rarity-rare); }
.tank-pick__name[data-rarity="SuperRare"]      { color: var(--rarity-superrare); }
.tank-pick__name[data-rarity="SuperSuperRare"] { color: var(--rarity-supersuperrare); }
.tank-pick__meta { font-size: 11px; color: var(--dim); }
.tank-pick__empty { padding: 10px 8px; font-size: 13px; color: var(--dim); }
/* The tank on show (the builder's list): ticked on the right. */
.tank-pick__tick { margin-left: auto; padding-left: 8px; color: var(--link); font-weight: 700; }
@media (max-width: 760px) {
  .cmpx { grid-template-columns: 96px repeat(3, minmax(0, 1fr)); }
  .cmpx__cell { padding: 8px 6px; font-size: 12px; overflow-wrap: break-word; hyphens: auto; }
  .cmpx__label, .cmpx__text { font-size: 12px; }
  .cmpx__head { padding: 8px; }
  .cmpx__name { font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
  .cmpx__nameline { flex-direction: column; align-items: flex-start; }
  .cmpx__art { height: 64px; }
  .cmpx__art img { width: 56px; height: 56px; }
  .cmpx__art img.tank-render { width: 100px; height: auto; }
}

/* The winning cell in a row. Colour alone would not carry it for a reader
   who cannot separate these hues, so the weight changes too. */
td.cmp-best { color: var(--pos); font-weight: 700; }
table.cmp td:first-child, table.cmp th:first-child { text-align: left; }

.cmp-foot {
  display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center;
  margin-top: 14px; font-size: 12px;
}
.cmp-reset {
  border: 1px solid var(--line); background: transparent; color: var(--dim);
  font: inherit; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 6px 12px; border-radius: var(--radius-sm); cursor: pointer;
  transition: color var(--ease), border-color var(--ease);
}
.cmp-reset:hover { color: var(--ink); border-color: var(--dim); }

.filter--search input {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 6px 8px; min-width: 200px;
}
.filter--search input::placeholder { color: var(--faint); }

/* Maps: the matchmaking picture (640px, dump_renders.py MAP_PX) under the
   minimap in its corner. Cards top out near 400px, so the picture stays at
   1.6x or better; the minimap's 308px source shows at 88px. */
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--stack-gap); }
.map-card {
  margin: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.map-card__art { position: relative; aspect-ratio: 640 / 296; background: var(--raised); }
.map-card__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.map-card__mini {
  position: absolute; right: 8px; bottom: 8px; width: 88px; height: 88px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, .55);
}
.map-card__cap { padding: 10px 12px; }
/* The name sits on the picture, top left, over a shade that fades out by
   the middle -- the pictures are bright and busy, so text alone drowns. */
.map-card__art::before {
  content: ''; position: absolute; inset: 0 0 45% 0; pointer-events: none; z-index: var(--z-raise);
  background: linear-gradient(180deg, rgba(var(--scrim-rgb), .78), rgba(var(--scrim-rgb), 0));
}
.map-card__name {
  position: absolute; left: 12px; top: 10px; right: 12px; z-index: 2;
  font-size: 15px; font-weight: 700; color: var(--on-fill); text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}
/* Mode icons: 284px sources at 28px. */
.map-card__modes { display: flex; flex-wrap: wrap; gap: 6px; }
.map-card__mode { width: 28px; height: 28px; display: block; }
.map-card__mode-name { font-size: 11px; color: var(--dim); }
.map-card__mode-name + .map-card__mode-name::before { content: '· '; }

/* Modes: one card each, icon (284px source at 56px) and the game's own
   description lines, each under its picture -- in-game glyphs and strips
   of 52-90px height, so 40px tall at their own proportions, never cropped. */
.mode-card .mode-card__title {
  display: flex; align-items: center; gap: 12px; margin: 0 0 12px;
  font-size: 18px; font-weight: 700; font-style: italic; color: var(--ink); letter-spacing: .03em;
}
.mode-card__icon { width: 56px; height: 56px; flex: none; }
/* The banner (640px source) beside the lines at up to 320px; stacked on top
   below 760px, where it can reach the full card width. */
.mode-card__body--banner { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 20px; align-items: start; }
.mode-card__banner {
  display: block; width: 100%; height: auto; aspect-ratio: 640 / 446;
  border-radius: var(--radius-sm); background: var(--raised);
}
@media (max-width: 760px) { .mode-card__body--banner { grid-template-columns: minmax(0, 1fr); } }
/* A token event's page (Events), after the Claude Design canvas: panels for the token, the box and the shop,
   then the event's own rewards under a .mode-group heading. */
.event-item { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: start; }
.event-item__pic { width: 100%; height: auto; }
.event-item__text { min-width: 0; }
.event-item__desc { margin: 0 0 10px; font-size: 13px; }
.event-item__note { margin: 8px 0 0; font-size: 12px; color: var(--dim); }
/* The event's dates under its title, and the game's "Event has ended." after them. */
.event-dates { margin: 0 0 16px; font-size: 14px; color: var(--dim); }
.event-dates b { color: var(--ink); font-weight: 600; }
.event-item__avg { margin: 8px 0 0; font-size: 13px; font-weight: 600; }
.event-item__avg img { width: 20px; height: 20px; vertical-align: -5px; margin-right: 4px; }
.event-item__wins { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
/* The card's picture stands out above its frame: room for it under the
   panel's head. */
.event-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: var(--stack-gap); margin-top: 16px; }
.event-card-set { display: flex; align-items: flex-end; gap: 12px; }
.event-card-set__avatar { width: 72px; height: 72px; flex: none; }
/* No fixed ratio: the picture stands out of the frame by as much as it does. */
.event-card-set__card { min-width: 0; width: 100%; height: auto; }
.event-emoji { display: flex; flex-wrap: wrap; gap: 16px; }
.event-emoji__pic { width: 80px; height: 80px; }
.event-anim { height: var(--ctl); padding: 0 12px; font-size: 12px; gap: 8px; }
/* The event's skin tiles open large on click: a button, without the
   browser's button frame, so it looks as the tank page's tiles do. */
button.skin__art { width: 100%; padding: 0; border: 0; font: inherit; color: inherit; cursor: zoom-in; }
button.skin__art:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
/* The box's rewards in groups, each a 52px row: the 40px icon (2x its
   source at least), the name with the count after it, the chance. */
.event-drop-groups { display: flex; flex-direction: column; gap: 14px; }
.event-drop-group { display: flex; flex-direction: column; gap: 6px; }
.event-drop-group .panel__sub { margin: 0; }
/* min(): never wider than the column, which on a phone is under 240px. */
.event-drop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 8px; }
.event-drop {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  height: 52px; box-sizing: border-box; padding: 4px 12px 4px 4px;
  border-radius: var(--radius-sm); background: var(--raised); font-size: 13px;
}
.event-drop img { width: 40px; height: 40px; object-fit: contain; }
.event-drop__skin { width: 40px; height: 26px; border-radius: 3px; background: repeating-linear-gradient(135deg, var(--raised) 0 4px, var(--line-hover) 4px 8px); }
.event-drop__name {
  min-width: 0; color: var(--ink); line-height: 1.25; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.event-drop__qty { color: var(--dim); white-space: nowrap; font-weight: 600; }
.event-drop__pct { font-family: var(--mono); font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }
/* The shop: steps in one row joined by arrows, then the bundles. */
.event-thing { display: inline-flex; align-items: center; gap: 2px; margin-right: 10px; font-weight: 600; }
.event-thing img { width: 40px; height: 40px; object-fit: contain; }
.event-steps, .event-offers { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
/* The page's own 10px between tiles, plus room for the chevron. */
.event-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.event-offers { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.event-step, .event-offer {
  display: flex; flex-direction: column; gap: 6px; padding: 10px 12px;
  border-radius: var(--radius-sm); background: var(--raised); font-size: 13px;
}
.event-stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px; }
.event-stage {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 12px;
  border-radius: var(--radius-sm); background: var(--raised); font-size: 13px;
}
.event-stage__map { font-size: 12px; color: var(--dim); }
.event-stage__wins { list-style: none; margin: 4px 0 0; padding: 0; width: 100%; }
.event-stage__wins li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; }
.event-stage__wins .event-thing { flex: none; margin-right: 0; }
.event-step { position: relative; }
.event-step__arrow { position: absolute; right: -14px; top: 50%; margin-top: -6px; color: var(--faint); }
.event-step__n, .event-offer__limit { font-size: 11px; color: var(--dim); }
.event-step__price, .event-offer__price { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.event-offer__price s { color: var(--dim); font-weight: 400; }
@media (max-width: 760px) {
  /* A smaller picture beside the text. */
  .event-item { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
  .event-cards { grid-template-columns: minmax(0, 1fr); }
  /* Five steps do not fit a phone: they wrap, and the arrows go. */
  .event-steps { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
  .event-step__arrow { display: none; }
}
.mode-card__lines { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--stack-gap); }
.mode-line__pic { display: block; height: 40px; width: auto; max-width: 100%; object-fit: contain; margin-bottom: 8px; }
.mode-line__text { margin: 0; font-size: 13px; color: var(--dim); max-width: 60ch; white-space: pre-line; }
/* The game's own group names over the cards: TROPHY MODE, SPECIAL MODE,
   MEDALS, LEAGUE. A section title like every other page's (.panel__title:
   italic, caps, ink; .panel__count: faint), one step up in size -- each
   group holds cards whose own titles are h3. */
.mode-group { display: flex; flex-direction: column; gap: 6px; margin-top: 24px; }
.mode-group .mode-group__title { font-size: var(--fs-group); font-weight: 800; letter-spacing: -.01em; }
.mode-group .mode-group__count {
  margin-left: 8px; font-family: var(--mono); font-weight: 700; font-size: 15px; letter-spacing: 0;
}
.mode-group__count::before { content: '· '; }
.mode-group__note { margin: 0; font-size: 13px; color: var(--faint); max-width: 72ch; }
/* Medals: a tile each -- the game's 160px icon at 56px, name and points on
   one line, the description under them. */
.medal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px 20px; }
.medal { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.medal__icon { flex: none; width: 56px; height: 56px; object-fit: contain; }
.medal__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.medal__top { display: flex; align-items: baseline; gap: 8px; }
.medal__name { font-size: 14px; font-weight: 700; color: var(--ink); }
.medal__pts { font-family: var(--mono); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* League (Modes page): ten badges in a row on a wide screen, the rules
   under them. */
.league-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px 12px;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.league { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.league__icon { width: 80px; height: 75px; object-fit: contain; }
.league__name { font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: .02em; }
.league__divs { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.league-rules { margin: 20px 0 0; padding: 16px 0 0 20px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--dim); max-width: 80ch; }
.medal__desc { margin: 0; font-size: 12px; color: var(--dim); text-wrap: pretty; }

/* Builder (design_handoff_boom_arsenal/builder): banner across, settings
   left, the sum right and sticky; below 760px one column, the sum last. */
/* The banner (handoff builder/README 1): the tank page's hero, flattened to
   one screen line -- plates, name, enhancement and level on the left, the
   render on the right, glowing in the rarity's colour. */
.bld-hero {
  --tier-rgb: var(--rarity-common-rgb);
  /* 224px: room between the name and the level row under it. */
  position: relative; z-index: 3; display: flex; align-items: stretch; min-height: 224px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: radial-gradient(120% 140% at 82% 50%, rgba(var(--tier-rgb), .22), rgba(var(--tier-rgb), 0) 55%),
              linear-gradient(90deg, var(--surface), var(--sunken));
}
.bld-hero[data-rarity="Rare"]           { --tier-rgb: var(--rarity-rare-rgb); }
.bld-hero[data-rarity="SuperRare"]      { --tier-rgb: var(--rarity-superrare-rgb); }
.bld-hero[data-rarity="SuperSuperRare"] { --tier-rgb: var(--rarity-supersuperrare-rgb); }
.bld-hero__text { flex: 1 1 auto; min-width: 0; padding: 20px 28px; display: flex; flex-direction: column; gap: 8px; }
.bld-hero__brow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bld-hero__brow .plate { height: 20px; padding: 0 6px; font-size: 10px; background: transparent; border: 1px solid var(--line); }
.bld-hero__brow .plate--rarity { background: rgb(var(--tier-rgb)); border-color: transparent; font-style: normal; }
.bld-hero__name {
  margin: 0; font-size: 48px; line-height: 1; font-weight: 900; font-style: italic;
  text-transform: uppercase; letter-spacing: .01em; color: var(--ink); overflow-wrap: anywhere;
}
.bld-hero__name[data-rarity="Rare"]           { color: var(--rarity-rare); }
.bld-hero__name[data-rarity="SuperRare"]      { color: var(--rarity-superrare); }
.bld-hero__name[data-rarity="SuperSuperRare"] { color: var(--rarity-supersuperrare); }
.bld-hero__art { flex: none; display: flex; align-items: center; justify-content: center; }
/* The banner lets "Change tank"'s list hang out of it, so the render is
   clipped by its own box instead. */
.bld-hero__art--wide { width: 380px; margin: 0 40px 0 0; align-self: stretch; overflow: hidden; }
.bld-hero__art--wide .bld-hero__render { margin-top: -16px; }
.bld-hero__art--phone { display: none; }
.bld-hero__render { display: block; width: 380px; height: 212px; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .5)); }
/* Enhancement, level and the view switch fit one line at 1440 (14px gaps,
   a 130px slider); in a longer language the switch wraps to the right. */
.bld-hero__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: auto; }
.bld-hero .ctl--level { background: rgba(var(--bg-rgb), .6); padding: 8px 12px; }
.bld-hero .ctl--level input[type="range"] { width: 130px; }
/* "Change tank": a button on the banner's glass opening the comparison's
   tank list (.tank-pick). */
.bld-pick-ctl { margin-left: 8px; }
.bld-pick-ctl__open { height: var(--ctl-sm); gap: 6px; padding: 0 10px; font-size: 12px; background: rgba(var(--bg-rgb), .4); }
.bld-pick-ctl__name { display: none; }
.bld-pick-ctl__name b { color: var(--ink); }
/* "View": the roster's view buttons, the banner's size. */
/* Right after the level, the foot's 18px gap between them. */
.bld-view { display: flex; align-items: center; gap: 6px; }
.bld-view__label { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--dim); text-transform: uppercase; margin-right: 2px; }
.bld-view .view { gap: 6px; }
.bld-view .view button { width: 34px; height: var(--ctl-sm); padding: 0; border-radius: 3px; }
/* Enhancement: a panel with the six badges in a row, texts in the tooltip. */
.bld-enh { display: flex; flex-wrap: wrap; gap: 6px; }
.bld-hero .ctl__label { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--dim); text-transform: uppercase; }
.bld-enh__btn {
  width: 48px; height: 48px; padding: 0; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(var(--bg-rgb), .5); color: var(--faint);
  font: inherit; cursor: pointer; transition: border-color var(--ease), background var(--ease);
}
.bld-enh__btn img { width: 34px; height: 34px; opacity: .55; filter: saturate(.6); }
.bld-enh__n { font-size: 18px; font-weight: 800; }
.bld-enh__btn:hover { border-color: var(--line-strong); }
.bld-enh__btn.on { border-color: var(--link); background: rgba(var(--link-rgb), .14); box-shadow: var(--ring-on); color: var(--ink); }
.bld-enh__btn.on img { width: 36px; height: 36px; opacity: 1; filter: none; }

.bld { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: var(--stack-gap); align-items: start; }
.bld__main { display: flex; flex-direction: column; gap: var(--stack-gap); min-width: 0; }
.bld__side {
  position: sticky; top: var(--bar-clear); max-height: calc(100vh - var(--bar-clear) - 16px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--panel-pad);
  display: flex; flex-direction: column; gap: var(--panel-gap);
}
.bld-side__head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.btn-ghost.bld-side__more { height: var(--ctl-sm); padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 12px; }
.btn-ghost.bld-side__more.on { border-color: var(--link); color: var(--link); background: rgba(var(--link-rgb), .12); }
.bld-side__title { margin: 0 0 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.bld-side__none { margin: 0; font-size: 12px; }
.bld-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.bld-tile {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 10px 8px; min-width: 0;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius);
}
.bld-tile__fig { display: flex; align-items: center; gap: 6px; }
.bld-tile__fig img, .bld-tile__fig svg { flex: none; width: 20px; height: 20px; }
.bld-tile__fig b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bld-tile__sub { display: flex; justify-content: space-between; gap: 4px; font-size: 10px; color: var(--dim); }
.bld-tile__sub .pos { font-weight: 700; }
.bld-stats { display: flex; flex-direction: column; }
.bld-stat { padding: 6px 0; border-bottom: 1px solid var(--line); }
.bld-stat__row { display: flex; align-items: baseline; gap: 8px; }
.bld-stat__row > span:first-child { font-size: 12px; color: var(--dim); }
.bld-stat__row .pos { margin-left: auto; font-size: 11px; font-weight: 700; }
.bld-stat__row b { min-width: 38px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.bld-stat__src {
  display: grid; grid-template-columns: 1fr auto; gap: 0 8px; margin-top: 2px;
  color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums;
}
.bld-stat__src span:nth-child(even) { text-align: right; }
.bld-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bld-chip {
  font-size: 12px; padding: 4px 8px; border-radius: var(--radius-sm);
  background: rgba(var(--pos-rgb), .08); border: 1px solid rgba(var(--pos-rgb), .25);
}
.bld-chip small { display: block; font-size: 10px; color: var(--faint); }
.bld-effs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; }
.bld-eff { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; }
.bld-eff img { flex: none; width: 22px; height: 22px; object-fit: contain; }
.bld-eff__dot { flex: none; width: 8px; height: 8px; margin: 0 8px; border-radius: 50%; background: var(--line); }
.bld-eff__text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bld-eff__text b { font-weight: 600; }
.bld-effs--full { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.bld-effs--full .bld-eff { align-items: flex-start; }
.bld-effs--full .bld-eff__text { white-space: normal; color: var(--dim); }
.bld-effs--full .bld-eff__text b { color: var(--ink); }
.bld-copy {
  width: 100%; height: var(--ctl-xl); border: 0; border-radius: var(--radius); background: var(--brand); color: var(--on-fill);
  font: inherit; font-size: 15px; font-weight: 800; font-style: italic; letter-spacing: .04em; text-transform: uppercase;
  cursor: pointer; transition: filter var(--ease);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.bld-copy svg { fill: currentColor; flex: none; }
.bld-copy:hover { filter: brightness(1.12); }
.bld-copy__url { width: 100%; font: inherit; font-size: 12px; background: transparent; color: inherit; border: 0; outline: none; text-overflow: ellipsis; }
/* The phone's bar (README 7); off on a desktop. */
.bld-bar { display: none; }
/* Builder panels: blocks a touch closer than the tank page's. */
.bld__main > .panel { gap: 12px; }
.bld .panel__count { font-size: 13px; font-weight: 400; color: var(--faint); text-transform: none; letter-spacing: 0; }
/* Operator: the choice and its level in one head line. */
.panel__head.bld-op__head { justify-content: flex-start; gap: 8px 12px; }
.bld-op__pills { display: flex; flex-wrap: wrap; gap: 6px; margin-left: 8px; }
.bld-op__pill {
  height: var(--ctl-lg); display: flex; align-items: center; gap: 8px; padding: 0 12px 0 4px;
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: transparent; color: var(--dim);
  font: inherit; font-size: 14px; font-weight: 700; font-style: italic; cursor: pointer;
  transition: border-color var(--ease), background var(--ease), color var(--ease);
}
.bld-op__pill--none { padding-left: 12px; }
.bld-op__pill img { width: 32px; height: 32px; border-radius: 50%; background: var(--raised); object-fit: cover; opacity: .7; }
.bld-op__pill:hover { border-color: var(--line-strong); color: var(--ink); }
.bld-op__pill.on { border-color: var(--link); background: rgba(var(--link-rgb), .12); color: var(--link); }
.bld-op__pill.on img { opacity: 1; }
.bld-op__short { display: none; }
.bld-op__lv {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--dim); text-transform: uppercase;
}
.bld-op__lv input[type=range] { width: 130px; margin: 0; accent-color: var(--link); }
.bld-op__lv-n { color: var(--ink); font-size: 15px; min-width: 18px; font-variant-numeric: tabular-nums; }
.bld-skill {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--radius-md);
  background: linear-gradient(90deg, rgba(var(--level-rgb), .12), rgba(var(--level-rgb), 0) 60%);
}
.bld-skill img { flex: none; width: 36px; height: 36px; }
.bld-skill__k { font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--link); text-transform: uppercase; }
.bld-skill__line b { font-style: italic; font-weight: 800; text-transform: uppercase; }
.bld-skill__line span { color: var(--dim); }
/* The level track: a rule down the badges, a row per level. */
.bld-scale { position: relative; display: flex; flex-direction: column; gap: 8px; }
.bld-scale::before {
  content: ""; position: absolute; left: 27px; top: 24px; bottom: 20px; width: 2px; background: var(--line);
}
.bld-scale__row { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: center; }
.bld-lv {
  height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised);
}
.bld-lv__k { font-size: 10px; color: var(--dim); letter-spacing: .06em; text-transform: uppercase; }
.bld-lv__n { font-size: var(--fs-figure); font-weight: 900; font-style: italic; }
.bld-lv__later { display: none; }
.bld-scale__row--locked .bld-lv {
  height: 40px; flex-direction: row; gap: 4px; border-style: dashed; background: var(--surface); color: var(--faint);
}
.bld-scale__row--locked .bld-lv__k { display: none; }
.bld-scale__row--locked .bld-lv__n { font-size: 16px; }
.bld-scale__items { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bld-scale--mod .bld-scale__items { display: grid; gap: 6px; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); }
.bld-or {
  flex: none; font-size: 10px; font-weight: 700; color: var(--faint); text-transform: uppercase;
  border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 4px 8px; background: var(--surface);
}
.bld-card {
  flex: 1 1 0; min-width: 0; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 14px 0 8px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); color: var(--ink);
  font: inherit; text-align: left; cursor: pointer; transition: border-color var(--ease), background var(--ease);
}
.bld-card:hover:not(:disabled) { border-color: var(--line-strong); background: var(--hover); }
.bld-card.on { border-color: var(--link); background: linear-gradient(90deg, rgba(var(--link-rgb), .16), rgba(var(--link-rgb), .04)); }
.bld-card__icon { flex: none; width: 40px; height: 40px; object-fit: contain; }
.bld-card__text { display: flex; flex-direction: column; min-width: 0; }
.bld-card__name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bld-card__desc { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bld-card__check { flex: none; margin-left: auto; color: var(--link); }
.bld-card__at { margin-left: auto; flex: none; font-size: 11px; white-space: nowrap; }
.bld-scale--mod .bld-card { gap: 8px; padding: 0 10px 0 6px; }
.bld-scale--mod .bld-card__icon { width: 34px; height: 34px; }
.bld-scale--mod .bld-card__name { font-size: 13px; }
.bld-scale--mod .bld-card__desc {
  font-size: 11px; line-height: 1.3; white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
/* A closed level: a flatter card, the name only. */
.bld-card:disabled { height: 40px; gap: 10px; padding: 0 12px 0 6px; background: var(--sunken); color: var(--faint); cursor: default; }
.bld-card:disabled .bld-card__icon { width: 28px; height: 28px; opacity: .5; filter: grayscale(.6); }
.bld-scale--mod .bld-card:disabled .bld-card__icon { width: 26px; height: 26px; }
.bld-card:disabled .bld-card__name { font-size: 13px; font-weight: 600; }
.bld-card.on:disabled { border-color: rgba(var(--link-rgb), .45); background: var(--sunken); }
/* A mod already chosen at the other level that offers it: the full card, greyed. */
.bld-card--taken:disabled { height: 56px; padding: 0 14px 0 8px; opacity: .45; }
.bld-scale--mod .bld-card--taken:disabled { gap: 8px; padding: 0 10px 0 6px; }
.bld-card--taken:disabled .bld-card__icon { width: 34px; height: 34px; }
@media (max-width: 1100px) {
  .bld-scale--mod .bld-scale__items { grid-template-columns: repeat(var(--n2, 2), minmax(0, 1fr)); }
}
/* The tree strip: Reputation's nodes, smaller; a maker's ring and pips in
   its colour (--branch, lifted for contrast by brightColor) once taken.
   Columns side by side while they fit the panel, tiers down the panel when
   they do not (a container query: the panel's width decides, not the
   window's). */
.bld-tree { --branch: var(--link); container: bldtree / inline-size; }
.panel__head.bld-tree__head { justify-content: flex-start; gap: 8px 10px; }
.bld-tree__short { display: none; }
.bld-tree__make { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; font-style: italic; color: var(--branch); }
.bld-tree__logo.rep-mark { width: 22px; height: 22px; color: var(--branch); border-color: var(--branch); }
.bld-tree__plus { font-size: 12px; color: var(--dim); }
.bld-tree__side { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--dim); }
.bld-tree__side b { color: var(--ink); font-variant-numeric: tabular-nums; }
/* A link's tree on screen: says so, and offers to make it the reader's own. */
.bld-tree__link { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--branch, var(--line)); border-radius: var(--radius-lg); font-size: 12px; color: var(--dim); }
.bld-tree__link span { flex: 1 1 200px; }
.btn-ghost.bld-tree__reset { height: var(--ctl-sm); padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.btn-ghost.bld-tree__reset:disabled { opacity: .5; cursor: default; background: transparent; }
.bld-tree__strip { display: flex; justify-content: space-between; align-items: stretch; }
.bld-tree__col { display: flex; flex-direction: column; gap: 8px; padding: 0 4px; border-right: 1px solid var(--line-soft); }
.bld-tree__col:last-child { border-right: 0; }
.bld-tree__nodes {
  flex: 1 1 auto; display: grid; gap: 8px 6px; align-content: center; justify-content: center;
  grid-template-columns: repeat(var(--k, 2), 46px);
}
.bld-tree__foot { text-align: center; padding-top: 6px; border-top: 1px solid var(--line); line-height: 1.1; }
.bld-tree__foot b { display: block; font-size: 18px; font-weight: 900; font-style: italic; }
.bld-tree__foot span { font-size: 10px; color: var(--faint); }
.bld-tree .tt-node { gap: 4px; }
.bld-tree .tt-node__face { width: 42px; height: 42px; border: 2px solid var(--line); background: var(--sunken); }
.bld-tree .tt-node__face img { width: 26px; height: 26px; }
.bld-tree .tt-node--off .tt-node__face { filter: none; }
.bld-tree .tt-node--off .tt-node__face img { opacity: .45; }
.bld-tree .tt-node:not(.tt-node--off):not(.tt-node--hex) .tt-node__face {
  border-color: var(--branch); box-shadow: 0 0 10px color-mix(in srgb, var(--branch) 35%, transparent);
}
.bld-tree .tt-node--hex .tt-node__face { width: 46px; height: 46px; border: 0; background: var(--node-ring); box-shadow: none; }
.bld-tree .tt-node--hex.tt-node--off .tt-node__face { background: var(--line-hover); }
.bld-tree .tt-node--hex .tt-node__face::before { inset: 2px; background: var(--sunken); }
.bld-tree .tt-node--hex .tt-node__face img { width: 28px; height: 28px; }
.bld-tree .tt-node--locked .tt-node__face { filter: grayscale(1) brightness(.45); }
.bld-tree .tt-node__pips { gap: 2px; }
.bld-tree .tt-node__pips i { background: var(--line); opacity: 1; }
.bld-tree .tt-node__pips i.lit { background: var(--branch); box-shadow: none; }
.bld-tree .tt-node--hex .tt-node__pips i.lit { background: var(--ink); }
.bld-tree__hint { margin: 0; font-size: 11px; color: var(--faint); }
@container bldtree (max-width: 839px) {
  .bld-tree__strip { flex-direction: column; }
  .bld-tree__col {
    display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: center;
    padding: 4px 0; border-right: 0; border-bottom: 1px solid var(--line-soft);
  }
  .bld-tree__col:last-child { border-bottom: 1px solid var(--line-soft); }
  .bld-tree__foot { order: -1; padding: 0; border-top: 0; line-height: 1.05; }
  .bld-tree__foot span { font-size: 10px; }
  .bld-tree__nodes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
  .bld-tree .tt-node { min-width: 44px; }
  .bld-tree .tt-node__face { width: 40px; height: 40px; }
  .bld-tree .tt-node__face img { width: 24px; height: 24px; }
  .bld-tree .tt-node--hex .tt-node__face { width: 44px; height: 44px; }
  .bld-tree .tt-node--hex .tt-node__face img { width: 26px; height: 26px; }
}
/* The compact view: operator and mods side by side, icons instead of cards. */
.bld-duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--stack-gap); align-items: start; }
.bld-op--compact .bld-op__lv { margin-left: auto; gap: 8px; font-size: 11px; }
.bld-op--compact .bld-op__lv input[type=range] { width: 90px; }
.bld-op__faces { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bld-op__face {
  flex: none; width: 52px; height: 52px; padding: 0; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%; background: var(--raised); color: var(--faint);
  overflow: hidden; cursor: pointer; transition: border-color var(--ease);
}
.bld-op__face img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; opacity: .6; }
.bld-op__face:hover { border-color: var(--line-strong); }
.bld-op__face:hover img { opacity: 1; }
.bld-op__face.on { border: 2px solid var(--link); box-shadow: var(--ring-on); }
.bld-op__face.on img { opacity: 1; }
.bld-op__who { margin-left: 4px; line-height: 1.2; min-width: 0; }
.bld-op__who b { font-style: italic; font-weight: 800; text-transform: uppercase; }
.bld-op__who span { display: block; font-size: 11px; color: var(--dim); }
.bld-irows { display: flex; flex-direction: column; gap: 12px; }
.bld-irow { display: flex; align-items: center; gap: 12px; }
.bld-irow .bld-lv { flex: none; width: 44px; height: 52px; }
.bld-irow .bld-lv__n { font-size: 20px; }
.bld-irow--locked .bld-lv { gap: 2px; border-style: dashed; background: transparent; color: var(--faint); }
.bld-irow--locked .bld-lv__n { font-size: 16px; }
.bld-irow__tiles { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.bld-irow__or { font-size: 10px; font-weight: 700; color: var(--faint); text-transform: uppercase; }
.bld-tile2 {
  position: relative; flex: none; width: 56px; height: 56px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--raised);
  cursor: pointer; transition: border-color var(--ease);
}
.bld-tile2 img { width: 38px; height: 38px; object-fit: contain; opacity: .8; }
.bld-tile2:hover { border-color: var(--line-strong); }
.bld-tile2:hover img { opacity: 1; }
.bld-tile2.on {
  border-color: var(--link); box-shadow: var(--ring-on);
  background: radial-gradient(circle at 50% 40%, rgba(var(--link-rgb), .28), rgba(var(--link-rgb), .06) 70%);
}
.bld-tile2.on img { width: 40px; height: 40px; opacity: 1; }
.bld-tile2__check {
  position: absolute; right: -5px; top: -5px; width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--link); color: var(--bg);
}
.bld-tile2__check svg { width: 10px; height: 10px; margin: 0; color: var(--bg); }
.bld-tile2__check path { stroke-width: 3; }
.bld-irow--locked .bld-tile2 { border-style: dashed; background: var(--sunken); }
.bld-tile2--taken { opacity: .35; cursor: not-allowed; }
.bld-tile2--taken:hover { border-color: var(--line); }
.bld-irow--locked .bld-tile2 img { width: 34px; height: 34px; opacity: .4; filter: grayscale(.7); }
.bld-tile2:focus-visible, .bld-op__face:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
/* Summary figures with their sources in a tooltip are focusable. */
.bld-tile[tabindex], .bld-stat[tabindex], .bld-chip[tabindex], .bld-eff[tabindex] { cursor: default; }
.bld-tile[tabindex]:focus-visible, .bld-stat[tabindex]:focus-visible,
.bld-chip[tabindex]:focus-visible, .bld-eff[tabindex]:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
/* #/build without a tank (handoff builder_picker2): two panels as on the
   builder page, roster tank cards inside. Only what differs from .tank-card
   is here. */
.bld-pick + .bld-pick { margin-top: 16px; }
.bld-pick__builds {
  display: flex; gap: 16px; padding: 4px 2px 8px; margin: -4px -2px -8px;
  scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.bld-pick__builds > .bld-saved { flex: 0 0 280px; scroll-snap-align: start; }
.bld-pick__builds.dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.bld-pick__builds.dragging .bld-saved { pointer-events: none; }
.bld-pick__head-end { display: flex; align-items: center; gap: 12px; }
.bld-pick__arrows { display: flex; gap: 4px; }
.bld-pick__arrows[hidden] { display: none; }
.bld-pick__arrow {
  display: inline-flex; align-items: center; justify-content: center; width: var(--ctl-sm); height: var(--ctl-sm); padding: 0;
  border: 1px solid var(--line); font-size: 18px; line-height: 1;
}
.bld-pick__arrow:hover:not(:disabled) { color: var(--ink); border-color: var(--link); }
.bld-pick__arrow:disabled { opacity: .35; cursor: default; }
.bld-saved__del {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 28px; height: 28px; margin: -4px -6px -4px 0; padding: 0; border: 0; border-radius: var(--radius-sm);
  background: none; color: var(--line-strong); cursor: pointer; transition: color var(--ease), background var(--ease);
}
.bld-saved__del:hover { color: var(--neg); background: rgba(var(--neg-rgb), .12); }
.bld-saved__del:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
/* The build last opened: the roster's selected border, held. */
.bld-saved--last { border-color: rgba(var(--link-rgb), .6); }
.bld-saved .tank-card__name { font-size: 20px; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .02em; }
.bld-saved__line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; color: var(--dim); }
.bld-saved__enh {
  display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 4px;
  border: 1px solid var(--link); border-radius: var(--radius-sm); background: rgba(var(--link-rgb), .14);
  color: var(--ink); font-size: 11px; font-weight: 800; font-style: italic;
}
.bld-saved__op {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 4px;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  color: var(--ink); font-size: 12px; font-weight: 700; font-style: italic;
}
.bld-saved__op img { width: 18px; height: 18px; border-radius: 50%; }
.bld-saved__op--none { padding-left: 10px; color: var(--faint); font-weight: 600; }
.bld-saved__count b { color: var(--ink); font-family: var(--mono); font-variant-numeric: tabular-nums; }

.bld-pick__facets { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.bld-pick__facets[hidden] { display: none; }
.bld-pick__tools { display: flex; align-items: center; gap: 8px; }
.bld-pick__maker {
  display: flex; align-items: center; gap: 10px; margin: 6px 0 -4px;
  font-size: 14px; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .03em;
}
.bld-pick__maker .rep-mark { color: inherit; border-color: currentColor; }
.bld-pick__n {
  font-size: 12px; font-weight: 600; font-style: normal; text-transform: none; letter-spacing: 0; color: var(--faint);
}
.bld-pick__tanks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
/* The roster card cut down: a shorter band, the name and role, nothing else. */
.bld-tank .tank-card__art { height: 84px; }
.bld-tank .tank-card__art img { width: 56px; height: 56px; }
.bld-tank .tank-card__art img.tank-render { width: 120px; height: auto; }
.bld-tank .card-rarity { display: none; }
.bld-tank .tank-card__body { padding: 8px 12px 10px; gap: 4px; }
.bld-tank .tank-card__name { font-size: 14px; font-weight: 800; font-style: italic; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bld-tank .tank-card__mfr { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bld-tank__saved {
  position: absolute; left: 6px; top: 6px; z-index: var(--z-raise); padding: 2px 6px; border-radius: var(--radius-sm);
  background: rgba(var(--link-rgb), .16); border: 1px solid var(--link); color: var(--link);
  font-size: 10px; font-weight: 700;
}
@media (max-width: 760px) {
  .bld-pick__builds > .bld-saved { flex-basis: 260px; }
  .bld-pick__tanks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bld-pick__tools { width: 100%; }
  .bld-pick .panel__head .search-box { flex: 1 1 auto; }
  .bld-pick .panel__head input.search { width: 100%; }
}
/* The builder on a phone (README 7, artboard 390): banner with the render
   on top, then operator, mods, tree and the summary in one column; the three
   headline figures and the link move to a bar pinned to the bottom. */
@media (max-width: 760px) {
  .bld { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .bld__side { position: static; max-height: none; overflow: visible; padding: 14px; gap: 12px; }
  .bld-tiles, .bld .bld-copy { display: none; }
  .bld-bar {
    grid-column: 1 / -1; position: sticky; bottom: 0; z-index: var(--z-sticky);
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin: 0 -16px; padding: 10px 12px 14px;
    background: rgba(var(--bg-rgb), .96); border-top: 1px solid var(--line); box-shadow: 0 -12px 24px rgba(0, 0, 0, .35);
  }
  .bld-bar__fig { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
  .bld-bar__fig > div { display: flex; align-items: center; gap: 4px; }
  .bld-bar__fig img, .bld-bar__fig svg { flex: none; width: 16px; height: 16px; }
  .bld-bar__fig b { font-size: 15px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .bld-bar__fig .pos { min-height: 12px; font-size: 10px; font-weight: 700; }
  .bld-bar__link {
    flex: none; height: var(--ctl-xl); padding: 0 14px; display: flex; align-items: center; gap: 6px;
    border: 0; border-radius: var(--radius); background: var(--brand); color: var(--on-fill);
    font: inherit; font-size: 13px; font-weight: 800; font-style: italic; text-transform: uppercase; cursor: pointer;
  }
  .bld-bar .bld-copy__url { flex: 1 0 100%; padding: 6px 0; }

  .bld-hero {
    flex-direction: column; min-height: 0;
    background: radial-gradient(120% 90% at 50% 18%, rgba(var(--tier-rgb), .22), rgba(var(--tier-rgb), 0) 60%), var(--surface);
  }
  .bld-hero__text { padding: 12px 14px 14px; }
  .bld-hero__art--wide { display: none; }
  .bld-hero__art--phone { display: flex; margin: -4px 0 -10px; }
  .bld-hero__art--phone .bld-hero__render { width: 300px; max-width: 100%; height: 167px; }
  .bld-hero__brow .bld-hero__role { display: none; }
  /* "Change tank" on its own line, a finger's height, with the tank named. */
  .bld-pick-ctl { flex: 1 0 100%; margin-left: 0; }
  .bld-pick-ctl__open { width: 100%; height: var(--ctl-xl); gap: 8px; padding: 0 12px; font-size: 13px; }
  .bld-pick-ctl__open .filters__chev { margin-left: auto; }
  .bld-pick-ctl__name { display: inline; }
  .bld-view { display: none; }
  .bld-hero__name { font-size: 40px; }
  .bld-hero__foot { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 4px; }
  .bld-enh { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bld-enh__btn { width: auto; }
  .bld-hero .ctl--level input[type="range"] { flex: 1 1 auto; width: auto; min-width: 0; }

  .bld__main > .panel { padding: 14px; gap: 10px; }
  .bld .panel__title { font-size: 18px; }
  .panel__head.bld-op__head { flex-direction: column; align-items: stretch; gap: 10px; padding-bottom: 0; border-bottom: 0; }
  .panel__head.bld-op__head .panel__title { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .bld-op__pills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-left: 0; }
  .bld-op__pill {
    min-width: 0; height: 64px; flex-direction: column; justify-content: center; gap: 2px;
    padding: 0 4px; border-radius: var(--radius-md); font-size: 12px;
  }
  .bld-op__pill img { width: 34px; height: 34px; }
  .bld-op__name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bld-op__pill--none .bld-op__name { display: none; }
  .bld-op__pill--none .bld-op__short { display: inline; }
  .bld-op__lv { margin-left: 0; }
  .bld-op__lv input[type=range] { flex: 1 1 auto; width: auto; min-width: 0; }
  .bld-skill { padding: 8px 10px; gap: 10px; font-size: 12px; }
  .bld-skill img { width: 32px; height: 32px; }
  .bld-skill__k { display: none; }

  /* Levels: a caption over each row instead of a badge on a track. */
  .bld-scale { gap: 10px; }
  .bld-scale::before { display: none; }
  .bld-scale__row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .bld-lv, .bld-scale__row--locked .bld-lv {
    height: auto; flex-direction: row; justify-content: flex-start; gap: 6px;
    border: 0; background: none; color: var(--dim);
  }
  .bld-lv__k, .bld-scale__row--locked .bld-lv__k { display: inline; font-size: 11px; font-weight: 700; }
  .bld-lv__n, .bld-scale__row--locked .bld-lv__n { order: 1; font-size: 16px; color: var(--ink); }
  .bld-lock { order: 2; }
  .bld-lv__later { display: inline; order: 3; font-size: 11px; }
  .bld-scale__items, .bld-scale--mod .bld-scale__items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .bld-or, .bld-card__at, .bld-card__check { display: none; }
  .bld-card, .bld-scale--mod .bld-card { height: auto; min-height: 60px; gap: 8px; padding: 6px 8px 6px 6px; }
  .bld-card__icon { width: 34px; height: 34px; }
  .bld-scale--mod .bld-card__icon { width: 30px; height: 30px; }
  .bld-card__name { white-space: normal; font-size: 13px; }
  .bld-card__desc { white-space: normal; font-size: 11px; line-height: 1.3; }
  /* Mods side by side, one size: the name on a line, the text on two (the
     whole of both in the tip). A wrapped name made one card taller. */
  .bld-scale--mod .bld-card:not(:disabled), .bld-scale--mod .bld-card--taken:disabled { height: 64px; min-height: 64px; }
  .bld-scale--mod .bld-card__name { white-space: nowrap; font-size: 12px; }
  .bld-card:disabled { height: 44px; min-height: 44px; padding: 0 8px 0 6px; }
  .bld-card:disabled .bld-card__icon { width: 26px; height: 26px; }
  .bld-card:disabled .bld-card__name { white-space: nowrap; font-size: 12px; }

  .bld-tree__long, .bld-tree__plus { display: none; }
  .bld-tree__short { display: inline; }
  .panel__head.bld-tree__head { gap: 8px; }
  .bld-tree__make { font-size: 12px; }
}
/* Reputation: the missions card, then the tech tree. */
.rep-card h2.rep-title {
  font-size: 18px; font-weight: 700; font-style: italic; color: var(--ink); letter-spacing: .03em;
}
.rep-block__sub { margin: 0 0 10px; font-size: 12px; color: var(--faint); max-width: 72ch; }
/* A card per mission, as the game's screen has them: icon, text, reward. */
.rep-missions {
  list-style: none; margin: 0 0 12px; padding: 0;
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px;
}
.rep-mission {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px 10px;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); text-align: center;
}
.rep-mission__icon { width: 48px; height: 48px; object-fit: contain; }
.rep-mission__text { font-size: 12px; line-height: 1.35; color: var(--ink); }
.rep-mission__reward {
  margin-top: auto; padding-top: 8px; width: 100%; border-top: 1px solid var(--line);
  font-size: 11px; color: var(--dim);
}
/* All eight in one row while each gets ~128px of its card, then four, then
   two on a phone. The card's width decides, not the window's: the window
   breakpoints (1100) would put eight in ~115px and the text in three lines.
   1110 here is where the window's 1199 used to switch. */
.rep-card { container: repcard / inline-size; }
@container repcard (max-width: 1110px) {
  .rep-missions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .rep-missions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rep-mission { padding: 10px 8px; }
  .rep-mission__icon { width: 44px; height: 44px; }
  .rep-mission__text { font-size: 12px; }
}
/* The tech tree, shaped like the game's: a grid, a row per maker, columns
   I-VIII divided by rules; circles in the maker's colour, hexagons for the
   common nodes; a pip per step. Scrolls sideways on a narrow screen rather
   than reflowing -- the columns are the point. */
.tt-scroll { overflow-x: auto; margin: 4px -4px 0; padding: 4px; }
.tt {
  --tt-label: 120px;
  display: grid; grid-template-columns: var(--tt-label) repeat(var(--tt-n, 8), max-content);
  align-items: center; column-gap: 0; row-gap: 10px; min-width: max-content;
}
.tt-maker {
  grid-column: 1; display: flex; align-items: center; gap: 8px; padding-right: 12px;
  font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .03em; font-size: 14px;
}
.tt-maker .rep-mark { color: inherit; border-color: currentColor; }
.tt-cell {
  display: flex; justify-content: center; gap: 8px; padding: 0 10px; min-height: 76px;
  align-items: center; border-left: 1px solid var(--line);
}
.tt-foot {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 10px 4px;
  border-left: 1px solid var(--line); border-top: 1px solid var(--line);
  color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums;
}
.tt-foot b { font-size: var(--fs-figure); font-style: italic; font-weight: 800; color: var(--ink); line-height: 1; }
.tt-node {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--node);
}
.tt-node__face {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--node); background: radial-gradient(circle at 50% 40%, var(--raised), var(--bg));
  box-shadow: 0 0 0 0 transparent; transition: box-shadow var(--ease), transform var(--ease);
}
.tt-node__face img { width: 32px; height: 32px; object-fit: contain; display: block; }
/* Hexagon: an outer hex in the rim colour, the face inset inside it. */
.tt-node--hex .tt-node__face {
  width: 60px; height: 60px; border: 0; border-radius: 0; position: relative;
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
  background: var(--node);
}
.tt-node--hex .tt-node__face::before {
  content: ""; position: absolute; inset: 3px;
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
  background: radial-gradient(circle at 50% 40%, var(--raised), var(--bg));
}
.tt-node--hex .tt-node__face img { position: relative; width: 36px; height: 36px; }
.tt-node__pips { display: flex; gap: 4px; }
.tt-node__pips i { width: 5px; height: 5px; transform: rotate(45deg); background: currentColor; opacity: .22; }
.tt-node__pips i.lit { opacity: 1; box-shadow: 0 0 4px currentColor; }
/* Untouched nodes recede, as the game draws locked or unspent ones. */
.tt-node--off .tt-node__face { filter: saturate(.35) brightness(.7); }
.tt-node--off:hover .tt-node__face { filter: none; }
.tt-node:hover .tt-node__face, .tt-node:focus-visible .tt-node__face { transform: translateY(-2px); }
.tt-node.on .tt-node__face { box-shadow: 0 0 0 3px rgba(var(--link-rgb), .55), 0 0 18px rgba(var(--link-rgb), .35); }
.tt-node--hex.on .tt-node__face { filter: drop-shadow(0 0 8px rgba(var(--link-rgb), .6)); box-shadow: none; }
/* The lift alone is 2px -- too faint to find the keyboard on a tree of
   dozens of nodes; the ring is the one every other control wears. */
.tt-node:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: var(--radius); }
/* Build summary: points and steps, then the bonus, per who it applies to. */
.tt-sum {
  margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(var(--bg-rgb), .45);
}
.tt-sum__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.tt-sum__fig { display: flex; align-items: baseline; gap: 8px; }
.tt-sum__fig span { font-size: 11px; font-weight: 600; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.tt-sum__fig b { font-size: 13px; font-weight: 400; color: var(--ink); font-variant-numeric: tabular-nums; }
.tt-sum__fig i { font-style: normal; font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tt-sum__reset { margin-left: auto; }
.tt-sum__groups {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 20px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
}
.tt-sum__title {
  font-size: 12px; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink); margin-bottom: 4px;
}
.tt-sum__row {
  display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 4px 0;
  border-bottom: 1px dotted var(--line); color: var(--dim);
}
.tt-sum__row b { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.tt-sum__none { color: var(--faint); font-size: 13px; }
.tt-sum__note { margin: 10px 0 0; font-size: 11px; color: var(--faint); }
/* The picked node: description, a rule, then its step and costs. */
.tt-detail__row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tt-detail__row .tech-node { flex: 0 1 auto; min-width: 0; }
.tt-step {
  flex: 0 0 auto; display: flex; align-items: baseline; gap: 14px; white-space: nowrap;
  padding-left: 16px; border-left: 1px solid var(--line); align-self: stretch; align-items: center;
}
.tt-step__lv { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.tt-step__lv b { font-weight: inherit; }
.tt-step__next, .tt-step__spent { font-size: 12px; color: var(--faint); }
@media (max-width: 600px) {
  .tt-detail__row { flex-direction: column; gap: 10px; }
  .tt-step { padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
/* The node tip: floats beside the node, above the page. */
.tt-tip {
  position: fixed; z-index: var(--z-tip); width: min(320px, calc(100vw - 16px)); box-sizing: border-box;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-tip);
  pointer-events: none;
  display: flex; flex-direction: column; gap: 8px; font-size: 12px; line-height: 1.4;
}
.tt-tip[hidden] { display: none; }
.tip__head { display: flex; align-items: center; gap: 10px; }
.tip__icon { flex: none; width: 36px; height: 36px; object-fit: contain; }
.tip__icon--gray { filter: grayscale(.7); }
.tip__title { min-width: 0; line-height: 1.2; }
.tip__title b { font-size: 14px; font-weight: 700; }
.tip__title b.tip__caps { font-weight: 800; font-style: italic; text-transform: uppercase; }
.tip__meta { font-size: 11px; color: var(--dim); }
.tip__tag {
  flex: none; margin-left: auto; align-self: flex-start; padding: 1px 6px; /* scale: off — hairline tag beside a line of text */ font-size: 10px; font-weight: 700;
  color: var(--link); border: 1px solid rgba(var(--link-rgb), .5); border-radius: 3px; text-transform: uppercase;
}
.tip__body { color: var(--ink); }
/* Glossary term (app/terms.js): icon + italic name, dotted --link rule, unbroken; no italics in CJK. */
.skill-term { white-space: nowrap; }
.skill-term > i { text-decoration: underline dotted rgba(var(--link-rgb), .7) 1.5px; text-underline-offset: 3px; }
.skill-term[data-term] { cursor: help; }
.skill-term[data-term]:hover, .skill-term[aria-describedby] { color: var(--link); }
.skill-term[data-term]:hover > i, .skill-term[aria-describedby] > i { text-decoration-color: var(--link); }
.skill-term[data-term]:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.skill-term--still > i { text-decoration-color: var(--faint); }
.skill-term__icon { width: 1.1em; height: 1.1em; margin-right: .3em; vertical-align: -.2em; }
:is(:lang(ja),:lang(ko),:lang(zh)) :is(.skill-term i,.tip__term>b) { font-style: normal; }
.tip__icon--term { width: 22px; height: 22px; }
.tip__val { color: var(--accent); }
.tip__term { display: grid; gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.tip__term > b { font-size: 13px; font-style: italic; }
.tip__term > div { color: var(--dim); }
/* A tree node's tip: the figure of the step it is on. */
.tip__on { color: var(--pos); font-weight: 700; }
.tip__foot { font-size: 11px; color: var(--faint); border-top: 1px solid var(--line); padding-top: 8px; }
.tip__foot--step { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--dim); }
.tip__foot--step b { color: var(--ink); font-weight: 700; }
.tip__lock { font-size: 12px; color: var(--level); }
.tip__enh { display: flex; flex-direction: column; }
.tip__enh-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 6px; padding: 4px 0; }
.tip__enh-row > b:first-child { font-style: italic; color: var(--dim); }
.tip__enh-row--off { opacity: .4; }
.tip__enh-row--cur span { font-weight: 700; }
.tip__stat { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tip__stat b:first-child { font-size: 14px; font-weight: 800; }
.tip__stat b:last-child { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tip__rows { display: flex; flex-direction: column; gap: 2px; margin-top: -2px; }
.tip__rows div { display: flex; justify-content: space-between; gap: 10px; color: var(--dim); }
.tip__rows span:last-child { font-variant-numeric: tabular-nums; }
.tip__ink { color: var(--ink); }
/* A tree node in its own shape: a maker's ring, a common hexagon. */
.tip__node { --node: var(--link); flex: none; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.tip__node > span {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--node); border-radius: 50%; background: var(--sunken); box-sizing: border-box;
}
.tip__node--hex > span {
  border: 0; border-radius: 0; background: var(--node-ring);
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); position: relative;
}
.tip__node--hex > span::before {
  content: ""; position: absolute; inset: 2px; background: var(--sunken);
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
}
.tip__node img { position: relative; width: 22px; height: 22px; object-fit: contain; }
.tip__node--locked { filter: grayscale(1) brightness(.7); }
/* A closed tier, as the game greys it: dim nodes, the requirement in the footer. */
.tt-node--locked .tt-node__face { filter: grayscale(1) brightness(.45); }
.tt-node--locked { cursor: not-allowed; }
.tt-foot--locked b { color: var(--faint); }
.tt-foot__need { color: var(--level); }
.tt-tip .tech-node { border-bottom: 0; padding: 0; }
/* One shape for every node: description on top, the step line under a rule. */
.tt-tip .tt-detail__row { display: block; }
.tt-tip .tt-step {
  border-left: 0; padding: 8px 0 0; margin-top: 8px; border-top: 1px solid var(--line);
  flex-wrap: wrap; gap: 4px 14px; white-space: normal;
}
@media (max-width: 600px) {
  .tt { --tt-label: 44px; }
  .tt-maker span { display: none; }
}

/* A key level is where the manufacturer hands over a tank or a slot -- worth
   finding at a glance in a 21-row table. */
tbody tr.tech-key td:first-child { color: var(--accent); font-weight: 700; }

/* ------------------------------------------------------------------ cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
/* Section labels are set in caps with tracking -- the one typographic move
   the mockup leans on, and the reason the body face is a techy grotesque
   rather than a neutral one. Caps at this size need the letter-spacing to
   stay readable; without it the words close up. Applied to labels only,
   never to prose or to a tank's name. */
.card h2 {
  margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--dim);
  text-transform: uppercase; letter-spacing: .06em;
}
.card h3 {
  margin: 20px 0 8px; font-size: 12px; font-weight: 700; color: var(--dim);
  text-transform: uppercase; letter-spacing: .06em;
}
.card h3:first-of-type { margin-top: 0; }

.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 20px; }
.kv div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px dotted var(--line); padding: 4px 0; }
.kv span:first-child { color: var(--dim); }
.kv span:last-child { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }

/* -------------------------------------------------------------- roster head
   Shared by both roster views: the "Ростер" title (plain .card h2) plus a
   purpose-built filter row -- select per key, label above control. */
.filters { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.filter { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--dim); }

/* -------------------------------------------------------------- roster grid
   Default roster view: a card per tank. minmax(260px,1fr) never forces a
   second column narrower than 260px can hold, so this collapses to one
   column with no horizontal scroll on a 375px viewport unassisted. */
.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--stack-gap); }

.tank-card {
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: inherit; text-decoration: none;
  transition: transform var(--ease), border-color var(--ease), background var(--ease), box-shadow var(--ease);
}
.tank-card:hover, .tank-card:focus-visible {
  transform: translateY(-3px); border-color: var(--link); background: var(--raised);
  box-shadow: var(--shadow-lift);
}
.tank-card:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

.tank-card__art {
  position: relative; overflow: hidden; height: 128px;
  display: flex; align-items: center; justify-content: center;
  /* Diagonal hatch under the art, as in the mockup: it separates the band
     from the body without a second border, and gives a transparent icon
     something to sit against. Very low contrast on purpose -- it is a
     texture, not a pattern anyone should read. */
  background:
    repeating-linear-gradient(135deg, rgba(var(--link-rgb), .05) 0 1px, transparent 1px 7px),
    linear-gradient(160deg, var(--raised), var(--surface));
  border-bottom: 1px solid var(--line);
}
.tank-card__art img { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45)); }
/* The default skin's render tile, 320px source: shown at half its width. */
.tank-card__art img.tank-render { width: 160px; height: auto; }
/* The one motion idea on this page, see the stylesheet-level note near the
   reduced-motion block below: a glint sweeping over the art band, like
   light glancing off armour plate. On cards it only plays on hover/focus --
   27 of these firing at once on load would be the "scatter of effects" the
   brief asks to avoid, and it would compete with reading the grid. */
.tank-card__art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(232, 238, 244, .16) 50%, transparent 60%);
  transform: translateX(-130%);
  transition: transform .65s ease;
}
.tank-card:hover .tank-card__art::after, .tank-card:focus-visible .tank-card__art::after {
  transform: translateX(130%);
}

.tank-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; }
.tank-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tank-card__head .chip { padding: 4px 10px; font-size: 11px; flex: 0 0 auto; }
.tank-card__mfr {
  margin: 0; font-size: 11px; color: var(--dim);
  text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
}

.tank-card__stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line);
}
.stat { display: flex; align-items: center; gap: 4px; min-width: 0; }
.stat__i { flex: 0 0 auto; color: var(--faint); }
.stat__value {
  font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700;
  font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat__label {
  font-size: 10px; color: var(--dim);
  text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
}

/* ----------------------------------------------------------------- tables
   The dense sortable roster table -- second view, exactly as capable as the
   card grid's replacement of it: every column still sorts, every filter
   still applies. Data columns render in mono with tabular figures; label
   columns stay in the UI font. Roster columns 7-12 (HP...mass) are numeric;
   the levels/enhance tables are numeric throughout except the enhance
   table's Effect column (marked with an explicit inline left-align because
   it holds prose, not a figure). */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 13px; font-family: var(--font); }
th, td { padding: 8px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th {
  position: sticky; top: 0; background: var(--surface); cursor: pointer; user-select: none;
  font-size: 11px; font-weight: 700; color: var(--dim);
  text-transform: uppercase; letter-spacing: .05em;
}
th:hover { color: var(--ink); }
/* A head moved down with the page (stickyHead) sits over the rows. */
thead.is-stuck th { position: relative; z-index: 2; box-shadow: 0 1px 0 var(--line), 0 6px 12px -8px rgba(0, 0, 0, .6); }

/* Roster column 1 is the icon; numeric columns start at 8 (HP...mass). */
.card.scroll > table td:nth-child(n+8) { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.card > .scroll > table td { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.card > .scroll > table td[style*="text-align:left"],
.card > .scroll > table td[style*="text-align: left"] {
  font-family: var(--font); font-variant-numeric: normal; white-space: normal;
}

tbody tr {
  cursor: pointer; box-shadow: inset 0 0 0 0 var(--link);
  transition: box-shadow var(--ease), background var(--ease);
}
tbody tr:hover { box-shadow: inset 3px 0 0 0 var(--link); background: var(--raised); }
/* Column 2 (name) carries the clickable-row affordance now that column 1
   is the icon; scoped to the roster table specifically. --link, not
   --accent -- this is the interactive affordance, not a value. */
.card.scroll tbody tr td:nth-child(2) { color: var(--link); font-weight: 600; }
.card.scroll tbody tr:hover td:nth-child(2) { text-decoration: underline; text-underline-offset: 2px; }

/* Three tanks ship no icon in this build (see artFallback in app.js). An
   empty art band reads as a broken image; a dim silhouette reads as absent
   on purpose. Deliberately low-contrast -- it is a placeholder, not content,
   and must not compete with the 24 real icons next to it. */
/* Contribution rows under an attribute (tech tree, enhancement). Indented
   and dimmed so the eye reads one value per attribute with its sources
   hanging off it, instead of a flat list where '+14%' looks like a
   sibling of '3978'. The leading rule is the indent, not a bullet --
   the rows are contributions, not separate attributes. */
.kv .kv-sub { padding-left: 16px; font-size: 13px; }
.kv .kv-sub > span { color: var(--dim); }
.kv .kv-sub > span:last-child { color: var(--faint); font-weight: 400; }

.art-fallback { display: flex; align-items: center; justify-content: center; color: var(--dim); opacity: .3; }
.art-fallback svg { fill: currentColor; }
.roster-icon img { display: inline-block; vertical-align: middle; width: 32px; height: 32px; object-fit: contain; border-radius: var(--radius-sm); }

/* Cost-cell currency/material icons -- inline with the amount in the
   levels/enhance tables' cost column and the cumulative total line. 20px is
   deliberately close to the row's own text line box; vertical-align:bottom
   keeps a 20px inline box from growing an otherwise ~19.5px line. */
.cost-item { display: inline-flex; align-items: center; vertical-align: bottom; }
.cost-item + .cost-item { margin-left: .05em; }
.element-icon { width: 20px; height: 20px; object-fit: contain; margin-right: .3em; border-radius: 3px; }

/* -------------------------------------------------------- modifications
   One column, slot under slot, on a full-width card. A slot is a choice
   between its own items, so its items stack together under one heading
   instead of being scattered across the two-column .kv grid that used to
   hold them -- and the extra width is what lets each item keep its
   description on the same row as its icon and price.
   Icon column is a fixed 40px track so names line up down the list whether
   or not an item resolved to a texture (eight in this build do not). */
.mod-list { display: flex; flex-direction: column; }
.mod-item {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px; align-items: center;
  padding: 8px 0; border-bottom: 1px dotted var(--line);
}
.mod-item:last-child { border-bottom: none; }
.mod-item__icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--raised); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.mod-item__icon img { width: 40px; height: 40px; object-fit: contain; display: block; }
/* On the game's own backing the square tile goes: the shape is the frame. */
.mod-item__icon--framed { background: center / contain no-repeat; border: 0; border-radius: 0; overflow: visible; }
.mod-item__text { min-width: 0; }
.mod-item__name { color: var(--ink); font-weight: 600; font-size: 14px; }
.mod-item__desc { color: var(--dim); font-size: 13px; margin-top: 2px; }
.mod-item__cost {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-weight: 600; font-size: 13px; white-space: nowrap;
}

/* Under ~520px the price has nowhere left to go beside a wrapped
   description, so it drops under the text and keeps the icon column. */
@media (max-width: 600px) {
  .mod-item { grid-template-columns: 40px minmax(0, 1fr); }
  .mod-item__cost { grid-column: 2; }
}
/* A phone: a level's modifications as icons in a row; a tap opens the name,
   text and cost in the tip (tapTip). */
@media (max-width: 600px) {
  div.mod-grid { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 0 8px; }
  .mod-item { display: flex; padding: 6px; border: 0; border-radius: var(--radius); background: var(--raised); cursor: pointer; }
  .mod-item__text, .mod-item__cost { display: none; }
  .mod-item:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
}

/* ------------------------------------------------------------- tank hero
   No border, full width: the tier's colour glows from behind the art on
   the right, the identity stack reads down the left. The art is the large
   render (DT_Skins.BigIcon, trimmed to ~550-700px wide) at no more than
   360px, so never shown above its source size; without it, the 216px icon
   at half size (see renderTank). */
.thero {
  --tier-rgb: 152, 162, 200;
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  display: flex; flex-direction: row-reverse; align-items: center; gap: 24px;
  padding: 28px 28px 32px;
  background: radial-gradient(ellipse 60% 90% at 78% 60%, rgba(var(--tier-rgb), .32), transparent 65%),
              linear-gradient(180deg, var(--surface), var(--bg));
}
.thero[data-rarity="Rare"]           { --tier-rgb: var(--rarity-rare-rgb); }
.thero[data-rarity="SuperRare"]      { --tier-rgb: var(--rarity-superrare-rgb); }
.thero[data-rarity="SuperSuperRare"] { --tier-rgb: var(--rarity-supersuperrare-rgb); }
.thero__art { flex: 1 1 auto; display: flex; justify-content: center; align-items: center; min-height: 200px; }
.hero-art img { width: 108px; height: 108px; object-fit: contain; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .6)); transform: scale(1); }
.hero-art img.hero-render { width: 100%; max-width: 360px; height: auto; }
.thero__text { flex: 0 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.thero__back { font-size: 12px; color: var(--dim); text-decoration: none; }
.thero__back:hover { color: var(--ink); }
.thero__badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plate {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px;
  background: var(--raised); color: var(--dim); border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; line-height: 1;
}
/* The rarity plate is the one filled in its tier's colour, dark text on it. */
.plate--rarity {
  background: rgb(var(--tier-rgb, 152, 162, 200)); color: var(--bg);
  font-size: 12px; font-weight: 700; font-style: italic; letter-spacing: .06em;
}
.plate--rarity[data-rarity="Rare"]           { --tier-rgb: var(--rarity-rare-rgb); }
.plate--rarity[data-rarity="SuperRare"]      { --tier-rgb: var(--rarity-superrare-rgb); }
.plate--rarity[data-rarity="SuperSuperRare"] { --tier-rgb: var(--rarity-supersuperrare-rgb); }
.plate__mark { display: inline-flex; width: 16px; height: 16px; color: var(--ink); }
.plate__mark .mfr-glyph { width: 100%; height: 100%; }
.thero__name {
  margin: 0; font-size: var(--fs-hero); line-height: .95; font-weight: 800; font-style: italic;
  text-transform: uppercase; letter-spacing: .02em; color: var(--ink); overflow-wrap: anywhere;
}
.thero__name[data-rarity="Rare"]           { color: var(--rarity-rare); }
.thero__name[data-rarity="SuperRare"]      { color: var(--rarity-superrare); }
.thero__name[data-rarity="SuperSuperRare"] { color: var(--rarity-supersuperrare); }
.thero__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.thero__tags .tag { margin: 0; height: 26px; padding: 0 10px; font-size: 12px; display: inline-flex; align-items: center; color: var(--ink); }
.thero__spacer { height: 45px; } /* the two lines the Power Move text used to fill */
.thero__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ----------------------------------------------------------------- buttons */
/* inline-flex, no underline: "To builder" is an <a> and must read as the
   <button>s beside it. */
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  height: var(--ctl-lg); padding: 0 16px; border-radius: var(--radius);
  border: 1px solid rgba(var(--link-rgb), .5); background: transparent; color: var(--link);
  font: inherit; font-size: 14px; font-weight: 700; font-style: italic;
  text-transform: uppercase; letter-spacing: .04em; cursor: pointer;
  transition: background var(--ease), border-color var(--ease);
}
.btn-secondary:hover { background: rgba(var(--link-rgb), .12); }
.btn-secondary:active { background: rgba(var(--link-rgb), .22); }
.btn-secondary.on { background: rgba(var(--link-rgb), .16); border-color: var(--link); }
.btn-secondary:disabled { border-color: var(--line); color: var(--faint); background: transparent; cursor: not-allowed; }
.btn-ghost {
  height: var(--ctl-sm); padding: 0 12px; border: 0; border-radius: var(--radius);
  background: transparent; color: var(--dim); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background var(--ease), color var(--ease);
}
.btn-ghost:hover { background: var(--raised); color: var(--ink); }

/* ------------------------------------------------------------ tank body */
.tbody { display: flex; flex-direction: column; gap: var(--stack-gap); }
.tbody__cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--stack-gap); align-items: stretch; }
/* Side by side, the two panels share one height; the shorter keeps its
   content at the top. */
.tbody__cols > .tbody__col > .panel:only-child { flex: 1 1 auto; }
/* Similar tanks: the phone roster's rows (.rrow) on the panel's raised step,
   four to a line on a desktop, one column on a phone. */
.tsimilar { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.tsimilar .rrow { position: relative; padding-right: var(--ctl-xl); /* room for the 44 px compare button */ background: var(--raised); transition: border-color var(--ease); }
.tsimilar .rrow:hover { border-color: var(--faint); }
.tsimilar .rrow:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
/* The maker as the roster card's corner mark, top right of the row (the
   row's 44px right padding keeps it clear). */
.tsimilar .card-mfr { top: 8px; right: 8px; }
@media (max-width: 600px) { .tsimilar { grid-template-columns: minmax(0, 1fr); } }
.tbody__col { display: flex; flex-direction: column; gap: var(--stack-gap); min-width: 0; }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--panel-pad); display: flex; flex-direction: column; gap: var(--panel-gap); min-width: 0;
}
.panel__head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  border-bottom: 1px solid var(--line); padding-bottom: 12px;
}
.panel__title {
  margin: 0; font-size: 18px; font-weight: 700; font-style: italic;
  text-transform: uppercase; letter-spacing: .03em; color: var(--ink);
}
.panel__count { margin-left: 8px; font-size: 14px; color: var(--faint); font-style: normal; font-weight: 600; }
.panel__note { font-size: 12px; color: var(--dim); }
.panel__sub {
  margin: 4px 0 -4px; font-size: 11px; font-weight: 600; color: var(--faint);
  text-transform: uppercase; letter-spacing: .06em;
}
.panel__foot { margin: 0; font-size: 12px; color: var(--faint); }
.empty {
  border: 1px dashed var(--line); border-radius: var(--radius-lg); padding: 20px; color: var(--dim); text-align: center;
}
.empty__why { margin-top: 4px; font-size: 12px; color: var(--faint); font-family: var(--mono); }

/* Characteristics: three tiles, then the rest as a dotted two-column list. */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.trio__tile {
  background: var(--raised); border-radius: var(--radius); padding: 12px 14px;
  display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
}
.trio__tile .stat__i { grid-row: 1 / 3; width: 26px; height: 26px; }
.trio__value { font-size: var(--fs-figure); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.trio__label { font-size: 11px; color: var(--dim); }
.attrs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.attrs__row {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  border-bottom: 1px dotted var(--line); padding: 8px 0; font-size: 13px;
}
.attrs__k { color: var(--dim); display: inline-flex; align-items: center; gap: 6px; }
.attrs__v { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Abilities: the game's own Power Move and Perk icons. */
.ability { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; }
.ability + .ability { border-top: 1px solid var(--line); padding-top: 14px; }
.ability__icon { width: 56px; height: 56px; border-radius: var(--radius); background: var(--raised); overflow: hidden; }
.ability__icon img { width: 56px; height: 56px; display: block; object-fit: contain; }
.ability__kicker { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.ability__kicker--skill { color: var(--link); }
.ability__kicker--trait { color: var(--pos); }
.ability__name {
  font-size: 18px; font-weight: 700; font-style: italic; text-transform: uppercase;
  letter-spacing: .02em; color: var(--ink); line-height: 1.2; margin-top: 2px;
}
.ability__desc { margin: 4px 0 0; font-size: 13px; color: var(--dim); }
.ability__stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px;
  margin: 8px 0 0; font-size: 12px;
}
.ability__stat { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; min-width: 0; }
.ability__stats dt { color: var(--dim); }
.ability__stats dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Modifications: each level's heading, then its items two to a row. */
.slot-emblem { flex: 0 0 auto; display: block; }
.panel__sub--mod { display: flex; align-items: center; gap: 6px; }
.mod-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }

/* Chips. */
.chip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.chip-tile {
  background: var(--raised); border-radius: var(--radius); padding: 8px 10px;
  display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center;
}
.chip-tile__icon { width: 36px; height: 36px; }
.chip-tile__icon img { width: 36px; height: 36px; display: block; object-fit: contain; }
.chip-tile__name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-tile__tier { font-size: 11px; color: var(--dim); }
.chip-tile__tier[data-tier="Golden"]    { color: var(--rarity-supersuperrare); }
.chip-tile__tier[data-tier="Prismatic"] { color: var(--rarity-superrare); }

/* Levels: folded to 1-4, the selected level and the last. */
table.lv td, table.lv th { text-align: right; }
table.lv td:first-child, table.lv th:first-child, table.lv td.lv__cost, table.lv th:last-child { text-align: left; }
table.lv tr.lv__now td { background: var(--raised); }
table.lv tr.lv__now td:first-child { box-shadow: inset 3px 0 0 0 var(--level); color: var(--level); font-weight: 700; }
table.lv tr.lv__gap td { text-align: center; color: var(--faint); padding: 0; line-height: 1.2; }
.lv__cost .cost-item + .cost-item { margin-left: 14px; }
.lv__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.lv__foot .btn-ghost { background: var(--raised); height: var(--ctl); }
.lv__total {
  display: flex; align-items: center; gap: 14px; background: var(--raised);
  border-radius: var(--radius); padding: 8px 12px;
}
.lv__total-label { font-size: 11px; font-weight: 600; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.lv__total-cost { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lv__total-cost .cost-item + .cost-item { margin-left: 14px; }

/* Enhancements: one tile per level, five to a row on a desktop panel. */
.enh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.enh {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 12px 8px; border-radius: var(--radius); background: var(--raised);
}
.enh__icon img { width: 48px; height: 48px; display: block; }
.enh__n {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
}
.enh__name { font-size: 12px; color: var(--dim); }
.enh__value { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.enh__cost { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Cosmetics: each skin's render, names under them; striped placeholders
   where the build has no render file (the single-file Artifact build). */
/* Tiles stop at 160px and a wide panel gets more columns instead: the
   renders are 320px wide (dump_renders.py SKIN_PX), 2x the widest tile. */
.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 160px)); gap: 10px; }
.skin__art {
  aspect-ratio: 1; border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, var(--raised) 0 8px, #26305a 8px 16px);
}
.skin__art--img {
  aspect-ratio: 16 / 10; background: var(--raised);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  cursor: zoom-in; /* opens in the lightbox */
}
.skin__art--img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.skin__name { margin-top: 6px; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
/* A season's skin: its event as a small link under the name; on the event
   page, the tank it belongs to and the price. */
.skin__event {
  display: inline-block; margin-top: 4px; padding: 1px 6px; /* scale: off — hairline tag */ border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 600; color: var(--link); background: rgba(var(--link-rgb), .12); text-decoration: none;
}
.skin__event:hover { background: rgba(var(--link-rgb), .22); }
.skin__tank { display: block; margin-top: 2px; font-size: 12px; color: var(--link); text-decoration: none; }
.skin__tank:hover { text-decoration: underline; }
.skin__cost { margin-top: 4px; font-size: 12px; color: var(--dim); }

/* By the page's column, not the window (953 = the old 1000px window
   rule): at 1001-1100 one column spread a stat's name and value 450px apart. */
@container page (max-width: 953px) {
  .tbody__cols { grid-template-columns: minmax(0, 1fr); }
  .chip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  /* Text, then the tank's picture, then its actions: the text box's parts
     join the hero's own column (display: contents) so the actions can sit
     under the picture. */
  .thero { flex-direction: column; align-items: stretch; padding: 16px; gap: 12px; }
  .thero__text { display: contents; }
  .thero__art { flex: 0 0 auto; min-height: 0; order: 1; }
  .thero__actions { order: 2; }
  .thero__name { font-size: 40px; }
  /* Damage, HP, armour in one row: the icon over the figure. */
  .trio__tile { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 10px 6px; row-gap: 2px; }
  .trio__tile .stat__i { grid-row: auto; width: 24px; height: 24px; }
  .trio__value { font-size: 18px; }
  .attrs, .mod-grid { grid-template-columns: minmax(0, 1fr); }
  /* Enhancements as a column of one-line rows. */
  .enh-grid { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .enh { flex-direction: row; text-align: left; gap: 12px; padding: 6px 12px; }
  .enh__icon img, .enh__n { width: 36px; height: 36px; }
  .enh__name { flex: 1 1 auto; min-width: 0; font-size: 13px; }
  .enh__value { flex: none; font-size: 14px; font-weight: 600; }  /* as the characteristics' figures */
  .chip-grid { grid-template-columns: minmax(0, 1fr); }
  .skin-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ability { grid-template-columns: 44px minmax(0, 1fr); }
  .ability__icon, .ability__icon img { width: 44px; height: 44px; }
}

.tags { margin: 16px 0 0; }
.tag {
  display: inline-block; border: 1px solid var(--line); background: var(--raised); color: var(--dim);
  border-radius: var(--radius-sm); padding: 4px 10px; font-size: 12px; margin: 0 6px 6px 0;
}

/* Footnote mark for text that isn't actually in the picked language yet --
   e.g. chip/modification names this build only carries as untranslated
   source text. A hover-only title names the real source culture; --faint
   (tertiary) keeps it reading as a footnote, not a warning. */
.loc-note { color: var(--faint); margin-left: 4px; cursor: help; font-size: .8em; }

.card--wide { grid-column: 1 / -1; }


/* ------------------------------------------------------------------ misc */
.muted { color: var(--dim); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }

details summary { cursor: pointer; color: var(--dim); font-size: 13px; padding: 4px 0; }
details summary:hover { color: var(--ink); }
details pre {
  margin: 8px 0 0; padding: 12px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-family: var(--mono); font-size: 12px; line-height: 1.5;
}

select {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 8px;
}

/* ------------------------------------------------------------ a11y & motion
   The page's one motion idea -- a glint suggesting light on armour plate,
   see .tank-card__art::after above -- is deliberately singular and
   hover-triggered. The tank hero's one-shot glint is gone, per the handoff.
   Nothing else on the page animates. It is removed
   outright under reduced motion, on top of the blanket transition/
   animation-duration collapse below, which covers every other transition
   on the page (card hover lift, chip/button hover, table row hover). */
a:focus-visible, button:focus-visible, select:focus-visible,
input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--link); outline-offset: 2px; border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
  .tank-card__art::after { display: none; }
}

/* A phone: the bar stays on screen, so it is no taller than it has to be --
   the 52px row and nothing above or below it. */
@media (max-width: 600px) {
  .topbar { padding: 0 12px; }
}

/* Marker carrying a derived figure's definition, next to the figure itself. */
.info-mark {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; margin-left: .35em; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--dim); font-size: 10px; font-weight: 600; font-style: italic;
  line-height: 1; cursor: help; vertical-align: middle; user-select: none;
}
.info-mark:hover, .info-mark:focus-visible { color: var(--link); border-color: var(--link); }

/* ------------------------------------------------------------ patch notes */
.patch__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.patch__entry { background: var(--raised); border-radius: var(--radius); padding: 10px 12px; min-width: 0; }
.patch__name {
  font-size: 15px; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .02em;
  color: var(--ink); text-decoration: none;
}
.patch__name:hover { color: var(--link); }
.patch__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.patch__art { flex: none; width: 48px; height: 30px; display: grid; place-items: center; }
.patch__art img { max-width: 48px; max-height: 30px; width: auto; height: auto; object-fit: contain; }
.patch__portrait { flex: none; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--bg); }
.patch__lines { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
/* Label and value share a line when they fit and wrap only when they do not:
   "Lv. 1 · Base Damage  851 → 935" is one line, a long description drops
   under its label. */
.patch__line { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 2px; font-size: 13px; }
.patch__icon { flex: none; width: 20px; height: 20px; object-fit: contain; align-self: center; }
.patch__field { color: var(--dim); }
.patch__val { min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.patch__old { color: var(--faint); text-decoration: line-through; }
.patch__new { color: var(--ink); font-weight: 600; }
.patch__up { color: var(--pos); }
.patch__down { color: var(--neg); }
.patch__add { color: var(--pos); }
.patch__del { color: var(--neg); }
.patch__note { color: var(--faint); font-size: 12px; }
@media (max-width: 760px) {
  .patch__grid { grid-template-columns: minmax(0, 1fr); }
}

/* Operator perks: four slots, a choice in each. */
.opskill__icon img { width: 48px; height: 48px; display: block; object-fit: contain; }
/* A profile item as a reward: the item's own picture, its kind in the
   tooltip. */
.reward-item { display: inline-flex; justify-content: center; cursor: help; }
.reward-item img { width: 36px; height: 36px; display: block; object-fit: contain; }
/* Operator perks: a track of levels, each a row -- the level badge on the
   left on a line that runs down the track, its choices on the right. */
.perks { display: flex; flex-direction: column; gap: var(--stack-gap); }
/* The badges, each centred on its row, are joined by a line: from a row's
   centre down across the gap, and from the top of the next row to its
   centre -- so it meets the badge centres whatever the rows' heights. */
.perks__row { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 20px; align-items: center; }
.perks__row:not(:last-child)::after, .perks__row:not(:first-child)::before {
  content: ""; position: absolute; left: 27px; width: 2px; background: var(--line);
}
.perks__row:not(:last-child)::after { top: 50%; bottom: -16px; }
.perks__row:not(:first-child)::before { top: 0; bottom: 50%; }
.perks__lv {
  position: relative; z-index: var(--z-raise);
  width: 56px; height: 56px; border-radius: var(--radius); background: var(--raised);
  border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.perks__lv-k { font-size: 10px; font-weight: 600; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; line-height: 1; }
.perks__lv-n { font-size: var(--fs-figure); font-weight: 800; font-style: italic; line-height: 1.05; color: var(--ink); }
.perks__choices { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; gap: 10px; }
.perks__choices--one { grid-template-columns: minmax(0, 1fr); }
.perk {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 12px; align-items: start;
  padding: 12px 14px; border-radius: var(--radius); background: var(--raised); border: 1px solid transparent;
}
.perk:hover { border-color: var(--line); }
.perk__icon { width: 44px; height: 44px; }
.perk__icon img { width: 44px; height: 44px; display: block; object-fit: contain; }
.perk__text { min-width: 0; }
.perk__name { font-size: 14px; font-weight: 700; color: var(--ink); }
.perk__desc { font-size: 12px; color: var(--dim); margin-top: 4px; line-height: 1.4; }
/* The cost on the name's line, at the card's right edge. */
.perk__cost {
  grid-column: 3; grid-row: 1; white-space: nowrap; line-height: 21px;
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
@media (max-width: 600px) {
  .perks__row { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
  .perks__row:not(:last-child)::after, .perks__row:not(:first-child)::before { left: 21px; }
  .perks__lv { width: 44px; height: 44px; }
  .perks__lv-n { font-size: 18px; }
}
/* A phone: a perk is its icon and name, two to a row beside the level; a
   tap opens the text and cost in the tip (perksPanel). */
@media (max-width: 600px) {
  .perks__choices { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .perks__choices--one { grid-template-columns: minmax(0, 1fr); }
  .perk {
    grid-template-columns: 32px minmax(0, 1fr); grid-template-rows: auto; column-gap: 8px;
    align-items: center; padding: 6px 8px; min-height: 44px; cursor: pointer;
  }
  .perk__icon, .perk__icon img { width: 32px; height: 32px; grid-row: auto; }
  .perk__name {
    font-size: 12px; line-height: 1.25; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .perk__desc, .perk__cost { display: none; }
  .perk:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
}

/* ---------------------------------------------------------------- phone
   The handoff's phone layout (<= 600px): burger and drawer instead of tabs,
   only Compare left in the bar, the roster as a list (renderRosterList),
   one scrolling row per filter group, the level slider full width. */
.burger, .lang--drawer, .scrim { display: none; }
/* The drawer's own wordmark: as specific as .tabs a, which would show it in
   the bar; the phone's rule below brings it back in the drawer. */
.tabs .brand--drawer, .drawer-head { display: none; }
.roster-list { display: flex; flex-direction: column; gap: 8px; }
.rrow {
  --tier-rgb: 152, 162, 200;
  display: flex; gap: 10px; align-items: center; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  color: var(--ink); text-decoration: none;
}
.rrow[data-rarity="Rare"]           { --tier-rgb: var(--rarity-rare-rgb); }
.rrow[data-rarity="SuperRare"]      { --tier-rgb: var(--rarity-superrare-rgb); }
.rrow[data-rarity="SuperSuperRare"] { --tier-rgb: var(--rarity-supersuperrare-rgb); }
.rrow.on { border-color: var(--link); box-shadow: inset 3px 0 0 0 var(--link); }
.rrow .cmp-toggle { position: static; width: var(--ctl-xl); height: var(--ctl-xl); margin: -11px -11px -11px -11px; flex: 0 0 auto; }
.rrow .cmp-toggle input { width: 24px; height: 24px; border-width: 0; border-radius: var(--radius-sm); }
.rrow__art {
  flex: 0 0 auto; width: 64px; height: 40px; border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse 80% 70% at 50% 100%, rgba(var(--tier-rgb), .28), transparent 70%), var(--raised);
  position: relative;
}
/* The maker's mark on the preview's corner: the row's own right edge holds the figures. */
.rrow__art .card-mfr { top: 2px; right: 2px; width: 18px; height: 18px; }
.rrow__art img { width: 64px; height: 40px; object-fit: cover; display: block; }
.rrow__art img.tank-render { width: 64px; height: 40px; object-fit: contain; }
.rrow__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.rrow__name {
  font-size: 15px; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rrow__name[data-rarity="Rare"]           { color: var(--rarity-rare); }
.rrow__name[data-rarity="SuperRare"]      { color: var(--rarity-superrare); }
.rrow__name[data-rarity="SuperSuperRare"] { color: var(--rarity-supersuperrare); }
.rrow__meta { font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rrow__nums { flex: 0 0 auto; display: flex; flex-direction: column; gap: 0; align-items: flex-end; }
.rrow__num { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rrow__num .stat__i { width: 12px; height: 12px; }

/* The bar fits brand, seven sections, Compare and the language from about
   1100px: narrower, the sections go into the drawer behind the burger (a
   tablet keeps Compare and the language in the bar, a phone only Compare). */
@media (max-width: 1100px) {
  .topbar__inner { flex-wrap: nowrap; height: 52px; min-height: 52px; padding: 0 8px 0 4px; gap: 8px; }
  .burger {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
    width: var(--ctl-xl); height: var(--ctl-xl); flex: 0 0 auto; background: transparent; border: 0; cursor: pointer;
  }
  .burger span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 1px; }
  .brand { font-size: 18px; white-space: nowrap; }
  .tabs {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: var(--z-menu); width: min(280px, 85vw);
    flex-direction: column; flex-wrap: nowrap; gap: 4px; padding: 64px 12px 16px;
    background: var(--surface); border-right: 1px solid var(--line);
    transform: translateX(-100%); overflow-y: auto;
    /* Closed, the drawer is hidden at once (no slide out): a fixed box down
       the whole screen, even off it, is what Safari on iOS picks its bottom
       bar's colour from; hidden only after the slide, the band lingered. */
    visibility: hidden; transition: visibility 0s;
  }
  /* The dimming is the drawer's shadow, not the scrim's background: Safari
     on iOS tints its bottom bar with the colour of a fixed box touching the
     bottom edge and kept a black band there after the drawer closed. The
     scrim stays, transparent, to take the tap that closes the drawer. */
  body.nav-open .tabs {
    transform: none; visibility: visible; transition: transform var(--ease), visibility 0s;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .5);
  }
  /* The site's name heads the drawer, as it heads the bar, a close button
     across from it. */
  .drawer-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin: -48px 2px 12px; padding: 0 0 10px; border-bottom: 1px solid var(--line);
  }
  .tabs .drawer-head .brand--drawer {
    display: block; margin: 0; padding: 0; font-size: 20px; letter-spacing: .01em;
    color: var(--ink); background: none; box-shadow: none;
  }
  .drawer-close {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: var(--ctl-lg); height: var(--ctl-lg); margin-right: -8px; padding: 0; border: 0; border-radius: var(--radius-sm);
    background: transparent; color: var(--dim); cursor: pointer;
  }
  .drawer-close:hover { color: var(--ink); background: var(--raised); }
  .drawer-close:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
  .tabs a { padding: 12px 14px; font-size: 15px; gap: 12px; }
  .tabs .nav-ico { display: block; color: var(--faint); }
  .tabs a.on .nav-ico, .tabs a:hover .nav-ico { color: var(--link); }
  .tabs a.on { background: var(--raised); box-shadow: inset 3px 0 0 0 var(--link); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: var(--z-scrim); background: transparent; }
}
@media (max-width: 600px) {
  .topbar__right > .lang { display: none; }
  .lang--drawer { display: flex; margin-top: auto; padding: 12px 2px 0; }
  .lang--drawer .lang-btn { width: 100%; height: var(--ctl-xl); font-size: 15px; }
  .lang--drawer .lang-btn .filters__chev { margin-left: auto; }
  /* 6px above the button, as Sort by's list: the block has 12px on top. */
  .lang--drawer .sort-ctl__menu.sort-ctl__menu--up { bottom: calc(100% - 6px); }

  main { padding: 16px var(--gutter); gap: 12px; }
  .sect__title { font-size: 24px; }
  .sect__controls { width: 100%; }
  .sect__controls .view { display: none; }
  .ctl--level { flex: 1 1 auto; }
  .ctl--level input[type="range"] { flex: 1 1 auto; min-width: 0; height: var(--ctl-xl); margin: 0; }
  .filters-card { padding: 12px; }
  .search-box, input.search { width: 100%; }
  .filters__top .search-box { flex: 1 1 0; width: auto; min-width: 0; }
  .filters__toggle { height: var(--ctl-xl); min-width: var(--ctl-xl); justify-content: center; }
  /* iPhone zooms into a field set under 16px when it gets focus. */
  input.search { height: var(--ctl-xl); font-size: 16px; background: var(--surface); }
  .filters__reset { margin-left: 0; }
  .pills {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 -12px; padding: 0 12px; width: calc(100% + 24px);
  }
  .pills::-webkit-scrollbar { display: none; }
  .pill { height: var(--ctl); flex: 0 0 auto; }
  .pills__label { flex: 0 0 auto; }
}

/* Favourites: a star beside the compare tick, on cards, rows and the table. */
.fav-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 18px; line-height: 1; color: var(--line-strong);
}
.fav-toggle:hover { color: var(--rarity-supersuperrare); }
.fav-toggle.on { color: var(--rarity-supersuperrare); }
.fav-toggle:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; border-radius: var(--radius-sm); }
.tank-card__ticks { display: flex; align-items: center; gap: 2px; margin: -4px -6px -4px 0; }
.tank-card__ticks .cmp-toggle { margin: 0; }
.roster-icon .fav-toggle { display: inline-flex; vertical-align: middle; width: 24px; height: 24px; font-size: 16px; margin-right: 4px; }
.rrow .fav-toggle { width: var(--ctl-sm); height: var(--ctl-sm); }
.btn-fav.on { color: var(--rarity-supersuperrare); border-color: var(--rarity-supersuperrare); }
.filters__fav.on { color: var(--rarity-supersuperrare); border-color: var(--rarity-supersuperrare); }
.filters__fav:disabled { opacity: .45; cursor: default; }
/* The star is drawn, not text: the button's name (aria-label) has to hold
   all of its visible words, and a star is not one. */
.filters__fav::before { content: '°5'; }

/* Roster sort: a button like "Фильтры" opening a page-styled list, and a
   square direction button. */
.sort-ctl { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.sort-ctl__value { color: var(--ink); font-weight: 700; }
.sort-ctl__open[aria-expanded="true"] .filters__chev { transform: rotate(180deg); }
.sort-ctl__dir { width: 36px; padding: 0; justify-content: center; font-size: 15px; }
.sort-ctl__menu {
  position: absolute; z-index: var(--z-menu); top: calc(100% + 6px); left: 0; min-width: 100%;
  list-style: none; margin: 0; padding: 6px; outline: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}
.sort-ctl__opt {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 26px; /* scale: off — room for the tick */ position: relative;
  border-radius: var(--radius-sm); font-size: 13px; color: var(--ink); cursor: pointer; white-space: nowrap;
}
.sort-ctl__opt.on { background: var(--raised); }
.sort-ctl__opt--cur { color: var(--link); font-weight: 600; }
.sort-ctl__opt--cur::before { content: "✓"; position: absolute; left: 9px; }

/* Tank page: previous / next as tabs on the hero's edges (handoff 2026-10-04).
   The tab sits in the hero's 28px padding; a card slides out beside it on
   hover. The wrapper lets the pointer through, only the tab takes it. */
.thero__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  display: flex; align-items: center; text-decoration: none; pointer-events: none;
}
/* The tabs fill the hero's 28px side padding exactly, so with them on the
   page the padding grows to 48px: a 20px gap between a tab and the text. */
.thero--nav { padding-left: 48px; padding-right: 48px; }
.thero__arrow--prev { left: 0; }
.thero__arrow--next { right: 0; flex-direction: row-reverse; }
.thero__tab {
  pointer-events: auto; width: 28px; height: 72px; display: flex; align-items: center; justify-content: center;
  background: rgba(var(--bg-rgb), .7); border: 1px solid var(--line);
  color: var(--link); font-size: 22px; line-height: 1;
  transition: background var(--ease), border-color var(--ease);
}
.thero__arrow--prev .thero__tab { border-left: 0; border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.thero__arrow--next .thero__tab { border-right: 0; border-radius: var(--radius-md) 0 0 var(--radius-md); }
.thero__arrow:hover .thero__tab, .thero__arrow:focus-visible .thero__tab { background: var(--raised); border-color: var(--link); }
.thero__arrow:focus-visible { outline: none; }
.thero__peek {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; white-space: nowrap; pointer-events: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
  opacity: 0; transition: opacity var(--ease), transform var(--ease);
}
.thero__arrow--prev .thero__peek { margin-left: 8px; transform: translateX(-8px); }
.thero__arrow--next .thero__peek { margin-right: 8px; transform: translateX(8px); flex-direction: row-reverse; }
.thero__arrow:hover .thero__peek, .thero__arrow:focus-visible .thero__peek { opacity: 1; transform: translateX(0); }
.thero__peek-art { width: 56px; height: 36px; background: center / contain no-repeat; }
.thero__peek-text { display: flex; flex-direction: column; gap: 2px; }
.thero__arrow--next .thero__peek-text { align-items: flex-end; }
.thero__peek-kicker { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.thero__peek-name { font-size: 16px; font-weight: 700; font-style: italic; text-transform: uppercase; letter-spacing: .02em; color: var(--ink); }
.thero__peek-name[data-rarity="Common"]         { color: var(--rarity-common); }
.thero__peek-name[data-rarity="Rare"]           { color: var(--rarity-rare); }
.thero__peek-name[data-rarity="SuperRare"]      { color: var(--rarity-superrare); }
.thero__peek-name[data-rarity="SuperSuperRare"] { color: var(--rarity-supersuperrare); }
@media (max-width: 600px) {
  .thero__arrow { display: none; }
  .filters__top .sort-ctl { flex: 1 1 100%; }
  .filters__top .sort-ctl__open { flex: 1 1 auto; height: var(--ctl-xl); }
  .filters__top .sort-ctl__open .filters__chev { margin-left: auto; }
  .filters__top .sort-ctl__dir { width: var(--ctl-xl); height: var(--ctl-xl); }
  .filters__fav { height: var(--ctl-xl); }
  /* Search, filters and favourites in one row: the two buttons as icons. */
  .filters__top { gap: 8px; }
  .filters__top .filters__toggle:not(.sort-ctl__open):not(.sort-ctl__dir) { padding: 0 12px; gap: 6px; }
  .filters__top .filters__label, .filters__top .filters__toggle:not(.sort-ctl__open) .filters__chev { display: none; }
  .thero--nav { padding-left: 16px; padding-right: 16px; }
  .ability__stats { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- touch */
/* Which hint a node's controls get: by the input, not the width -- a tablet
   with a mouse clicks, a large phone taps. */
.hint-touch { display: none; }
@media (hover: none) {
  .hint-mouse { display: none; }
  .hint-touch { display: inline; }
}
/* A tip with buttons in it (a tree node on touch) takes taps. */
.tt-tip--live { pointer-events: auto; }
.tip__steps { display: flex; gap: 8px; }
.tip__step {
  flex: 1 1 0; height: var(--ctl-lg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--raised); color: var(--ink); font: inherit; font-size: 20px; font-weight: 700; cursor: pointer;
}
.tip__step:disabled { opacity: .35; cursor: default; }
/* The marker's own 14px circle, tapped through a larger box around it. */
.info-mark::after { content: ''; position: absolute; inset: -6px; }

/* A box that scrolls sideways fades at the edge where more is hidden
   (scrollHint in app.js sets the flags). */
.scroll.more-right, .tt-scroll.more-right {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
}
.scroll.more-left.more-right, .tt-scroll.more-left.more-right {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}
.scroll.more-left:not(.more-right), .tt-scroll.more-left:not(.more-right) {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 40px);
  mask-image: linear-gradient(to right, transparent, #000 40px);
}

@media (max-width: 600px) {
  /* Room for a finger: 44px, the project's floor (WCAG 2.5.5). Small marks
     keep their look and take taps through a box around them; buttons grow. */
  .patch__name { display: inline-block; padding: 4px 0; }
  .thero__back { display: inline-block; padding: 6px 0; }
  .brand, .patch__name, .thero__back, .topbar__right .cmp-pill, .info-mark { position: relative; }
  .brand::after, .patch__name::after, .thero__back::after, .topbar__right .cmp-pill::after {
    content: ''; position: absolute; left: 50%; top: 50%;
    width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%);
  }
  .info-mark::after { inset: -16px; }
  .btn-ghost, .event-anim, .rep-strip__tab, .tip__step, .bld-stat { min-height: var(--ctl-xl); }
  .rrow .fav-toggle { width: var(--ctl-xl); height: var(--ctl-xl); }
  .bld-stat { display: flex; flex-direction: column; justify-content: center; }
  .skin__tank { display: flex; align-items: center; min-height: 44px; margin-top: 0; }
  .bld-eff { min-height: 28px; }
  .cmpx__name { padding: 2px 0; }
  /* No text under 11px on a phone, the common small labels at 12. */
  .card-rarity, .bld-tree__foot span, .bld-tile__sub, .bld-chip small, .bld-skill__k,
  .bld-irow__or, .bld-bar__fig .pos, .perks__lv-k, .info-mark, .thero__peek-kicker { font-size: 11px; }
  .rrow__meta, .tag, .tank-card__tags .tag, .map-card__mode-name, .optrack__lv, .cost-item,
  .bld-card__desc, .bld-lv__later, .tt-sum__note, .bld-tree__hint { font-size: 12px; }
  .ability__kicker, .perks__lv-k, .trio__label, .panel h3.panel__sub, .lv__total-label,
  .thero__badges .plate, .bld-hero__brow .plate, .rep-mission__reward, .rep-mission__reward b, .ctl__label, .bld-hero .ctl__label,
  .topbar__right .cmp-pill, .cmp-pill__n, .filters__count, .bld-side__sec h3.bld-side__title, .bld-op__lv-k,
  .bld-lv .bld-lv__k, .bld-card__text .bld-card__desc, .tt-sum__fig span, .scroll th, .bld-stat__row .pos { font-size: 12px; }
}

/* Reputation's tree on a phone: one maker at a time, as the builder's strip
   (techStrip); the wide grid stays for anything wider. */
.rep-strip { display: none; }
.rep-strip__tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0 0 10px; }
.rep-strip__tab {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0; height: var(--ctl-lg); padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent;
  color: var(--dim); font: inherit; font-size: 12px; font-weight: 800; font-style: italic; cursor: pointer;
}
/* The mark in its maker's colour on every tab, as the wide grid's labels. */
.rep-strip__tab .rep-mark { flex: none; width: 20px; height: 20px; color: var(--branch); border-color: var(--branch); }
.rep-strip__tab[aria-selected="true"] { color: var(--branch); border-color: var(--branch); background: var(--raised); }
.rep-strip__tab:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.rep-strip .bld-tree__strip[hidden] { display: none; }
.rep-strip .bld-tree__foot .tt-foot__need { color: var(--faint); }
/* The foot carries the tier's stars (★ 12/48), wider than the builder's. */
@container bldtree (max-width: 839px) {
  .rep-strip .bld-tree__col { grid-template-columns: 68px minmax(0, 1fr); }
  .rep-strip .bld-tree__foot span { display: block; font-size: 11px; }
}
@media (max-width: 760px) {
  .rep-card .tt-scroll { display: none; }
  .rep-strip { display: block; margin-top: 8px; }
}

/* A tablet: search, filters, favourites and sort in one row, the search
   box giving way first. */
@media (min-width: 601px) and (max-width: 1100px) {
  .filters__top { flex-wrap: nowrap; gap: 8px; }
  .filters__top .search-box { flex: 1 1 240px; min-width: 120px; }
  .filters__top input.search { width: 100%; }
  .filters__top .filters__toggle, .filters__top .sort-ctl { flex: none; }
}
/* A narrow tablet: the two buttons as icons, as on a phone, or the row
   does not fit. */
@media (min-width: 601px) and (max-width: 760px) {
  .filters__top .filters__label, .filters__top .filters__toggle:not(.sort-ctl__open) .filters__chev { display: none; }
}

/* A tank's three actions share one row on a phone and a tablet; a long
   label (German) wraps inside its button rather than pushing one down. */
@media (max-width: 1100px) {
  .thero__actions { flex-wrap: nowrap; gap: 8px; }
  .thero__actions .btn-secondary {
    flex: 1 1 0; min-width: 0; height: auto; min-height: var(--ctl-xl); padding: 4px 8px;
    text-align: center; line-height: 1.15;
  }
}
@media (max-width: 600px) {
  .thero__actions .btn-secondary { font-size: 12px; letter-spacing: .02em; }
}

/* A skin's picture opened over the page (lightbox). */
.skin__art--img:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.lightbox {
  position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: center; justify-content: center;
  padding: 56px 16px 24px; background: rgba(var(--scrim-rgb), .88); cursor: zoom-out;
}
.lightbox__fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 100%; }
/* The tiles are 320px: never wider than their file, or they go soft. */
.lightbox__img { display: block; width: auto; max-width: min(100%, 960px); max-height: calc(100vh - 140px); object-fit: contain; }
.lightbox__cap { font-size: 14px; font-weight: 700; color: var(--ink); text-align: center; }
.lightbox__close {
  position: absolute; top: 8px; right: 8px; width: var(--ctl-xl); height: var(--ctl-xl); padding: 0; border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); background: transparent; color: var(--ink); cursor: pointer;
}
.lightbox__close:hover { background: var(--raised); }

/* New in the game (patch notes block), titles and the glossary (0.30.0). */
/* The block's heading and box sit apart as a panel's children do (.panel gap). */
.nig { display: flex; flex-direction: column; gap: 14px; }
.nig__link { color: var(--link); white-space: nowrap; }
.title-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.title-card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 12px; text-align: center; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
/* The game's gradient, clipped to the letters; --ink if a browser cannot clip. */
.title-card__name { font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .02em;
  color: var(--ink); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.term-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 12px; margin: 0; }
.term { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.term__name { font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.term__desc { margin: 0; line-height: 1.45; color: var(--ink); }

/* "New" on a badge the newest release added. */
.medal__tag { display: inline-block; align-self: flex-start; width: fit-content; font-size: 11px; line-height: 1.4; padding: 0 6px; margin-bottom: 2px;
  border: 1px solid var(--pos); border-radius: var(--radius-pill); color: var(--pos); }

/* Mods that came or went at one level: the label, then a row per mod. */
.patch__line--mods { flex-direction: column; align-items: stretch; }
.patch__rows { display: flex; flex-direction: column; gap: 2px; }
.patch__row { overflow-wrap: anywhere; }
.patch__row .patch__icon { display: inline-block; vertical-align: middle; }
.patch__item { font-weight: 700; color: var(--ink); }

/* A figure that moved in a reworded text, and a hidden parameter's percent. */
.patch__mark { background: none; color: var(--accent); font-weight: 700; }
.patch__old .patch__mark { color: inherit; }
.patch__pct { color: var(--dim); }

/* New glossary terms as small cards under the block's lines. */
.nig .term-grid { margin: 2px 0 8px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 8px; }
.nig .term { background: var(--surface); padding: 8px 10px; }
.nig .term__name { margin-bottom: 4px; font-size: 13px; }
.nig .term__desc { font-size: 12px; color: var(--dim); }

/* New titles as small plates under the block's lines. */
.nig .title-grid { margin: 2px 0 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.nig .title-card { background: var(--surface); padding: 8px 10px; }
.nig .title-card__name { font-size: 13px; }

/* A few new badges in one row in New in the game; the rest on Modes. */
.badge-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 2px 0 8px; }
.badge-strip__item { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  background: var(--surface); border-radius: var(--radius); padding: 8px 6px; min-width: 0; }
.badge-strip__icon { width: 40px; height: 40px; object-fit: contain; }
.badge-strip__name { font-size: 12px; line-height: 1.25; overflow-wrap: anywhere; }
@media (max-width: 600px) { .badge-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
