@charset "UTF-8";
/* =========================================================
   MaxTe.ru — единая таблица стилей
   Стек: чистый CSS, без Bootstrap. Light + Dark темы.
   ========================================================= */

/* ---------- 1. CSS-переменные / темы ---------- */
:root,
[data-theme="light"] {
  --tg: #0088cc;
  --tg-600: #0077b3;
  --tg-50: #e6f4fb;
  --mx: #7c3aed;
  --mx-600: #6d28d9;
  --mx-50: #f3eefe;

  --bg: #f6f8fb;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f4f8;
  --surface-3: #e9eef5;
  --border: #e3e8ef;
  --border-strong: #cbd3df;

  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --muted: #64748b;

  --primary: var(--tg);
  --primary-600: var(--tg-600);
  --accent: var(--mx);

  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0284c7;
  --ok: var(--success);
  --warn: var(--warning);
  --err: var(--danger);
  --bg-soft: var(--surface-2);
  --text-mute: var(--muted);
  --tg-300: #8fd0ee;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 6px 24px -8px rgba(15, 23, 42, .12), 0 2px 6px rgba(15, 23, 42, .06);
  --shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, .25);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --container: 1240px;
  --gutter: 16px;
  --header-h: 64px;

  --grad-tg: linear-gradient(135deg, #0088cc 0%, #1ea7e8 100%);
  --grad-mx: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  --grad-brand: linear-gradient(135deg, #0088cc 0%, #7c3aed 100%);
}

[data-theme="dark"] {
  --bg: #0b1220;
  --bg-elev: #0f172a;
  --surface: #131c2e;
  --surface-2: #1a2438;
  --surface-3: #223049;
  --border: #243049;
  --border-strong: #334566;

  --text: #e6edf7;
  --text-2: #b6c2d6;
  --text-3: #7c8aa3;
  --muted: #94a3b8;

  --tg-50: #0c2231;
  --mx-50: #1c1535;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 6px 24px -8px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, .65);
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PT Sans", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-600); }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .5em;
  line-height: 1.25;
  color: var(--text);
  font-weight: 700;
}
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
p { margin: 0 0 1em; }

ul, ol { margin: 0 0 1em; padding-left: 20px; }
ul li, ol li { margin: 2px 0; }

/* ---------- 3. Утилиты ---------- */
.muted, .text-mute { color: var(--muted); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-100 { width: 100%; }
.mt-3 { margin-top: 16px; }
.d-none-sm { display: initial; }
[x-cloak] { display: none !important; }
@media (max-width: 767px) {
  .d-none-sm { display: none !important; }
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: #fff; padding: 8px 12px; z-index: 9999; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.lazy { opacity: 0; transition: opacity .3s; }
.lazy.loaded { opacity: 1; }

.gradient-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gradient-mx {
  background: var(--grad-mx);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 4. Layout / Grid ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.main {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  min-height: calc(100vh - var(--header-h) - 200px);
  padding: 24px var(--gutter) 48px;
  min-width: 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -8px;
  margin-right: -8px;
  min-width: 0;
}
.row > [class*="col-"] {
  padding-left: 8px;
  padding-right: 8px;
  width: 100%;
  min-width: 0;
}

.g-2 { margin-left: -4px; margin-right: -4px; }
.g-2 > [class*="col-"] { padding-left: 4px; padding-right: 4px; margin-bottom: 8px; }

.g-3 { margin-left: -8px; margin-right: -8px; }
.g-3 > [class*="col-"] { padding-left: 8px; padding-right: 8px; margin-bottom: 16px; }

.col-6 { width: 50%; }
.col-12 { width: 100%; }

@media (min-width: 768px) {
  .col-md-1  { width: 8.3333%; }
  .col-md-2  { width: 16.6667%; }
  .col-md-3  { width: 25%; }
  .col-md-4  { width: 33.3333%; }
  .col-md-6  { width: 50%; }
  .col-md-8  { width: 66.6667%; }
}
@media (min-width: 992px) {
  .col-lg-4  { width: 33.3333%; }
  .col-lg-5  { width: 41.6667%; }
  .col-lg-7  { width: 58.3333%; }
  .col-lg-8  { width: 66.6667%; }
}
@media (min-width: 1200px) {
  .col-xl-3  { width: 25%; }
}

/* ---------- 5. Иконки ---------- */
.ic {
  width: 18px; height: 18px;
  display: inline-block;
  vertical-align: middle;
  fill: currentColor;
  flex: none;
}
.ic-sm { width: 14px; height: 14px; }
.ic-lg { width: 22px; height: 22px; }
.ic-xl { width: 28px; height: 28px; }

/* ---------- 6. Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
  white-space: nowrap;
  min-height: 36px;
}
.btn:hover { background: var(--surface-3); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled { opacity: .55; pointer-events: none; }

.btn-primary {
  color: #fff;
  background: var(--grad-tg);
  border-color: transparent;
  box-shadow: 0 4px 12px -4px rgba(0, 136, 204, .55);
}
.btn-primary:hover,
.btn-primary:focus {
  color: #fff;
  background: var(--grad-tg);
  border-color: transparent;
  box-shadow: 0 8px 18px -6px rgba(0, 136, 204, .7);
}
.btn-primary .ic { color: currentColor; }

.btn-mx {
  color: #fff;
  background: var(--grad-mx);
  border-color: transparent;
  box-shadow: 0 4px 12px -4px rgba(124, 58, 237, .55);
}
.btn-mx:hover,
.btn-mx:focus {
  color: #fff;
  background: var(--grad-mx);
  border-color: transparent;
  box-shadow: 0 8px 18px -6px rgba(124, 58, 237, .7);
}

.btn-soft {
  background: var(--tg-50);
  color: var(--tg);
  border-color: transparent;
}
.btn-soft:hover { background: var(--tg-50); filter: brightness(.97); color: var(--tg-600); }
[data-theme="dark"] .btn-soft {
  background: rgba(0, 136, 204, .14);
  color: #38bdf8;
}
[data-theme="dark"] .btn-soft:hover,
[data-theme="dark"] .btn-soft:focus {
  background: rgba(0, 136, 204, .22);
  color: #7dd3fc;
}

.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 6px; }
.btn-lg { padding: 12px 22px; font-size: 16px; border-radius: var(--radius); }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
}
.btn-icon:hover { background: var(--surface-3); }
.btn-icon .ic { width: 18px; height: 18px; }

.btn-fav {
  width: 36px; height: 36px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
}
.btn.btn-fav {
  width: auto;
  height: auto;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
}
.btn-fav:hover, .btn-fav.is-active, .btn-fav.is-fav { background: #fee2e2; color: #ef4444; border-color: transparent; }
[data-theme="dark"] .btn-fav:hover,
[data-theme="dark"] .btn-fav.is-active,
[data-theme="dark"] .btn-fav.is-fav { background: #3b1212; }

/* ---------- 7. Pills / Badges / Flags ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  line-height: 1.4;
  white-space: nowrap;
}
.pill-soft   { background: var(--surface-2); color: var(--text-2); }
.pill-ok     { background: rgba(22,163,74,.12); color: var(--success); }
.pill-warn   { background: rgba(217,119,6,.14); color: var(--warning); }
.pill-pin    { background: rgba(124,58,237,.12); color: var(--mx); }
.pill-telegram { background: var(--tg-50); color: var(--tg); }
.pill-max      { background: var(--mx-50); color: var(--mx); }

.flag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  background: var(--surface-2); color: var(--text-2);
}
.flag-pin  { background: rgba(124,58,237,.14); color: var(--mx); }
.flag-paid { background: rgba(22,163,74,.14); color: var(--success); }
.flag-hl   { background: rgba(245,158,11,.16); color: #b45309; }

.stat-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  font-size: 12px;
  background: var(--surface-2);
  color: var(--text-2);
  border-radius: 6px;
}
.stat-cat {
  display: inline-flex;
  padding: 2px 8px;
  font-size: 12px;
  background: var(--tg-50);
  color: var(--tg);
  border-radius: 6px;
}

/* ---------- 8. Header ---------- */
.app-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .app-header { background: rgba(11,18,32,.85); }

.app-header-inner {
  position: relative;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  flex: 0 0 auto;
  min-width: 0;
  max-width: 190px;
}
.app-brand:hover { color: var(--text); }
.app-brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--grad-brand);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}
.app-brand-text {
  letter-spacing: -.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-nav {
  display: flex; align-items: center; gap: 4px;
  flex: none;
}
.app-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.app-nav-link:hover, .app-nav-link.is-active {
  background: var(--surface-2);
  color: var(--text);
}

.app-search {
  position: relative;
  flex: 1 1 auto;
  max-width: 420px;
}
.app-search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.app-search-icon,
.hero-search-icon {
  display: none;
}
.app-search-input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 10px;
  outline: none;
  transition: border-color .15s, background .15s;
  appearance: none;
  -webkit-appearance: none;
}
.app-search-input::-webkit-search-decoration,
.app-search-input::-webkit-search-cancel-button,
.app-search-input::-webkit-search-results-button,
.app-search-input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.app-search-input:focus {
  background: var(--surface);
  border-color: var(--primary);
}
.app-search-suggest {
  display: none;
  position: absolute;
  top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  max-height: 360px; overflow: auto;
  z-index: 50;
}
.app-search-suggest.open { display: block; }
.app-search-suggest a,
.app-search-suggest .ss-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}
.app-search-suggest a:hover,
.app-search-suggest .ss-item:hover { background: var(--surface-2); }
.app-search-suggest .ss-t { font-size: 14px; color: var(--text); }
.app-search-suggest .ss-s { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.app-search-suggest .ss-empty {
  padding: 16px; text-align: center; color: var(--text-2); font-size: 13px;
}

.app-actions {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto;
  flex: none;
  min-width: 0;
}

@media (max-width: 1199px) {
  .app-header-inner { gap: 10px; }
  .app-brand-text { font-size: 15px; }
  .app-nav-link { padding: 8px 10px; }
  .app-search { max-width: 320px; }
}

.app-user {
  position: relative;
  min-width: 0;
}
.app-user > .btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 767px) {
  .app-header-inner { gap: 8px; }
  .app-brand { flex: 1 1 auto; }
  .app-brand-mark { width: 28px; height: 28px; }
  .app-brand-text { font-size: 14px; }
  .app-actions { gap: 6px; }
  .app-user > .btn-soft {
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (max-width: 575px) {
  .app-brand-text { max-width: 120px; }
  .app-header-inner {
    padding-left: 10px;
    padding-right: 10px;
  }
  .app-actions .btn-icon {
    width: 34px;
    height: 34px;
  }
  .app-actions > .btn {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 13px;
  }
  .app-user-menu {
    position: fixed;
    top: calc(var(--header-h) + 10px);
    left: auto;
    right: 8px;
    width: min(260px, calc(100vw - 16px));
    min-width: 0;
    max-width: none;
    max-height: calc(100vh - var(--header-h) - 24px);
    overflow-y: auto;
  }
}
.app-user-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 60;
}
.app-user-menu a, .app-user-menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--text);
  background: none; border: 0;
  border-radius: 8px;
  text-align: left;
}
.app-user-menu a:hover, .app-user-menu button:hover { background: var(--surface-2); }
.app-user-logout { color: var(--danger) !important; }

