/* Urban Hub — новое оформление «liquid glass» поверх styles.css (кнопка «Старый дизайн» отключает этот файл).
   Тёмная тема — тёплый почти чёрный фон с лёгким оранжевым свечением; светлая — молочное стекло на тёплом фоне.
   Компьютер: боковая панель (полная или только иконки), курсы — одной строкой плиток над содержимым.
   Планшет: панель только с иконками. Телефон: стеклянная шапка и меню разделов.
   Движение — только плавное: одна мягкая кривая без «пружин», короткие расстояния.
   Всплывающие списки и панели — плотное стекло, чтобы текст под ними не просвечивал. */
:root {
  --ground: #050404;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.065);
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.17);
  --muted: #aaa49c;
  --faint: #8e8880;
  /* стекло: тонкий световой градиент, сильное размытие и насыщение того, что под ним */
  --glass: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018) 45%, rgba(255, 255, 255, 0.04));
  --glass-flat: rgba(255, 255, 255, 0.04);
  --glass-2: rgba(255, 255, 255, 0.07);
  --glass-line: rgba(255, 255, 255, 0.11);
  --glass-hi: rgba(255, 255, 255, 0.17);
  --glass-lo: rgba(255, 255, 255, 0.035);
  --glass-shadow: 0 30px 70px -34px rgba(0, 0, 0, 0.9);
  --blur: blur(34px) saturate(170%);
  --pop: rgb(19, 17, 15); /* сплошной: под списком не должна просвечивать таблица */
  --th: rgba(15, 13, 12, 0.84);
  --row-hover: rgba(255, 255, 255, 0.05);
  /* фон: глубокий чёрный, плавно переходящий в оранжевое свечение (сильнее — сверху справа, слабее — снизу слева) */
  --glow-a: rgba(236, 122, 38, 0.34);
  --glow-a2: rgba(150, 64, 16, 0.16);
  --glow-b: rgba(196, 92, 26, 0.16);
  --glow-c: rgba(90, 40, 12, 0.08);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-io: cubic-bezier(0.45, 0, 0.25, 1);
  --ease-glide: cubic-bezier(0.32, 0.72, 0, 1);
  --font-display: 'Manrope', 'Inter', system-ui, sans-serif;
  --radius: 14px;
  --radius-btn: 999px;
  --side-w: 232px;
}
:root[data-theme='light'] {
  /* светлая тема — «лавандовый дашборд»: мягкий сиренево-голубой фон с розоватым низом, белые карточки,
     выбранное и главные кнопки — почти чёрные, выделенные числа — фиолетовые */
  --ground: #ecebf7;
  --text: #16151d;
  --surface: rgba(255, 255, 255, 0.55);
  --surface-2: rgba(244, 243, 250, 0.9);
  --line: rgba(28, 26, 58, 0.08);
  --line-strong: rgba(28, 26, 58, 0.15);
  --muted: #605f74;
  --faint: #717085;
  --glass: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78));
  --glass-flat: rgba(255, 255, 255, 0.7);
  --glass-2: rgba(255, 255, 255, 0.86);
  --glass-line: rgba(255, 255, 255, 0.95);
  --glass-hi: rgba(255, 255, 255, 1);
  --glass-lo: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 24px 50px -30px rgba(70, 60, 150, 0.28);
  --pop: rgb(255, 255, 255);
  --th: rgba(247, 246, 252, 0.96);
  --row-hover: rgba(90, 80, 200, 0.05);
  --glow-a: rgba(196, 190, 255, 0.75);
  --glow-a2: rgba(214, 222, 255, 0.5);
  --glow-b: rgba(255, 206, 228, 0.7);
  --glow-c: rgba(206, 226, 255, 0.55);
  --accent: #17161f;
  --accent-ink: #ffffff;
  --accent-soft: rgba(110, 96, 230, 0.12);
  --accent-text: #5b4bd6;
}
@media (max-width: 1099.98px) { :root { --side-w: 68px; } }
:root.nav-compact { --side-w: 68px; }

/* ---------- фон ---------- */
html { background: var(--ground); }
body { background: transparent; position: relative; }
/* сайт не тянется вбок: ничего не выходит за ширину экрана, а «резинка» по горизонтали выключена */
html, body { overflow-x: clip; overscroll-behavior-x: none; }
html { -webkit-tap-highlight-color: transparent; } /* без серого «силуэта» при касании на iPhone */
@supports not (overflow: clip) { html, body { overflow-x: hidden; } }
/* фон на всю высоту экрана, включая зону под плавающей панелью Safari на iPhone (иначе свечение обрывается над ней):
   100lvh — высота экрана при спрятанных панелях браузера */
/* слой фона выше и ниже экрана с запасом (по 20%): при резком пролистывании и под панелью Safari нет обрыва свечения;
   положения и размеры пятен пересчитаны так, чтобы на самом экране картинка была прежней */
body::before { content: ''; position: fixed; z-index: -1; pointer-events: none; left: 0; right: 0; bottom: auto;
  top: -20vh; height: 140vh; top: -20lvh; height: 140lvh;
  background:
    radial-gradient(70% 44% at 100% 14.3%, var(--glow-a) 0%, var(--glow-a2) 38%, transparent 72%),
    radial-gradient(58% 37% at 0% 85.7%, var(--glow-b) 0%, transparent 70%),
    radial-gradient(60% 36% at 55% 57.1%, var(--glow-c) 0%, transparent 75%);
  animation: fx-drift 90s ease-in-out infinite alternate; }
