/* templStandart J6 — prototype theme
   Evolutionary refresh: same structure & blue palette, cleaner gov/edu look */

@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Source+Serif+4:opsz,wght@8..60,500;8..60,600;8..60,700&display=swap");

:root {
  /* Как в настройках шаблона: templateColor / templateAccentColor */
  --tempcolor: #3d4f8f; /* цвет сайта — крупные плоскости, заголовки, кнопки */
  --tempaccentcolor: #c26d2d; /* акцент — мелкие детали и hover */
  --tempcolor-dark: color-mix(in srgb, var(--tempcolor) 72%, #000);
  --tempcolor-soft: color-mix(in srgb, var(--tempcolor) 12%, #fff);
  --tempaccent-soft: color-mix(in srgb, var(--tempaccentcolor) 12%, #fff);
  --tempcolor-mid: color-mix(in srgb, var(--tempcolor) 22%, #fff);
  --text: #1a2a33;
  --text-muted: #5a6b75;
  --surface: #ffffff;
  --surface-alt: #f4f7f9;
  --border: #d8e2e8;
  --sheet-max: 1340px;
  --sheet-pad: 1rem;
  --sidebar-width: 300px;
  --radius: 6px;
  --radius-sm: 4px;
  --control-min-h: 2.35rem;
  --control-pad-y: 0.28rem;
  --control-pad-x: 0.65rem;
  --control-font: 0.78rem;
  --control-border: color-mix(in srgb, var(--tempcolor) 22%, #d8e2e8);
  --shadow-soft: 0 1px 2px rgba(10, 42, 58, 0.06), 0 4px 14px rgba(10, 42, 58, 0.05);
  --font-ui: "Manrope", "Segoe UI", sans-serif;
  --font-display: "Source Serif 4", "Times New Roman", serif;
  --header-pattern: radial-gradient(ellipse 100% 85% at 0% 0%, color-mix(in srgb, var(--tempcolor) 14%, transparent) 0%, transparent 58%),
    radial-gradient(ellipse 90% 75% at 100% 100%, color-mix(in srgb, var(--tempaccentcolor) 12%, transparent) 0%, transparent 52%);
  --mid-header-bg: color-mix(in srgb, var(--tempcolor) 12%, #f5f7fa);
  --mid-header-fill: linear-gradient(
    160deg,
    color-mix(in srgb, var(--tempcolor) 8%, #ffffff) 0%,
    color-mix(in srgb, var(--tempcolor) 14%, #f2f5f9) 55%,
    color-mix(in srgb, var(--tempaccentcolor) 10%, #eef2f7) 100%
  );
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface-alt);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--tempcolor);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: var(--tempaccentcolor);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--tempaccentcolor);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* —— Default form controls (как в верхней панели) —— */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
input[type="date"],
select,
textarea,
.form-control {
  box-sizing: border-box;
  min-height: var(--control-min-h);
  padding: var(--control-pad-y) var(--control-pad-x);
  border: 1px solid var(--control-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--tempcolor);
  font-family: var(--font-ui);
  font-size: var(--control-font);
  font-weight: 700;
  line-height: 1.15;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--tempcolor) 45%, #fff);
  font-weight: 600;
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus {
  outline: none;
  border-color: var(--tempaccentcolor);
  box-shadow: 0 0 0 2px var(--tempaccent-soft);
}

textarea {
  min-height: 6rem;
  font-weight: 600;
  line-height: 1.4;
  resize: vertical;
}

select {
  cursor: pointer;
}

/* Поля в модулях / позициях — на всю ширину блока */
.module-box :is(
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="number"],
  input[type="search"],
  input[type="date"],
  select,
  textarea,
  .form-control
),
.sidebar :is(
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="number"],
  input[type="search"],
  input[type="date"],
  select,
  textarea,
  .form-control
),
.footer-auth :is(
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="number"],
  input[type="search"],
  select,
  textarea,
  .form-control
),
[data-position^="footer"] :is(
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="number"],
  input[type="search"],
  select,
  textarea,
  .form-control
) {
  width: 100%;
  max-width: 100%;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-height: auto;
  padding: 0;
  border: 0;
  box-shadow: none;
}

/* Базовая типографика кнопок — только .ts-main (статьи / компонент), не блоки модулей */
.ts-main :is(
  button:not(.news-slider__btn):not(.news-slider__dot),
  input[type="submit"],
  input[type="button"],
  input[type="reset"],
  .btn
) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-min-h);
  padding: var(--control-pad-y) 0.85rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: var(--control-font);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.15;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* —— Proto toolbar —— */
.proto-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem var(--sheet-pad);
  background: #12222b;
  color: #e8eef2;
  font-size: 0.85rem;
}

.proto-bar a {
  color: #c8e6f2;
}

.proto-bar a:hover,
.proto-bar a.is-active {
  color: #fff;
}

.proto-bar nav {
  display: flex;
  gap: 1rem;
}

.proto-bar button {
  font: inherit;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: inherit;
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
}

.proto-bar button[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.55);
}

.proto-bar__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
}

.proto-color {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #c8e6f2;
  white-space: nowrap;
}

.proto-color input[type="color"] {
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
}

.proto-palette {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #c8e6f2;
  white-space: nowrap;
}

.proto-palette select {
  max-width: 14rem;
  min-height: 1.7rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
  background: #1a2c36;
  color: #e8eef2;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

/* —— Top utility bar —— */
.top-header {
  background: var(--tempcolor-dark);
  color: #fff;
  font-size: 0.875rem;
}

.top-header .sheet-inner {
  min-height: 0;
  padding-block: 0.3rem;
  align-items: center;
}

.top-header-left {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.4rem;
}

/* Общий язык контролов верхней панели */
.top-btn,
.site-search-field {
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: none;
  min-height: var(--control-min-h);
}

.top-btn {
  display: inline-flex;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.2rem var(--control-pad-x) 0.2rem 0.35rem;
  color: var(--tempcolor) !important;
  font-weight: 700;
  font-size: var(--control-font);
  line-height: 1.15;
  text-decoration: none !important;
  white-space: normal;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.top-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  flex: 0 0 1.55rem;
  width: 1.55rem;
  min-height: 100%;
}

.top-btn-icon img {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  max-width: 1.35rem;
  max-height: 1.35rem;
  object-fit: contain;
}

.top-btn-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  line-height: 1.15;
  max-width: 7.5rem;
}

.site-title .ts-line,
.site-slogan .ts-line,
.contact-link .ts-line {
  display: block;
}

.top-btn-text br {
  display: block;
  content: "";
}

/* FA как в прототипе: тянется по высоте кнопки и центрирует глиф */
.top-btn > i,
.top-btn > .fa-solid,
.top-btn > .fa-regular,
.top-btn > .fa {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  flex-shrink: 0;
  width: 1.35rem;
  height: auto;
  max-height: none;
  font-size: 1.35rem;
  line-height: 1;
  margin: 0;
}

.top-btn:hover {
  background: var(--tempaccent-soft);
  color: var(--tempaccentcolor) !important;
  border-color: #fff;
  opacity: 1;
}

.top-btn:hover i {
  color: var(--tempaccentcolor);
}

/* Поиск — компактнее кнопок слева, не на всю шапку */
.site-search--header {
  display: block;
  width: 15rem;
  max-width: 15rem;
  margin-left: auto;
}

.site-search-field {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  overflow: hidden;
}

.site-search-field:focus-within {
  border-color: #fff;
  background: #fff;
}

.site-search--header input[type="search"] {
  flex: 1;
  min-width: 0;
  width: 100%;
  margin: 0;
  min-height: 0;
  padding: var(--control-pad-y) 5.4rem var(--control-pad-y) var(--control-pad-x);
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--tempcolor);
  font: inherit;
  font-size: var(--control-font);
  font-weight: 700;
  line-height: 1.15;
  height: auto;
  box-shadow: none;
}

.site-search--header input[type="search"]:focus {
  outline: none;
  box-shadow: none;
  border-color: transparent;
}

.site-search--header .btn-search {
  position: absolute;
  inset: 0 0 0 auto;
  top: 0;
  right: 0;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  box-sizing: border-box;
  width: auto;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100%;
  margin: 0;
  padding: 0 0.75rem !important;
  border: 0 !important;
  border-left: 1px solid color-mix(in srgb, var(--tempcolor) 18%, #fff) !important;
  border-radius: 0 !important;
  background: var(--tempcolor-soft);
  color: var(--tempcolor);
  font: inherit;
  font-weight: 700;
  font-size: var(--control-font);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
}

.site-search--header .btn-search > i,
.site-search--header .btn-search > .fa-solid,
.site-search--header .btn-search > .fa {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.35rem !important;
  height: 1.35rem !important;
  max-width: 1.35rem !important;
  max-height: 1.35rem !important;
  margin: 0 !important;
  font-size: 1.35rem !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

.site-search--header .btn-search > span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.site-search--header .btn-search:hover {
  background: var(--tempaccent-soft);
  color: var(--tempaccentcolor);
}

.site-search-toggle,
.site-search-close {
  display: none;
}

.site-search-panel {
  display: block;
  width: 100%;
}

.top-header-right {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  margin-left: auto;
}

/* —— Mid header —— */
.mid-header {
  position: relative;
  isolation: isolate;
  border-bottom: 1px solid color-mix(in srgb, var(--tempcolor) 10%, #dfe5ec);
}

.mid-header .sheet {
  position: relative;
  z-index: 1;
}

.site-logo {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: contain;
}

svg.site-logo {
  overflow: visible;
}

.site-slogan {
  margin: 0 0 0.5rem;
  font-family: var(--font-ui);
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slogan-color, var(--tempcolor));
}

.site-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--title-color, var(--text));
}