@media (max-width: 991px) {
  .app-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 12px var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    z-index: 90;
  }
  .app-nav.open { display: flex; }
  .app-nav-link { padding: 12px; border-radius: 8px; }
}
@media (max-width: 767px) {
  .app-search { display: none; }
}
.menu-toggle { display: none; }
.menu-toggle {
  flex: none;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  cursor: pointer;
  position: relative;
  z-index: 95;
}
.menu-toggle .ic {
  width: 20px;
  height: 20px;
}
@media (max-width: 991px) {
  .menu-toggle { display: inline-flex; }
}

/* ---------- 9. Footer ---------- */
.app-footer {
  margin-top: 64px;
  padding: 48px 0 24px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 14px;
}
.app-footer-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.ft-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.ft-col { min-width: 0; }
.ft-col-brand { max-width: 360px; }
.ft-lead { color: var(--muted); margin-top: 12px; }
.ft-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 12px;
}
.ft-list { list-style: none; padding: 0; margin: 0; }
.ft-list li { margin: 6px 0; }
.ft-list a { color: var(--text-2); }
.ft-list a:hover { color: var(--primary); }
.ft-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
.ft-pay { display: inline-flex; align-items: center; gap: 8px; }

@media (max-width: 767px) {
  .ft-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 480px) {
  .ft-grid { grid-template-columns: 1fr; }
}

