/* ==========================================================================
   РОО «ФВВС СО» — «Лоция», официальная редакция. Базовые стили и компоненты
   ========================================================================== */

:root {
  --bg: #fbfaf6;
  --surface: #ffffff;
  --tint: #f3f1ea;
  --tint-2: #ebe8df;
  --ink: #1b2735;
  --ink-2: #3a4555;
  --ink-3: #59626f;
  --line: #e1ddd2;
  --line-2: #cbc6b8;
  --mag: #b5246b;
  --mag-dark: #931c56;
  --mag-soft: #f7ebf1;
  --rec: #8c3b26;
  --ok: #2f6b4f;
  --land: #e5d3a6;
  --land-2: #c9ab6b;
  --depth-1: #dfe9e8;
  --depth-2: #cbdcdc;
  --dark-2: #24344a;
  --on-dark: #e9ecf0;
  --on-dark-2: #aeb7c3;
  --f-sans: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'IBM Plex Mono', Menlo, Consolas, monospace;
  --f-map: 'Spectral', Georgia, 'Times New Roman', serif;
  --r: 4px;
  --maxw: 1280px;
  --gutter: clamp(16px, 3vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 1px 2px rgba(27, 39, 53, .06), 0 6px 18px rgba(27, 39, 53, .07);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

img,
svg {
  max-width: 100%;
}

img {
  display: block;
  height: auto;
}

a {
  color: inherit;
  text-decoration-color: var(--line-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--mag);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--mag);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.01em;
}

p {
  margin: 0 0 1em;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

address {
  font-style: normal;
}

.mono {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--ink-3);
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--r);
}

.skip-link:focus {
  top: 8px;
  color: #fff;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Служебная строка ---------- */
.util {
  background: var(--ink);
  color: var(--on-dark-2);
  font-size: .8125rem;
}

.util__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
}

.util__label {
  margin: 0;
}

.util__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.util a {
  color: var(--on-dark);
  text-decoration: none;
}

.util a:hover {
  color: #fff;
  text-decoration: underline;
}

.util__a11y {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 3px 10px;
  border: 1px solid rgba(233, 236, 240, .35);
  border-radius: var(--r);
  background: transparent;
  color: var(--on-dark);
  font-size: .8125rem;
}

.util__a11y svg {
  width: 18px;
  height: 18px;
}

.util__a11y:hover,
.util__a11y[aria-pressed='true'] {
  background: var(--on-dark);
  color: var(--ink);
}

/* ---------- Шапка ---------- */
.site-header {
  --stick-top: 0px;
  position: sticky;
  top: var(--stick-top);
  z-index: 60;
  background: var(--surface);
}

.masthead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 22px;
  padding-block: 18px;
}

.masthead__logo {
  display: block;
  width: 76px;
  height: 76px;
}

.masthead__logo img {
  width: 76px;
  height: 76px;
}

.masthead__names {
  min-width: 0;
}

.masthead__short {
  margin: 0 0 4px;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--mag);
}

.masthead__short a {
  text-decoration: none;
}

.masthead__full {
  margin: 0;
  max-width: 74ch;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: .01em;
  color: var(--ink);
}

.masthead__aside {
  display: flex;
  align-items: center;
  gap: 12px;
}

.burger {
  display: none;
  position: relative;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
}

.burger__line {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--ink);
  transition: transform .25s var(--ease), opacity .2s;
}

.burger__line:nth-child(1) { top: 15px; }
.burger__line:nth-child(2) { top: 22px; }
.burger__line:nth-child(3) { top: 29px; }

.burger[aria-expanded='true'] .burger__line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded='true'] .burger__line:nth-child(2) { opacity: 0; }
.burger[aria-expanded='true'] .burger__line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s;
}

.btn--primary {
  background: var(--ink);
  color: #fff;
}

.btn--primary:hover {
  background: var(--dark-2);
  color: #fff;
}

.btn--live {
  background: var(--mag);
  color: #fff;
}

.btn--live:hover {
  background: var(--mag-dark);
  color: #fff;
}

.btn--ghost {
  border-color: var(--line-2);
  background: var(--surface);
}

.btn--ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn--ghost-light {
  border-color: rgba(233, 236, 240, .45);
  background: transparent;
  color: var(--on-dark);
}