.site-title a {
  color: inherit;
}

.site-title a:hover {
  color: var(--tempaccentcolor);
}

.contact-link {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: 100%;
  color: var(--contact-color, var(--text));
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: left;
}

.contact-link > span {
  min-width: 0;
  text-align: left;
}

.contact-link i {
  color: var(--tempcolor);
  margin-top: 0.15rem;
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.contact-link:hover {
  color: var(--tempaccentcolor);
}

.contact-link:hover i {
  color: var(--tempaccentcolor);
}

/* —— Main nav + dropdown —— */
.bottom-header {
  position: relative;
  z-index: 40;
  background: var(--tempcolor);
  box-shadow: 0 2px 8px rgba(5, 60, 85, 0.18);
  overflow: visible;
}

.bottom-header .sheet {
  overflow: visible;
  position: relative;
}

.hmenu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  align-content: center;
  column-gap: 0.25rem;
  row-gap: 0.2rem;
  /* Полоса компактная — высоту дают сами кнопки */
  padding-block: 0.2rem;
  margin: 0;
  list-style: none;
  position: relative;
  z-index: 41;
}

.hmenu > li {
  position: relative;
  flex: 0 1 auto;
  max-width: 100%;
  display: flex;
}

.hmenu > li > .menu-item__hit {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 2.55rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  line-height: 1.2;
  max-width: none;
}

/* Демо: много пунктов (2–4 строки) */
.hmenu-extra {
  display: none;
}

body.demo-hmenu-dense .hmenu-extra {
  display: list-item;
}

body.demo-hmenu-dense .hmenu {
  row-gap: 0.2rem;
  padding-block: 0.2rem;
}

.hmenu > li > .menu-item__hit:hover,
.hmenu > li.is-active > .menu-item__hit,
.hmenu > li.is-open > .menu-item__hit {
  background: #fff;
  color: var(--tempcolor);
}

.hmenu > li.has-children > .menu-item__hit {
  padding-right: 1.7rem;
  position: relative;
}

/* L1: стрелка вниз, цвет = цвет текста */
.hmenu > li.has-children > .menu-item__hit::after {
  content: "";
  position: absolute;
  right: 0.55rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: -0.38rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.9;
}

/* Dropdown level 2: не уже пункта 1-го уровня */
.hmenu > li > .hmenu-sub {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  display: none;
  box-sizing: border-box;
  min-width: 100%;
  width: max(100%, 18rem);
  max-width: 28rem;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(10, 42, 58, 0.16);
  overflow: visible;
}

.hmenu > li:hover > .hmenu-sub,
.hmenu > li:focus-within > .hmenu-sub,
.hmenu > li.is-open > .hmenu-sub {
  display: block;
}

/* Bridge so hover doesn't drop when moving to submenu */
.hmenu > li.has-children::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 0.4rem;
}

/* —— L2+ ссылки: единый hover для листьев —— */
.hmenu-sub li > .menu-item__hit {
  display: block;
  padding: 0.55rem 0.9rem;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
}

.hmenu-sub li > .menu-item__hit:hover,
.hmenu-sub li.is-active > .menu-item__hit,
.hmenu-sub li.has-children:hover > .menu-item__hit,
.hmenu-sub li.has-children:focus-within > .menu-item__hit,
.hmenu-sub li.has-children.is-open > .menu-item__hit {
  background: var(--tempaccent-soft);
  color: var(--tempaccentcolor);
}

/* li static — L3+ от панели родителя */
.hmenu-sub li {
  position: static;
}

/* Родители с подменю — один вид на всех уровнях */
.hmenu-sub li.has-children > .menu-item__hit {
  padding-right: 2rem;
  position: relative;
}

.hmenu-sub li.has-children > .menu-item__hit::after {
  content: "";
  position: absolute;
  right: 0.7rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: -0.28rem;
  border-right: 2.5px solid currentColor;
  border-top: 2.5px solid currentColor;
  border-bottom: 0;
  border-left: 0;
  transform: rotate(45deg);
  opacity: 0.9;
}

.hmenu-sub li.has-children:hover > .menu-item__hit::after,
.hmenu-sub li.has-children:focus-within > .menu-item__hit::after,
.hmenu-sub li.has-children.is-open > .menu-item__hit::after {
  border-color: currentColor;
  opacity: 1;
}

/* Level 3+: вправо ступеньками; высота ≥ панели предыдущего уровня (можно выше) */
.hmenu-sub--l3,
.hmenu-sub .hmenu-sub {
  position: absolute !important;
  top: 0.5rem;
  left: calc(100% - 0.5rem);
  z-index: 55;
  display: none;
  box-sizing: border-box;
  width: max(100%, 16.5rem);
  min-width: 16.5rem;
  max-width: 26rem;
  min-height: calc(100% - 0.5rem);
  height: auto;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 2px solid var(--tempcolor);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 28px rgba(10, 42, 58, 0.18);
  /* visible — иначе L4+ клипаются и «уезжают» в скролл панели L3 */
  overflow: visible;
}

/* следующая ступенька — ещё правее и чуть ниже */
.hmenu-sub .hmenu-sub .hmenu-sub {
  top: 1rem;
  left: calc(100% - 0.5rem);
  z-index: 56;
  min-height: calc(100% - 1rem);
}

.hmenu-sub > li:hover > .hmenu-sub--l3,
.hmenu-sub > li:focus-within > .hmenu-sub--l3,
.hmenu-sub > li.is-open > .hmenu-sub--l3,
.hmenu-sub > li:hover > .hmenu-sub,
.hmenu-sub > li:focus-within > .hmenu-sub,
.hmenu-sub > li.is-open > .hmenu-sub {
  display: block;
}

.hmenu-sub .hmenu-sub li > .menu-item__hit {
  font-size: 0.85rem;
}

.hmenu-drawer-head,
.nav-backdrop {
  display: none;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-sizing: border-box;
  width: auto;
  min-height: var(--control-min-h);
  margin: 0.35rem 0;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle__icon {
  position: relative;
  display: block;
  width: 1.15rem;
  height: 0.85rem;
  flex-shrink: 0;
}

.nav-toggle__icon span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease, bottom 0.2s ease;
}

.nav-toggle__icon span:nth-child(1) { top: 0; }
.nav-toggle__icon span:nth-child(2) { top: 50%; margin-top: -1px; }
.nav-toggle__icon span:nth-child(3) { bottom: 0; }

body.nav-open .nav-toggle__icon span:nth-child(1) {
  top: 50%;
  margin-top: -1px;
  transform: rotate(45deg);
}

body.nav-open .nav-toggle__icon span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle__icon span:nth-child(3) {
  bottom: auto;
  top: 50%;
  margin-top: -1px;
  transform: rotate(-45deg);
}

.nav-close {
  display: none;
}

