:root {
  --sky: #0090c5;
  --sky-deep: #0077a8;
  --navy: #0a2748;
  --navy-soft: #143a63;
  --ink: #1a2433;
  --muted: #5c6b7a;
  --line: #c9d3de;
  --field: #e8eef4;
  --paper: #f4f7fa;
  --white: #ffffff;
  --gold: #c9a24d;
  --shell: min(1180px, calc(100% - 48px));
  --display: "PT Serif", "Times New Roman", serif;
  --body: "Golos Text", "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  position: relative;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

a { color: inherit; }
button { font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
.shell { width: var(--shell); margin-inline: auto; }

/* Left flag edge — CIS institutional chrome */
.page-edge {
  position: fixed;
  z-index: 60;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background:
    linear-gradient(180deg, var(--sky) 0 72%, var(--gold) 72% 82%, var(--sky) 82%);
}

.skip {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 18px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--navy);
  transform: translateY(-160%);
}

.skip:focus { transform: none; }

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity .55s ease var(--delay, 0ms),
    transform .55s ease var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Official top bar */
.gov-bar {
  color: rgba(255, 255, 255, .82);
  background: var(--navy);
  font-size: 12px;
}

.gov-bar-inner {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.gov-bar p {
  display: flex;
  margin: 0;
  align-items: center;
  gap: 10px;
}

.gov-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 18px;
  color: var(--navy);
  background: var(--sky);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}

.gov-bar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.gov-bar a {
  color: rgba(255, 255, 255, .78);
  text-decoration: none;
}

.gov-bar a:hover { color: var(--white); }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 247, 250, .96);
}

.header.is-scrolled {
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 1px 0 rgba(10, 39, 72, .06);
}

.header-inner {
  display: grid;
  min-height: 78px;
  grid-template-columns: 210px 1fr auto;
  align-items: center;
  gap: 20px;
}

.logo img { width: 196px; }

.nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(12px, 1.8vw, 26px);
}

.nav a {
  position: relative;
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.nav a::after {
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 2px;
  background: var(--sky);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
  content: "";
}

.nav a:hover::after { transform: scaleX(1); }

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

.lang {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
}

.cabinet {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--navy);
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.cabinet:hover {
  color: var(--white);
  background: var(--navy);
}

.menu-btn {
  display: none;
  width: 42px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--white);
}

.menu-btn span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 3px auto;
  background: var(--navy);
}

.drawer {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.drawer-inner {
  display: grid;
  gap: 0;
  padding: 8px 0 20px;
  width: var(--shell);
  margin-inline: auto;
}

.drawer a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

.drawer-meta {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.drawer-meta a {
  border: 0;
  padding: 0;
  color: var(--muted);
  font-weight: 500;
}

/* Hero — full-bleed, institutional panel */
.hero {
  position: relative;
  display: grid;
  min-height: min(88vh, 760px);
  align-items: end;
  overflow: hidden;
  color: var(--white);
  background: var(--navy);
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  will-change: transform;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(10, 39, 72, .88) 0%, rgba(10, 39, 72, .55) 48%, rgba(10, 39, 72, .28) 100%),
    linear-gradient(180deg, rgba(10, 39, 72, .15) 0%, rgba(10, 39, 72, .82) 100%);
}

.hero .shell {
  position: relative;
  z-index: 1;
  padding-bottom: 72px;
}

.hero-panel {
  max-width: 720px;
}

.brand {
  margin: 0 0 18px;
  color: var(--sky);
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
}

.hero h1 {
  max-width: 16ch;
  margin: 0 0 18px;
  font-family: var(--body);
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.18;
}

.lead {
  max-width: 42ch;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, .86);
  font-size: 16px;
  line-height: 1.65;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-solid,
.btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.btn-solid {
  color: var(--white);
  background: var(--sky);
}

.btn-solid:hover { background: var(--sky-deep); }

.btn-line {
  border: 1px solid rgba(255, 255, 255, .7);
  color: var(--white);
}

.btn-line:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, .1);
}

.btn-line.dark {
  border-color: var(--navy);
  color: var(--navy);
}

.btn-line.dark:hover {
  color: var(--white);
  background: var(--navy);
}

/* Sections */
.section-head {
  max-width: 640px;
  margin-bottom: 36px;
}