/* ---------- 10. Хлебные крошки ---------- */
.crumbs {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-3);
}
.crumbs ol {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.crumbs li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.crumbs li + li::before {
  content: "›";
  color: var(--text-3);
  margin-right: 2px;
}
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--primary); }
.crumbs li[aria-current="page"] { color: var(--text); font-weight: 500; }

/* ---------- 11. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 56px;
  background: linear-gradient(180deg, var(--tg-50) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .hero { background: linear-gradient(180deg, rgba(0,136,204,.08) 0%, transparent 100%); }

.hero-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-orb {
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
}
.orb-tg { background: var(--tg);  top: -120px; left: -80px; }
.orb-mx { background: var(--mx);  bottom: -160px; right: -80px; }

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: var(--tg-50);
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -.02em;
}
.hero-lead, .hero-sub {
  font-size: 17px;
  color: var(--text-2);
  margin: 0 auto 24px;
  max-width: 620px;
}
.hero-search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto 16px;
}
.hero-search-icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--text-3);
}
.hero-search input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  box-shadow: var(--shadow);
  transition: border-color .15s;
}
.hero-search input:focus { border-color: var(--primary); }
.hero-search .btn {
  height: 52px;
  padding-left: 18px;
  padding-right: 18px;
}
.hero-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-3);
}
.dot-live { background: var(--success); box-shadow: 0 0 0 3px rgba(22,163,74,.18); }

/* ---------- 12. Секции ---------- */
.section { margin: 40px 0; }
[data-theme="dark"] .section { margin: 48px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.section-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -.01em;
}
.section-sub {
  color: var(--muted);
  margin: 4px 0 0;
  font-size: 14px;
}
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
}
.link-arrow:hover { gap: 10px; color: var(--primary-600); }
[data-theme="dark"] a:not(.btn),
[data-theme="dark"] .link-arrow { color: #38bdf8; }
[data-theme="dark"] a:not(.btn):hover,
[data-theme="dark"] .link-arrow:hover { color: #7dd3fc; }

.surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  max-width: 100%;
}
.surface-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.surface-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
.tile-grid > .empty-state,
.tile-grid > .empty-state-soft {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ---------- 13. Tile (карточка списка) ---------- */
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  height: 100%;
}
[data-theme="dark"] .tile {
  background: linear-gradient(180deg, rgba(19,28,46,.98), rgba(19,28,46,.92));
}
.tile:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.tile.is-pinned { border-color: rgba(124,58,237,.5); box-shadow: 0 0 0 1px rgba(124,58,237,.2); }
.tile.is-highlighted { background: linear-gradient(180deg, rgba(245,158,11,.06), transparent 60%); }
.tile.is-promo { border-style: dashed; }

.tile-main {
  display: block;
  padding: 18px;
  color: inherit;
  flex: 1;
}
.tile-main:hover { color: inherit; }

.tile-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.tile-avatar {
  width: 48px; height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-2);
  flex: none;
  overflow: hidden;
}
.tile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tile-avatar-fallback {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--grad-brand);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
  flex: none;
}
.tile-id { flex: 1; min-width: 0; }
.tile-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tile-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
}
.tile-meta .pill { flex: none; }
.tile-handle {
  color: var(--text-3);
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile-flags { display: flex; align-items: center; gap: 4px; flex: none; }
.tile-desc {
  font-size: 13px;
  color: var(--text-2);
  margin: 8px 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tile-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12px;
  color: var(--muted);
}
.tile-foot .btn-primary { min-width: 104px; }
.tile-go,
.tile-go:hover,
.tile-go:focus {
  color: #fff;
  background: var(--grad-tg);
  border-color: transparent;
  font-weight: 700;
}
.tile-rank-wrap { display: inline-flex; align-items: flex-start; gap: 6px; min-width: 0; }
.tile-rank-wrap .tile { flex: 1; min-width: 0; }
.tile-rank {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-3);
  color: var(--text-2);
  border-radius: 6px;
}
.rank-1 { background: #f59e0b; color: #fff; }
.rank-2 { background: #94a3b8; color: #fff; }
.rank-3 { background: #b45309; color: #fff; }
.rank-n { background: var(--surface-3); color: var(--text-2); }

/* ---------- 14. Card detail ---------- */
.cd-hero {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
}
.cd-hero-main { display: flex; align-items: flex-start; gap: 20px; min-width: 0; }
.cd-avatar {
  width: 88px; height: 88px;
  border-radius: 20px;
  object-fit: cover;
  flex: none;
  background: var(--surface-2);
  overflow: hidden;
}
.cd-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cd-avatar-fallback {
  width: 88px; height: 88px;
  border-radius: 20px;
  background: var(--grad-brand);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 32px;
  flex: none;
}
.cd-id { min-width: 0; }
.cd-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cd-title { font-size: 26px; font-weight: 800; margin: 0 0 4px; letter-spacing: -.01em; }
.cd-handle { color: var(--muted); font-size: 14px; }
.cd-desc { color: var(--text-2); font-size: 15px; margin-bottom: 20px; white-space: pre-line; }
.cd-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; margin-bottom: 16px; }
.cd-main { min-width: 0; }
.cd-aside { min-width: 0; }
.cd-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  align-self: start;
}
.cd-stat {
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--radius);
}
.cd-stat-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
.cd-stat-v { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.1; }
.cd-stat-k { font-size: 12px; color: var(--muted); }