@media (max-width: 860px) {
  html.ts-js .bottom-header .sheet {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    min-height: 2.85rem;
    padding-block: 0;
    padding-inline: 0;
  }

  html.ts-js .nav-toggle {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    margin: 0;
    min-height: 2.85rem;
    border: 0;
    border-radius: 0;
  }

  html.ts-js .nav-toggle:hover,
  html.ts-js .nav-toggle:focus-visible {
    background: color-mix(in srgb, #fff 14%, transparent);
  }

  .hmenu {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    flex-wrap: nowrap;
    width: 100%;
    padding: 0.4rem 0 1rem;
    row-gap: 0;
  }

  html.ts-js .hmenu-wrap {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    width: min(22.5rem, 88vw);
    max-width: 100%;
    margin: 0;
    background: #fff;
    box-shadow: 8px 0 32px rgba(10, 42, 58, 0.22);
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform 0.28s ease, visibility 0.28s ease;
  }

  html.ts-js .hmenu-wrap.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  html.ts-js .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 85;
    background: rgba(12, 24, 38, 0.46);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
  }

  html.ts-js .nav-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  html.ts-js .hmenu-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex: 0 0 auto;
    padding: 0.85rem 1rem;
    background: var(--tempcolor);
    color: #fff;
  }

  html.ts-js .hmenu-drawer-title {
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  html.ts-js .nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    min-height: 2.2rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--radius-sm);
    background: transparent;
    color: #fff;
    cursor: pointer;
  }

  html.ts-js .nav-close:hover {
    background: rgba(255, 255, 255, 0.14);
  }

  html.ts-js .hmenu-wrap .hmenu {
    flex: 1 1 auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0.5rem 0.65rem 1.25rem;
  }

  html.ts-js .hmenu-wrap .hmenu > li {
    display: block;
    max-width: none;
  }

  html.ts-js .hmenu-wrap .hmenu > li > .menu-item__hit {
    width: 100%;
    min-height: 2.7rem;
    padding: 0.65rem 0.85rem;
    color: var(--text);
    background: transparent;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    text-transform: none;
    white-space: normal;
    border-radius: var(--radius-sm);
  }

  html.ts-js .hmenu-wrap .hmenu > li > .menu-item__hit:hover,
  html.ts-js .hmenu-wrap .hmenu > li.is-active > .menu-item__hit,
  html.ts-js .hmenu-wrap .hmenu > li.is-open > .menu-item__hit {
    background: var(--tempcolor-soft);
    color: var(--tempcolor);
  }

  .hmenu > li.has-children::after {
    display: none;
  }

  .hmenu > li > .hmenu-sub {
    position: static;
    display: none;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0.15rem 0 0.35rem 0.55rem;
    box-shadow: none;
    border: 0;
    border-left: 3px solid var(--tempcolor);
    border-radius: 0;
    background: transparent;
  }

  .hmenu-sub--l3,
  .hmenu-sub .hmenu-sub {
    position: static !important;
    top: auto !important;
    left: auto !important;
    display: none;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0.15rem 0 0.25rem 0.55rem;
    border: 0;
    border-left: 3px solid color-mix(in srgb, var(--tempcolor) 55%, #fff);
    box-shadow: none;
    overflow: visible;
    background: transparent;
  }

  html.ts-js .hmenu-wrap .hmenu-sub li > .menu-item__hit {
    color: var(--text);
    padding: 0.45rem 0.7rem;
  }

  html.ts-js .hmenu-wrap .hmenu-sub li > .menu-item__hit:hover,
  html.ts-js .hmenu-wrap .hmenu-sub li.is-active > .menu-item__hit,
  html.ts-js .hmenu-wrap .hmenu-sub li.has-children.is-open > .menu-item__hit {
    background: var(--tempcolor-soft);
    color: var(--tempcolor);
  }

  .hmenu > li:hover > .hmenu-sub,
  .hmenu-sub > li:hover > .hmenu-sub,
  .hmenu-sub > li:hover > .hmenu-sub--l3 {
    display: none;
  }

  .hmenu > li.is-open > .hmenu-sub,
  .hmenu-sub > li.is-open > .hmenu-sub,
  .hmenu-sub > li.is-open > .hmenu-sub--l3 {
    display: block;
  }

  .hmenu-sub li.has-children > .menu-item__hit::after {
    margin-top: -0.2rem;
    border-right: 2.5px solid currentColor;
    border-bottom: 2.5px solid currentColor;
    border-top: 0;
    transform: rotate(45deg);
  }

  .hmenu > li.has-children.is-open > .menu-item__hit::after,
  .hmenu-sub li.has-children.is-open > .menu-item__hit::after {
    transform: rotate(-135deg);
    margin-top: -0.05rem;
  }

  .hmenu-sub li.has-children:hover > .menu-item__hit::after,
  .hmenu-sub li.has-children:focus-within > .menu-item__hit::after,
  .hmenu-sub li.has-children.is-open > .menu-item__hit::after {
    border-color: currentColor;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.ts-js .hmenu-wrap,
  html.ts-js .nav-backdrop,
  .nav-toggle__icon span {
    transition: none;
  }
}

/* —— Page areas —— */
.site-header {
  position: relative;
  z-index: 50;
}

.wrap-content {
  position: relative;
  z-index: 1;
  padding-bottom: 1.25rem;
}

/* Пустой pageslider не даёт лишней полосы перед крошками */
.pageslider {
  display: none;
  background: transparent;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.pageslider.has-content,
body.show-positions .pageslider {
  display: block;
}

.pageslider.has-content {
  background: transparent;
  padding-block: 0;
}

/* —— Full-bleed pageslider: 5 колонок —— */
.banner-cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: 100%;
  min-height: 11.5rem;
  gap: 0;
}

.banner-col {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 11.5rem;
  padding: 0.85rem 0.75rem;
  background-size: cover;
  background-position: center;
  color: #fff !important;
  text-decoration: none !important;
  overflow: hidden;
  transition: filter 0.25s ease;
}

.banner-col::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--tempcolor) 18%, transparent) 0%,
    color-mix(in srgb, var(--tempcolor-dark) 78%, transparent) 100%
  );
  transition: background 0.25s ease;
}

.banner-col:hover::before {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--tempcolor) 28%, transparent) 0%,
    color-mix(in srgb, var(--tempcolor-dark) 88%, transparent) 100%
  );
}

.banner-col + .banner-col {
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.2);
}

.banner-col-caption {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.banner-col-title {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.banner-col-text {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
  opacity: 0.92;
}

/* Banners / triples — пустые слоты без отступов */
.banner-slot {
  padding-block: 0;
  min-height: 0;
}

.banner-slot:has(.module-box),
.banner-slot:has(img),
.banner-slot.has-content,
body.show-positions .banner-slot {
  padding-block: 0.65rem;
}

@media (max-width: 991px) {
  :root {
    --sheet-pad: 0.5rem;
  }

  .banner-cols {
    grid-template-columns: repeat(5, minmax(9.5rem, 1fr));
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .banner-col {
    scroll-snap-align: start;
    min-width: 9.5rem;
  }

  html.ts-js .sidebar-nav .sidenav-collapsible .mod-title,
  html.ts-js .sidebar-nav .sidenav-drawer-toggle {
    position: relative;
    cursor: pointer;
    padding-right: 2.25rem;
    user-select: none;
  }

  html.ts-js .sidebar-nav .sidenav-drawer-toggle {
    display: block;
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    text-align: left;
    background: var(--tempcolor);
    color: #fff;
    font-family: var(--font-ui);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: normal;
    text-transform: none;
    min-height: 0;
    padding: 0.5rem 2.25rem 0.5rem 0.95rem;
    box-shadow: none;
  }

  html.ts-js .sidebar-nav .sidenav-collapsible .mod-title::after,
  html.ts-js .sidebar-nav .sidenav-drawer-toggle::after {
    content: "";
    position: absolute;
    right: 0.85rem;
    top: 50%;
    width: 0.45rem;
    height: 0.45rem;
    margin-top: -0.35rem;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
  }

  html.ts-js .sidebar-nav .sidenav-collapsible.is-open .mod-title::after,
  html.ts-js .sidebar-nav .sidenav-collapsible.is-open .sidenav-drawer-toggle::after {
    margin-top: -0.1rem;
    transform: rotate(225deg);
  }

  html.ts-js .sidebar-nav .sidenav-collapsible:not(.is-open) .mod-body {
    display: none;
  }
}

@media (max-width: 860px) {
  .top-header .sheet-inner {
    justify-content: center;
    flex-wrap: wrap;
  }

  .site-search--header {
    width: auto;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .top-header-left,
  .top-header-right {
    display: contents;
    flex: 0 0 auto;
    overflow: visible;
    margin-left: 0;
    margin-right: 0;
    justify-content: center;
  }

  .top-header-left > ul,
  .top-bar-menu,
  .top-header-left > ul > li,
  .top-bar-menu > li {
    display: contents;
    margin: 0;
    padding: 0;
  }

  .site-search--header input[type="search"] {
    padding-right: 3rem;
  }

  .site-search--header .btn-search span {
    display: none;
  }

  .site-search--header .btn-search {
    padding: 0 0.75rem;
  }

  html.ts-js .site-search--collapsible {
    width: auto;
    max-width: none;
    margin-left: 0;
  }

  html.ts-js .site-search--collapsible .site-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: var(--control-min-h);
    min-width: var(--control-min-h);
    height: var(--control-min-h);
    min-height: var(--control-min-h);
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--tempcolor);
    cursor: pointer;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
  }

  html.ts-js .site-search--collapsible .site-search-toggle:hover {
    background: var(--tempaccent-soft);
    color: var(--tempaccentcolor);
    border-color: #fff;
  }

  html.ts-js .site-search--collapsible .site-search-toggle > i,
  html.ts-js .site-search--collapsible .site-search-toggle > .fa-solid {
    display: inline-flex !important;
    width: 1.35rem !important;
    height: 1.35rem !important;
    max-width: 1.35rem !important;
    max-height: 1.35rem !important;
    font-size: 1.35rem !important;
    line-height: 1 !important;
  }

  html.ts-js .site-search--collapsible:not(.is-open) .site-search-panel {
    display: none;
  }

  html.ts-js .site-search--collapsible.is-open .site-search-panel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 40;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0.35rem var(--sheet-pad);
    background: var(--tempcolor-dark);
    box-shadow: 0 8px 24px rgba(10, 42, 58, 0.22);
    animation: ts-search-in 0.18s ease;
  }

  html.ts-js .site-search--collapsible.is-open .site-search-field {
    flex: 1 1 auto;
    min-width: 0;
  }

  html.ts-js .site-search--collapsible.is-open .site-search-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-sizing: border-box;
    width: var(--control-min-h);
    min-width: var(--control-min-h);
    height: var(--control-min-h);
    min-height: var(--control-min-h);
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--tempcolor);
    cursor: pointer;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
  }

  html.ts-js .site-search--collapsible.is-open .site-search-close:hover {
    background: var(--tempaccent-soft);
    color: var(--tempaccentcolor);
    border-color: #fff;
  }

  html.ts-js .site-search--collapsible.is-open .site-search-close > i,
  html.ts-js .site-search--collapsible.is-open .site-search-close > .fa-solid {
    display: inline-flex !important;
    width: 1.35rem !important;
    height: 1.35rem !important;
    max-width: 1.35rem !important;
    max-height: 1.35rem !important;
    font-size: 1.35rem !important;
    line-height: 1 !important;
  }

  .top-btn,
  .site-search--header,
  html.ts-js .site-search--collapsible {
    flex-shrink: 0;
  }

  .top-btn {
    font-size: 0.72rem;
    padding: 0.25rem 0.55rem;
  }

  .banner-cols {
    min-height: 9.5rem;
  }

  .banner-col {
    min-height: 9.5rem;
  }
}