.section-head.split {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.section-index {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--sky-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.section-index.on-dark { color: rgba(255, 255, 255, .65); }

.section-head h2,
.figures-head h2,
.contact-panel h2 {
  margin: 0;
  color: var(--navy);
  font-family: var(--display);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
}

.section-head p,
.contact-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.head-link {
  color: var(--sky-deep);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.head-link:hover { text-decoration: underline; }

/* Audiences — flat service windows, not cards */
.audiences {
  padding: 88px 0 40px;
  background:
    linear-gradient(180deg, var(--white) 0%, var(--paper) 100%);
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.audience {
  display: grid;
  gap: 10px;
  min-height: 190px;
  padding: 28px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: inherit;
  background: var(--white);
  text-decoration: none;
  transition: background .2s ease;
}

.audience:hover { background: var(--field); }

.audience-code {
  color: var(--sky);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
}

.audience strong {
  color: var(--navy);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
}

.audience span:last-child {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Services registry */
.services {
  padding: 72px 0 88px;
}

.registry {
  display: grid;
  border-top: 2px solid var(--navy);
}

.registry-row {
  display: grid;
  grid-template-columns: 56px 1fr 180px 90px;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 18px 8px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background .2s ease;
}

.registry-row:hover { background: rgba(0, 144, 197, .06); }

.reg-no {
  color: var(--sky);
  font-size: 13px;
  font-weight: 700;
}

.reg-title {
  color: var(--navy);
  font-size: 17px;
  font-weight: 600;
}

.reg-aud {
  color: var(--muted);
  font-size: 13px;
}

.reg-go {
  justify-self: end;
  color: var(--sky-deep);
  font-size: 13px;
  font-weight: 600;
}

.section-foot {
  margin-top: 22px;
}

.section-foot a {
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--sky);
}

.section-foot a:hover { color: var(--sky-deep); }

/* Figures */
.figures {
  padding: 0 0 88px;
}

.figures-panel {
  padding: 48px 44px;
  color: var(--white);
  background:
    linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 55%, #0d4a6e 100%);
}

.figures-head { margin-bottom: 36px; }
.figures-head h2 { color: var(--white); }

.figure-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.figure {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .28);
}

.figure strong {
  display: block;
  margin-bottom: 10px;
  font-family: var(--display);
  font-size: clamp(32px, 3.5vw, 44px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
}

.figure span {
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
  line-height: 1.45;
}

/* News feed — classic portal лента */
.news {
  padding: 0 0 72px;
}

.news-feed {
  display: grid;
  border-top: 2px solid var(--navy);
}

.news-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  padding: 26px 4px;
  border-bottom: 1px solid var(--line);
}

.news-item time {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.news-type {
  margin: 0 0 6px;
  color: var(--sky-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.news-item h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.news-item h3 a {
  color: var(--navy);
  text-decoration: none;
}

.news-item h3 a:hover { color: var(--sky-deep); }

/* Contact */
.contact {
  padding: 0 0 96px;
}

.contact-panel {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  padding: 40px 0 0;
  border-top: 1px solid var(--line);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Footer */
.footer {
  color: rgba(255, 255, 255, .78);
  background: var(--navy);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 36px;
  padding: 56px 0 40px;
}

.footer-brand img {
  width: 180px;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  max-width: 32ch;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.footer h3 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

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

.footer li + li { margin-top: 10px; }

.footer a {
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
  text-decoration: none;
}

.footer a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .55);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-btn { display: block; }
  .header-inner { grid-template-columns: 1fr auto; }
  .audience-grid { grid-template-columns: 1fr 1fr; }
  .registry-row {
    grid-template-columns: 40px 1fr;
    gap: 8px 14px;
  }
  .reg-aud { grid-column: 2; }
  .reg-go { display: none; }
  .figure-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .page-edge { width: 3px; }
  .gov-bar-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
  }
  .gov-bar nav { gap: 12px; }
  .cabinet { display: none; }
  .hero { min-height: 78vh; }
  .hero-panel { padding-bottom: 52px; }
  .audiences { padding-top: 56px; }
  .audience-grid { grid-template-columns: 1fr; }
  .figures-panel { padding: 36px 24px; }
  .figure-grid { grid-template-columns: 1fr; gap: 20px; }
  .section-head.split {
    align-items: flex-start;
    flex-direction: column;
  }
  .news-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .contact-panel {
    align-items: flex-start;
    flex-direction: column;
  }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 520px) {
  :root { --shell: calc(100% - 30px); }
  .shell { width: var(--shell); }
  .hero .shell { padding-bottom: 48px; }
}