.btn--ghost-light:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.btn--small {
  min-height: 36px;
  padding: 6px 14px;
  font-size: .875rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.link-more__arrow {
  transition: transform .2s var(--ease);
}

.link-more:hover .link-more__arrow {
  transform: translateX(3px);
}

/* ---------- Навигация ---------- */
.navbar {
  position: relative;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.navbar.is-stuck {
  box-shadow: 0 2px 10px rgba(27, 39, 53, .08);
}

.navbar__inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar__brand {
  display: none;
  align-items: center;
  gap: 10px;
  max-width: 440px;
  flex: none;
  padding-block: 6px;
  font-size: .625rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .02em;
  text-decoration: none;
}

.navbar__brand img {
  width: 34px;
  height: 34px;
  flex: none;
}

.navbar__live {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 6px 12px;
  border-radius: var(--r);
  background: var(--mag);
  color: #fff;
  font-size: .8125rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.navbar__live:hover {
  background: var(--mag-dark);
  color: #fff;
}

.menu,
.submenu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu {
  display: flex;
  align-items: stretch;
}

.menu__item {
  position: relative;
}

.menu__row {
  display: flex;
  align-items: stretch;
}

.menu__link {
  position: relative;
  display: flex;
  align-items: center;
  padding: 15px 14px;
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}

.menu > .menu__item:first-child > .menu__row > .menu__link {
  padding-left: 0;
}

.menu > .menu__item > .menu__row > .menu__link::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  background: transparent;
}

.menu > .menu__item:first-child > .menu__row > .menu__link::after {
  left: 0;
}

.menu > .menu__item.is-trail > .menu__row > .menu__link::after,
.menu > .menu__item > .menu__row > .menu__link[aria-current='page']::after {
  background: var(--mag);
}

.menu__link:hover,
.menu__link[aria-current='page'] {
  color: var(--mag);
}

.menu__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  margin-left: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
}

.menu__chev {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s var(--ease);
}

.menu__item.is-open > .menu__row .menu__chev {
  transform: translateY(1px) rotate(-135deg);
}

.submenu {
  min-width: 260px;
  padding: 6px 0;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

.submenu .menu__link {
  padding: 9px 16px;
  font-size: .9375rem;
  font-weight: 400;
  line-height: 1.35;
}

.submenu .menu__link:hover {
  background: var(--tint);
}

.submenu .menu__link[aria-current='page'] {
  font-weight: 600;
}

.submenu--l3 {
  min-width: 300px;
  max-width: 340px;
}

.menu__live {
  display: none;
}

@media (min-width: 1025px) {
  .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity .18s, transform .18s var(--ease), visibility 0s .18s;
  }

  .submenu .submenu {
    top: -7px;
    left: 100%;
  }

  .menu__item:hover > .submenu,
  .menu__item:focus-within > .submenu,
  .menu__item.is-open > .submenu {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .18s, transform .18s var(--ease), visibility 0s;
  }

  .submenu .menu__row {
    justify-content: space-between;
  }

  .submenu .menu__toggle {
    width: 34px;
    margin-left: 0;
  }

  .submenu .menu__chev {
    transform: rotate(-45deg);
  }

  .submenu .menu__item.is-open > .menu__row .menu__chev {
    transform: rotate(-45deg);
  }

  .navbar.is-stuck .navbar__brand,
  .navbar.is-stuck .navbar__live {
    display: flex;
  }

  .nav-backdrop,
  .nav-panel__title,
  .nav-panel__close {
    display: none;
  }
}

/* ---------- Мобильная навигация ---------- */
@media (max-width: 1024px) {
  .burger {
    display: block;
  }

  .site-header {
    position: relative;
    top: 0;
  }

  .navbar {
    border: 0;
  }

  .navbar__inner {
    padding: 0;
  }

  .nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    width: min(400px, 100%);
    padding: 72px 20px 32px;
    background: var(--surface);
    border-left: 1px solid var(--line-2);
    overflow-y: auto;
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .3s var(--ease), visibility 0s .3s;
  }

  .nav-panel.is-open {
    transform: none;
    visibility: visible;
    transition: transform .3s var(--ease), visibility 0s;
  }

  .nav-panel__title {
    position: absolute;
    top: 24px;
    left: 20px;
    margin: 0;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-3);
  }

  .nav-panel__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-2);
    border-radius: var(--r);
    background: var(--surface);
    font-size: 1.5rem;
    line-height: 1;
  }

  .menu {
    flex-direction: column;
    border-top: 1px solid var(--line);
  }

  .menu > .menu__item {
    border-bottom: 1px solid var(--line);
  }

  .menu__row {
    justify-content: space-between;
  }

  .menu__link,
  .menu > .menu__item:first-child > .menu__row > .menu__link {
    flex: 1;
    padding: 14px 4px;
    font-size: 1.0625rem;
  }

  .menu > .menu__item > .menu__row > .menu__link::after {
    display: none;
  }

  .menu__toggle {
    width: 46px;
    margin: 0;
  }

  .submenu {
    display: none;
    min-width: 0;
    max-width: none;
    margin: 0 0 10px 6px;
    padding: 0 0 0 12px;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    box-shadow: none;
  }

  .menu__item.is-open > .submenu {
    display: block;
  }

  .submenu .menu__link {
    padding: 10px 4px;
    font-size: 1rem;
  }

  .menu__item.is-trail > .menu__row > .menu__link {
    color: var(--mag);
  }

  .menu__live {
    display: block;
    margin-top: 22px;
  }

  .menu__live .btn {
    width: 100%;
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(27, 39, 53, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility 0s .25s;
  }

  .nav-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity .25s, visibility 0s;
  }

  .masthead__full {
    font-size: .9375rem;
  }
}

