/* 01-base.css — reset, app shell, header and navigation.
   Part of the former single site.css. These files are ORDER-DEPENDENT: they are linked in
   numeric order in _Layout.cshtml and later rules still override earlier ones exactly as they
   did in the one big file. Do not reorder the <link> tags. The tokens are in 00-tokens.css (task 100);
   the eleven names that used to be declared here (--bg, --surface, --muted, --good …) are aliases there. */

/* Whole app (task 050): macOS renders light-on-dark and small text heavier under subpixel AA. */
html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* A column at least the window tall whose page (.app-body) takes what is left (task 132): the footer sits at the
   window's bottom on a short page — on the phone at the bar's top, the body's padding being the bar's — and after the
   content on a long one. No position: fixed. 100vh first for a browser without dvh. */
body.app-shell {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

body.app-shell > .app-body {
  flex: 1 0 auto;
}

/* What a window opened by a tap or a click gave focus to, or back to (focus-return.js: the phone's details sheet since
   task 128, the edit panel, the /MySets movers and the photo viewer since task 134): focused for the keyboard and the
   screen reader, no ring until it loses focus — iOS drew one after every sheet. !important: it must beat each element's
   own :focus-visible rule (.ui-m-row__link, .ui-m-card__link, .ui-btn, Bootstrap's .btn …), whatever their order.
   A ring drawn as a border or on a label instead (.icon-btn, .pf-mover, .detail-image-button, .image-lightbox__close, the
   status picker's) is written :focus-visible:not([data-focus-quiet]). */
[data-focus-quiet]:focus-visible {
  outline: none !important;
}

.btn[data-focus-quiet]:focus-visible {
  box-shadow: none !important;
}

/* theme.js sets this for the two frames of a theme switch: every colour moves at once, nothing fades on its own. */
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

/* The header (task 100): one 56 px bar on --surface-1 with a shadow instead of a rule. Since task 125 the brand and the
   six sections on the left, the bell and the account's circle on the right (.app-header__end; the theme switch is in
   the account's menu, 13-accounts.css). */
.app-header {
  background: var(--surface-1);
  box-shadow: var(--shadow-1);
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-header-inner,
.app-body,
.app-footer__inner {
  width: min(2200px, calc(100vw - 40px));
  margin: 0 auto;
}

.app-header-inner {
  min-height: var(--app-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex: none;
  color: var(--text);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.app-brand__mark {
  flex: none;
  fill: var(--accent);
}

.app-brand:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 4px;
  border-radius: var(--radius-1);
}

.app-nav {
  display: flex;
  flex: none;
  align-items: center;
  gap: 2px;
}

.app-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: var(--text-md);
  font-weight: 600;
  padding: 8px 10px;
  border-radius: var(--radius-2);
  transition: color var(--duration-1) var(--ease), background-color var(--duration-1) var(--ease);
}

.app-nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.app-nav a:active {
  background: var(--surface-3);
}

/* Task 188: _NavIcon before each word, a size under the bell's; the current section's icon takes the accent. The six
   icons cost 144 px: with them the row needs 1 200 px of the header (measured on the task 188 stand — the brand, the
   six, the search at its 200 px floor, the bell and the account), so under 1 240 px the words stand alone. */
.app-nav .ui-icon {
  width: 18px;
  height: 18px;
}

@media (max-width: 1239px) {
  .app-nav .ui-icon {
    display: none;
  }
}

.app-nav a[aria-current="page"] .ui-icon {
  color: var(--accent-text);
}

.app-nav a[aria-current="page"] {
  color: var(--text);
}

/* The current section: an accent rule under the word, Binance's marker. */
.app-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -10px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.app-nav a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}

/* Bootstrap's buttons on the tokens (task 100), until 101+ moves each page to .ui-btn. Bootstrap's own colours are for
   a white page: #6c757d outline text is 3.7:1 on the dark surfaces, #0a58ca 2.7:1 (measured on the stand). Primary is
   the accent, as .ui-btn--primary; the outlines take the signal families. */
.btn-primary,
.btn-success,
.btn-danger,
.btn-secondary,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger {
  --bs-btn-focus-box-shadow: 0 0 0 2px var(--focus-ring);
  --bs-btn-disabled-opacity: 0.45;
}

.btn-primary {
  --bs-btn-color: var(--accent-contrast);
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: var(--accent-contrast);
  --bs-btn-hover-bg: var(--accent-hover);
  --bs-btn-hover-border-color: var(--accent-hover);
  --bs-btn-active-color: var(--accent-contrast);
  --bs-btn-active-bg: var(--accent-hover);
  --bs-btn-active-border-color: var(--accent-hover);
  --bs-btn-disabled-color: var(--accent-contrast);
  --bs-btn-disabled-bg: var(--accent);
  --bs-btn-disabled-border-color: var(--accent);
}

.btn-secondary {
  --bs-btn-color: var(--text);
  --bs-btn-bg: var(--surface-3);
  --bs-btn-border-color: var(--surface-3);
  --bs-btn-hover-color: var(--text);
  --bs-btn-hover-bg: var(--border-strong);
  --bs-btn-hover-border-color: var(--border-strong);
  --bs-btn-active-color: var(--text);
  --bs-btn-active-bg: var(--border-strong);
  --bs-btn-active-border-color: var(--border-strong);
}

.btn-success {
  --bs-btn-color: var(--surface-1);
  --bs-btn-bg: var(--up);
  --bs-btn-border-color: var(--up);
  --bs-btn-hover-color: var(--surface-1);
  --bs-btn-hover-bg: color-mix(in srgb, var(--up) 85%, var(--text));
  --bs-btn-hover-border-color: color-mix(in srgb, var(--up) 85%, var(--text));
  --bs-btn-active-color: var(--surface-1);
  --bs-btn-active-bg: color-mix(in srgb, var(--up) 85%, var(--text));
  --bs-btn-active-border-color: color-mix(in srgb, var(--up) 85%, var(--text));
}

.btn-danger {
  --bs-btn-color: var(--down-contrast);
  --bs-btn-bg: var(--down);
  --bs-btn-border-color: var(--down);
  --bs-btn-hover-color: var(--down-contrast);
  --bs-btn-hover-bg: color-mix(in srgb, var(--down) 85%, var(--text));
  --bs-btn-hover-border-color: color-mix(in srgb, var(--down) 85%, var(--text));
  --bs-btn-active-color: var(--down-contrast);
  --bs-btn-active-bg: color-mix(in srgb, var(--down) 85%, var(--text));
  --bs-btn-active-border-color: color-mix(in srgb, var(--down) 85%, var(--text));
}

.btn-outline-primary { --btn-family: var(--info); --btn-family-bg: var(--info-bg); }
.btn-outline-success { --btn-family: var(--up); --btn-family-bg: var(--up-bg); }
.btn-outline-danger { --btn-family: var(--down); --btn-family-bg: var(--down-bg); }

.btn-outline-primary,
.btn-outline-success,
.btn-outline-danger {
  --bs-btn-color: var(--btn-family);
  --bs-btn-border-color: color-mix(in srgb, var(--btn-family) 45%, var(--surface-1));
  --bs-btn-hover-color: var(--btn-family);
  --bs-btn-hover-bg: var(--btn-family-bg);
  --bs-btn-hover-border-color: var(--btn-family);
  --bs-btn-active-color: var(--btn-family);
  --bs-btn-active-bg: var(--btn-family-bg);
  --bs-btn-active-border-color: var(--btn-family);
  --bs-btn-disabled-color: var(--btn-family);
  --bs-btn-disabled-border-color: color-mix(in srgb, var(--btn-family) 45%, var(--surface-1));
}

.btn-outline-secondary {
  --bs-btn-color: var(--text-muted);
  --bs-btn-border-color: var(--border-strong);
  --bs-btn-hover-color: var(--text);
  --bs-btn-hover-bg: var(--surface-3);
  --bs-btn-hover-border-color: var(--border-strong);
  --bs-btn-active-color: var(--text);
  --bs-btn-active-bg: var(--surface-3);
  --bs-btn-active-border-color: var(--border-strong);
  --bs-btn-disabled-color: var(--text-muted);
  --bs-btn-disabled-border-color: var(--border);
}

/* Dark / light / system: a segmented control of three icons. */
.app-theme {
  display: inline-flex;
  flex: none;
  gap: 2px;
  padding: 2px;
  border-radius: var(--radius-2);
  background: var(--surface-2);
}

.app-theme__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-sm);
  height: var(--control-sm);
  padding: 0;
  border: 0;
  border-radius: var(--radius-1);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--duration-1) var(--ease), background-color var(--duration-1) var(--ease);
}