@keyframes fx-drift { from { transform: scale(1.08) translate3d(-1%, -0.5%, 0); } to { transform: scale(1.08) translate3d(1.2%, 1%, 0); } }

h1, h2 { font-family: var(--font-display); letter-spacing: -0.01em; }
h2 { font-size: 20px; font-weight: 700; }
.panel > .head h2 { font-size: 26px; font-weight: 800; }

/* ---------- стекло ---------- */
.box, .table-wrap, .tick, .ticker__meta, .total, .topbar__row, .demo-banner, .nav-menu {
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.box { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 24px; padding: 20px;
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 var(--glass-lo), var(--glass-shadow); }
.box .box, .box--soft, .offer__form, .tgs, .tdc { background: var(--glass-2); border-color: var(--glass-line); border-radius: 18px;
  backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: inset 0 1px 0 var(--glass-hi); }
.box--flat { background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ---------- бренд, вкладки, кнопки панели (общее) ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo { display: block; width: 30px; height: auto; flex: none; }
/* светлая тема: логотип — ровный серый, без металлического градиента (он хорош только на тёмном) */
:root[data-theme='light'] .brand__logo { filter: brightness(0) invert(0.4); }
.brand__name { font: 800 14px/1.15 var(--font-display); letter-spacing: 0.1em; white-space: nowrap; }
.brand__name b { color: var(--text); font-weight: 800; }
.brand__hub { color: var(--faint); font-weight: 700; }
.tab__ico { display: block; flex: none; transition: color 0.3s var(--ease); }
.tab { position: relative; display: inline-flex; align-items: center; gap: 8px; flex: none; border-radius: 999px;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.25s var(--ease); }
.tab:active { transform: scale(0.98); }
.tab__txt { white-space: nowrap; transition: opacity 0.3s var(--ease); }
.nav-menu { display: none; }
/* иконки кнопок панели: тема (в тёмной — солнце, в светлой — луна), старый дизайн, свернуть меню, выход */
:root #themeBtn { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E"); }
:root[data-theme='light'] #themeBtn { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z'/%3E%3C/svg%3E"); }
#designBtn { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='4'/%3E%3Cpath d='M3 9h18M9 21V9'/%3E%3C/svg%3E"); }
#navToggle { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='3'/%3E%3Cpath d='M9 4v16M15.5 10l-2 2 2 2'/%3E%3C/svg%3E"); }
:root.nav-compact #navToggle { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='3'/%3E%3Cpath d='M9 4v16M13.5 10l2 2-2 2'/%3E%3C/svg%3E"); }
#logoutBtn { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9'/%3E%3C/svg%3E"); }
.topbar__side .btn::before { content: ''; flex: none; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }

/* ---------- компьютер и планшет: боковая панель ----------
   Ширина панели меняется плавно, а всё внутри стоит на месте: иконки на одном отступе слева,
   подписи просто прячутся за краем и гаснут — ничего не прыгает. */
@media (min-width: 720px) {
  body { padding-left: calc(var(--side-w) + 32px); transition: padding-left 0.45s var(--ease-io); }
  .topbar { display: contents; }
  .topbar > .topbar__row {
    position: fixed; z-index: 30; left: 16px; top: calc(16px + env(safe-area-inset-top, 0px)); bottom: 16px; width: var(--side-w); max-width: none; margin: 0;
    padding: 16px 10px; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 20px; min-height: 0; overflow: hidden; overflow-y: auto; scrollbar-width: none;
    background: var(--glass); border: 1px solid var(--glass-line); border-radius: 26px;
    box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 var(--glass-lo), var(--glass-shadow);
    transition: width 0.45s var(--ease-io);
  }
  .brand { padding: 2px 0 2px 8px; min-height: 42px; }
  .brand__logo { width: 32px; }
  .brand__name { display: flex; flex-direction: column; gap: 3px; transition: opacity 0.3s var(--ease); }
  .brand__hub { font-size: 11px; letter-spacing: 0.24em; }
  .brand__hub::before { content: none; }
  .tabs { flex-direction: column; gap: 4px; overflow: visible; flex: 1 1 auto; }
  .tab { width: 100%; min-height: 44px; padding: 0 12px 0 14px; gap: 18px; border-radius: 14px; border: 1px solid transparent; font-size: 14px; overflow: hidden; justify-content: flex-start; }
  .tab:hover { background: var(--glass-2); color: var(--text); }
  .tab[aria-selected='true'] { background: var(--glass-2); color: var(--text); border-color: var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-hi); font-weight: 600; }
  .tab[aria-selected='true'] .tab__ico { color: var(--accent); }
  .topbar__side { flex-direction: column; align-items: stretch; gap: 4px; }
  .topbar__side .btn { width: 100%; min-height: 42px; padding: 0 12px 0 14px; gap: 18px; display: flex; align-items: center; justify-content: flex-start;
    border-radius: 14px; border-color: transparent; background: transparent; box-shadow: none; font-size: 13px; font-weight: 500; color: var(--muted);
    white-space: nowrap; overflow: hidden; transform: none; }
  .topbar__side .btn:hover { background: var(--glass-2); color: var(--text); border-color: var(--glass-line); transform: none; }
  :root[data-theme='light'] .topbar__side .btn { background: transparent; border-color: transparent; }
  :root[data-theme='light'] .topbar__side .btn:hover { background: var(--glass-2); border-color: var(--glass-line); }
  .ticker { background: none; border: 0; }
  .demo-banner { margin: 16px 16px 0; }

  :root.nav-compact .brand__name, :root.nav-compact .tab__txt { opacity: 0; }
  :root.nav-compact .topbar__side .btn { color: var(--muted); }
}
@media (min-width: 1100px) { .topbar__side #navToggle { display: flex; } }
/* планшет: панель всегда только с иконками, кнопку «свернуть» не показываем */
@media (min-width: 720px) and (max-width: 1099.98px) {
  #navToggle { display: none; }
  .brand__name, .tab__txt { opacity: 0; }
}

/* ---------- телефон: стеклянная шапка и меню разделов ---------- */
@media (max-width: 719.98px) {
  /* стекло шапки — на отдельном слое (::before): тогда у самой шапки нет размытия, и меню разделов внутри неё
     может само размывать страницу под собой (размытие внутри размытого браузеры не рисуют) */
  .topbar { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 1px solid var(--glass-line); will-change: auto; isolation: isolate;
    /* шапка уезжает и возвращается только сдвигом, без затухания: при затухании браузер выключает размытие,
       и шапка сначала появлялась прозрачной, а потом «вспыхивало» стекло */
    opacity: 1; transition: transform 0.5s var(--ease-glide); }
  .topbar.is-away { opacity: 1; transition: transform 0.45s cubic-bezier(0.45, 0, 0.25, 1); }
  .topbar::before { content: ''; position: absolute; inset: -240px 0 0; z-index: -1; pointer-events: none; /* вверх с запасом: при оттяжке страницы нет полосы без затемнения */
    background: color-mix(in srgb, var(--ground) 55%, transparent); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
  /* затемнение страницы под открытым меню; касание по нему закрывает меню */
  .topbar::after { content: ''; position: fixed; left: 0; right: 0; top: 0; height: 100lvh; z-index: -2;
    background: rgba(0, 0, 0, 0.38); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0s 0.4s; }
  :root[data-theme='light'] .topbar::after { background: rgba(60, 50, 120, 0.14); }
  .nav-open .topbar::after { opacity: 1; visibility: visible; transition: opacity 0.4s var(--ease); }
  .topbar__row { flex-wrap: nowrap; gap: 8px; min-height: 56px; position: relative; z-index: 2; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .ticker { position: relative; z-index: 1; }
  .brand__name { display: none; }
  .nav-menu { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; margin-left: auto; border-radius: 999px;
    border: 1px solid var(--glass-line); background: var(--glass-2); color: var(--text); font: 600 14px var(--font-ui); cursor: pointer; position: relative;
    box-shadow: inset 0 1px 0 var(--glass-hi); max-width: 52vw; transition: background-color 0.3s var(--ease); }
  .nav-menu #navMenuLabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-menu__chev { transition: transform 0.35s var(--ease); flex: none; }
  .nav-open .nav-menu__chev { transform: rotate(180deg); }
  .topbar__side { margin-left: 0; gap: 4px; flex-wrap: nowrap; }
  #navToggle { display: none; }
  .topbar__side .btn { font-size: 0; padding: 0; width: 38px; min-height: 38px; display: flex; align-items: center; justify-content: center; }
  /* меню разделов — жидкое стекло: размытая страница под ним, мягкое появление от кнопки, пункты — по очереди */
  .tabs { position: absolute; left: 10px; right: 10px; top: calc(100% + 8px); z-index: 40; flex-direction: column; gap: 2px; padding: 8px; order: 0; flex-basis: auto; margin: 0;
    background: color-mix(in srgb, var(--ground) 62%, transparent); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--glass-line); border-radius: 26px;
    box-shadow: inset 0 1px 0 var(--glass-hi), 0 30px 70px -24px rgba(0, 0, 0, 0.75);
    transform-origin: 50% 0; opacity: 0; transform: translateY(-8px) scale(0.97); pointer-events: none; visibility: hidden;
    transition: opacity 0.3s var(--ease), transform 0.45s var(--ease-glide), visibility 0s 0.45s; }
  :root[data-theme='light'] .tabs { background: rgba(255, 255, 255, 0.74); border-color: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 1px 0 #fff, 0 30px 60px -26px rgba(70, 60, 150, 0.3), 0 0 0 1px rgba(28, 26, 58, 0.05); }
  .nav-open .tabs { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity 0.3s var(--ease), transform 0.5s var(--ease-glide); }
  .tab { width: 100%; min-height: 50px; padding: 0 14px 0 8px; gap: 12px; border-radius: 18px; font-size: 15.5px; font-weight: 550; color: var(--text);
    border: 1px solid transparent; transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease); }
  /* значок — в маленькой стеклянной плитке */
  .tab .tab__ico { box-sizing: content-box; width: 18px; height: 18px; padding: 8px; border-radius: 12px; background: var(--glass-2);
    box-shadow: inset 0 0 0 1px var(--glass-line); color: var(--muted); transition: background-color 0.3s var(--ease), color 0.3s var(--ease); }
  .tab:active { background: var(--glass-2); transform: none; }
  .tab[aria-selected='true'] { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--text);
    border-color: color-mix(in srgb, var(--accent) 28%, transparent); }
  .tab[aria-selected='true'] .tab__ico { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 14px -8px var(--accent); }
  :root[data-theme='light'] .tab[aria-selected='true'] { background: rgba(110, 96, 230, 0.1); border-color: rgba(110, 96, 230, 0.18); }
  /* пункты появляются по очереди сверху вниз */
  .nav-open .tabs .tab { animation: fx-menu-in 0.45s var(--ease) both; }
  .nav-open .tabs .tab:nth-child(2) { animation-delay: 0.025s; }
  .nav-open .tabs .tab:nth-child(3) { animation-delay: 0.05s; }
  .nav-open .tabs .tab:nth-child(4) { animation-delay: 0.075s; }
  .nav-open .tabs .tab:nth-child(5) { animation-delay: 0.1s; }
  .nav-open .tabs .tab:nth-child(6) { animation-delay: 0.125s; }
  .nav-open .tabs .tab:nth-child(n+7) { animation-delay: 0.15s; }
  .nav-open .nav-menu { border-color: color-mix(in srgb, var(--accent) 45%, var(--glass-line)); background: color-mix(in srgb, var(--accent) 10%, var(--glass-2)); }
  .nav-open .topbar.is-away { transform: none; opacity: 1; }
  .ticker { background: none; border-bottom: 0; }
  .ticker > .wrap { padding-block: 0 10px; }
  .demo-banner { margin: 8px 12px 0; border-radius: 16px; position: relative; z-index: 21; }
}

/* ---------- курсы сверху: одна строка компактных плиток ---------- */
.ticker > .wrap { padding-top: 12px; }
.ticker__row { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding-bottom: 2px; }
.ticker__row::-webkit-scrollbar { display: none; }
.tick { flex: 1 0 auto; min-width: 118px; margin: 0; padding: 8px 12px; border: 1px solid var(--glass-line); border-radius: 16px; background: var(--glass);
  box-shadow: inset 0 1px 0 var(--glass-hi); transition: transform 0.35s var(--ease), border-color 0.35s var(--ease); white-space: nowrap; }
.tick:last-of-type { border-right: 1px solid var(--glass-line); }
.tick:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.tick__label { font-size: 10px; letter-spacing: 0.06em; }
.tick__value { font: 700 16px/1.25 var(--font-display); }
.tick__sub { font-size: 10.5px; }
.ticker__meta { flex: none; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; margin: 0; padding: 6px 12px;
  border: 1px dashed var(--glass-line); border-radius: 16px; font-size: 11px; }
.ticker__meta .pill { font-size: 10px; padding: 1px 8px; }

/* ---------- карточки курсов, итоги ---------- */
.rate__big { font: 800 34px/1.05 var(--font-display); letter-spacing: -0.02em; transition: color 0.4s var(--ease); }
.cols-rates .rate__big { font-size: clamp(24px, 2.1vw, 32px); }
.rate__ctl { border-top: 1px solid var(--line); }
.total__value { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; }
.total { border-radius: 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), var(--glass-flat);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--glass-line)); box-shadow: inset 0 1px 0 var(--glass-hi); }