@media (max-width: 760px) {
  .util__label,
  .util__hide-s {
    display: none;
  }

  .util__inner {
    justify-content: flex-end;
  }

  .masthead {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: 'logo names burger' 'live live live';
    padding-block: 12px 14px;
  }

  .masthead__logo { grid-area: logo; }
  .masthead__names { grid-area: names; }

  .masthead__aside {
    display: contents;
  }

  .masthead__aside .btn--live {
    grid-area: live;
    width: 100%;
  }

  .burger {
    grid-area: burger;
  }

  .masthead__logo,
  .masthead__logo img {
    width: 52px;
    height: 52px;
  }

  .masthead__full {
    font-size: .75rem;
    line-height: 1.35;
  }

  .masthead__short {
    font-size: .75rem;
    margin-bottom: 2px;
  }
}

/* ---------- Шапка внутренних страниц ---------- */
.page-head {
  position: relative;
  overflow: hidden;
  background: var(--tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.page-head__art {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(48%, 640px);
  pointer-events: none;
}

.page-head__art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.page-head__art::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--tint) 0%, rgba(243, 241, 234, 0) 55%);
}

.ha-d { fill: rgba(203, 220, 220, .45); }
.ha-iso { fill: none; stroke: var(--ink); stroke-opacity: .16; stroke-width: 1; }
.ha-land { fill: rgba(229, 211, 166, .7); stroke: var(--ink); stroke-opacity: .45; stroke-width: 1; }

.page-head__inner {
  position: relative;
  display: grid;
  gap: 12px;
  padding-block: 28px 36px;
}

.page-head__title {
  max-width: 26ch;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.15;
}

.page-head__lead {
  max-width: 70ch;
  margin: 0;
  font-size: 1.0625rem;
  color: var(--ink-2);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .8125rem;
  color: var(--ink-3);
}

.crumbs li + li::before {
  content: '/';
  margin: 0 8px;
  color: var(--line-2);
}

.crumbs a {
  text-decoration: none;
}

.crumbs a:hover {
  text-decoration: underline;
}

.crumbs [aria-current='page'] {
  color: var(--ink);
}

@media (max-width: 760px) {
  .page-head__art {
    width: 100%;
    opacity: .4;
  }
}

/* ---------- Секции ---------- */
.section {
  padding-block: clamp(44px, 6vw, 72px);
}