/* Динамика подписчиков */
.cd-deltas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.cd-delta {
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--radius);
  text-align: center;
}
.cd-delta-v { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.1; }
.cd-delta-k { font-size: 12px; color: var(--muted); margin-top: 4px; }
.cd-delta.is-up   .cd-delta-v { color: #16a34a; }
.cd-delta.is-down .cd-delta-v { color: #dc2626; }
.cd-spark { display: block; }
.cd-spark svg { width: 100%; height: 80px; display: block; }
.cd-spark-axis {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 6px; font-size: 12px; color: var(--text-2);
}
@media (max-width: 600px) {
  .cd-deltas { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .cd-delta { padding: 8px 6px; }
  .cd-delta-v { font-size: 15px; }
}
.cd-history { margin-top: 16px; overflow-x: auto; }
.cd-history-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.cd-history-table th,
.cd-history-table td {
  padding: 8px 12px; text-align: left;
  border-bottom: 1px solid var(--border);
}
.cd-history-table th {
  font-weight: 600; color: var(--text-2);
  background: var(--surface-2); position: sticky; top: 0;
}
.cd-history-table td.num,
.cd-history-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cd-history-table tbody tr:hover { background: var(--surface-2); }
.cd-delta-cell.is-up { color: #16a34a; }
.cd-delta-cell.is-down { color: #dc2626; }
.cd-delta-cell .muted { font-weight: 400; margin-left: 4px; }
.cd-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.cd-main .surface,
.cd-aside .surface { padding: 24px; }
.cd-related { display: flex; flex-direction: column; gap: 8px; }
.cd-related-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: inherit;
  transition: background .15s;
}
.cd-related-item:hover { background: var(--surface-2); color: inherit; }
.cd-rel-avatar {
  width: 36px; height: 36px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-3);
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
  overflow: hidden;
}
.cd-rel-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cd-rel-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cd-rel-title { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-rel-meta { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 991px) {
  .cd-hero { grid-template-columns: 1fr; }
  .cd-layout { grid-template-columns: 1fr; }
  .cd-hero-main { flex-direction: column; }
}

/* ---------- 15. Catalog ---------- */
.cat-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.cat-title { font-size: 28px; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.cat-sub { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
.cat-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-actions [data-modal-open="filters-modal"] { display: none; }
.filter-block { margin-bottom: 16px; }

.cat-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.cat-main { min-width: 0; }
.cat-aside {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.cat-aside-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cat-aside-list li { margin: 0; padding: 0; }
.cat-aside-list a {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text-2);
  line-height: 1.35;
}
.cat-aside-list a:hover {
  background: var(--surface-2);
  color: var(--text);
}
.cat-aside-list a,
.cat-aside-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.cat-aside-name { flex: 1; }
.cat-aside-list .muted {
  flex: none;
  white-space: nowrap;
}

.filter-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 8px;
}
.filter-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.check {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
}
.check input { accent-color: var(--primary); }

@media (max-width: 991px) {
  .cat-layout { grid-template-columns: 1fr; }
  .cat-aside { display: none; }
  .cat-actions [data-modal-open="filters-modal"] { display: inline-flex; }
}

/* ---------- 16. Категории на главной ---------- */
.cats-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.cats-col { min-width: 0; }
.cats-col-title { font-size: 20px; font-weight: 700; margin: 0 0 12px; }

.cat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}
.cat-grid > .empty-state-soft { grid-column: 1 / -1; }
.cat-grid:not(.is-expanded) .cat-tile.is-extra,
.cat-grid:not(.is-expanded) .cat-chip.is-extra { display: none; }
.cat-more {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 2px;
  margin-top: 2px;
}
.cat-more:hover { color: var(--primary-600); }

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  line-height: 1.2;
  transition: border-color .15s, background .15s, transform .15s;
}
.cat-chip:hover {
  background: var(--surface-2);
  border-color: var(--primary);
  color: var(--text);
  transform: translateY(-1px);
}
.cat-chip-name {
  min-width: 0;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 650;
}
.cat-tile {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  transition: border-color .15s, transform .15s;
}
[data-theme="dark"] .cat-tile,
[data-theme="dark"] .surface,
[data-theme="dark"] .stat,
[data-theme="dark"] .cab-aside,
[data-theme="dark"] .x-modal-dialog,
[data-theme="dark"] .cookie-banner {
  background: var(--surface);
  border-color: var(--border);
}
.cat-tile:hover { border-color: var(--primary); transform: translateY(-2px); color: inherit; }
.cat-tile-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--tg-50);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
.cat-tile-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.cat-tile-count {
  font-size: 12px;
  color: var(--muted);
  justify-self: end;
  white-space: nowrap;
  font-weight: 600;
}

/* ---------- 17. Cabinet ---------- */
.cab-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.cab-wrap > * { min-width: 0; }
.cab-aside {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.cab-avatar {
  width: 56px; height: 56px;
  min-width: 56px;
  min-height: 56px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  margin-bottom: 12px;
  overflow: hidden;
}
.cab-balance {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  min-width: 0;
}
.cab-balance .label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  line-height: 1.2;
}
.cab-balance .value {
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

.cab-page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.cab-page-title { font-size: 24px; font-weight: 800; margin: 0; letter-spacing: -.01em; }

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  color: var(--text-2);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.is-active { background: var(--tg-50); color: var(--primary); font-weight: 600; }
[data-theme="dark"] .side-nav a.is-active {
  background: rgba(0, 136, 204, .18);
  color: #7dd3fc;
}

.divider { height: 1px; background: var(--border); margin: 12px 0; }

@media (max-width: 991px) {
  .cab-wrap { grid-template-columns: 1fr; }
  .cab-aside { position: static; }
}

/* ---------- 18. Stat ---------- */
.stat {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 100%;
}
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--tg-50);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
.stat-label { font-size: 12px; color: var(--muted); margin: 0; }
.stat-value { font-size: 20px; font-weight: 700; margin: 0; line-height: 1.2; }
.stat.is-ok    .stat-icon { background: rgba(22,163,74,.12); color: var(--success); }
.stat.is-warn  .stat-icon { background: rgba(217,119,6,.14); color: var(--warning); }
.stat.is-mx    .stat-icon { background: var(--mx-50); color: var(--mx); }
.stat.is-active { border-color: var(--primary); }

/* ---------- 19. Tables ---------- */
.tbl {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}
.tbl th, .tbl td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}
.tbl th {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  background: var(--surface-2);
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }

@media (max-width: 767px) {
  .surface:has(.tbl) {
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
  }
  .tbl {
    min-width: 0;
    table-layout: fixed;
  }
  .tbl th,
  .tbl td {
    padding: 10px 8px;
    font-size: 12px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .tbl .btn {
    white-space: normal;
  }
}

[data-theme="dark"] .tbl {
  background: var(--surface);
  border-color: var(--border);
}
[data-theme="dark"] .tbl th { background: var(--surface-2); color: var(--text-2); }
[data-theme="dark"] .tbl td { color: var(--text); }

/* ---------- 20. Pagination ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 24px 0; flex-wrap: wrap; }
.pager-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.pager-btn:hover { background: var(--surface-2); color: var(--text); }
.pager-btn.is-active { background: var(--primary); color: #fff; border-color: transparent; }
.pager-btn.is-disabled { opacity: .4; pointer-events: none; }
.pager-dots { padding: 0 6px; color: var(--text-3); }

/* ---------- 21. Forms ---------- */
.field { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,136,204,.15);
}
.input-sm { padding: 6px 10px; font-size: 13px; }
textarea { min-height: 100px; resize: vertical; }
.field-err { color: var(--danger); font-size: 12px; margin-top: 4px; }

/* ---------- 22. Modal ---------- */
.x-modal {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center; justify-content: center;
  padding: 16px;
}
.x-modal.open { display: flex; }
.x-modal-dialog {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-height: calc(100vh - 32px);
  display: flex; flex-direction: column;
}
.x-modal-form { display: contents; }
.x-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.x-modal-head h3 { margin: 0; font-size: 17px; }
.x-modal-body { padding: 20px; overflow: auto; }
.x-modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.cc-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
body.is-locked { overflow: hidden; }

/* ---------- 23. Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 900;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner-inner {
  display: flex; align-items: center; gap: 16px;
  max-width: var(--container);
  margin: 0 auto;
  flex-wrap: wrap;
}
.cookie-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--tg-50);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
.cookie-text { flex: 1; min-width: 220px; font-size: 14px; color: var(--text-2); }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 24. Errors ---------- */
.err-page {
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center; justify-content: center;
  padding: 48px 0;
}
.err-wrap { text-align: center; max-width: 560px; margin: 0 auto; padding: 0 var(--gutter); }
.err-art { position: relative; margin-bottom: 24px; }
.err-code {
  font-size: 8rem;
  font-weight: 900;
  line-height: 1;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -.04em;
}
.err-glow {
  position: absolute; inset: 0;
  background: radial-gradient(circle, rgba(124,58,237,.25), transparent 60%);
  filter: blur(40px);
  z-index: -1;
}
.err-title { font-size: 24px; margin: 0 0 8px; }
.err-lead { color: var(--muted); margin-bottom: 24px; }
.err-search { max-width: 380px; margin: 0 auto 16px; }
.err-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.err-cats { margin-top: 24px; }
.err-cats-title {
  font-size: 13px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 12px;
}

/* ---------- 25. Auth ---------- */
.auth-page {
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center; justify-content: center;
  padding: 32px var(--gutter);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px;
}
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head h1 { font-size: 22px; margin: 0 0 6px; }
.auth-head p { color: var(--muted); margin: 0; font-size: 14px; }
.auth-foot { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }

/* ---------- 26. Legal ---------- */
.legal { max-width: 820px; margin: 0 auto; }
.legal-with-toc {
  max-width: 1040px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.legal-with-toc aside {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
.legal-with-toc aside ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.legal-with-toc aside li { margin: 0; }
.legal-with-toc aside a {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text-2);
  font-weight: 600;
  line-height: 1.35;
}
.legal-with-toc aside a:hover,
.legal-with-toc aside a.is-active {
  background: var(--tg-50);
  color: var(--primary);
}
.legal-head { margin-bottom: 24px; }
.legal-title { font-size: 28px; margin: 0 0 8px; }
.legal-updated { color: var(--muted); font-size: 13px; }
.legal-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  font-size: 15px;
  line-height: 1.7;
}
.legal-article h2 { font-size: 20px; margin: 28px 0 12px; }
.legal-article h3 { font-size: 16px; margin: 20px 0 8px; }
.legal-article p { margin: 0 0 14px; color: var(--text-2); }
.legal-article ul, .legal-article ol { margin: 0 0 14px; color: var(--text-2); }

.price-card {
  padding: 22px;
}
.price-card .stat-icon { margin-bottom: 14px; }
.price-card-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.price-card-desc { font-size: .88rem; }
.price-card-price {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 14px 0 4px;
}
.price-card-term { font-size: .85rem; }

.pricing-hero {
  padding: 34px 0 22px;
  background:
    radial-gradient(circle at 12% 12%, rgba(0,136,204,.13), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(124,58,237,.14), transparent 30%);
}
.pricing-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: center;
}
.pricing-hero-copy { min-width: 0; }
.pricing-panel { padding: 24px; position: relative; overflow: hidden; }
.pricing-panel::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -70px;
  top: -70px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0,136,204,.18), rgba(124,58,237,.18));
}
.pricing-panel-label {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pricing-panel-price {
  font-size: 2.25rem;
  font-weight: 850;
  letter-spacing: -.04em;
  margin: 10px 0;
}
.pricing-panel-text { color: var(--text-2); line-height: 1.55; }
.pricing-mini-list { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.pricing-mini-list span { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.pricing-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 8px;
}
.pricing-strip-card { padding: 18px; display: flex; gap: 12px; align-items: center; }
.pricing-strip-card strong { display: block; margin-bottom: 3px; }
.pricing-strip-card span { color: var(--muted); font-size: .9rem; }
.pricing-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.pricing-product { padding: 22px; display: flex; flex-direction: column; min-height: 260px; }
.pricing-product-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.pricing-product h3 { font-size: 1.12rem; margin: 0 0 8px; }
.pricing-product p { color: var(--text-2); line-height: 1.55; margin: 0 0 14px; }
.pricing-product-best {
  margin-top: auto;
  color: var(--muted);
  font-size: .88rem;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.pricing-periods { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.pricing-periods span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-2);
  font-size: .8rem;
  font-weight: 700;
}
.pricing-scenarios {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr);
  gap: 16px;
}
.pricing-scenario { padding: 22px; }
.pricing-scenario-main { grid-row: span 3; background: linear-gradient(135deg, var(--tg-50), var(--mx-50)); }
.pricing-scenario h2 { margin: 8px 0 10px; font-size: 1.7rem; letter-spacing: -.03em; }
.pricing-scenario h3 { margin: 0 0 8px; font-size: 1rem; }
.pricing-scenario p { color: var(--text-2); line-height: 1.6; margin: 0 0 16px; }
.pricing-note { padding: 24px; display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.pricing-note h2 { margin: 0 0 8px; font-size: 1.35rem; }
.pricing-note p { margin: 0; color: var(--text-2); line-height: 1.55; }
.pricing-note-actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }

.promo-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.promo-intro {
  padding: 18px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  background: linear-gradient(135deg, var(--tg-50), var(--mx-50));
}
.promo-card-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.home-owner-card,
.catalog-seo {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}
.home-owner-card {
  background:
    linear-gradient(135deg, rgba(0,136,204,.08), rgba(124,58,237,.08)),
    var(--surface);
}
.home-owner-card h2,
.catalog-seo h2 {
  margin: 6px 0 8px;
  font-size: 1.35rem;
  letter-spacing: -.02em;
}
.home-owner-card p,
.catalog-seo p {
  margin: 0;
  color: var(--text-2);
  line-height: 1.6;
}
.home-owner-actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
.catalog-seo { margin-top: 24px; }

@media (max-width: 991px) {
  .pricing-hero-inner,
  .pricing-scenarios { grid-template-columns: 1fr; }
  .pricing-strip,
  .pricing-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-scenario-main { grid-row: auto; }
  .promo-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-owner-card,
  .catalog-seo { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 640px) {
  .pricing-hero { padding-top: 22px; }
  .pricing-strip,
  .pricing-product-grid { grid-template-columns: 1fr; }
  .pricing-panel-price { font-size: 1.9rem; }
  .pricing-note { align-items: flex-start; flex-direction: column; }
  .pricing-note-actions, .pricing-note-actions .btn { width: 100%; }
  .promo-summary { grid-template-columns: 1fr; }
  .promo-intro { align-items: flex-start; flex-direction: column; }
  .home-owner-actions, .home-owner-actions .btn, .catalog-seo .btn { width: 100%; }
}

/* ---------- 27. Banners (главная) ---------- */
.banner-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}
.banner-spot {
  display: flex; align-items: center; gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  min-height: 100px;
  transition: border-color .15s, transform .15s;
}
.banner-spot:hover { border-color: var(--primary); transform: translateY(-2px); color: inherit; }
.banner-text { font-size: 14px; color: var(--text-2); }

@media (max-width: 767px) { .banner-row { grid-template-columns: 1fr; } }

/* ---------- 28. Collections ---------- */
.coll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.coll-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.coll-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.coll-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.coll-cover-stub {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.85);
  font-size: 28px; font-weight: 800;
}
.coll-body { padding: 16px; }
.coll-title { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.coll-desc { font-size: 13px; color: var(--text-2); margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.coll-meta { font-size: 12px; color: var(--muted); }

/* ---------- 29. Reviews ---------- */
.review-list { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.review-list > article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.review-user { display: flex; align-items: center; gap: 10px; flex: 1; }
.review-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.review-name { font-weight: 600; font-size: 14px; }
.review-date { font-size: 12px; color: var(--muted); }
.review-stars { color: #f59e0b; font-size: 14px; letter-spacing: 1px; }
.review-text { font-size: 14px; color: var(--text-2); margin: 0; }
.review-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.review-rating {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 4px;
  margin-bottom: 12px;
}
.review-rating input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.review-rating label {
  color: var(--surface-3);
  cursor: pointer;
  line-height: 1;
}
.review-rating label .ic { width: 22px; height: 22px; }
.review-rating label:hover,
.review-rating label:hover ~ label,
.review-rating input:checked ~ label { color: #f59e0b; }

/* ---------- 30. Search / Top сегменты ---------- */
.seg {
  display: inline-flex;
  padding: 4px;
  background: var(--surface-2);
  border-radius: 10px;
  gap: 2px;
}
.seg-item {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.seg-item:hover { color: var(--text); }
.seg-item.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.search-page-form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 24px;
}
.search-page-form input {
  flex: 1;
  padding-left: 14px;
}

.app-search .app-search-input,
.hero-search input[type="search"],
.search-page-form input[type="search"] {
  appearance: none;
  -webkit-appearance: none;
}

/* ---------- 31. Toasts ---------- */
.toast-stack {
  position: fixed;
  top: calc(var(--header-h) + 16px); right: 16px;
  z-index: 1100;
  display: flex; flex-direction: column;
  gap: 8px;
  max-width: 360px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  font-size: 14px;
  color: var(--text);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast > span { flex: 1; }
.toast-x {
  background: none; border: 0; cursor: pointer;
  color: var(--text-2); font-size: 18px; line-height: 1;
  padding: 0 2px;
}
.toast-x:hover { color: var(--text); }
.toast-success { border-left-color: var(--success); }
.toast-warn,
.toast-warning { border-left-color: var(--warning); }
.toast-error  { border-left-color: var(--danger); }
.toast-info   { border-left-color: var(--primary); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---------- 32. Empty state ---------- */
.empty-state { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty-state-soft {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
  font-size: 14px;
  background: var(--surface-2);
  border-radius: var(--radius);
}
[data-theme="dark"] .empty-state,
[data-theme="dark"] .empty-state-soft { color: var(--text-2); }

/* ---------- 33. Link helper ---------- */
.link { color: var(--primary); }
.link:hover { color: var(--primary-600); text-decoration: underline; }

/* ---------- 33b. JS-состояния (loading, is-fav, has-error, sentinel) ---------- */
[data-infinite].loading,
[data-filter-target].loading {
  position: relative;
  opacity: .55;
  pointer-events: none;
  transition: opacity .15s;
}
[data-infinite].loading::after,
[data-filter-target].loading::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 32px; height: 32px;
  margin: -16px 0 0 -16px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.inf-sentinel { height: 1px; }

[data-fav].is-fav { color: var(--danger); }
[data-fav].is-fav .ic { color: var(--danger); }

.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 6%, var(--surface));
}
.field.has-error .field-err { display: block; }

/* ---------- 33c. Card form ---------- */
.card-form { padding: 24px; }
.form-intro {
  padding: 16px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(0,136,204,.12), rgba(124,58,237,.10));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.form-intro-title { font-weight: 800; margin-bottom: 4px; }
.form-intro-text { color: var(--text-2); font-size: 14px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.form-span-2 { grid-column: 1 / -1; }
.form-check-field {
  display: flex;
  align-items: end;
  padding-bottom: 10px;
}

/* ---------- 33d. Analytics ---------- */
.analytics-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.analytics-stat {
  min-height: 104px;
  padding: 18px 72px 18px 18px;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.analytics-stat .stat-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}
.analytics-stat.is-ok .stat-icon { background: rgba(22,163,74,.12); color: var(--success); }
.analytics-stat.is-warn .stat-icon { background: rgba(217,119,6,.14); color: var(--warning); }
.analytics-stat.is-mx .stat-icon { background: var(--mx-50); color: var(--mx); }
.analytics-stat-body { min-width: 0; }
.analytics-stat-label {
  color: var(--text-2);
  font-size: 12px;
  margin-bottom: 6px;
}
.analytics-stat-value {
  color: var(--text);
  font-size: 24px;
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: -.02em;
}
.analytics-stat-hint {
  color: var(--text-2);
  font-size: 12px;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.analytics-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  gap: 12px;
  min-height: 220px;
  align-items: end;
}
.analytics-bar {
  height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  text-align: center;
}
.analytics-bar strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .25);
}
.analytics-bar span {
  display: block;
  width: 100%;
  min-height: 12px;
  border: 1px solid rgba(56, 189, 248, .45);
  border-radius: 12px 12px 5px 5px;
  background: linear-gradient(180deg, #38bdf8 0%, #0088cc 50%, #7c3aed 100%);
  box-shadow: 0 12px 28px rgba(0, 136, 204, .35), inset 0 1px 0 rgba(255,255,255,.24);
}
.analytics-bar small {
  color: var(--text);
  font-size: 11px;
  white-space: nowrap;
  opacity: .85;
}

/* ---------- 34. Адаптив общий ---------- */
@media (max-width: 991px) {
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cats-row { grid-template-columns: 1fr; }
  .analytics-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575px) {
  h1 { font-size: 24px; }
  h2 { font-size: 19px; }
  .main { padding: 16px 0 32px; }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .stat {
    padding: 12px;
    gap: 8px;
  }
  .stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .stat-value { font-size: 18px; }
  .stat-label { font-size: 11px; }
  .cab-aside { padding: 12px; }
  .cab-page-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }
  .cab-page-head .btn {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
    font-size: 13px;
  }
  .cab-wrap .surface:has(.tbl) {
    padding: 12px !important;
  }
  .cab-wrap .tbl,
  .cab-wrap .tbl thead,
  .cab-wrap .tbl tbody,
  .cab-wrap .tbl tr,
  .cab-wrap .tbl th,
  .cab-wrap .tbl td {
    display: block;
    width: 100%;
  }
  .cab-wrap .tbl {
    border: 0;
    background: transparent;
  }
  .cab-wrap .tbl thead { display: none; }
  .cab-wrap .tbl tr {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 10px;
  }
  .cab-wrap .tbl td {
    border: 0;
    padding: 4px 0;
    text-align: left !important;
    font-size: 13px;
  }
  .cab-wrap .tbl td.empty-state-soft {
    background: transparent;
    padding: 0;
    text-align: left;
  }
  .cab-wrap .tbl td:nth-child(n+4) { display: none; }
  .cab-wrap .tbl tr:last-child td { border: 0; }
  .surface:has(.tbl) {
    padding: 12px !important;
    overflow: hidden !important;
  }
  .tbl,
  .tbl thead,
  .tbl tbody,
  .tbl tr,
  .tbl th,
  .tbl td {
    display: block;
    width: 100%;
    max-width: 100%;
  }
  .tbl {
    border: 0;
    background: transparent;
    table-layout: auto;
  }
  .tbl thead { display: none; }
  .tbl tr {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 10px;
  }
  .tbl td,
  .tbl th {
    border: 0;
    padding: 4px 0;
    text-align: left !important;
    font-size: 13px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .tbl td.empty-state-soft,
  .tbl .empty-state,
  .tbl .empty-state-soft {
    background: transparent;
    padding: 0;
    text-align: left;
  }
  .tbl td [style*="white-space:nowrap"],
  .tbl td[style*="white-space:nowrap"] {
    white-space: normal !important;
  }
  .tbl form,
  .tbl .row {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }
  .tbl input,
  .tbl select,
  .tbl textarea,
  .tbl .input,
  .tbl .btn {
    max-width: 100% !important;
  }
  .section-head {
    align-items: flex-start;
    gap: 8px;
  }
  .section-title {
    font-size: 22px;
    line-height: 1.15;
  }
  .link-arrow {
    font-size: 13px;
    white-space: nowrap;
  }
  .row,
  .g-2,
  .g-3 {
    margin-left: 0;
    margin-right: 0;
  }
  .row > [class*="col-"],
  .g-2 > [class*="col-"],
  .g-3 > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
  }
  form.row,
  form .row {
    max-width: 100%;
  }
  input[style*="width"],
  select[style*="width"],
  textarea[style*="width"],
  .input[style*="width"] {
    max-width: 100% !important;
  }
  .surface form [style*="display:flex"] {
    max-width: 100%;
  }
  .surface form input,
  .surface form select,
  .surface form textarea {
    min-width: 0;
  }
  .surface form .btn {
    flex-shrink: 0;
  }
  .cat-aside,
  .legal aside,
  .legal-article {
    max-width: 100%;
  }
  .legal-with-toc {
    display: block;
    max-width: 100%;
  }
  .legal-with-toc aside {
    position: static;
    margin-bottom: 14px;
    padding: 10px;
  }
  .legal-with-toc aside ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .legal-with-toc aside a {
    padding: 7px 10px;
    font-size: 13px;
    background: var(--surface-2);
  }
  .cat-chip-name { max-width: 150px; }
  .card-form { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .form-span-2 { grid-column: auto; }
  .form-check-field { padding-bottom: 0; align-items: center; }
  .analytics-summary-grid { grid-template-columns: 1fr; gap: 12px; }
  .analytics-stat { min-height: 92px; padding: 16px 66px 16px 16px; }
  .analytics-stat-value { font-size: 22px; }
  .analytics-bars { gap: 6px; overflow-x: auto; grid-auto-flow: column; grid-auto-columns: 34px; grid-template-columns: none; }
  .section { margin: 28px 0; }
  .hero { padding: 40px 0 32px; }
  .hero-search {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .hero-search .btn { width: 100%; }
  .search-page-form { grid-template-columns: 1fr; }
  .tile-grid { grid-template-columns: 1fr; }
  .cd-hero { padding: 16px; }
  .cd-stats { grid-template-columns: 1fr; }
  .cd-title { font-size: 22px; }
  .auth-card { padding: 24px; }
  .legal-article { padding: 20px; }
  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 14px;
  }
  .cookie-banner-inner {
    align-items: flex-start;
    gap: 12px;
  }
  .cookie-text { min-width: 0; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1 1 auto; }
}