.breadcrumb-bar {
  background: #eef2f5;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  margin: 0;
}

.breadcrumb-bar .sheet {
  /* та же горизонталь, что у .content-layout.sheet */
  max-width: var(--sheet-max);
  padding-inline: var(--sheet-pad);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-block: 0.5rem;
  margin: 0;
  list-style: none;
  color: var(--text-muted);
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: #9aabB5;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--tempaccentcolor);
}

.breadcrumb .active {
  color: var(--text);
  font-weight: 600;
}

/* Icon menu (imeny) — контур + синий круг под белые иконки */

.imeny-section {
  padding-block: 0.85rem 0.65rem;
  background: transparent;
}

.imeny-item .menu-item__hit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 0.9rem 0.55rem 0.85rem;
  text-align: center;
  position: relative;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.25;
  text-decoration: none;
  background: var(--tempcolor-soft);
  color: var(--text);
  border: 1.5px solid color-mix(in srgb, var(--tempcolor) 35%, var(--border));
  border-radius: var(--radius);
  box-shadow: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.imeny-item .imeny-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  background: var(--tempcolor);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(5, 60, 85, 0.18);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.imeny-item img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* Зона подписи = всегда 2 строки: 1-строчные по центру, длинные переносятся */
.imeny-item .imeny-label {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  width: 100%;
  min-height: calc(1.25em * 2);
  margin: 0;
  padding: 0 0.15rem;
  box-sizing: border-box;
  text-align: center;
  line-height: 1.25;
  overflow: hidden;
}

.imeny-item .imeny-label > span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-wrap: balance;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.imeny-item .menu-item__hit:hover {
  background: var(--tempaccent-soft);
  border-color: var(--tempaccentcolor);
  color: var(--tempaccentcolor);
}

.imeny-item .menu-item__hit:hover .imeny-icon {
  background: var(--tempaccentcolor);
  box-shadow: 0 1px 3px rgba(5, 60, 85, 0.18);
}