.app-theme__option svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-theme__option[data-theme-choice="dark"] svg {
  fill: currentColor;
  stroke: none;
}

.app-theme__option:hover {
  color: var(--text);
}

.app-theme__option[aria-pressed="true"] {
  background: var(--surface-3);
  color: var(--text);
}

.app-theme__option:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

/* The row from 901 px (task 125): six sections need 853 px with the brand, the bell and the account (measured on the
   task 125 stand), so nothing folds — the «Меню» that held nine from 901 to 1 180 px (tasks 042 / 080) is gone. The
   search's 44 px icon (task 130) left 35 px free at 901 (task 130 stand); «Мої мініфігурки» (task 188) takes 23 of
   them — 12 px free at 901, the brand's name already cut (task 188 stand). A longer App:Name is what could still
   crowd it: below 1 100 px the name gives way first, cut with an ellipsis, and the links close up. */
@media (max-width: 1100px) {
  .app-header-inner {
    gap: var(--space-3);
  }

  .app-brand {
    min-width: 0;
    flex: 0 1 auto;
  }

  .app-brand__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-nav {
    flex: none;
  }

  .app-nav a {
    padding-inline: 8px;
  }

  .app-nav a[aria-current="page"]::after {
    left: 8px;
    right: 8px;
  }
}

