/* ==========================================================================
   RELOAD23 Platform v2 — platform.css
   Общий слой: layout, header/footer, типографика, кнопки, карточки,
   формы, таблицы, табы, меню пользователя, тосты, адаптив.
   Зависимость: tokens.css. Без сторонних библиотек.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Base / reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 620px at 82% -12%, rgba(102, 192, 244, 0.08), transparent 62%),
    var(--st-bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, h4, h5, h6, p, figure { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; color: #fff; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--steam-blue); text-decoration: none; }
a:hover { color: #9bd8ff; }
strong, b { color: #fff; font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
::selection { background: rgba(102, 192, 244, 0.35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--steam-blue);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Hidden but accessible */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 999;
  padding: 10px 16px;
  background: var(--steam-blue);
  color: #08151f;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
  transition: transform var(--t-fast) var(--ease);
}
.skip-link:focus { transform: translateY(0); color: #08151f; }

/* Thin dark scrollbars (Steam-like) */
* { scrollbar-width: thin; scrollbar-color: #3a5a72 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.18); }
*::-webkit-scrollbar-thumb { background: #3a5a72; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #4d7793; background-clip: content-box; }

/* --------------------------------------------------------------------------
   2. Layout / typography
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: 44px; }
.section-sm { padding-block: 28px; }
.section-tight { padding-block: 20px; }
.section-alt {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.05));
  border-block: 1px solid rgba(255, 255, 255, 0.04);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-head .h2,
.section-head .h3 { margin: 0; }
.section-head p { margin-top: 4px; }
.section-link {
  flex: 0 0 auto;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--steam-blue);
  white-space: nowrap;
}
.section-link:hover { color: #bfe9ff; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steam-blue);
}
.eyebrow.is-brand { color: var(--brand-hi); }

.h1 {
  font-size: var(--fs-hero);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.h2 {
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.h3 {
  font-size: var(--fs-h3);
  line-height: 1.25;
}

.lead {
  font-size: clamp(0.98rem, 1.35vw, 1.1rem);
  line-height: 1.6;
  color: var(--text-dim);
}
.muted { color: var(--muted); }
.text-blue { color: var(--steam-blue); }
.text-green { color: var(--steam-green); }
.text-orange { color: var(--brand-hi); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }

.demo-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border: 1px dashed rgba(154, 223, 90, 0.5);
  border-radius: 3px;
  background: rgba(124, 194, 66, 0.08);
  color: var(--brand-hi);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   3. Panels
   -------------------------------------------------------------------------- */
.panel {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 42%),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.panel-soft {
  background: rgba(22, 32, 45, 0.6);
  box-shadow: none;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.panel-head h2,
.panel-head h3 { margin: 0; font-size: var(--fs-h3); }
.panel-head .muted { font-size: var(--fs-sm); }
.panel-body { padding: 20px; }
.panel-body > :last-child { margin-bottom: 0; }
.panel-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* --------------------------------------------------------------------------
   4. Buttons / badges / chips
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: var(--font-head);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition:
    filter var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}
.btn:hover { color: #fff; filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn svg { flex: 0 0 auto; }

.btn-blue {
  background: linear-gradient(180deg, #7cc8f5 0%, #4b8fb4 100%);
  border-color: #6cc4f2;
  color: #07141d;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-blue:hover { color: #07141d; }

.btn-green {
  background: linear-gradient(180deg, #c3f22a 0%, #8cbb00 100%);
  border-color: #a8d414;
  color: #1b2838;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-green:hover { color: #1b2838; }

.btn-orange,
.btn-orange:visited {
  background-color: #5f921f;
  background-image: linear-gradient(180deg, #8ccb52 0%, #5f921f 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  border-color: #6fae35;
  color: #10200a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-orange:hover,
.btn-orange:focus,
.btn-orange:active,
.btn-orange:visited:hover {
  background-color: #5f921f;
  background-image: linear-gradient(180deg, #8ccb52 0%, #5f921f 100%);
  color: #10200a;
}
.home-actions .btn-orange {
  background-color: #5f921f;
  background-image: linear-gradient(180deg, #8ccb52 0%, #5f921f 100%);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(102, 192, 244, 0.4); color: #fff; }

.btn-link {
  background: none;
  border-color: transparent;
  color: var(--steam-blue);
  padding-inline: 4px;
  min-height: 0;
}
.btn-link:hover { color: #bfe9ff; background: none; }

.btn-sm { min-height: 30px; padding: 5px 12px; font-size: 12px; border-radius: 3px; }
.btn-lg { min-height: 46px; padding: 12px 26px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  transform: none;
}
.btn.is-in-cart {
  background: rgba(190, 238, 17, 0.12);
  border-color: rgba(190, 238, 17, 0.45);
  color: var(--steam-green);
  text-shadow: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid rgba(102, 192, 244, 0.32);
  border-radius: 3px;
  background: rgba(102, 192, 244, 0.12);
  color: var(--steam-blue);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-green {
  border-color: rgba(190, 238, 17, 0.35);
  background: rgba(190, 238, 17, 0.12);
  color: var(--steam-green);
}
.badge-live {
  border-color: rgba(190, 238, 17, 0.35);
  background: rgba(190, 238, 17, 0.1);
  color: var(--steam-green);
}
.badge-live::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--steam-green);
  box-shadow: 0 0 0 0 rgba(190, 238, 17, 0.5);
  animation: r23-pulse 1.9s infinite;
}
.badge-discount {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  padding: 4px 8px;
  border: 0;
  border-radius: 3px;
  background: linear-gradient(180deg, #c3f22a 0%, #8cbb00 100%);
  color: #1b2838;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
a.chip:hover { background: rgba(102, 192, 244, 0.12); border-color: rgba(102, 192, 244, 0.35); color: #fff; }
.chip.is-active { background: rgba(102, 192, 244, 0.16); border-color: rgba(102, 192, 244, 0.5); color: #fff; }

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.5;
}
.tag-blue { background: rgba(102, 192, 244, 0.12); color: var(--steam-blue); }
.tag-green { background: rgba(190, 238, 17, 0.1); color: var(--steam-green); }
.tag-orange { background: rgba(124, 194, 66, 0.12); color: var(--brand-hi); }

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--steam-green);
  box-shadow: 0 0 0 0 rgba(190, 238, 17, 0.55);
  animation: r23-pulse 1.9s infinite;
  flex: 0 0 auto;
}
.live-dot.is-off { background: var(--muted-2); box-shadow: none; animation: none; }

@keyframes r23-pulse {
  0% { box-shadow: 0 0 0 0 rgba(190, 238, 17, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(190, 238, 17, 0); }
  100% { box-shadow: 0 0 0 0 rgba(190, 238, 17, 0); }
}

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--st-bg-deep);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
  transition: box-shadow var(--t-med) var(--ease);
}
.site-header.is-stuck { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }

.topbar { background: var(--st-bg-deep); }
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  color: #fff;
  text-decoration: none;
}
.brand:hover { color: #fff; }
.brand-mark { width: 32px; height: 32px; }
.brand-name {
  font-family: var(--font-brand);
  font-size: 1.62rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  color: #fff;
}
.brand-accent { color: var(--brand); }

.topnav {
  display: flex;
  align-items: center;
  gap: 1px;
}
.topnav > a {
  position: relative;
  display: block;
  padding: 8px 11px;
  border-radius: 3px;
  color: var(--text-dim);
  font-family: var(--font-head);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.075em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.topnav > a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.topnav > a.is-active,
.topnav > a[aria-current="page"] {
  color: #fff;
  background: rgba(102, 192, 244, 0.09);
  box-shadow: inset 0 -2px 0 var(--steam-blue);
}

.global-search {
  position: relative;
  display: flex;
  flex: 1 1 200px;
  max-width: 300px;
  margin-left: auto;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(102, 192, 244, 0.16);
  border-radius: 3px;
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.global-search:focus-within {
  border-color: rgba(102, 192, 244, 0.55);
  box-shadow: 0 0 0 2px rgba(102, 192, 244, 0.12);
}
.global-search input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  outline: 0;
}
.global-search input::placeholder { color: var(--muted-2); }
.global-search button {
  display: grid;
  place-items: center;
  width: 34px;
  border: 0;
  background: rgba(102, 192, 244, 0.14);
  color: var(--steam-blue);
  flex: 0 0 auto;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.global-search button:hover { background: rgba(102, 192, 244, 0.26); color: #fff; }

.user-area {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.user-login {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border: 1px solid rgba(102, 192, 244, 0.3);
  border-radius: 3px;
  background: rgba(102, 192, 244, 0.08);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.user-login:hover { background: rgba(102, 192, 244, 0.18); color: #fff; border-color: rgba(102, 192, 244, 0.55); }

.user-menu-wrap { position: relative; }
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  text-align: left;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.user-chip:hover,
.user-chip[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
}
.user-chip-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}
.user-chip-nick {
  max-width: 116px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
}
.user-chip-balance {
  color: var(--steam-green);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.user-caret { color: var(--muted); flex: 0 0 auto; }
.user-chip[aria-expanded="true"] .user-caret { transform: rotate(180deg); }

.user-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 80;
  width: 232px;
  padding: 6px;
  background: #1b2838;
  border: 1px solid rgba(102, 192, 244, 0.2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
}
.user-menu[hidden] { display: none; }
.user-menu-head {
  padding: 9px 10px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.user-menu-head .user-menu-nick { display: block; color: #fff; font-weight: 600; font-size: 13px; }
.user-menu-head .user-menu-balance { display: block; color: var(--steam-green); font-size: 12px; margin-top: 2px; }
.user-menu a,
.user-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
}
.user-menu a:hover,
.user-menu button:hover { background: rgba(102, 192, 244, 0.13); color: #fff; }
.user-menu svg { color: var(--muted); flex: 0 0 auto; }
.user-menu .user-menu-sep { height: 1px; margin: 4px 0; background: var(--border); }
.user-menu .user-menu-out { color: #ff9b83; }
.user-menu .user-menu-out:hover { background: rgba(217, 65, 38, 0.14); color: #ffb3a2; }

.cart-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 34px;
  border-radius: 3px;
  color: var(--text-dim);
  flex: 0 0 auto;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.cart-link:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.cart-count {
  position: absolute;
  top: -3px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.cart-link.has-items .cart-count { background: linear-gradient(180deg, #8ccb52, #5f921f); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 38px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  flex: 0 0 auto;
}
.nav-toggle span {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.subbar {
  background: rgba(0, 0, 0, 0.22);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border);
}
.subbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
}
.subnav {
  display: flex;
  align-items: stretch;
  gap: 1px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: inset 0 -2px 0 transparent;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.subnav a:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
.subnav a.is-active,
.subnav a[aria-current="page"] {
  color: #fff;
  background: rgba(102, 192, 244, 0.08);
  box-shadow: inset 0 -2px 0 var(--steam-blue);
}
.subbar-note {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.mobile-search { display: none; }

/* --------------------------------------------------------------------------
   6. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: 28px;
  padding: 46px 0 22px;
  background: var(--st-bg-deep);
  border-top: 1px solid var(--border);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.7fr repeat(3, 1fr);
  gap: 36px;
  padding-bottom: 34px;
}
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p {
  max-width: 330px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h3 {
  margin: 2px 0 4px;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.footer-col a {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
  transition: color var(--t-fast) var(--ease);
}
.footer-col a:hover { color: var(--steam-blue); }
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.footer-legal,
.footer-demo {
  max-width: 980px;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.55;
}
.footer-demo { color: rgba(154, 223, 90, 0.62); }
.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 11.5px;
}
.lang-switch {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: transparent;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.lang-switch:hover { border-color: rgba(102, 192, 244, 0.35); color: #fff; }

/* --------------------------------------------------------------------------
   7. Item card + rarity
   -------------------------------------------------------------------------- */
.rarity-consumer { --rarity: var(--r-consumer); }
.rarity-industrial { --rarity: var(--r-industrial); }
.rarity-milspec { --rarity: var(--r-milspec); }
.rarity-restricted { --rarity: var(--r-restricted); }
.rarity-classified { --rarity: var(--r-classified); }
.rarity-covert { --rarity: var(--r-covert); }
.rarity-exceedingly { --rarity: var(--r-exceedingly); }
.rarity-contraband { --rarity: var(--r-contraband); }

.item-card {
  --rarity: #8f98a0;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #223447 0%, #16202d 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  transition:
    transform var(--t-med) var(--ease),
    border-color var(--t-med) var(--ease),
    box-shadow var(--t-med) var(--ease);
}
.item-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--rarity) 55%, rgba(255, 255, 255, 0.16));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px color-mix(in srgb, var(--rarity) 18%, transparent);
}

.item-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1b2a3a;
}
.item-media::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  height: 3px;
  background: var(--rarity);
  box-shadow: 0 0 10px color-mix(in srgb, var(--rarity) 45%, transparent);
  pointer-events: none;
}
.item-art {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 130% at 76% 12%, color-mix(in srgb, var(--rarity) 44%, transparent) 0%, transparent 62%),
    radial-gradient(70% 90% at 20% 100%, rgba(102, 192, 244, 0.16), transparent 65%),
    linear-gradient(140deg, #2a475e 0%, #1a2b3c 58%, #101a24 100%);
  transition: transform var(--t-med) var(--ease), filter var(--t-med) var(--ease);
}
.item-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(120% 100% at 70% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 100% at 70% 30%, #000 0%, transparent 78%);
}
.item-card:hover .item-art { transform: scale(1.045); filter: brightness(1.07); }
.item-glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10%;
  color: rgba(255, 255, 255, 0.28);
  font-family: var(--font-brand);
  font-size: clamp(1.5rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
  transform: rotate(-4deg);
  user-select: none;
}
.item-media img {
  position: absolute;
  inset: 6% 8%;
  z-index: 2;
  width: 84%;
  height: 88%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45));
}
.item-media.has-image .item-glyph { opacity: 0; }
.item-card:hover .item-media img { transform: scale(1.04); }
.item-badge-new {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  padding: 3px 7px;
  border-radius: 3px;
  background: rgba(102, 192, 244, 0.92);
  color: #08151f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.item-wear {
  position: absolute;
  right: 9px;
  bottom: 9px;
  z-index: 3;
  padding: 2px 6px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.75);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.item-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  padding: 11px 13px 13px;
  min-width: 0;
}
.item-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}
.item-title:hover { color: var(--steam-blue); }
.item-sub {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-sub .item-rarity-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--rarity);
  vertical-align: 1px;
}
.item-price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
.price { display: flex; flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.15; }
.price-old {
  color: var(--muted-2);
  font-size: 10.5px;
  text-decoration: line-through;
  order: 1;
}
.price-new {
  color: var(--steam-green);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  order: 2;
}
.price.is-free .price-new { color: var(--steam-blue); }
.item-price-row .btn { flex: 0 0 auto; }

/* Compact item card variant */
.item-card.is-compact .item-body { padding: 9px 11px 11px; }
.item-card.is-compact .item-title { font-size: 12.5px; }
.item-card.is-compact .price-new { font-size: 13px; }

/* --------------------------------------------------------------------------
   8. Grids
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.grid-tight { gap: 12px; }
.grid-wide { gap: 22px; }

/* --------------------------------------------------------------------------
   9. Forms
   -------------------------------------------------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 15px;
  min-width: 0;
}
.field > label,
.field-label {
  color: var(--text-dim);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.field-hint { color: var(--muted-2); font-size: 11px; line-height: 1.45; }
.field-error { color: #ff8d72; font-size: 11.5px; }

.input,
.select,
textarea.input {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid rgba(102, 192, 244, 0.18);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  outline: 0;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.input::placeholder,
textarea.input::placeholder { color: var(--muted-2); }
.input:hover,
.select:hover { border-color: rgba(102, 192, 244, 0.32); }
.input:focus,
.select:focus,
textarea.input:focus {
  border-color: rgba(102, 192, 244, 0.65);
  background: rgba(0, 0, 0, 0.38);
  box-shadow: 0 0 0 3px rgba(102, 192, 244, 0.12);
}
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.select option { background: #1b2838; color: var(--text); }
textarea.input { min-height: 110px; resize: vertical; }

.checkbox,
.radio {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.45;
  cursor: pointer;
}
.checkbox input,
.radio input { width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--steam-blue); flex: 0 0 auto; }

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

/* --------------------------------------------------------------------------
   10. Table
   -------------------------------------------------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(102, 192, 244, 0.18);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
.table td strong { color: #fff; }
.table .is-right { text-align: right; }

/* --------------------------------------------------------------------------
   11. Breadcrumbs / tabs
   -------------------------------------------------------------------------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 11.5px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--steam-blue); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 5px; }
.breadcrumbs li + li::before { content: "/"; color: var(--muted-2); }
.breadcrumbs [aria-current="page"] { color: var(--text-dim); }

.tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.tab:hover { color: #fff; }
.tab.is-active,
.tab[aria-selected="true"] { border-bottom-color: var(--steam-blue); color: #fff; }

/* --------------------------------------------------------------------------
   12. Avatar / user bits
   -------------------------------------------------------------------------- */
.avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, #3d6c8a, #24425a);
  color: #fff;
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 27px; height: 27px; font-size: 13px; }
.avatar-lg { width: 64px; height: 64px; font-size: 28px; }
.avatar-xl { width: 92px; height: 92px; font-size: 40px; border-width: 2px; }
.avatar-ring { box-shadow: 0 0 0 2px rgba(102, 192, 244, 0.4), 0 0 0 5px rgba(102, 192, 244, 0.09); }

/* --------------------------------------------------------------------------
   13. Toast / empty state / skeleton
   -------------------------------------------------------------------------- */
.toast-host {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  position: relative;
  padding: 11px 14px 11px 17px;
  overflow: hidden;
  border: 1px solid rgba(102, 192, 244, 0.28);
  border-radius: var(--radius);
  background: #1b2c3d;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.45;
  box-shadow: var(--shadow-2);
  animation: r23-toast-in var(--t-med) var(--ease);
}
.toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--steam-blue);
}
.toast.toast-ok { border-color: rgba(190, 238, 17, 0.3); }
.toast.toast-ok::before { background: var(--steam-green); }
.toast.toast-error { border-color: rgba(217, 65, 38, 0.45); }
.toast.toast-error::before { background: var(--steam-red); }
.toast.is-out { animation: r23-toast-out var(--t-med) var(--ease) forwards; }

@keyframes r23-toast-in {
  from { transform: translateY(10px) scale(0.98); }
  to { transform: translateY(0) scale(1); }
}
@keyframes r23-toast-out {
  to { opacity: 0; transform: translateY(6px); }
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 44px 22px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  text-align: center;
}
.empty-state .empty-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: rgba(102, 192, 244, 0.08);
  color: var(--steam-blue);
}
.empty-state h3 { font-size: 15px; }
.empty-state p { max-width: 420px; font-size: 12.5px; line-height: 1.55; }
.empty-state .btn { margin-top: 8px; }

.skeleton {
  position: relative;
  overflow: hidden;
  min-height: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.055);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  animation: r23-shimmer 1.4s infinite;
}
.skeleton-card { height: 220px; border-radius: var(--radius); }
.skeleton-line { height: 12px; margin-bottom: 8px; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-80 { width: 80%; }

@keyframes r23-shimmer {
  100% { transform: translateX(100%); }
}

/* --------------------------------------------------------------------------
   14. Utilities
   -------------------------------------------------------------------------- */
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { gap: 20px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row-between { justify-content: space-between; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.w-100 { width: 100%; }
.hidden { display: none !important; }

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(102, 192, 244, 0.22);
  border-left: 3px solid var(--steam-blue);
  border-radius: var(--radius-sm);
  background: rgba(102, 192, 244, 0.06);
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.55;
}
.notice strong { color: #fff; }
.notice.is-warn {
  border-color: rgba(154, 223, 90, 0.28);
  border-left-color: var(--brand-hi);
  background: rgba(124, 194, 66, 0.07);
}
.notice .notice-icon { flex: 0 0 auto; color: var(--steam-blue); margin-top: 1px; }
.notice.is-warn .notice-icon { color: var(--brand-hi); }

/* --------------------------------------------------------------------------
   15. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .topnav > a { padding-inline: 8px; font-size: 11px; letter-spacing: 0.05em; }
  .global-search { max-width: 230px; }
  .user-chip-nick { max-width: 90px; }
}

@media (max-width: 1024px) {
  .container { padding-inline: 20px; }

  .topnav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 59;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - var(--header-h));
    padding: 10px 20px 18px;
    overflow-y: auto;
    background: #171a21;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid rgba(102, 192, 244, 0.15);
    box-shadow: 0 22px 40px rgba(0, 0, 0, 0.55);
  }
  .topnav.is-open { display: flex; }
  .topnav > a {
    padding: 13px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0;
    font-size: 13px;
    letter-spacing: 0.06em;
  }
  .topnav > a.is-active,
  .topnav > a[aria-current="page"] {
    background: transparent;
    box-shadow: inset 2px 0 0 var(--steam-blue);
    padding-left: 12px;
  }
  .global-search { display: none; }
  .topnav .mobile-search {
    display: flex;
    flex: 0 0 auto;
    height: 34px;
    margin: 2px 0 8px;
    max-width: none;
  }
  .nav-toggle { display: flex; }
  .topbar-inner { gap: 12px; }
  .user-area { margin-left: auto; }

  .footer-top { grid-template-columns: 1fr 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand p { max-width: 520px; }

  .section { padding-block: 36px; }
}

@media (max-width: 768px) {
  .container { padding-inline: 18px; }
  .subbar-note { display: none; }
  .subbar-inner { min-height: 38px; }
  .subnav a { padding: 8px 10px; font-size: 12px; }

  .grid-3,
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .grid { gap: 13px; }

  .form-row { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .section-head .section-link { align-self: flex-start; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-meta { flex-direction: column; align-items: flex-start; gap: 8px; }

  .user-chip-nick { max-width: 76px; }

  .toast-host { right: 16px; bottom: 16px; }
}

@media (max-width: 520px) {
  .container { padding-inline: 14px; }
  :root { --fs-body: 0.9rem; }

  .topbar-inner { gap: 8px; min-height: 56px; }
  .brand { gap: 7px; }
  .brand-mark { width: 27px; height: 27px; }
  .brand-name { font-size: 1.42rem; }
  .topnav { top: 56px; max-height: calc(100vh - 56px); padding-inline: 14px; }

  .user-chip { padding: 3px; gap: 0; }
  .user-chip-meta { display: none; }
  .user-caret { display: none; }
  .user-login { padding: 6px 10px; font-size: 12px; }
  .cart-link { width: 32px; }
  .nav-toggle { width: 34px; }
  .user-menu { right: -46px; width: 218px; }

  .subnav a { padding: 8px 9px; font-size: 11.5px; }
  .subnav {
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
  }

  .section { padding-block: 28px; }
  .panel-head { padding: 13px 14px; }
  .panel-body { padding: 15px; }

  .grid { gap: 10px; }
  .grid-4,
  .grid-3,
  .grid-auto { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-tight { gap: 9px; }

  .item-body { padding: 9px 10px 10px; }
  .item-title { font-size: 12px; }
  .item-sub { font-size: 10px; }
  .item-price-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .item-price-row .btn { width: 100%; }
  .price-new { font-size: 13.5px; }
  .badge-discount { top: 7px; left: 7px; font-size: 10.5px; padding: 3px 6px; }
  .item-wear { display: none; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 22px 14px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col a { font-size: 12px; }
  .site-footer { padding-top: 34px; }

  .form-actions .btn { flex: 1 1 100%; }
  .toast-host { right: 12px; left: 12px; bottom: 12px; width: auto; }
}

@media (max-width: 380px) {
  .topnav > a { font-size: 12.5px; }
  .subnav a { padding-inline: 7px; font-size: 11px; }
  .item-price-row .btn { font-size: 11px; padding-inline: 6px; }
}

/* --------------------------------------------------------------------------
   16. Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .item-card:hover { transform: none; }
  .item-card:hover .item-art { transform: none; }
}

/* Страховка для основных CTA: не терять зелёную заливку и яркость
   после входа/выхода и перезагрузок страницы (в т.ч. в Safari). */
.btn-orange:not([aria-disabled="true"]):not(:disabled) {
  opacity: 1 !important;
}

.home-actions .btn-orange,
.home-actions .btn-orange:visited,
.home-actions .btn-orange:hover,
.home-actions .btn-orange:focus,
.home-actions .btn-orange:active {
  background-color: #5f921f !important;
  background-image: linear-gradient(180deg, #8ccb52 0%, #5f921f 100%) !important;
  border-color: #6fae35 !important;
  color: #10200a !important;
  opacity: 1 !important;
}

/* ================= Футер 1-в-1 по структуре RELOAD23 ================= */
.ref-footer {
  background: #101317;
  border-top: 1px solid rgba(124, 194, 66, 0.35);
  box-shadow: 0 -12px 32px rgba(124, 194, 66, 0.045);
  color: #8b929a;
}

.ref-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px;
}

.ref-footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(420px, 1fr);
  gap: 64px;
}

.ref-footer-brand { max-width: 42rem; }

.ref-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #dcdedf;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.ref-footer-bar {
  width: 3px;
  height: 32px;
  background: #7cc242;
}

.ref-footer-accent { color: #7cc242; }

.ref-footer-copy {
  margin: 20px 0 0;
  color: #67707b;
  font-size: 11px;
  line-height: 20px;
}

.ref-footer-desc {
  margin: 12px 0 0;
  max-width: 36rem;
  color: #67707b;
  font-size: 11px;
  line-height: 20px;
}

.ref-footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.ref-footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.ref-footer-col h2 {
  margin: 0 0 4px;
  color: #dcdedf;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ref-footer-col a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: #8b929a;
  font-size: 12px;
  line-height: 1.2;
  text-decoration: none;
}

.ref-footer-col a:hover { color: #fff; }
.ref-footer-col svg { width: 14px; height: 14px; flex: 0 0 auto; }

.ref-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.18);
}

.ref-footer-lang-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #67707b;
  font-size: 11px;
}

.ref-footer-lang-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ref-footer-lang-label svg { width: 14px; height: 14px; }

.ref-footer-lang {
  display: flex;
  padding: 2px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.2);
}

.ref-footer-lang button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #8b929a;
  font-size: 11px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.ref-footer-lang button:hover { background: #23262e; color: #fff; }

.ref-footer-lang button[aria-pressed="true"] {
  background: #23262e;
  color: #fff;
  box-shadow: inset 0 -2px #7cc242;
}

.ref-footer-community {
  color: #4f5965;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

@media (max-width: 1024px) {
  .ref-footer-top { grid-template-columns: 1fr; gap: 40px; }
}

@media (min-width: 640px) {
  .ref-footer-inner { padding-top: 40px; padding-bottom: 40px; }
}

@media (max-width: 640px) {
  .ref-footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref-footer-bottom { margin-top: 24px; }
}

/* Приглушённый зелёный для нижнего информационного блока. */
.ref-footer {
  background: #18231a;
  border-top-color: rgba(124, 194, 66, 0.35);
}

.ref-footer-logo { color: #e4efe0; }
.ref-footer-copy,
.ref-footer-desc { color: #72806c; }
.ref-footer-col h2 { color: #d9e6d1; }
.ref-footer-col a { color: #93a38c; }
.ref-footer-col a:hover { color: #cfe3c6; }
.ref-footer-bottom { background: rgba(0, 0, 0, 0.22); }
.ref-footer-lang-wrap { color: #72806c; }
.ref-footer-lang button { color: #93a38c; }
.ref-footer-lang button:hover { background: #22301f; color: #fff; }
.ref-footer-lang button[aria-pressed="true"] {
  background: #22301f;
  color: #d9e6d1;
  box-shadow: inset 0 -2px #7cc242;
}
.ref-footer-community { color: #5c6b55; }

/* Почти чёрный футер с едва заметным зелёным оттенком. */
.ref-footer {
  background: #101512;
  border-top-color: rgba(124, 194, 66, 0.18);
  box-shadow: 0 -10px 26px rgba(124, 194, 66, 0.025);
}
.ref-footer-logo { color: #d6ddd3; }
.ref-footer-bar { background: #5f8f37; }
.ref-footer-accent { color: #5f8f37; }
.ref-footer-copy,
.ref-footer-desc { color: #636b65; }
.ref-footer-col h2 { color: #b9c2b7; }
.ref-footer-col a { color: #7c857e; }
.ref-footer-col a:hover { color: #b9c7b3; }
.ref-footer-bottom { background: rgba(0, 0, 0, 0.3); }
.ref-footer-lang-wrap { color: #636b65; }
.ref-footer-lang button { color: #7c857e; }
.ref-footer-lang button:hover { background: #1b241d; color: #c2ccbf; }
.ref-footer-lang button[aria-pressed="true"] {
  background: #1b241d;
  color: #c2ccbf;
  box-shadow: inset 0 -2px #5f8f37;
}
.ref-footer-community { color: #4d5650; }

/* Серый переключатель языка в футере. */
.ref-footer-lang-wrap { color: #8b929a; }
.ref-footer-lang { background: rgba(255, 255, 255, 0.04); }
.ref-footer-lang button { color: #8b929a; }
.ref-footer-lang button:hover { background: #2b2f36; color: #fff; }
.ref-footer-lang button[aria-pressed="true"] {
  background: #2b2f36;
  color: #fff;
  box-shadow: inset 0 -2px #6b7279;
}

/* Полоска активного языка в цвет самой кнопки. */
.ref-footer-lang button[aria-pressed="true"] {
  box-shadow: inset 0 -2px #2b2f36;
}

/* Возвращаем видимую полоску под активным языком. */
.ref-footer-lang button[aria-pressed="true"] {
  box-shadow: inset 0 -2px #7cc242;
}

/* Скроллбар в приглушённом зелёном цвете проекта. */
html {
  scrollbar-width: thin;
  scrollbar-color: #3f5a2a #101512;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #101512;
}

::-webkit-scrollbar-thumb {
  background: #3f5a2a;
  border: 3px solid #101512;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4f7034;
}

::-webkit-scrollbar-corner {
  background: #101512;
}