.module-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-nav,
.sidebar-extra {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* —— Боковое меню: L1 — цвет сайта, L2+ — акцент; раскрытие вниз —— */
.module-box:has(.sidenav) .mod-body {
  padding: 0;
}

.sidenav {
  background: #fff;
  border-top: 1px solid var(--border);
}

.sidenav__list,
.sidenav__sub {
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
}

.sidenav__list > li,
.sidenav__sub > li {
  position: relative;
  border-top: 1px solid var(--border);
}

.sidenav__list > li:first-child,
.sidenav__sub > li:first-child {
  border-top: 0;
}

.sidenav .menu-item__hit {
  display: block;
  position: relative;
  padding: 0.5rem 2rem 0.5rem 0.85rem;
  color: var(--text);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.35;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sidenav__list > li > .menu-item__hit {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding-block: 0.55rem;
}

/* Первый уровень — основной цвет сайта */
.sidenav__list > li > .menu-item__hit:hover,
.sidenav__list > li.is-active > .menu-item__hit,
.sidenav__list > li.is-open > .menu-item__hit {
  background: var(--tempcolor-soft);
  color: var(--tempcolor);
  border-left-color: var(--tempcolor);
}

/* Второй и далее — акцент */
.sidenav__sub .menu-item__hit:hover,
.sidenav__sub li.is-active > .menu-item__hit,
.sidenav__sub li.is-open > .menu-item__hit {
  background: var(--tempaccent-soft);
  color: var(--tempaccentcolor);
  border-left-color: var(--tempaccentcolor);
}

.sidenav li.has-children > .menu-item__hit::after {
  content: "";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  width: 0.4rem;
  height: 0.4rem;
  margin-top: -0.3rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.75;
  transition: transform 0.2s ease, margin-top 0.2s ease;
}

.sidenav li.has-children.is-open > .menu-item__hit::after {
  margin-top: -0.08rem;
  transform: rotate(225deg);
}

.sidenav__sub {
  display: none;
  border-top: 1px solid var(--border);
  margin-left: 0;
  padding-left: 0;
  border-left: 2px solid color-mix(in srgb, var(--tempcolor) 45%, var(--border));
  background: color-mix(in srgb, var(--tempcolor-soft) 35%, #fff);
}

.sidenav__list > li.is-open > .sidenav__sub,
.sidenav__sub > li.is-open > .sidenav__sub {
  display: block;
}

/* Вложенное подменю — ещё одна ступень линии слева */
.sidenav__sub .sidenav__sub {
  margin-left: 0;
  border-left-color: color-mix(in srgb, var(--tempaccentcolor) 40%, var(--border));
  background: color-mix(in srgb, var(--tempaccent-soft) 40%, #fff);
}

.sidenav__sub > li > .menu-item__hit {
  padding-left: 0.95rem;
}

.sidenav__sub .sidenav__sub > li > .menu-item__hit {
  padding-left: 1.25rem;
  font-size: 0.875rem;
}

.sidenav__sub .sidenav__sub .sidenav__sub > li > .menu-item__hit {
  padding-left: 1.55rem;
}

/* Разделитель / заголовок — та же «клетка», что у ссылки */
.menu-item__hit--separator,
.menu-item__hit--heading {
  cursor: default;
}

.sidenav .menu-item__hit--separator.menu-item__hit--empty,
.sidenav .menu-item__hit--heading.menu-item__hit--empty {
  padding-block: 0.4rem;
  min-height: 0;
}

.sidenav .menu-item__hit--separator.menu-item__hit--empty::before {
  content: "";
  display: block;
  height: 1px;
  background: var(--border);
}

.hmenu > li > .menu-item__hit--separator.menu-item__hit--empty,
.hmenu-sub li > .menu-item__hit--separator.menu-item__hit--empty {
  min-width: 1.5rem;
  padding-inline: 0.65rem;
}

.hmenu > li > .menu-item__hit--separator.menu-item__hit--empty::before,
.hmenu-sub li > .menu-item__hit--separator.menu-item__hit--empty::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
}

.module-box .mod-title {
  margin: 0;
  padding: 0.5rem 0.95rem;
  background: var(--tempcolor);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.15;
}

.module-box .mod-body {
  padding: 1rem;
}

.module-box .mod-body p:first-child {
  margin-top: 0;
}

.module-box .mod-body p:last-child {
  margin-bottom: 0;
}

.triple-row {
  padding-block: 0.5rem;
}

.banner-img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Content */
.content-layout {
  padding-block: 1rem;
}

.content-layout > .u-content > .article,
.content-layout > .u-content > .ts-component,
.content-layout > .u-content > .ts-login,
.content-layout > .u-content > .com-finder.finder,
.content-layout > .u-content > .contact {
  margin-top: 0;
}

.content-layout > .sidebar > .sidebar-nav > .module-box:first-child,
.content-layout > .sidebar > .sidebar-extra:first-child > .module-box:first-child,
.content-layout > .sidebar > .module-box:first-child {
  margin-top: 0;
}

.article,
.category-list,
.ts-component,
.ts-login,
.ts-logout,
.com-finder.finder,
.contact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 1.75rem 1.5rem;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.category-list {
  padding: 0;
}

/* Единый заголовок страницы / раздела (статья, категория, блок новостей) */
.article > h1,
.article > h1:first-child,
.article .page-heading,
.article .page-header > h1,
.ts-component--ext > .page-heading,
.ts-login > .ts-login__head .page-heading,
.com-finder.finder > h1:first-child,
.contact > h1:first-child,
.item-page > h1,
.category-blog__head h1,
.category-blog__head h2,
.category-list__head h1,
.page-heading {
  margin: 0;
  padding: 0.5rem 0.95rem;
  background: var(--tempcolor);
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.15;
}

.article > h1,
.article > h1:first-child,
.article .page-heading,
.article .page-header > h1,
.ts-component--ext > .page-heading,
.ts-login > .ts-login__head .page-heading,
.com-finder.finder > h1:first-child,
.contact > h1:first-child {
  margin: 0 -1.75rem 1.15rem;
}

.category-blog__head h1,
.category-blog__head h2,
.category-list__head h1,
.category-list__head h2,
.category-blog--page > .page-heading,
.category-blog--featured > .page-heading,
.category-blog--page > h1.page-heading,
.category-blog--page > h2.page-heading {
  border-radius: var(--radius-sm, 4px) var(--radius-sm, 4px) 0 0;
}

.article .lead {
  text-align: left;
  font-weight: 600;
  margin-bottom: 1rem;
}

.article p {
  margin: 0 0 1rem;
}

.article ul.content-list {
  margin: 0 0 1rem 1.25rem;
  list-style: disc;
}

.article ul.content-list li {
  margin-bottom: 0.35rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.article h2,
.article .type-inline-h2 {
  margin: 1.35rem 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.8vw, 1.4rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.article h3,
.article .type-inline-h3 {
  margin: 1.1rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.article h4 {
  margin: 1rem 0 0.4rem;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.article a {
  color: var(--tempaccentcolor);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article a:hover {
  color: color-mix(in srgb, var(--tempaccentcolor) 75%, #000);
}

.article ul,
.article ol {
  margin: 0 0 1rem 1.25rem;
}

.article ul {
  list-style: disc;
}

.article ol {
  list-style: decimal;
}

.article ul ul,
.article ol ol,
.article ul ol,
.article ol ul {
  margin: 0.35rem 0 0.35rem 1.1rem;
}

.article li {
  margin-bottom: 0.35rem;
  line-height: 1.55;
}

.article li::marker {
  color: var(--tempcolor);
}

.article blockquote {
  margin: 1.15rem 0;
  padding: 0.85rem 1rem 0.85rem 1.15rem;
  border-left: 4px solid var(--tempaccentcolor);
  background: color-mix(in srgb, var(--tempaccent-soft) 55%, #fff);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
}

.article blockquote p {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.45;
  font-style: italic;
}

.article blockquote p:last-child {
  margin-bottom: 0;
}

.article blockquote cite,
.article blockquote footer {
  display: block;
  margin-top: 0.55rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  font-style: normal;
  color: var(--text-muted);
}

.article blockquote cite::before,
.article blockquote footer::before {
  content: "— ";
}

.article hr {
  margin: 1.35rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.article code,
.article kbd {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  font-size: 0.88em;
  font-weight: 600;
  padding: 0.12em 0.4em;
  border-radius: 3px;
  background: var(--tempcolor-soft);
  color: var(--tempcolor);
  border: 1px solid color-mix(in srgb, var(--tempcolor) 22%, var(--border));
}

.article kbd {
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--tempcolor) 25%, transparent);
}

.article pre {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #1a2c36;
  color: #e8eef2;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
}

.article pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 500;
  font-size: inherit;
}

.article mark {
  background: color-mix(in srgb, var(--tempaccentcolor) 28%, #fff);
  color: inherit;
  padding: 0.05em 0.2em;
  border-radius: 2px;
}

.article small {
  font-size: 0.875em;
  color: var(--text-muted);
}

.article dl {
  margin: 0 0 1rem;
}

.article dt {
  margin-top: 0.65rem;
  font-weight: 700;
  color: var(--tempcolor);
}

.article dt:first-child {
  margin-top: 0;
}

.article dd {
  margin: 0.2rem 0 0 1rem;
  color: var(--text);
}

.article figure {
  margin: 1rem 0 1.25rem;
}

/* Fulltext intro image only — do not crop editor images */
.article > .article-image img,
.article figure.article-image img {
  width: 100%;
  max-height: 16rem;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: block;
}

/* Editor images in text flow — article, category blog intro, modules */
.article-body img,
.article .article-body figure img,
.fr-view img,
.blog-card__intro img {
  display: inline-block;
  vertical-align: top;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* Several images in one <p> — row layout (override editor inline display:block) */
.article-body p img:not(:only-child),
.fr-view p img:not(:only-child),
.blog-card__intro p img:not(:only-child) {
  display: inline-block !important;
  vertical-align: top;
}

.article-body figure:not(.article-image),
.fr-view figure:not(.article-image),
.blog-card__intro figure:not(.article-image) {
  display: inline-block;
  vertical-align: top;
  max-width: 100%;
  margin: 0 0.5rem 0.75rem 0;
}

.article-body figure:not(.article-image) img,
.fr-view figure:not(.article-image) img,
.blog-card__intro figure:not(.article-image) img {
  display: block;
}

.article figcaption {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.article .content-table-wrap,
.article-body .table-responsive,
.article-body .table-wrap {
  overflow-x: auto;
  margin: 0 0 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* Any editor / CMS table in article body (not only .content-table) */
.article table,
.article-body table,
.item-page table,
.fr-view table {
  width: 100%;
  max-width: 100%;
  margin: 0 0 1rem;
  border-collapse: collapse;
  empty-cells: show;
  font-size: 0.9rem;
  background: var(--surface);
}

.article table th,
.article table td,
.article-body table th,
.article-body table td,
.item-page table th,
.item-page table td,
.fr-view table th,
.fr-view table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
  background: transparent;
}

.article table th,
.article-body table th,
.item-page table th,
.fr-view table th {
  background: var(--tempcolor-soft);
  color: var(--tempcolor);
  font-weight: 700;
}

.article table tr:nth-child(even) td,
.article-body table tr:nth-child(even) td,
.item-page table tr:nth-child(even) td,
.fr-view table tr:nth-child(even) td {
  background: color-mix(in srgb, var(--surface-alt) 70%, #fff);
}

.article table[border="0"] th,
.article table[border="0"] td,
.article-body table[border="0"] th,
.article-body table[border="0"] td {
  border-width: 0;
}

.article table.content-table th,
.article table.content-table td {
  border-left: 0;
  border-right: 0;
  border-top: 0;
  border-bottom: 1px solid var(--border);
}

.article table.content-table tr:last-child th,
.article table.content-table tr:last-child td {
  border-bottom: 0;
}

.article .notice {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--tempcolor) 28%, var(--border));
  background: var(--tempcolor-soft);
  border-left: 4px solid var(--tempcolor);
}

.article .notice--accent {
  border-color: color-mix(in srgb, var(--tempaccentcolor) 30%, var(--border));
  background: var(--tempaccent-soft);
  border-left-color: var(--tempaccentcolor);
}

.article .notice__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--tempcolor);
}

.article .notice--accent .notice__title {
  color: var(--tempaccentcolor);
}

.article .notice p:last-child {
  margin-bottom: 0;
}

.article address {
  margin: 0 0 1rem;
  font-style: normal;
  padding: 0.75rem 0.9rem;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* —— Category blog (материалы категории: главная + страница списка) —— */
.category-blog {
  margin-top: 1.35rem;
}

.category-blog--page,
.category-blog--featured {
  margin-top: 0;
}

.category-blog--page .category-blog__desc,
.category-blog--page .category-blog__links,
.category-blog--page .category-blog__children,
.category-blog--page .ts-pagination,
.category-blog--page > p {
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

/* Сетки карточек — на всю ширину колонки контента (любое число колонок) */
.category-blog__grid,
.category-blog__lead {
  padding-left: 0;
  padding-right: 0;
}

.category-blog--page .category-blog__grid:last-child,
.category-blog--page .category-blog__lead:last-child,
.category-blog--page .ts-pagination:last-child,
.category-blog--page > p:last-child {
  padding-bottom: 1.5rem;
}

.category-blog__head {
  margin: 0 0 0.85rem;
}

.category-blog__lead {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.category-blog__lead .blog-card__title {
  font-size: 1.22rem;
}

.category-blog__grid {
  display: grid;
  grid-template-columns: repeat(var(--blog-cols, 1), minmax(0, 1fr));
  gap: 0.85rem;
  align-items: stretch;
}

.category-blog__grid--down {
  display: block;
  column-count: var(--blog-cols, 1);
  column-gap: 0.85rem;
}

.category-blog__grid--down > .blog-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 0.85rem;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}

.category-blog--module .category-blog__grid {
  grid-template-columns: repeat(var(--blog-cols, 2), minmax(0, 1fr));
}

.category-blog--module.category-blog--layout-vert .category-blog__grid,
.category-blog--module.category-blog--cols-1 .category-blog__grid {
  grid-template-columns: 1fr;
}

.category-blog--module.category-blog--layout-hor.category-blog--cols-2 .category-blog__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-blog--module.category-blog--layout-hor.category-blog--cols-3 .category-blog__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-blog--module.category-blog--layout-hor.category-blog--cols-4 .category-blog__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.blog-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.blog-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: color-mix(in srgb, var(--tempcolor-soft) 55%, #dce6ec);
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.blog-card:hover .blog-card__media img {
  transform: scale(1.04);
}

.blog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0.45rem;
  padding: 0.95rem 1.05rem 1.05rem;
}

.blog-card__date,
.blog-card__meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.85rem;
  font-weight: 500;
}

.blog-card__meta a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.blog-card__badge {
  display: inline-block;
  margin: 0.65rem 0.95rem 0;
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--tempaccentcolor);
  border: 1px solid color-mix(in srgb, var(--tempaccentcolor) 45%, var(--border));
  border-radius: var(--radius-sm);
}

.blog-card--unpublished {
  opacity: 0.72;
}

.category-blog__cat-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.category-blog__desc {
  margin: 0 0 1rem;
}

.category-blog__desc img {
  display: inline-block;
  vertical-align: top;
  max-width: 100%;
  height: auto;
  margin: 0 0.5rem 0.5rem 0;
}

.category-blog__links,
.category-blog__children {
  margin-top: 1.25rem;
}

.category-blog__links h3,
.category-blog__children h3 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
}

.category-blog__links ol,
.category-blog__children ul {
  margin: 0;
  padding: 0 0 0 1.15rem;
}

.blog-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.15;
}

.blog-card__title a {
  color: var(--text);
  text-decoration: none;
}

.blog-card__title a:hover {
  color: var(--tempaccentcolor);
}

.blog-card__intro {
  margin: 0;
  flex: 1 1 auto;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.category-blog--page .blog-card__intro,
.category-blog--featured .blog-card__intro,
.category-blog__lead .blog-card__intro {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

.blog-card__more {
  align-self: flex-start;
  margin-top: 0.25rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--tempcolor);
  border: 1.5px solid color-mix(in srgb, var(--tempcolor) 45%, var(--border));
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.blog-card__more:hover {
  background: var(--tempaccent-soft);
  border-color: var(--tempaccentcolor);
  color: var(--tempaccentcolor);
}

.category-blog__all {
  margin: 0.9rem 0 0;
  text-align: right;
  font-weight: 600;
}

.category-blog__all a {
  color: var(--tempaccentcolor);
}

/* Планшет: на 1 колонку меньше, чем в настройках Joomla (адаптив только в шаблоне) */
@media (min-width: 641px) and (max-width: 991px) {
  .category-blog--cols-4 .category-blog__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-blog--cols-3 .category-blog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-blog--cols-2 .category-blog__grid {
    grid-template-columns: 1fr;
  }

  .category-blog--cols-4 .category-blog__grid--down {
    column-count: 3;
  }

  .category-blog--cols-3 .category-blog__grid--down {
    column-count: 2;
  }

  .category-blog--cols-2 .category-blog__grid--down {
    column-count: 1;
  }

  .category-blog--module.category-blog--layout-hor.category-blog--cols-4 .category-blog__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-blog--module.category-blog--layout-hor.category-blog--cols-3 .category-blog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-blog--module.category-blog--layout-hor.category-blog--cols-2 .category-blog__grid {
    grid-template-columns: 1fr;
  }

  .category-blog--module.has-news-slider.category-blog--layout-hor.category-blog--cols-4 .category-blog__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-blog--module.has-news-slider.category-blog--layout-hor.category-blog--cols-3 .category-blog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-blog--module.has-news-slider.category-blog--layout-hor.category-blog--cols-2 .category-blog__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .category-blog:not(.has-news-slider) .category-blog__grid {
    grid-template-columns: 1fr;
  }

  .category-blog:not(.has-news-slider) .category-blog__grid--down {
    column-count: 1;
  }
}

.news-slider__controls {
  display: none;
}

.news-slider__btn,
.news-slider__dot {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  cursor: pointer;
  box-shadow: none;
  text-transform: none;
  letter-spacing: normal;
  font-family: inherit;
}

.news-slider__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  min-height: 2.15rem;
  padding: 0;
  border: 1.5px solid var(--tempcolor);
  border-radius: var(--radius-sm);
  background: var(--tempcolor-soft);
  color: var(--tempcolor);
}

.news-slider__btn::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.news-slider__btn--prev::before {
  transform: rotate(135deg);
  margin-left: 0.15rem;
}

.news-slider__btn--next::before {
  transform: rotate(-45deg);
  margin-right: 0.15rem;
}

.news-slider__btn:hover {
  background: var(--tempaccent-soft);
  color: var(--tempaccentcolor);
  border-color: var(--tempaccentcolor);
}

.news-slider__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 1 1 auto;
}

.news-slider__dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 1.5px solid var(--tempcolor);
  border-radius: 50%;
  background: transparent;
}

.news-slider__dot.is-active {
  background: var(--tempcolor);
}

@media (max-width: 720px) {
  .has-news-slider .news-slider {
    min-width: 0;
  }

  .has-news-slider .news-slider__track,
  .category-blog--module.has-news-slider .category-blog__grid,
  .category-blog--module.has-news-slider.category-blog--layout-hor .category-blog__grid,
  .category-blog--module.has-news-slider.category-blog--cols-1 .category-blog__grid,
  .category-blog--module.has-news-slider.category-blog--layout-hor.category-blog--cols-2 .category-blog__grid,
  .category-blog--module.has-news-slider.category-blog--layout-hor.category-blog--cols-3 .category-blog__grid,
  .category-blog--module.has-news-slider.category-blog--layout-hor.category-blog--cols-4 .category-blog__grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    grid-template-columns: none;
  }

  .has-news-slider .news-slider__track::-webkit-scrollbar {
    display: none;
  }

  .has-news-slider .blog-card {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .has-news-slider .news-slider__controls {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.75rem;
  }
}


.category-blog__pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 1.15rem;
}

.category-blog__pager a,
.category-blog__pager span {
  min-width: 2rem;
  padding: 0.35rem 0.65rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--tempcolor);
}

.category-blog__pager a:hover {
  background: var(--tempaccent-soft);
  border-color: var(--tempaccentcolor);
  color: var(--tempaccentcolor);
}

.category-blog__pager .is-active {
  background: var(--tempcolor);
  border-color: var(--tempcolor);
  color: #fff;
}

/* —— Category list (как /sveden: только заголовки) —— */
.category-list {
  margin-top: 0;
}

.category-list__head h1,
.category-list__head h2 {
  margin: 0;
  padding: 0.5rem 0.95rem;
  background: var(--tempcolor);
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.15;
}

.category-list__table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.category-list__table th {
  margin: 0;
  padding: 0;
  font-weight: 600;
  text-align: left;
  background: transparent;
  border-bottom: 1px solid var(--border);
}

.category-list__table tr:last-child th {
  border-bottom: 0;
}

.category-list__table tr:nth-child(odd) th {
  background: color-mix(in srgb, var(--tempcolor-soft) 35%, #fff);
}

.category-list__table tr:nth-child(even) th {
  background: #fff;
}

.category-list__table a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1.1rem;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.category-list__table a::after {
  content: "";
  flex: 0 0 0.45rem;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid color-mix(in srgb, var(--tempcolor) 55%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--tempcolor) 55%, transparent);
  transform: rotate(-45deg);
  opacity: 0.7;
}

.category-list__table a:hover {
  color: var(--tempaccentcolor);
  background: var(--tempaccent-soft);
  text-decoration: none;
}

.category-list__table a:hover::after {
  border-color: var(--tempaccentcolor);
  opacity: 1;
}

/* —— 404: полный лист, рваная страница + акценты —— */
.error-404 {
  padding-block: 1rem 2rem;
  width: 100%;
}

.error-404__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 22rem;
  background:
    linear-gradient(135deg, #f7fbfd 0%, #fff 42%, color-mix(in srgb, var(--tempcolor-soft) 70%, #fff) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.error-404__panel > h1 {
  margin: 0;
  padding: 0.5rem 0.95rem;
  background: var(--tempcolor);
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.15;
  position: relative;
  z-index: 3;
}

.error-404__body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

.error-404__watermark {
  position: absolute;
  inset: auto -2% -18% auto;
  font-family: var(--font-display);
  font-size: clamp(8rem, 22vw, 16rem);
  font-weight: 700;
  line-height: 0.8;
  color: color-mix(in srgb, var(--tempcolor) 8%, transparent);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.error-404__rip {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 52%;
  width: 1.35rem;
  height: 100%;
  z-index: 2;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0.9;
}

.error-404__rip-line {
  stroke: color-mix(in srgb, var(--tempcolor) 35%, var(--border));
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.error-404__left,
.error-404__right {
  position: relative;
  z-index: 1;
  padding: 2rem 2.25rem;
}

.error-404__left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  padding-right: 2.5rem;
}

.error-404__code {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.08em;
  font-family: var(--font-display);
  font-size: clamp(5.5rem, 14vw, 9rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: var(--tempcolor);
}

.error-404__zero {
  position: relative;
  color: color-mix(in srgb, var(--tempcolor) 42%, #fff);
  text-decoration: line-through;
  text-decoration-thickness: 0.08em;
  text-decoration-color: color-mix(in srgb, var(--tempaccentcolor) 55%, transparent);
}

.error-404__book {
  display: block;
  width: min(100%, 17.5rem);
  height: auto;
  max-height: 13.75rem;
  margin-top: 0.15rem;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.error-404__hint {
  margin: 0;
  max-width: 22rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-muted);
}

.error-404__right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.85rem;
  padding-left: 2.75rem;
  background: color-mix(in srgb, var(--tempcolor-soft) 40%, #fff);
}

.error-404__text {
  margin: 0;
  max-width: 26rem;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--text);
}

.error-404__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  align-items: center;
}

.error-404__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.45rem 1.2rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--tempcolor);
  border: 1.5px solid var(--tempcolor);
  border-radius: var(--radius-sm);
}
.error-404__btn:hover {
  background: var(--tempaccentcolor);
  border-color: var(--tempaccentcolor);
  color: #fff;
}

.error-404__link {
  font-weight: 700;
  color: var(--tempcolor);
}
.error-404__link:hover {
  color: var(--tempaccentcolor);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.error-404__routes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.75rem;
  width: 100%;
  max-width: 26rem;
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}

.error-404__routes a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--tempcolor);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.error-404__routes a:hover {
  color: var(--tempaccentcolor);
  border-color: var(--tempaccentcolor);
  background: var(--tempaccent-soft);
}
.error-404__routes i {
  width: 1rem;
  text-align: center;
  opacity: 0.85;
}

@media (max-width: 900px) {
  .error-404__body {
    grid-template-columns: 1fr;
  }
  .error-404__rip {
    display: none;
  }
  .error-404__left,
  .error-404__right {
    padding: 1.5rem 1.25rem;
  }
  .error-404__right {
    border-top: 1px dashed color-mix(in srgb, var(--tempcolor) 35%, var(--border));
  }
  .error-404__routes {
    grid-template-columns: 1fr 1fr;
  }
}

/* —— Footer —— */
.site-footer {
  background: var(--tempcolor);
  color: #fff;
  margin-top: 1.5rem;
}

.site-footer a {
  color: #fff;
}

.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-logo {
  width: 120px;
  margin: 0 auto 0.75rem;
  filter: brightness(0) invert(1);
}

.footer-copy {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 700;
  opacity: 0.95;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  gap: 1.15rem;
  padding: 0;
  min-height: 0;
}

.footer-brand__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1.15rem;
  min-width: 0;
  width: 100%;
}