/* The right end of the header (task 125): the bell — an icon button whose badge sits on its corner — and the account. */
.app-header__end {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
}

.app-header__icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: var(--touch);
  height: var(--touch);
  border-radius: var(--radius-2);
  color: var(--text-muted);
  transition: color var(--duration-1) var(--ease), background-color var(--duration-1) var(--ease);
}

.app-header__icon:hover {
  background: var(--surface-2);
  color: var(--text);
}

.app-header__icon[aria-current="page"] {
  color: var(--accent-text);
}

.app-header__icon:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}

.app-header__icon .ui-icon {
  width: 22px;
  height: 22px;
}

/* A guest's end of the header (task 195): the language (.app-lang, a .ui-segmented of two links; on a phone
   .app-lang__other, one link to the other language), the theme, and «Zaloguj się» where an account's circle is —
   secondary: the page's yellow is the deal's. */
.app-header__end--guest {
  gap: var(--space-3);
}

.app-lang__other {
  display: none;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.app-lang .ui-segmented__option {
  justify-content: center;
  min-width: 40px;
  padding: 0 var(--space-2);
  letter-spacing: 0.02em;
}

/* Under a finger from 901 px (a tablet's desktop page): the touch floor (web-design-guidelines, task 195). */
@media (pointer: coarse) {
  .app-lang .ui-segmented__option {
    min-width: var(--touch);
    height: var(--touch);
  }
}

/* The bell's panel (.ui-bell, task 139) hangs under the bell where anchors are supported. */
.notification-nav-link {
  anchor-name: --app-bell;
}

.notification-nav-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--down);
  color: var(--down-contrast);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.notification-nav-badge[hidden] {
  display: none;
}

/* The search (task 130): between the sections and the bell. From 1 101 px a field (280 px, giving way to 200 px) with
   its list under it; 901 – 1 100 px an icon whose field covers the sections' right end while open; at ≤ 900 px the
   icon in the header's right half, and open the whole screen — the field, «‹ Скасувати», the list under them.
   global-search.js opens and fills it; without script the icon is a link to /Search and the field a GET form there. */
.app-header-inner {
  position: relative;
}

.app-search {
  position: relative;
  flex: 0 1 280px;
  min-width: 200px;
  margin-left: auto;
}

.app-search + .app-header__end {
  margin-left: 0;
}

.app-search__open {
  display: none;
}

.app-search__bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.app-search__field {
  flex: 1;
  min-width: 0;
}

.app-search__field .ui-input {
  height: 36px;
  padding-right: var(--space-7);
}

/* The field is type="search": the browser's own ✕ would sit under the key hint. */
.app-search__field .ui-input::-webkit-search-cancel-button {
  display: none;
}

.app-search__kbd {
  position: absolute;
  top: 50%;
  right: var(--space-2);
  translate: 0 -50%;
  pointer-events: none;
}

.app-search__field .ui-input:focus ~ .app-search__kbd,
.app-search__field .ui-input:not(:placeholder-shown) ~ .app-search__kbd {
  display: none;
}

/* .ui-btn (01-components.css, later in the cascade) is inline-flex: the class pair outweighs it. */
.app-search .app-search__cancel {
  display: none;
}