.section--tint {
  background: var(--tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section--dark {
  background: var(--ink);
  color: var(--on-dark);
}

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 32px;
  margin-bottom: 28px;
}

.sec-head__text {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.sec-head__kicker {
  margin: 0;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mag);
}

.sec-head__title {
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
}

.sec-head__note {
  max-width: 68ch;
  margin: 2px 0 0;
  font-size: .9375rem;
  color: var(--ink-2);
}

.section--dark .sec-head__kicker {
  color: #f08cbc;
}

@media (max-width: 640px) {
  .sec-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Карточки ---------- */
.grid {
  display: grid;
  gap: 24px;
}

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

@media (max-width: 1100px) {
  .grid--3,
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .grid--3,
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}

.card:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}

.card__art {
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--line);
  background: var(--tint);
}

.card__art .art {
  display: block;
  width: 100%;
  height: 100%;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 18px 20px 20px;
}

.card__title {
  font-size: 1.125rem;
}

.card__link {
  text-decoration: none;
}

.card__link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.card__text {
  margin: 0;
  font-size: .9375rem;
  color: var(--ink-2);
}

.card__subs {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: auto 0 0;
  padding: 8px 0 0;
  list-style: none;
}

.card__subs a {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  font-size: .8125rem;
  text-decoration: none;
  background: var(--surface);
}

.card__subs a:hover {
  border-color: var(--mag);
}