.footer-brand--right .footer-brand__head {
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem 1.15rem;
}

.footer-brand--below .footer-brand__head {
  flex-direction: column;
  align-items: flex-start;
}

.footer-brand--no-logo .footer-brand__head {
  flex-direction: column;
}

.footer-brand .module-box,
.footer-brand .module-box--footer {
  width: 100%;
  flex: 0 0 auto;
  align-self: stretch;
  margin: 0;
}

.footer-brand__logo {
  display: block;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}

.footer-brand__logo:hover {
  text-decoration: none;
  opacity: 0.92;
}

.footer-brand__logo img,
.footer-brand__logo svg {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  background: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: none;
  box-sizing: border-box;
}

.footer-brand__logo svg {
  height: 200px;
  width: auto;
}

.footer-brand__logo .site-logo--default {
  filter: brightness(0) invert(1);
}

.footer-brand__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  max-width: min(100%, 26rem);
  min-width: 0;
}

.footer-brand--right .footer-brand__text {
  max-width: min(100%, 20rem);
}

.footer-brand__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.88rem, 1.1vw, 0.98rem);
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  max-width: 100%;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: manual;
}

.footer-brand__year {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: #fff;
  opacity: 0.9;
  max-width: 100%;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: manual;
}

.footer-brand__name .ts-line,
.footer-brand__year .ts-line {
  display: block;
}