/* ---------- кнопки ---------- */
.btn { position: relative; border-radius: 999px; background: var(--glass-2); border-color: var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-hi); min-height: 38px; padding: 7px 16px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.3s var(--ease), box-shadow 0.35s var(--ease), filter 0.3s var(--ease); }
.btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); transition-duration: 0.12s; }
.btn--primary { background: var(--accent); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 26px -16px var(--accent); }
.btn--primary:hover { background: var(--accent); filter: brightness(1.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 14px 30px -14px var(--accent); }
.btn--ghost { background: transparent; box-shadow: none; }
.btn--sm { border-radius: 999px; min-height: 30px; padding: 4px 12px; }
.btn[disabled] { transform: none; }
:root[data-theme='light'] .btn { border-color: rgba(28, 26, 58, 0.1); background: #fff; box-shadow: 0 1px 2px rgba(40, 30, 100, 0.06); }
:root[data-theme='light'] .btn--primary { border-color: transparent; background: var(--accent); }

/* ---------- поля ---------- */
.input, select.input { border-radius: 14px; min-height: 42px; padding: 9px 14px; background: var(--surface-2); border-color: var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-hi); transition: border-color 0.3s var(--ease), box-shadow 0.35s var(--ease); }
.input:focus { border-color: color-mix(in srgb, var(--accent) 80%, transparent); box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
:root[data-theme='light'] .input, :root[data-theme='light'] select.input { background: #f3f2f9; border-color: transparent; box-shadow: none; }
select.input option { background: var(--ground); color: var(--text); }
.mini { min-height: 34px; border-radius: 12px; }

/* ---------- переключатели-сегменты: подсветка плавно переезжает к выбранному (fx.js) ---------- */
.seg { position: relative; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass-flat); overflow: visible; isolation: isolate; -webkit-tap-highlight-color: transparent; }
.seg label { z-index: 1; -webkit-tap-highlight-color: transparent; }
.seg input { -webkit-tap-highlight-color: transparent; outline: none; }
.seg span { border-radius: 999px; padding: 7px 14px; outline: none !important; transition: color 0.5s var(--ease-glide); }
.seg label + label span { border-left: 0; }
.seg input:checked + span { background: var(--accent); color: var(--accent-ink); }
.seg.has-ind input:checked + span { background: transparent; box-shadow: none; } /* без тени-«силуэта», пока подсветка едет */
.seg span:hover { color: var(--text); }
.seg__ind { display: block; position: absolute; z-index: 0; left: 0; top: 0; border-radius: 999px; background: var(--accent); pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 6px 18px -10px var(--accent);
  will-change: transform, width;
  transition: transform 0.55s var(--ease-glide), width 0.55s var(--ease-glide), height 0.4s var(--ease-glide), opacity 0.35s var(--ease), box-shadow 0.3s var(--ease); }
/* рамка выбора только для клавиатуры (Tab) — и рисуется на самой подсветке, а не отдельным контуром */
.seg:has(input:focus-visible) .seg__ind { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
/* крупные переключатели (во всю ширину, в две строки) — скруглённые прямоугольники, а не овалы */
.seg--fill { border-radius: 16px; }
.seg--fill span, .seg--fill .seg__ind { border-radius: 12px; }
.seg--fill span { padding: 8px 6px; min-width: 0; }
.seg--tiles span { padding: 7px 4px; line-height: 1.2; }
.seg--fill span, .seg--tiles span { overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
@media (max-width: 719.98px) {
  .seg--fill { gap: 3px; padding: 3px; border-radius: 15px; }
  .seg--fill .seg__ind, .seg--fill span { border-radius: 11px; }
  .seg--tiles span { padding: 8px 3px; font-size: 13px; letter-spacing: -0.01em; }
  .car-mode { gap: 3px; padding: 3px; border-radius: 15px; }
  .car-mode span, .car-mode .seg__ind { border-radius: 11px; }
  .car-mode span { padding: 9px 4px; }
}
@media (max-width: 380px) { .seg--tiles span { font-size: 12px; } }
:root[data-theme='light'] .seg { border-color: transparent; background: #f1f0f8; }

/* ---------- ползунки: «Расчёт по ТПО», «Новое авто», «С НДС» и все галочки-переключатели ---------- */
.switch { background: var(--glass-2); border-color: var(--glass-line); transition: border-color 0.35s var(--ease), background-color 0.35s var(--ease); position: relative; }
.switch__track { width: 40px; height: 24px; background: var(--line-strong); transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.switch__track::after { top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.5s var(--ease-glide); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:checked + .switch__track { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.switch:has(input:checked) { background: color-mix(in srgb, var(--accent) 11%, var(--glass-2)); }
.check input[type='checkbox'], .rate__ctl input[type='checkbox'] {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 36px; height: 22px; margin: 0; border-radius: 999px; cursor: pointer;
  background: var(--line-strong); border: 0; transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.check input[type='checkbox']::before, .rate__ctl input[type='checkbox']::before {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 999px; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transition: transform 0.5s var(--ease-glide); }
.check input[type='checkbox']:checked, .rate__ctl input[type='checkbox']:checked { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 13%, transparent); }
.check input[type='checkbox']:checked::before, .rate__ctl input[type='checkbox']:checked::before { transform: translateX(14px); }
.check input[type='checkbox']:disabled { opacity: 0.45; cursor: not-allowed; }
.check input.fx-hold, .check input.fx-hold::before, .rate__ctl input.fx-hold, .rate__ctl input.fx-hold::before { transition: none !important; }

/* ---------- плашки и уведомления ---------- */
.pill { border-color: var(--glass-line); background: var(--glass-2); padding: 3px 10px; }
.notice { border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); border-radius: 14px; padding: 10px 14px; }
.notice--err { border-color: color-mix(in srgb, var(--down) 40%, transparent); }
.notice--info { border-color: color-mix(in srgb, var(--info) 35%, transparent); }
.demo-banner { border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 36%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text); padding: 7px 16px; }

/* ---------- таблицы ---------- */
.table-wrap { border-radius: 20px; border-color: var(--glass-line); background: var(--glass); box-shadow: inset 0 1px 0 var(--glass-hi); }
.box .table-wrap { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--glass-flat); }
th { background: var(--th); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
:root[data-theme='light'] th { background: var(--th); }
:root[data-theme='light'] .table-wrap { background: var(--glass); border-color: var(--glass-line); }
tbody tr td { transition: background-color 0.3s var(--ease); }
.util-table tbody tr td.is-hit { outline: 0; background-image: none; background: var(--accent); color: var(--accent-ink); border-radius: 10px; box-shadow: 0 8px 22px -12px var(--accent);
  animation: fx-fade 0.4s var(--ease); }
.util-table tbody tr td.is-hit small { color: var(--accent-ink); opacity: 0.75; }
@keyframes fx-fade { from { opacity: 0.4; } to { opacity: 1; } }

/* ---------- всплывающее: плотное стекло ---------- */
.cb-list, .cols__panel, .suggest__list, .mp, .mp-sheet__box, .hist-drawer__box, .toast {
  background: var(--pop); border-color: var(--glass-line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.cb-list, .cols__panel, .suggest__list, .mp { border-radius: 16px; }
/* стеклянная карточка — отдельный слой (из-за размытия фона), поэтому открытый в ней список поднимаем вместе с карточкой:
   иначе он уходит ПОД следующую карточку (таблицу справочника, итоги и т.п.) */
.box:has(.cb-list:not([hidden])), .box:has(.suggest__list:not([hidden])), .box:has(details.cols[open]), .box:has(.mp:not([hidden])),
.table-wrap:has(.cb-list:not([hidden])), .table-wrap:has(.suggest__list:not([hidden])) { position: relative; z-index: 25; }
.cols__panel .check input[type='checkbox']:checked { box-shadow: none; }
.toast { border-radius: 16px; }
.hist-drawer__box { border-radius: 24px 0 0 24px; }
.mp__cell, .mp__nav { background: var(--surface-2); }

/* ---------- появление разделов и чисел: мягко, без рывков ---------- */
.panel.is-active { animation: fx-in 0.5s var(--ease) backwards; } /* backwards: после анимации у раздела не остаётся transform — иначе окна внутри (история, фото) «прилипают» к разделу, а не к экрану */
@keyframes fx-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fx-menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .nav-open .tabs .tab { animation: none; } }
.fx-bump { animation: fx-bump 0.45s var(--ease); }
@keyframes fx-bump { from { opacity: 0.5; transform: translateY(2px); } to { opacity: 1; transform: none; } }
/* курс пересчитался после наценки — цифры мягко проявляются заново */
.fx-swap { animation: fx-swap 0.55s var(--ease) both; }
@keyframes fx-swap { from { opacity: 0.25; transform: translateY(4px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@media (prefers-reduced-motion: reduce) { .fx-swap { animation: none; } }

/* на вкладке «Курсы» строка курсов сверху не нужна — те же курсы ниже большими карточками */
/* ---------- история расчётов: плавающая стеклянная панель справа ----------
   Фон под панелью не «серым мутным», а слегка затемнён и размыт; сама панель — отдельная карточка с отступом от краёв,
   записи — мягкие карточки, вместо пустой рамки без фото — значок машины. */
.hist-drawer__back { background: rgba(0, 0, 0, 0.42); backdrop-filter: blur(6px) saturate(115%); -webkit-backdrop-filter: blur(6px) saturate(115%);
  transition: opacity 0.45s var(--ease); }
:root[data-theme='light'] .hist-drawer__back { background: rgba(60, 50, 120, 0.14); }
.hist-drawer__box { top: 12px; right: 12px; bottom: 12px; width: min(520px, calc(100% - 24px)); gap: 0; padding: 22px 18px 14px;
  border: 1px solid var(--glass-line); border-radius: 26px;
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 40px 90px -30px rgba(0, 0, 0, 0.75);
  transform: translate3d(calc(100% + 28px), 0, 0); opacity: 0.6;
  transition: transform 0.5s var(--ease-glide), opacity 0.4s var(--ease); }
.hist-drawer.is-open .hist-drawer__box { transform: none; opacity: 1; }
:root[data-theme='light'] .hist-drawer__box { background: rgba(255, 255, 255, 0.94); border-color: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 #fff, 0 40px 80px -36px rgba(70, 60, 150, 0.3), 0 0 0 1px rgba(28, 26, 58, 0.05); }
.hist-drawer__head { align-items: center; padding: 0 2px 4px 4px; }
.hist-drawer__head h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -0.015em;
  text-transform: none; color: var(--text); }
.hist-drawer__head .hint { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.hist-drawer__x { width: 38px; height: 38px; border-radius: 50%; font-size: 13px; color: var(--muted);
  background: var(--glass-2); border: 1px solid var(--glass-line); box-shadow: none; }
.hist-drawer__x:hover { color: var(--text); background: var(--surface-2); transform: none; }
:root[data-theme='light'] .hist-drawer__x { background: #f1f0f8; border-color: transparent; }
.hist-drawer .car-hist__bar { margin: 14px 0 12px; padding: 0 2px 14px 4px; gap: 10px; border-bottom: 1px solid var(--line); }
.hist-drawer .car-hist__who { font-size: 13px; color: var(--muted); }
.hist-drawer .car-hist__who .linkbtn { text-decoration: none; color: var(--accent); }
.hist-drawer .car-hist__who .linkbtn:hover { text-decoration: underline; }
.hist-drawer #carHistClear { margin-left: auto; }
.hist-drawer .car-hist__list { gap: 6px; margin: 0 -6px; padding: 2px 6px 8px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

.ch-item { gap: 12px; padding: 8px 6px 8px 8px; border: 1px solid transparent; border-radius: 16px; background: var(--glass-flat);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease); }
.ch-item.is-link:hover, .ch-item:hover { background: var(--glass-2); border-color: var(--glass-line); }
:root[data-theme='light'] .ch-item { background: #f6f5fb; border-color: transparent; }
:root[data-theme='light'] .ch-item:hover { background: #fff; border-color: rgba(30, 24, 18, 0.1); box-shadow: 0 10px 24px -18px rgba(70, 60, 150, 0.4); }
.ch-item__img { width: 76px; height: 54px; border-radius: 11px; background: var(--surface-2); }
.ch-item__img--none { position: relative; border: 0; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--accent) 5%, transparent)); }
.ch-item__img--none::after { content: ''; position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; background: var(--accent); opacity: 0.75;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 16.5h14M3.5 14.2l1.6-4.6A2 2 0 0 1 7 8.3h10a2 2 0 0 1 1.9 1.3l1.6 4.6V17a1 1 0 0 1-1 1H19a1 1 0 0 1-1-1v-.5H6v.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1z'/%3E%3Ccircle cx='7.5' cy='13.3' r='1'/%3E%3Ccircle cx='16.5' cy='13.3' r='1'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 16.5h14M3.5 14.2l1.6-4.6A2 2 0 0 1 7 8.3h10a2 2 0 0 1 1.9 1.3l1.6 4.6V17a1 1 0 0 1-1 1H19a1 1 0 0 1-1-1v-.5H6v.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1z'/%3E%3Ccircle cx='7.5' cy='13.3' r='1'/%3E%3Ccircle cx='16.5' cy='13.3' r='1'/%3E%3C/svg%3E") center / contain no-repeat; }
.ch-item__title { font-size: 14px; font-weight: 650; letter-spacing: -0.005em; }
.ch-item__year { font-weight: 500; }
.ch-item__meta { margin-top: 3px; font-size: 12.5px; }
.ch-item__meta b { font-weight: 700; }
.ch-item__btn { width: 34px; height: 34px; border-radius: 50%; font-size: 16px;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease); }
.ch-item__btn:hover { background: var(--glass-2); color: var(--text); }
:root[data-theme='light'] .ch-item__btn:hover { background: rgba(28, 26, 58, 0.06); }
.ch-item__fav.is-on { color: var(--accent); }
.ch-item__del:hover { color: #e5534b; }
/* записи появляются по очереди, мягко */
.hist-drawer.is-open .ch-item { animation: fx-in 0.45s var(--ease) both; }
.hist-drawer.is-open .ch-item:nth-child(2) { animation-delay: 0.03s; }
.hist-drawer.is-open .ch-item:nth-child(3) { animation-delay: 0.06s; }
.hist-drawer.is-open .ch-item:nth-child(4) { animation-delay: 0.09s; }
.hist-drawer.is-open .ch-item:nth-child(5) { animation-delay: 0.12s; }
.hist-drawer.is-open .ch-item:nth-child(6) { animation-delay: 0.15s; }
.hist-drawer.is-open .ch-item:nth-child(n+7) { animation-delay: 0.18s; }
@media (max-width: 719.98px) {
  .hist-drawer__box { top: max(8px, env(safe-area-inset-top)); right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); left: 8px; width: auto;
    border-radius: 22px; padding: 18px 12px 10px; transform: translate3d(0, 24px, 0); opacity: 0; }
  .hist-drawer__head h3 { font-size: 19px; }
  .hist-drawer .car-hist__who { flex-basis: 100%; }
  .hist-drawer #carHistClear { margin-left: auto; }
  .ch-item { gap: 10px; align-items: center; }
  .ch-item__title { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.3; }
  .ch-item__meta { white-space: normal; line-height: 1.35; }
  .ch-item__img { width: 64px; height: 48px; }
  .ch-item__btn { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) { .hist-drawer.is-open .ch-item { animation: none; } }

/* ---------- фото в КП: аккуратные плитки, кнопки — поверх фото ----------
   (общие правила .btn из этого файла снимали с кнопок position:absolute — они «выпадали» под фото и раздували плитку) */
#carResult .car-photos { gap: 10px; }
.car-photos figure { border-radius: 14px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.car-photos figure img, #carResult .car-photos img { border: 0; border-radius: 14px; }
.car-photos figure:hover { box-shadow: 0 0 0 1px var(--line-strong), 0 14px 30px -18px rgba(0, 0, 0, 0.8); }
.car-photos figure.is-pinned { box-shadow: 0 0 0 2px var(--accent), 0 12px 28px -16px color-mix(in srgb, var(--accent) 70%, transparent); }
.car-photos figure.is-pinned img { outline: 0; }
/* номер — маленький стеклянный ярлык; у обложки — оранжевый */
.car-photos figure .car-photos__num { left: 7px; top: 7px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 8px; font-size: 11.5px;
  background: rgba(10, 8, 6, 0.55); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.car-photos figure.is-cover .car-photos__num { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
/* кнопки поверх фото: «КП» слева снизу, булавка справа сверху, скачать справа снизу */
.car-photos figure .car-photos__kp, .car-photos figure .car-photos__pin, .car-photos figure .car-photos__dl {
  position: absolute; z-index: 1; min-height: 0; height: 26px; margin: 0; border: 0; border-radius: 999px;
  background: rgba(10, 8, 6, 0.55); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); font-size: 11.5px; font-weight: 600; line-height: 1;
  transition: opacity 0.3s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.2s var(--ease); }
.car-photos figure .car-photos__kp { left: 7px; bottom: 7px; top: auto; display: inline-flex; align-items: center; gap: 4px; padding: 0 9px 0 7px; }
.car-photos figure .car-photos__kp svg { color: var(--accent); }
.car-photos figure .car-photos__kp[aria-pressed='false'] { color: rgba(255, 255, 255, 0.75); text-decoration: line-through; padding: 0 9px; }
.car-photos figure .car-photos__pin { right: 7px; top: 7px; width: 26px; padding: 0; display: grid; place-items: center; opacity: 0; }
.car-photos figure .car-photos__dl { right: 7px; bottom: 7px; width: 26px; padding: 0; display: grid; place-items: center; font-size: 13px; opacity: 0; }
.car-photos figure:hover .car-photos__pin, .car-photos figure:hover .car-photos__dl, .car-photos figure:focus-within .car-photos__pin, .car-photos figure:focus-within .car-photos__dl { opacity: 1; }
.car-photos figure.is-pinned .car-photos__pin { opacity: 1; background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.car-photos figure .car-photos__kp:hover, .car-photos figure .car-photos__pin:hover, .car-photos figure .car-photos__dl:hover { background: rgba(10, 8, 6, 0.75); transform: none; }
.car-photos figure.is-pinned .car-photos__pin:hover { background: var(--accent); }
.car-photos figure.is-off img, .car-photos figure.is-extra img { opacity: 0.32; filter: grayscale(0.7); }
@media (pointer: coarse) {
  .car-photos figure .car-photos__kp, .car-photos figure .car-photos__pin, .car-photos figure .car-photos__dl { height: 30px; }
  .car-photos figure .car-photos__pin, .car-photos figure .car-photos__dl { width: 30px; opacity: 0.95; }
}

/* ---------- светлая тема: оранжевый текст — глубже, заливки — светлые ---------- */
:root[data-theme='light'] :is(.total__value, .kv .is-accent, .linkbtn, .td-summary .big, .td-table th[aria-sort], .tick__value.is-fee, .ch-item__fav.is-on,
  .pill--accent, .lines__inp.is-own, .offer[open] > summary, .tdc__tile--pow .tdc__val, .mp-sheet__btn.is-main, .brand b, .hist-filter .btn.is-on) { color: var(--accent-text); }
:root[data-theme='light'] .rate__big.is-fee { color: var(--accent-text) !important; }
:root[data-theme='light'] .btn--primary, :root[data-theme='light'] .seg__ind { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 18px -12px rgba(20, 18, 40, 0.55); }

/* ---------- кнопка «История»: в одну строку с заголовком ---------- */
.car-hist-btn { gap: 8px; }
.car-hist-btn .pill { min-width: 24px; padding: 2px 8px; font-size: 12px; text-align: center; background: color-mix(in srgb, var(--accent) 18%, var(--glass-2));
  border-color: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--text); }
@media (max-width: 719.98px) {
  #panel-link > .head { flex-wrap: nowrap; align-items: center; }
  #panel-link > .head h2 { flex: 1; min-width: 0; }
  .car-hist-btn { flex: none; margin-left: 0; min-height: 44px; padding: 0 12px 0 13px; }
}
@media (max-width: 459.98px) { .car-hist-btn__txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }

/* ---------- утиль: «Редактировать таблицу» — в строке над таблицей, справа ---------- */
.util-filters { align-items: center; row-gap: 10px; }
.util-edit { margin-left: auto; gap: 10px; align-items: center; flex-wrap: nowrap; }
.util-edit .btn { min-height: 34px; padding: 4px 14px; }
@media (max-width: 719.98px) {
  .util-edit { margin-left: 0; width: 100%; justify-content: space-between; }
  .util-edit .check { white-space: nowrap; }
  /* переключатели над таблицей — во всю ширину, равными частями, а не «переносом» на две строки */
  .util-filters .seg { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; padding: 3px; border-radius: 15px; }
  .util-filters .seg label { display: flex; min-width: 0; }
  .util-filters .seg span, .util-filters .seg .seg__ind { border-radius: 11px; }
  .util-filters .seg span { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px 6px; line-height: 1.25; }
}

/* ---------- светлая тема: фиолетовые акценты там, где тёмный цвет выбранного был бы слишком тяжёлым ---------- */
:root[data-theme='light'] .total { background: linear-gradient(135deg, rgba(124, 108, 240, 0.16), rgba(255, 210, 230, 0.18) 60%, transparent), #fff;
  border-color: rgba(124, 108, 240, 0.2); }
:root[data-theme='light'] .demo-banner { background: rgba(124, 108, 240, 0.1); border-color: rgba(124, 108, 240, 0.22); color: var(--text); }
:root[data-theme='light'] .input:focus { border-color: rgba(110, 96, 230, 0.55); box-shadow: 0 0 0 4px rgba(110, 96, 230, 0.12); }
:root[data-theme='light'] .switch:has(input:checked) { background: rgba(110, 96, 230, 0.08); }
:root[data-theme='light'] .switch input:checked + .switch__track,
:root[data-theme='light'] .check input[type='checkbox']:checked, :root[data-theme='light'] .rate__ctl input[type='checkbox']:checked { box-shadow: 0 0 0 4px rgba(110, 96, 230, 0.12); }
:root[data-theme='light'] .car-hist-btn .pill { background: rgba(110, 96, 230, 0.12); border-color: rgba(110, 96, 230, 0.2); }
:root[data-theme='light'] .box, :root[data-theme='light'] .tick, :root[data-theme='light'] .table-wrap { box-shadow: 0 1px 0 #fff inset, 0 18px 40px -30px rgba(70, 60, 150, 0.35); }

/* тепловая подсветка сумм в таблице утильсбора — сиреневая; выбранный раздел в боковой панели — тёмная «таблетка», как в образце */
:root[data-theme='light'] .util-table { --heat: 120, 104, 236; }
@media (min-width: 720px) {
  :root[data-theme='light'] .tab[aria-selected='true'] { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 10px 22px -14px rgba(20, 18, 40, 0.6); }
  :root[data-theme='light'] .tab[aria-selected='true'] .tab__ico { color: var(--accent-ink); }
}

body:has(#panel-rates.is-active) .ticker { display: none; }

/* обязательный выбор типа гибрида (как в styles.css) */
.field.is-need > span:first-child, .hint.field-need { color: var(--down, #ff5d5d); }
.field.is-need .seg { outline: 1.5px solid var(--down, #ff5d5d); outline-offset: 2px; border-radius: 14px; }
select.is-need { border-color: var(--down, #ff5d5d) !important; }
.field-need { display: block; margin-top: 4px; font-size: 12px; }
.field-need[hidden] { display: none; }

/* новые авто: карточки комплектаций и окна — стеклом, как остальные блоки */
.ah-spec { background: var(--glass); border-color: var(--glass-line); border-radius: 24px; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 var(--glass-lo), var(--glass-shadow); }
.ah-spec.is-sel { border-color: var(--accent); box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 0 0 1px var(--accent), var(--glass-shadow); }
.ah-calc { background: var(--glass-flat); border-top-color: var(--glass-line); }
.ah-hero__media { border-radius: 18px; box-shadow: inset 0 0 0 1px var(--glass-line); }
.ah-bar { background: var(--pop); border-color: var(--glass-line); border-radius: 999px; }
.ah-st__bar, .ah-kp__sec { background: var(--glass-flat); border-color: var(--glass-line); }
.ah-col, .ah-kp__trim { background: var(--glass-2); border-color: var(--glass-line); }
@media (max-width: 720px) {
  .ah-bar { border-radius: 20px; } .ah-spec { border-radius: 20px; }
  .ah-hero__ctrl .switch { background: var(--glass-2); border-color: var(--glass-line); }
}
.ah-fg { background: var(--glass-2); border-color: var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-hi); }