.app-search__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: min(480px, calc(100vw - 32px));
  max-height: min(72vh, 620px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: var(--radius-3);
  background: var(--surface-1);
  box-shadow: var(--shadow-2);
}

.app-search__panel[hidden] {
  display: none;
}

@media (min-width: 901px) and (max-width: 1100px) {
  .app-search {
    flex: none;
    min-width: 0;
  }

  .app-search__open {
    display: inline-grid;
  }

  .app-search__form {
    display: none;
  }

  .app-search.is-open .app-search__form {
    display: block;
    position: absolute;
    top: 50%;
    right: 0;
    width: 420px;
    translate: 0 -50%;
    padding: var(--space-1);
    border-radius: var(--radius-2);
    background: var(--surface-1);
  }
}

/* The /Search page — where the header's form goes without script; its field is the header's, filled with the query
   (task 186). The 404 and the error page (task 161, Pages/Error): the head, then the way on. */
.search-page {
  display: grid;
  gap: var(--space-4);
}

.search-page__title {
  margin: 0;
  font-size: var(--text-2xl);
}

.error-page {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
}

.error-page__title {
  margin: 0;
  font-size: var(--text-2xl);
  text-wrap: balance;
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.error-page__id {
  margin: 0;
}

/* Bootstrap paints <code> pink: an id to copy, not an alarm. */
.error-page__id code {
  color: inherit;
  user-select: all;
}

.app-body {
  padding: 28px 0 48px;
}

/* The phone's shell (task 105), ≤ 900 px: the header keeps the mark, the name, the search's icon and the bell (task
   139) — the sections, the theme and the account are in the bottom bar and its «Ще» sheet (_Layout, .ui-tabbar) — and
   the page leaves the bar's height free under its last line. */
@media (max-width: 900px) {
  .app-header-inner > .app-nav,
  .app-header-inner > .app-theme,
  .app-header__end > .app-account__toggle,
  .app-header__end--guest > .app-theme,
  .app-header__end--guest > .app-lang {
    display: none;
  }
  /* A guest's «Zaloguj się» (task 196): the header's last control, after the language — a guest has no bottom bar. */
  .app-header__end--guest {
    gap: var(--space-1);
  }

  .app-header__end--guest > .app-signin {
    margin-left: var(--space-1);
    white-space: nowrap;
  }

  /* No bottom bar, no room left for one: what a page holds at the bottom («Kup», «Filtry») sits on the safe area. */
  body.app-shell:not(:has(> .app-tabbar)) {
    --tabbar-space: var(--safe-bottom);
  }
  /* A guest's language beside the search's icon (task 195): one 44 px link to the other. */
  .app-header__end--guest > .app-lang__other {
    display: inline-grid;
  }

  /* The bell stays (task 139), after the search's icon: a link to /Notifications with the server's count. */
  .app-header-inner > .app-header__end {
    gap: 0;
    margin-left: 0;
  }

  .app-header {
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
  }

  /* The search on a phone (task 130): the icon at the header's right; open, the whole screen over the bottom bar. */
  .app-search {
    flex: none;
    min-width: 0;
  }

  .app-search__open {
    display: inline-grid;
  }

  .app-search__form {
    display: none;
  }

  body:has(.app-search.is-open) {
    overflow: hidden;
  }

  body:has(.app-search.is-open) .app-header {
    z-index: 50;
  }

  .app-search.is-open .app-search__form {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
    background: var(--bg);
  }

  .app-search.is-open .app-search__bar {
    min-height: 52px;
    padding: var(--space-1) var(--space-3) var(--space-1) var(--space-1);
    background: var(--surface-1);
    box-shadow: var(--shadow-1);
  }

  .app-search.is-open .app-search__cancel {
    display: inline-flex;
    flex: none;
  }

  .app-search__field .ui-input {
    height: var(--touch);
  }

  .app-search__kbd {
    display: none;
  }

  .app-search__panel {
    position: static;
    flex: 1;
    width: auto;
    max-height: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .app-header-inner {
    min-height: 52px;
  }

  body.app-shell:has(> .app-tabbar) {
    padding-bottom: var(--tabbar-space);
  }
}

@media (max-width: 480px) {
  .app-header-inner,
  .app-body,
  .app-footer__inner {
    width: calc(100vw - 24px);
  }

  .app-body {
    padding: 16px 0 32px;
  }
}

/* The touch floor (task 105): below 901 px, or under a finger at any width, every control the pages have not moved to
   .ui- yet — Bootstrap's buttons and fields, bare buttons and summaries — is 44 px tall and a button 44 px wide, and
   a field's text 16 px (iOS zooms into anything smaller; !important because a page's own size for its field is never
   the reason to zoom the whole page). A page rule that still sets its control smaller is fixed in its own file. */
@media (max-width: 900px), (pointer: coarse) {
  .btn,
  .form-control,
  .form-select,
  summary {
    min-height: var(--touch);
  }

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--touch);
  }

  summary:not([class]) {
    padding-block: 10px;
  }

  button:not(.btn, [class*="ui-"]) {
    min-width: var(--touch);
    min-height: var(--touch);
  }

  input:not([type="checkbox"], [type="radio"], [type="range"], [type="hidden"], [type="color"]),
  select,
  textarea {
    font-size: 16px !important;
  }

  input:not([type="checkbox"], [type="radio"], [type="range"], [type="hidden"], [type="color"]),
  select {
    min-height: var(--touch);
  }
}