.footer-brand__name br,
.footer-brand__year br {
  display: block;
  content: "";
}

/* Заголовки модулей в подвале — без цветной плашки, на фоне футера */
.site-footer .footer-heading,
.site-footer .mod-title,
.site-footer .module-box .mod-title,
.site-footer h3 {
  margin: 0 0 0.85rem;
  padding: 0 0 0.5rem;
  background: transparent;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
}

.site-footer .module-box {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.site-footer .module-box .mod-body {
  padding: 0;
  color: #fff;
}

@media (max-width: 640px) {
  .imeny-item .menu-item__hit {
    padding: 0.55rem 0.3rem 0.5rem;
    font-size: 0.78rem;
    gap: 0.45rem;
  }

  .imeny-item .imeny-icon {
    width: 2.4rem;
    height: 2.4rem;
  }

  /* Mobile: logo above name, year below name, centered — layout option ignored */
  .footer-brand,
  .footer-brand--right,
  .footer-brand--below,
  .footer-brand--no-logo {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    gap: 0.85rem;
  }

  .footer-brand__head,
  .footer-brand--right .footer-brand__head,
  .footer-brand--below .footer-brand__head,
  .footer-brand--no-logo .footer-brand__head {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }

  .footer-brand__text {
    align-items: center;
    text-align: center;
    max-width: 22rem;
  }

  .footer-brand--right .footer-brand__text {
    max-width: 22rem;
  }

  .footer-brand__name,
  .footer-brand__year {
    text-align: center;
  }

  .site-footer .footer-heading,
  .site-footer .mod-title,
  .site-footer h3 {
    text-align: center;
  }
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.95rem;
}

.footer-links .menu-item__hit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links i {
  width: 1.1rem;
  text-align: center;
  opacity: 0.9;
}

.footer-auth {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  max-width: none;
}

.footer-auth label {
  font-size: 0.8rem;
  font-weight: 600;
}

.footer-auth .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.footer-auth .auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.35rem;
  font-size: 0.82rem;
}

.footer-auth .auth-links a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-credit {
  text-align: center;
  padding: 0.85rem 1rem 1.25rem;
  font-size: 0.82rem;
  opacity: 0.92;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

/* Кнопки в подвале — белая заливка на синем, hover как у остальных outline */
.site-footer .btn-light {
  background: #fff;
  color: var(--tempcolor);
  border: 1.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.site-footer .btn-light:hover {
  background: var(--tempaccent-soft);
  color: var(--tempaccentcolor);
  border-color: var(--tempaccentcolor);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
}

.site-footer .btn-ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1.5px solid #fff;
  box-shadow: none;
}

.site-footer .btn-ghost:hover {
  background: var(--tempaccent-soft);
  color: var(--tempaccentcolor);
  border-color: var(--tempaccentcolor);
}

/* —— Cookie banner (настройки: цвет, фон, позиция, ширина, z-index) —— */
.cookie-banner {
  --cookie-fg: #163a4a;
  --cookie-bg: #ffffff;
  --cookie-border-color: color-mix(in srgb, var(--tempcolor) 22%, var(--border));
  --cookie-shadow: 0 10px 36px rgba(10, 42, 58, 0.2);
  --cookie-ring: 0 0 0 2px color-mix(in srgb, var(--tempcolor) 35%, transparent);
  position: fixed;
  z-index: 9999;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  padding: 1.15rem 1.35rem 1.25rem;
  margin: 0;
  background: var(--cookie-bg);
  color: var(--cookie-fg);
  border: 1px solid var(--cookie-border-color);
  box-shadow: var(--cookie-shadow), var(--cookie-ring);
  font-family: inherit;
}

.cookie-banner.is-hidden {
  display: none;
}

.cookie-banner__inner,
.cookie-banner-content {
  max-width: 1200px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem 1.35rem;
}

.cookie-banner__media {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  line-height: 0;
  color: var(--tempcolor);
}

.cookie-banner__logo {
  display: block;
  width: 5.75rem;
  height: 5.75rem;
  color: inherit;
  fill: currentColor;
  flex-shrink: 0;
  object-fit: contain;
}

.cookie-banner__logo--custom {
  color: unset;
  fill: unset;
}

.cookie-banner__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cookie-banner__title,
.cookie-banner h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--cookie-fg);
}

.cookie-banner__text,
.cookie-banner p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  opacity: 0.95;
}