.panel {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.panel__title {
  margin-bottom: 12px;
  font-size: 1rem;
}

/* ---------- Знаки дисциплин ---------- */
.sym {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: none;
  background: currentColor;
  vertical-align: middle;
}

.sym--circle { border-radius: 50%; }
.sym--diamond { transform: rotate(45deg) scale(.82); }
.sym--triangle { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.sym--all { border-radius: 50%; background: transparent; border: 1.5px solid currentColor; }

.disc {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .8125rem;
  color: var(--ink-2);
  white-space: nowrap;
}

.disc .sym {
  color: var(--ink);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  color: var(--ink-2);
  background: var(--surface);
}

.badge--fill {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.badge--status-open {
  background: var(--mag-soft);
  border-color: transparent;
  color: var(--mag-dark);
}

.badge--status-done {
  color: var(--ink-3);
  background: var(--tint);
  border-color: transparent;
}

.badge--status-team {
  color: var(--rec);
  border-color: rgba(140, 59, 38, .35);
}

/* ---------- Фильтры ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 28px;
}

.filters__label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink-3);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 5px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
  font-size: .875rem;
  transition: background-color .15s, border-color .15s, color .15s;
}

.chip:hover {
  border-color: var(--ink);
}

.chip[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
}

.seg__btn {
  min-height: 38px;
  padding: 6px 16px;
  border: 0;
  border-right: 1px solid var(--line-2);
  background: transparent;
  font-size: .875rem;
  font-weight: 500;
}

.seg__btn:last-child {
  border-right: 0;
}

.seg__btn:hover {
  background: var(--tint);
}

.seg__btn[aria-pressed='true'] {
  background: var(--ink);
  color: #fff;
}

.field {
  display: grid;
  gap: 6px;
}

.field--inline {
  grid-template-columns: auto minmax(200px, auto);
  align-items: center;
  gap: 10px;
}

.field__label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink-2);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 1rem;
}

.select {
  appearance: none;
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.textarea {
  min-height: 150px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: 2px solid var(--mag);
  outline-offset: 0;
  border-color: transparent;
}

.search {
  position: relative;
  min-width: min(100%, 300px);
}

.search .input {
  padding-left: 38px;
}

.search::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--ink-3);
  border-radius: 50%;
  transform: translateY(-60%);
}

.search::after {
  content: '';
  position: absolute;
  left: 24px;
  top: 58%;
  width: 6px;
  height: 1.5px;
  background: var(--ink-3);
  transform: rotate(45deg);
}

.check {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .9375rem;
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--ink);
}

.result-count {
  margin: -10px 0 18px;
  font-size: .875rem;
  color: var(--ink-3);
}

/* ---------- Таблицы ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9375rem;
  font-variant-numeric: tabular-nums;
}

.table caption {
  padding: 14px 16px;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

.table th,
.table td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

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

.table thead th {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--tint);
  white-space: nowrap;
}

.table tbody th {
  font-weight: 500;
}

.table tbody tr:hover {
  background: var(--bg);
}

.table .num {
  text-align: right;
  white-space: nowrap;
}

.table .mono {
  white-space: nowrap;
}

.rec-mark {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 3px;
  background: rgba(140, 59, 38, .1);
  color: var(--rec);
  font-family: var(--f-mono);
  font-size: .6875rem;
  font-weight: 600;
  line-height: 1.6;
  vertical-align: 1px;
}

.note {
  margin-top: 16px;
  font-size: .875rem;
  color: var(--ink-3);
}

.empty {
  padding: 36px 24px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  text-align: center;
  color: var(--ink-2);
  background: var(--surface);
}

.empty .btn {
  margin-top: 14px;
}

.more {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

/* ---------- Уведомление ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 250;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: var(--r);
  background: var(--ink);
  color: #fff;
  font-size: .9375rem;
  box-shadow: var(--shadow);
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform .3s var(--ease), opacity .25s;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ---------- Подвал ---------- */
.footer {
  background: var(--ink);
  color: var(--on-dark-2);
  font-size: .9375rem;
}

.footer a {
  color: var(--on-dark);
  text-decoration: none;
}

.footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer :focus-visible {
  outline-color: #fff;
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 36px 40px;
  padding-block: 52px 36px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.footer__logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
}

.footer__short {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.footer__full {
  margin: 0 0 16px;
  font-size: .75rem;
  line-height: 1.5;
  letter-spacing: .02em;
  color: var(--on-dark);
}

.footer__req {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: .8125rem;
}

.footer__req div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
}

.footer__req dt {
  color: var(--on-dark-2);
}

.footer__req dd {
  margin: 0;
  font-family: var(--f-mono);
  color: var(--on-dark);
  overflow-wrap: anywhere;
}

.footer__title {
  margin: 0 0 14px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
}

.footer__list,
.footer__sub {
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.4;
}

.footer__list > li {
  margin-bottom: 9px;
}

.footer__sub {
  margin-top: 7px;
  padding-left: 12px;
  border-left: 1px solid rgba(233, 236, 240, .2);
  font-size: .875rem;
}

.footer__sub li {
  margin-bottom: 6px;
}

.footer__addr,
.footer__line {
  margin: 0 0 12px;
  line-height: 1.55;
}

.footer__muted {
  font-size: .8125rem;
  color: var(--on-dark-2);
}

.footer__social {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.footer__social a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(233, 236, 240, .3);
  border-radius: var(--r);
  transition: background-color .2s, color .2s;
}

.footer__social a:hover {
  background: #fff;
  color: var(--ink);
}

.footer__social svg {
  width: 20px;
  height: 20px;
}

.footer__partners {
  padding-block: 22px 26px;
  border-top: 1px solid rgba(233, 236, 240, .14);
}

.footer__plist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .875rem;
  color: var(--on-dark);
}

.footer__bottom {
  background: #142030;
  font-size: .8125rem;
}

.footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 16px;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}

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

  .footer__org {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .footer__top {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Появление при прокрутке (только при разрешённой анимации) ---------- */
.motion-ok .reveal--pending {
  opacity: 0;
  transform: translateY(12px);
}

.motion-ok .reveal--in {
  opacity: 1;
  transform: none;
  transition: opacity .45s var(--ease), transform .45s var(--ease);
  transition-delay: var(--rv-d, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   Версия для слабовидящих
   ========================================================================== */
.a11y {
  font-size: 20px;
  --bg: #ffffff;
  --surface: #ffffff;
  --tint: #ffffff;
  --tint-2: #eeeeee;
  --ink: #000000;
  --ink-2: #000000;
  --ink-3: #1a1a1a;
  --line: #000000;
  --line-2: #000000;
  --mag: #7d0c43;
  --mag-dark: #5a0830;
  --mag-soft: #ffffff;
}

.a11y body {
  line-height: 1.7;
  letter-spacing: .01em;
}

.a11y a {
  text-decoration: underline;
}

.a11y :focus-visible {
  outline-width: 3px;
}

.a11y .art,
.a11y .portrait,
.a11y .chart,
.a11y .cityplan {
  filter: grayscale(1) contrast(1.15);
}

.a11y .page-head__art {
  display: none;
}

.a11y .masthead__full {
  max-width: none;
}

/* ---------- Печать ---------- */
@media print {
  .util,
  .navbar,
  .burger,
  .footer__social,
  .page-head__art {
    display: none;
  }
}