/* The «Ще» sheet (task 125): the account's card, then the groups (.ui-navlist, 01-components.css) and «Вийти». */
.app-more__nav {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-3) var(--space-4);
}

.app-more__nav .app-theme {
  margin-left: auto;
}

@media (min-width: 901px) {
  .app-more {
    display: none;
  }
}

.page-hero,
.content-band,
.toolbar-band,
.summary-grid {
  margin-bottom: 18px;
}

.page-hero,
.toolbar-band,
.content-section,
.summary-stat,
.empty-state {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 24px;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: 28px;
  align-items: start;
}

.page-hero__copy {
  max-width: 780px;
}

.page-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.page-hero__facts span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: var(--text);
  background: var(--info-bg);
  border: 1px solid color-mix(in srgb, var(--info) 35%, var(--surface-1));
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.page-kicker {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: 2rem;
  line-height: 1.1;
}

.page-hero p,
.section-head p {
  margin: 0;
  color: var(--muted);
}

.hero-action-panel {
  display: grid;
  gap: 12px;
}

.hero-action-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.hero-action-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hero-action-card__title {
  color: var(--text);
  font-weight: 800;
  line-height: 1.2;
}

.hero-action-card__note {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.hero-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hero-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.hero-field span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-field .form-control {
  min-height: 36px;
}

.hero-action-card__button {
  justify-self: start;
  min-width: 150px;
}

.toolbar-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.summary-stat {
  min-width: 0;
  padding: 14px 16px;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

a.summary-stat:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.10);
}

.summary-stat--positive {
  border-color: color-mix(in srgb, var(--up) 35%, var(--surface-1));
  background: linear-gradient(180deg, var(--surface), var(--up-bg));
}

.summary-stat--warn {
  border-color: color-mix(in srgb, var(--warn) 35%, var(--surface-1));
  background: linear-gradient(180deg, var(--surface), var(--warn-bg));
}

.summary-stat--muted {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.toolbar-band {
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.toolbar-form .form-control {
  min-width: min(320px, 100%);
}

.toolbar-form .form-select {
  width: 150px;
}

.checkbox-label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-weight: 600;
}

.offer-note {
  color: var(--muted);
}

.pricing-label {
  display: block;
  overflow: hidden;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-value,
.offer-price {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-value--good {
  color: var(--good);
}

/* ── Set tags (task 079) ─────────────────────────────
   The chips under a set's name — copies, LEGO status, signal, stale, deal score (task 168) — on /MySets, /Wishlist,
   the catalogue and the set page, rendered by one partial (Pages/Shared/Components/_SetTags.cshtml). One height, one
   radius, one font, no border, a soft fill. Of the tags only the signal is coloured, by its action: green buy, grey
   hold / wait, amber sell or do not buy; the score is a .ui-chip coloured by DealScore.Css. Contrast, text on its own fill: neutral 8.44, muted 5.84, copy 7.55, buy 6.14, sell 6.39, warn 6.77. */
.set-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  max-width: 100%;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}
.tag--muted { background: var(--surface-2); color: var(--text-muted); }
.tag--copy  { background: var(--info-bg); color: var(--info); }
.tag--buy   { background: var(--up-bg); color: var(--up); }
.tag--hold  { background: var(--surface-3); color: var(--text); }
.tag--sell  { background: var(--warn-bg); color: var(--warn); }
.tag--warn  { background: var(--down-bg); color: var(--down); }