.cookie-banner a {
  color: var(--cookie-fg);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner a:hover {
  opacity: 0.88;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 0.45rem 0.75rem;
  width: 100%;
  max-width: 100%;
  margin-top: 0.1rem;
}

.cookie-banner-actions p,
.cookie-banner__link {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.88rem;
}

button.cookie-banner-button,
.cookie-banner-button {
  flex: 0 0 auto;
  margin-left: auto;
  min-height: 2.35rem;
  padding: 0.45rem 1.2rem;
  background: var(--tempcolor-soft);
  color: var(--tempcolor);
  border: 1.5px solid color-mix(in srgb, var(--tempcolor) 45%, var(--border));
  border-radius: var(--radius-sm);
  box-shadow: none;
  outline: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.15;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

button.cookie-banner-button:hover,
.cookie-banner-button:hover {
  background: var(--tempaccent-soft);
  color: var(--tempaccentcolor);
  border-color: var(--tempaccentcolor);
}

.cookie-banner-top,
.cookie-banner-bottom {
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  transform: none;
  border-radius: 0;
}

.cookie-banner-top {
  top: 0;
  bottom: auto;
}

.cookie-banner-bottom-left,
.cookie-banner-bottom-right {
  left: auto;
  right: auto;
  transform: none;
  width: min(calc(100% - 2rem), var(--cookie-width, 28rem));
  max-width: calc(100% - 2rem);
  border-radius: 10px;
  padding: 1.1rem 1.15rem;
}

.cookie-banner-bottom-left {
  bottom: 1rem;
  left: 1rem;
}

.cookie-banner-bottom-right {
  bottom: 1rem;
  right: 1rem;
}

@media (max-width: 991px) {
  .cookie-banner,
  #cookie-banner,
  .cookie-banner-top,
  .cookie-banner-bottom,
  .cookie-banner-bottom-left,
  .cookie-banner-bottom-right {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    transform: none;
    margin: 0;
    border-radius: 0;
    padding: 0.55rem 0.7rem 0.65rem;
  }

  .cookie-banner-bottom-left,
  .cookie-banner-bottom-right {
    bottom: 0;
    border: 0;
    border-top: 1px solid color-mix(in srgb, var(--tempcolor) 28%, var(--border));
    box-shadow:
      0 -12px 40px rgba(10, 42, 58, 0.18),
      0 -2px 0 var(--tempcolor);
  }

  .cookie-banner__inner,
  .cookie-banner-content {
    flex-direction: row;
    align-items: center;
  }

  .cookie-banner__logo {
    width: 3.25rem;
    height: 3.25rem;
  }

  .cookie-banner-button {
    min-height: 1.9rem;
    padding: 0.28rem 0.75rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 359px) {
  .cookie-banner,
  #cookie-banner,
  .cookie-banner-top,
  .cookie-banner-bottom,
  .cookie-banner-bottom-left,
  .cookie-banner-bottom-right {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    transform: none;
    margin: 0;
    border-radius: 0;
    padding: 0.55rem 0.7rem 0.65rem;
  }

  .cookie-banner-bottom-left,
  .cookie-banner-bottom-right {
    bottom: 0;
  }

  .cookie-banner__inner,
  .cookie-banner-content {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.35rem 0.6rem;
    max-width: none;
  }

  .cookie-banner--no-media .cookie-banner__inner,
  .cookie-banner--no-media .cookie-banner-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .cookie-banner__media {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
  }

  .cookie-banner__logo {
    width: 2.15rem;
    height: 2.15rem;
  }

  .cookie-banner__body {
    display: contents;
  }

  .cookie-banner__title,
  .cookie-banner h3 {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    display: flex;
    align-items: center;
    min-height: 2.15rem;
    font-size: 0.98rem;
    line-height: 1.2;
  }

  .cookie-banner__text {
    grid-column: 1 / -1;
    font-size: 0.75rem;
    line-height: 1.35;
  }

  .cookie-banner-actions {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.35rem;
    margin-top: 0;
  }

  .cookie-banner-actions p,
  .cookie-banner__link {
    flex: 0 0 auto;
    font-size: 0.72rem;
  }

  .cookie-banner-button {
    width: 100%;
    margin-left: 0;
    min-height: 1.9rem;
    padding: 0.28rem 0.75rem;
    font-size: 0.7rem;
  }
}

/* Utility */
.hidden-slot {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Subtle entrance */
@keyframes ts-search-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article,
.category-list,
.ts-component,
.sidebar .module-box {
  animation: fade-up 0.45s ease both;
}

.sidebar .module-box:nth-child(2) {
  animation-delay: 0.08s;
}

.imeny-item {
  animation: fade-up 0.4s ease both;
}

.imeny-item:nth-child(2) { animation-delay: 0.04s; }
.imeny-item:nth-child(3) { animation-delay: 0.08s; }
.imeny-item:nth-child(4) { animation-delay: 0.12s; }
.imeny-item:nth-child(5) { animation-delay: 0.16s; }
.imeny-item:nth-child(6) { animation-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

}

/* —— Typography guide page —— */
.type-guide-page .proto-bar-note {
  opacity: 0.7;
  font-size: 0.8rem;
}

.type-guide {
  padding-block: 1.25rem 2.5rem;
}

.type-guide__intro {
  margin-bottom: 1rem;
}

.type-guide__intro code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  background: var(--tempcolor-soft);
  border-radius: var(--radius-sm);
  color: var(--tempaccentcolor);
}

.type-guide__toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.5rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: sticky;
  top: 2.75rem;
  z-index: 20;
}

.type-guide__toc a {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--tempcolor);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
}

.type-guide__toc a:hover,
.type-guide__toc a.is-active {
  background: var(--tempaccent-soft);
  border-color: var(--tempaccentcolor);
  color: var(--tempaccentcolor);
}

.type-section {
  margin-bottom: 2rem;
  scroll-margin-top: 6rem;
}

.type-section__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tempaccentcolor);
}

.type-section__hint {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.type-specimen {
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* Образец mid-шапки: без photo-tint оверлеев, иначе весь блок «затуманен» */
.type-specimen.mid-header {
  isolation: auto;
  background-color: color-mix(in srgb, var(--tempcolor-soft) 45%, var(--surface));
  background-image: none;
  border-bottom: none;
}

.type-specimen.mid-header::before,
.type-specimen.mid-header::after {
  content: none;
  display: none;
}

/* Образцы на цвете сайта: не затирать --tempcolor белым .type-specimen */
.type-specimen.bottom-header,
.type-specimen.site-footer,
.type-specimen.top-header {
  background: var(--tempcolor);
  border-color: color-mix(in srgb, var(--tempcolor) 70%, #000);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.type-specimen.top-header {
  background: var(--tempcolor-dark);
}

.type-specimen.bottom-header .type-specimen__label,
.type-specimen.site-footer .type-specimen__label,
.type-specimen.top-header .type-specimen__label {
  color: rgba(255, 255, 255, 0.72);
}

.type-specimen--bleed {
  padding: 0;
  overflow: hidden;
}

.type-specimen--bleed .type-specimen__label {
  padding: 0.85rem 1rem 0.35rem;
}

.type-specimen--bleed .breadcrumb-bar {
  border-bottom: none;
  border-radius: 0;
}

.type-specimen__label {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.type-table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.type-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.type-table th,
.type-table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.type-table th {
  background: var(--tempcolor-soft);
  font-weight: 700;
  color: var(--tempaccentcolor);
  white-space: nowrap;
}

.type-table tr:last-child td {
  border-bottom: 0;
}

.type-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.type-swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.type-swatch i {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--sw);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.type-swatch--on-blue i,
.type-swatch--on-site i {
  background: var(--tempcolor);
  box-shadow: inset 0 0 0 3px #fff;
}

.type-modules-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.type-logo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.type-logo-card {
  margin: 0;
  padding: 1rem 0.75rem 0.85rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.type-logo-card img {
  width: 7.5rem;
  height: 7.5rem;
  margin: 0 auto;
  object-fit: contain;
}

.type-logo-card figcaption {
  margin-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.type-logo-card figcaption strong {
  font-size: 0.85rem;
  color: var(--text);
}

.type-logo-grid--invert {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  padding: 0.65rem 0 0.35rem;
}

.type-logo-grid--invert img {
  width: 6rem;
  height: 6rem;
  object-fit: contain;
  display: block;
  background: #fff;
  border-radius: 50%;
  padding: 0.3rem;
  box-sizing: border-box;
}

.type-logo-on-site {
  background: var(--tempcolor) !important;
  padding: 1rem 1.15rem 1.15rem;
}

@media (max-width: 720px) {
  .type-logo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.type-inline-h2 {
  margin: 1.25rem 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.type-inline-h3 {
  margin: 1rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.type-forms {
  display: grid;
  gap: 0.85rem;
  max-width: 28rem;
}

.type-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.type-field--row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 860px) {
  .type-modules-row {
    grid-template-columns: 1fr;
  }

  .type-guide__toc {
    top: auto;
    position: static;
  }
}
