/* Общий слой «Табло» по брендбуку GLL для ВСЕХ страниц сайта: старые статические, новости, страницы SitePages, главная.
   Подключается шагом SiteTablo (флаг SITE_PAGES_TABLO) последним стилем на каждой странице с шапкой сайта. Разметку не
   меняет. Что делает: шрифт Tilda Sans (Light, Regular, Medium) вместо DM Sans и Onest; фиолетовый логотипа
   (#5d2e8e, #3e286a, #a581ba) вместо #8618b5 и янтаря; без скруглений, теней и градиентов на кнопках; полный логотип
   в шапке на белом. Блоки и тексты страниц остаются как были — глубже их перестраивают шаблоны разделов. */
@font-face { font-family: "Tilda Sans"; src: url("/assets/vendor/fonts/TildaSans-VF.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }

:root, html[data-theme="dark"], :root[data-theme="dark"] {
  --brand: #5d2e8e; --blue: #5d2e8e; --blue-dark: #3e286a; --brand-dark: #3e286a; --brand-soft: rgba(93, 46, 142, .1);
  --amber: #a581ba; --warehouse-color: #5d2e8e; --warehouse-glow: rgba(93, 46, 142, .14);
  --radius: 0px; --radius-lg: 0px; --shadow: none; --shadow-soft: none; --shadow-lift: none;
  --n-brand: #5d2e8e; --n-brand-soft: rgba(93, 46, 142, .12); --n-lilac: #a581ba; --n-signal: #a581ba; --n-signal-soft: rgba(165, 129, 186, .2); --n-radius: 0px;
}

/* шрифт и насыщенность — одни на всём сайте */
html body, html body :where(*) { font-family: "Tilda Sans", "Segoe UI", system-ui, sans-serif !important; }
html body :where(h1, h2, h3, h4, h5, strong, b, th, summary, label, legend, .button, .n-btn, .logo__text) { font-weight: 500 !important; }
html body :where(h1, h2) { letter-spacing: -.02em; }

/* без скруглений и теней; круглыми остаются только точки карты и маршрута */
html body *, html body *::before, html body *::after { border-radius: 0 !important; box-shadow: none !important; }
html body .hb-city i, html body .g-route__line::after, html body .a-route__line::after, html body .n-kicker::before, html body .g-person img, html body .a-author img { border-radius: 50% !important; }
html body .board__row:focus-visible { outline: 2px solid #a581ba !important; outline-offset: -2px; }   /* фокус был только тенью */
html body :where(a, button, input, textarea, select, summary):focus-visible { outline: 2px solid #5d2e8e !important; outline-offset: 2px; }

/* шапка: белая полоса с полным логотипом (знак и надпись вместе, не уже 200 px) */
html body .site-header { background: #fff !important; border-bottom: 1px solid rgba(0, 0, 0, .16) !important; backdrop-filter: none !important; }
html body .site-header .logo img { content: url("/assets/images/logo-gll-full.png"); width: 232px; height: auto; object-fit: contain; }
html body .site-header .logo__text { display: none !important; }
html body .site-header .nav__links { background: none !important; border: 0 !important; }
html body .site-header .nav__links a { color: #000 !important; background: none !important; }
/* шапка «Табло» белая в обеих темах: панели меню v4 (nav.css) берут её цвета */
html[data-theme="dark"] body .site-header { --nav-panel: #fff; --nav-ink: #1b1530; --nav-mute: #5b5266; --nav-line: rgba(62, 40, 106, .18); --nav-hover: #ece3f0; --nav-accent: #5d2e8e; }
/* меню в одну строку и ровный ряд действий: поиск, «Рассчитать» и тема — одной высоты 44 px и одного веса */
@media (min-width: 1021px) {   /* выпадающее меню на телефоне и планшете остаётся как было */
  html body .site-header .nav { gap: 16px; }
  html body .site-header .nav__links { flex: 1 1 auto; min-width: 0; gap: 0; padding: 0; justify-content: center; }
  html body .site-header .nav__links a { white-space: nowrap; padding: 0 clamp(8px, 1vw, 14px); font-size: 15px; }
}
html body .site-header .nav__links a { font-weight: 500 !important; }
html body .site-header .nav__actions { flex: 0 0 auto; gap: 8px; }
html body .site-header .nav__actions .button { min-height: 44px; padding: 0 20px; font-size: 15px; white-space: nowrap; }
html body .site-header .gs-open, html body .site-header .theme-toggle { width: 44px; height: 44px; border: 1px solid rgba(62, 40, 106, .18) !important; background: #fff !important; color: #3e286a; }
html body .site-header .gs-open:hover, html body .site-header .theme-toggle:hover { background: #ece3f0 !important; }
html body .site-header .nav__links a:hover, html body .site-header .nav__links a[aria-current="page"], html body .site-header .nav__links a.is-active { color: #5d2e8e !important; }
html body .site-header .nav__links a[aria-current="page"], html body .site-header .nav__links a.is-active { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
html body .site-header .menu-toggle { background: #fff !important; border: 1px solid rgba(0, 0, 0, .16) !important; color: #000 !important; }
html body .site-header .menu-toggle span, html body .site-header .menu-toggle span::before, html body .site-header .menu-toggle span::after { background: #000 !important; }
html body .site-header .theme-toggle { background: #fff !important; border: 1px solid rgba(0, 0, 0, .16) !important; }
html body .site-header .theme-toggle__icon { background: #5d2e8e !important; border-radius: 50% !important; }   /* виден в обеих темах */
html body .site-header .theme-toggle__icon::before { border-color: rgba(93, 46, 142, .4) !important; border-radius: 50% !important; }

/* кнопки: одна фиолетовая плашка, без градиента */
html body .button, html body .n-btn--signal { background: #5d2e8e !important; background-image: none !important; border-color: #5d2e8e !important; color: #fff !important; transform: none !important; }
html body .button:hover, html body .n-btn--signal:hover { background: #3e286a !important; border-color: #3e286a !important; color: #fff !important; }
html body .hero .button, html body .n-stage .n-btn--signal, html body .n-cta .n-btn--signal { background: #fff !important; border-color: #fff !important; color: #3e286a !important; }
html body .hero .button:hover, html body .n-stage .n-btn--signal:hover, html body .n-cta .n-btn--signal:hover { background: #ece3f0 !important; border-color: #ece3f0 !important; color: #3e286a !important; }
html body.g-tablo main .n-btn--signal { background: #5d2e8e !important; border-color: #5d2e8e !important; color: #fff !important; }
html body.g-tablo main .n-cta .n-btn--signal { background: #fff !important; border-color: #fff !important; color: #3e286a !important; }
html body.g-tablo main .g-team .n-btn--signal { background: #fff !important; border-color: #fff !important; color: #3e286a !important; }   /* «Команда» — тёмная полоса, как призыв (30.11) */
html body.g-tablo main .g-team .n-btn--signal:hover { background: #ece3f0 !important; border-color: #ece3f0 !important; color: #3e286a !important; }

/* подписи-метки и ссылки — цвет логотипа */
html body .eyebrow, html body .g-eyebrow, html body .n-kicker { color: #5d2e8e; }
html body main a:not(.button):not(.n-btn):not(.n-card):not(.hb-q__go):not([class*="card"]) { text-underline-offset: 4px; }

@media (min-width: 1021px) and (max-width: 1260px) {   /* тесная шапка: логотип и ссылки чуть меньше, чтобы меню не переносилось */
  html body .site-header .logo img { width: 180px; }
  html body .site-header .nav { gap: 10px; }
  html body .site-header .nav__links a { font-size: 14px; padding: 0 7px; }
  html body .site-header .nav__actions .button { padding: 0 14px; }
}
@media (max-width: 1020px) {
  html body .site-header .logo img { width: 200px; }
  html body .site-header .nav__links { background: #fff !important; border: 1px solid rgba(0, 0, 0, .16) !important; }
}
/* телефон (02.12): кнопка темы видна на любой ширине; логотип и кнопки ужаты, чтобы меню не уезжало за край экрана */
@media (max-width: 480px) {
  html body .site-header .logo img { width: 150px; }
  html body .site-header .nav { gap: 6px; }
  html body .site-header .nav__actions { gap: 6px; }
  html body .site-header :is(.gs-open, .theme-toggle, .menu-toggle) { width: 42px; height: 42px; flex: 0 0 42px; }
  html body .site-header .theme-toggle { display: inline-grid !important; }
}
@media (max-width: 380px) { html body .site-header .logo img { width: 136px; } }
@media (max-width: 340px) {
  html body .site-header .logo img { width: 112px; }
  html body .site-header [data-gll-lang] { min-width: 32px; padding-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html body *, html body *::before, html body *::after { transition: none !important; animation: none !important; }
}

/* ссылка «EN» в шапке: color:inherit в разметке, в тёмной теме наследовала светлый текст на белой шапке (30.11) */
html body .site-header [data-gll-lang] { color: #000 !important; }
/* телефон и WhatsApp в шапке на широком экране: nav.css в тёмной теме красит их в #ece3f0, а шапка «Табло» белая в обеих
   темах — контраст 1.25 (30.11). Селектор с header сильнее правила nav.css, которое подключается позже. */
html[data-theme="dark"] body header.site-header .nav-contacts a { color: #3e286a; border-color: rgba(62, 40, 106, .18); }
html[data-theme="dark"] body header.site-header .nav-contacts a:hover { background: #ece3f0; }
/* «Читайте также»: сетка auto-fit (minmax 240px), а news.css на телефоне даёт карточке span 12 — браузер достраивал 11 пустых колонок с
   зазорами, карточка 416 px на экране 375 (30.11). В этой сетке карточка занимает одну колонку. */
html body .a-related__grid > .n-card { grid-column: auto; min-width: 0; }

/* ссылка на индекс ставок над лентой /news/ (30.11; в news-tablo.css места нет — лимит 12 КБ) */
html body main .ri-promo { background: #ece3f0; border-bottom: 1px solid rgba(62, 40, 106, .18); color: #000; }
html body main .ri-promo b { color: #3e286a; }
html body main .ri-promo .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 18px; }
html body main .ri-promo p { margin: 0; max-width: 70ch; }
/* один призыв внизу (30.11): WhatsApp и LinkedIn — строкой под текстом формы, вместо второй полосы */
html body .g-lead__alt { margin: 16px 0 0; font-size: 15px; line-height: 1.5; color: #4d4d4d; }
html body .g-lead__alt a { color: #5d2e8e; text-decoration: underline; text-underline-offset: 4px; }

/* Тёмная тема «ночное табло» (02.12). Раньше слой «Табло» держал светлые цвета и в тёмной теме: перекрашивались только фон
   и подвал. Здесь те же переменные разделов получают ночные значения. Шапка остаётся белой в обеих темах. Префикс
   :root[data-theme="dark"] body и место в конце файла — чтобы перебить правила tablo.css и news-tablo.css. */
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="dark"] body .hb, :root[data-theme="dark"] body .hb.sv {
  --paper: #160f26; --cell: #1e1633; --veil: rgba(30, 22, 51, .9); --ink: #f2f2f2; --ink-2: rgba(242, 242, 242, .74);
  --line: rgba(255, 255, 255, .16); --dot: rgba(255, 255, 255, .24);
  --v900: #e6d9f2; --v700: #c9aedd; --v500: #b48fd0; --v300: #a581ba; --v100: #2b2145; --white: #fff; --bad: #ff8a80;
}
:root[data-theme="dark"] body.g-tablo main, :root[data-theme="dark"] body.n-page main {
  --t-v900: #e6d9f2; --t-v700: #c9aedd; --t-v500: #b48fd0; --t-v300: #a581ba; --t-v100: #2b2145;
  --t-ink: #f2f2f2; --t-ink-2: rgba(242, 242, 242, .74); --t-paper: #160f26; --t-cell: #1e1633; --t-line: rgba(255, 255, 255, .16);
  --t-light: linear-gradient(180deg, #1e1633 0, #2b2145 100%);   /* светлая подложка секций (заявка, «Соседние ресурсы») — тёмная в тёмной теме (03.12) */
}
/* «Ресурсы», калькулятор /rasschitat/ и их динамические блоки (результат ТН ВЭД, калькуляторы, справочники): все цвета — переменные --r-*;
   светлые значения здесь и в resources.css, тёмные ниже; контраст ≥ 4.5:1 на #1e1633–#2b2145 (тест test_site_dark_contrast) */
:root { --r-ink: #000; --r-ink-2: #4d4d4d; --r-line: rgba(0,0,0,.16); --r-line-2: rgba(0,0,0,.4); --r-link: #5d2e8e; --r-accent-ink: #3e286a;
  --r-paper: #fff; --r-soft: #ece3f0; --r-err: #b00020; --r-warn-bg: #fff3cd; --r-warn-ink: #6b4e00; }
:root[data-theme="dark"] { --r-ink: #f2f2f2; --r-ink-2: rgba(242, 242, 242, .78); --r-line: rgba(255, 255, 255, .16); --r-line-2: rgba(255, 255, 255, .32); --r-link: #c9aedd; --r-accent-ink: #c9aedd;
  --r-paper: #1e1633; --r-soft: #2b2145; --r-err: #ff8a80; --r-warn-bg: #3a2f10; --r-warn-ink: #f5d98a; }
/* кнопка «Обзор» на карте: белый фон с --v700, который в тёмной теме светлеет (03.12) */
:root[data-theme="dark"] body .hb-globe__reset { background: #1e1633; color: #c9aedd; border-color: rgba(255, 255, 255, .28); }
:root[data-theme="dark"] body .hb-globe__reset:hover { background: #2b2145; }
:root[data-theme="dark"] body :is(.hb-q__go, .hb-tabs button[aria-selected="true"], .hb-prod__tabs button[aria-selected="true"], .hb-map__tabs button[aria-selected="true"], .hb-fan__i.is-on, .hb-lane a:hover, .hb-city.is-on span, .n-chip[aria-pressed="true"], .g-mono) { background: #5d2e8e; border-color: #5d2e8e; color: #fff; }
:root[data-theme="dark"] body .hb-q__go:hover { background: #72479b; }
:root[data-theme="dark"] body .hb-q__go--quiet { background: transparent; color: #f2f2f2; border: 1px solid rgba(242, 242, 242, .5); }
:root[data-theme="dark"] body .hb-way__img { background: #3e286a; }
:root[data-theme="dark"] body :is(.field, .r-field, .r-tool__body, .hb-q__cell) :is(input, textarea, select) { background: #1e1633; color: #f2f2f2; border-color: rgba(255, 255, 255, .28); }
:root[data-theme="dark"] body :is(.field, .r-field, .r-tool__body, .hb-q__cell) :is(input, textarea)::placeholder { color: rgba(242, 242, 242, .5); }
:root[data-theme="dark"] body main p.g-answer { background: #1e1633; color: #f2f2f2; }
:root[data-theme="dark"] body main .n-btn--ghost, :root[data-theme="dark"] body.n-page main .n-cta .n-btn--ghost { background: transparent; border-color: rgba(242, 242, 242, .6); color: #f2f2f2; }
:root[data-theme="dark"] body .g-lead__alt { color: rgba(242, 242, 242, .74); }
:root[data-theme="dark"] body :is(.g-lead__alt, .r-meta__list, .hb-karta-link) a { color: #c9aedd; }
:root[data-theme="dark"] body :is(.eyebrow, .g-eyebrow, .n-kicker) { color: #c9aedd; }
:root[data-theme="dark"] body main .ri-promo { background: #2b2145; color: #f2f2f2; border-color: rgba(255, 255, 255, .16); }
:root[data-theme="dark"] body main .ri-promo :is(b, p) { color: #f2f2f2; }
:root[data-theme="dark"] body.n-page main :is(.n-tag--signal, .a-hero .n-tag--signal) { background: transparent; color: #c9aedd; border-color: #a581ba; }
:root[data-theme="dark"] body main .n-chip { color: #f2f2f2; border-color: rgba(255, 255, 255, .28); background: transparent; }
:root[data-theme="dark"] body main .board__row { background: #1e1633; color: #f2f2f2; }
:root[data-theme="dark"] body main .board__row:hover { background: #2b2145; }
:root[data-theme="dark"] body .r-hero .r-prelim { background: #2b2145; color: #f2f2f2; border-left-color: #a581ba; }
:root[data-theme="dark"] body .r-tool { background: linear-gradient(180deg, #1e1633 0, #2b2145 100%); border-color: rgba(255, 255, 255, .16); }
:root[data-theme="dark"] body :is(.r-tool__body label, .r-meta__list dt, .r-card .n-card__text, .r-sg__pilot, .r-sg__pilot strong) { color: rgba(242, 242, 242, .74); }
:root[data-theme="dark"] body :is(.r-meta__list dd, .r-meta__list time, .r-tool__body h3, main .container h2) { color: #f2f2f2; }
:root[data-theme="dark"] body :is(.r-grid, .r-card, .r-tool__body th, .r-tool__body td) { border-color: rgba(255, 255, 255, .16); }
:root[data-theme="dark"] body .r-card:hover { background: #2b2145; }
:root[data-theme="dark"] body .hb:not(.hb--cat) :is(#routes, #services) { background: linear-gradient(180deg, #1e1633 0, #2b2145 100%); }
:root[data-theme="dark"] body .hb:not(.hb--cat) :is(#warehouses, #audit-short) { background: var(--cell); }
:root[data-theme="dark"] body.g-tablo .n-cta { background: #3e286a; }
:root[data-theme="dark"] body.g-tablo main .n-cta .n-btn--signal:hover { background: #ece3f0; border-color: #ece3f0; }
:root[data-theme="dark"] body.g-tablo .g-steps li::before { background: #5d2e8e; color: #fff; }
/* светлые ссылки в тёмной теме — кроме кнопок (r-btn, btn) и белой шапки: там телефон и кнопка «Рассчитать доставку» ТН ВЭД бледнели (03.12) */
:root[data-theme="dark"] body :is(.policy-card, .container) a:not(.button):not(.n-btn):not(.r-btn):not(.btn):not(.site-header a) { color: #c9aedd; }
/* ссылка внутри абзаца отличается не только цветом: подчёркивание (Lighthouse «link-in-text-block», чек-лист ввоза, 02.12) */
html body main :is(p, li) > a:not([class]) { text-decoration: underline; text-underline-offset: 4px; }

/* Телефон (02.12): свёрнутый длинный абзац — 3 строки и кнопка «Читать дальше» (main.js setupFold). */
html body main .m-fold__btn { display: none; }   /* шире телефона кнопки не нужны */
@media (max-width: 600px) {
  html body main p.m-fold:not(.m-fold--open) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
  html body main .m-fold__btn { display: inline-flex; align-items: center; min-height: 44px; margin: -4px 0 4px; padding: 0; background: none; border: 0; color: inherit; font: inherit; font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
  html body main .m-fold__btn--block { display: flex; margin: 4px 0 0; }
  /* ленты вбок вместо столбика: команда и «Читайте также» */
  html body main :is(.a-related__grid, .g-team__list) { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; padding-bottom: 4px; }
  html body main :is(.a-related__grid, .g-team__list)::-webkit-scrollbar { display: none; }
  html body main :is(.a-related__grid, .g-team__list) > * { scroll-snap-align: start; min-width: 0; }
}

/* Телефон (02.12): подвал — столбцы карты сайта свёрнуты под заголовок (site-fold.js), навигация в две колонки. */
html body footer .f-fold__btn { display: none; }
@media (max-width: 600px) {
  html body footer .footer__map-col.f-fold { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid currentColor; border-bottom-color: color-mix(in oklab, currentColor 18%, transparent); padding: 0; margin: 0; }
  html body footer .footer__map-col.f-fold > h3 { flex: 1 1 auto; margin: 0; min-height: 44px; display: flex; align-items: center; }
  html body footer .footer__map-col.f-fold > ul { flex: 1 0 100%; margin: 0 0 12px; }
  html body footer .f-fold__btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: none; border: 0; color: inherit; cursor: pointer; }
  html body footer .f-fold__btn::before { content: "+"; font-size: 22px; line-height: 1; font-weight: 400; transition: transform .2s ease; }
  html body footer .f-fold__btn[aria-expanded="true"]::before { transform: rotate(45deg); }
  html body footer .footer__map:has(.f-fold) { grid-template-columns: minmax(0, 1fr); gap: 0; }
  html body footer .footer__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; row-gap: 20px; }
  html body footer .footer__top > div:first-child { grid-row: span 2; }
  html body footer .footer__top a { overflow-wrap: anywhere; }
}
@media (max-width: 600px) and (prefers-reduced-motion: reduce) { html body footer .f-fold__btn::before { transition: none; } }
