:root {
  --paper: #f5f7fa;
  --surface: #ffffff;
  --ink: #20232a;
  --muted: #667085;
  --line: #d8dee8;
  --nav: #183642;
  --accent: #b54708;
  --accent-soft: #fff7ed;
  --green: #1f7a5c;
  --shadow: 0 16px 40px rgba(32, 35, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 10px 32px;
  background: rgba(245, 247, 250, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.site-identity {
  display: flex;
  align-items: center;
  gap: 32px;
  min-width: 0;
}

.site-tagline {
  margin: 0;
  color: var(--nav);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--nav);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-mark {
  width: 51px;
  height: 51px;
  flex-shrink: 0;
  border: 1px solid rgba(24, 54, 66, 0.18);
  border-radius: 50%;
  object-fit: cover;
}

.brand-name {
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.brand-initial {
  width: 1.8em;
  height: 1.8em;
  flex: 0 0 1.8em;
  border: 0;
  border-radius: 0;
  object-fit: contain;
}

.calculator-brand .brand-mark {
  width: 48px;
  height: 48px;
  object-fit: fill;
}

.top-nav {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
  font-size: 14px;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--nav);
  border-radius: 8px;
  background: var(--nav);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(24, 54, 66, 0.14);
}

.top-nav .active,
.top-nav a:hover {
  background: #244d5b;
  border-color: #244d5b;
  color: #ffffff;
}

.top-nav a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.top-nav a[aria-disabled="true"] {
  color: var(--muted);
  cursor: default;
}

.top-nav a[aria-disabled="true"]:hover {
  background: transparent;
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 32px 72px;
}

.sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  background: #edf2f7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sidebar-title,
.sidebar-section {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar-section {
  margin-top: 16px;
}

.sidebar a,
.sidebar span {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--nav);
  font-size: 14px;
  text-decoration: none;
}

.sidebar span {
  color: var(--muted);
}

.sidebar-service-link {
  background: #e5edf3;
  border: 1px solid rgba(24, 54, 66, 0.08);
  font-weight: 600;
}

.sidebar .active,
.sidebar a:hover {
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(32, 35, 42, 0.04);
}

.content {
  min-width: 0;
  overflow-wrap: anywhere;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 820px;
  margin: 0;
  color: var(--nav);
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 14px;
  color: var(--nav);
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: 0;
  scroll-margin-top: 90px;
}

.article h2 {
  margin-top: 42px;
}

.lead {
  max-width: 820px;
  margin: 24px 0 0;
  color: #394150;
  font-size: 19px;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 44px;
}

.route-card,
.notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.route-card {
  padding: 24px;
}

.route-card.muted {
  box-shadow: none;
}

.tag {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.route-card p {
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 10px;
  padding: 0 16px;
  background: var(--nav);
  border-radius: 6px;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.button.secondary {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--nav);
}

.article {
  max-width: 980px;
}

.notice {
  margin-top: 34px;
  padding: 22px;
  background: var(--accent-soft);
  box-shadow: none;
}

.notice h2 {
  margin-top: 0;
}

.notice p {
  margin-bottom: 0;
}

.article blockquote {
  margin: 18px 0 22px;
  padding: 14px 18px;
  background: #e4f2ff;
  border-left: 3px solid #6aaedb;
  color: #273c4f;
}

.article blockquote p {
  margin: 0;
}

.article-contact {
  margin: 20px 0 24px;
  padding: 16px 18px;
  background: #e4f2ff;
  border-left: 3px solid #6aaedb;
  color: #273c4f;
}

.article-contact p {
  margin: 0;
}

.article-contact a {
  color: var(--nav);
  font-weight: 600;
}

.article-contact .telegram-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
  white-space: nowrap;
  font-weight: 700;
}

.article-contact .telegram-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.service-price-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  width: min(300px, 100%);
  margin: 6px 0;
  color: #394150;
}

.service-price {
  flex: 0 0 auto;
  color: #1f5f8f;
  font-size: 24px;
  line-height: 1;
}

.article-hero {
  margin: 24px 0 28px;
}

.blog-card-image {
  width: calc(100% + 48px);
  margin: -24px -24px 18px;
  border-bottom: 1px solid var(--line);
}

.document-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 28px;
}

.document-list li {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.document-list strong {
  display: block;
  color: var(--nav);
  font-size: 15px;
}

.document-list span {
  display: block;
  margin-top: 4px;
  color: #4b5563;
}

.document-list.compact {
  gap: 8px;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.check-list li {
  padding-left: 4px;
}

.requirement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.requirement-grid > div {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.requirement-grid h3 {
  margin: 0 0 8px;
  color: var(--nav);
  font-size: 17px;
  line-height: 1.25;
}

.requirement-grid p {
  margin: 0;
  color: #4b5563;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

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

th {
  background: #edf5f1;
  color: var(--nav);
  font-size: 13px;
}

td {
  background: var(--surface);
  color: #3d4551;
}

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

.media-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 4px;
}

.media-grid.media-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.document-example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 10px;
}

.document-example-narrow img {
  width: auto;
  max-width: 100%;
  max-height: 620px;
  margin: 0 auto;
}

figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

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

.file-name-example {
  align-self: start;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
}

.file-name-example img {
  width: auto;
  max-width: 100%;
}

figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
}

.small-note {
  color: var(--muted);
  font-size: 14px;
}

.source-list {
  margin: 0;
  padding-left: 22px;
}

.source-list a {
  color: var(--accent);
}

.link-list {
  display: grid;
  gap: 12px;
}

.link-list a {
  display: block;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}

.link-list a:hover {
  border-color: var(--accent);
}

.link-list strong,
.link-list span {
  display: block;
}

.link-list strong {
  color: var(--nav);
}

.link-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
  }

  .site-identity {
    flex-wrap: wrap;
    gap: 10px 24px;
  }

  .top-nav {
    flex-wrap: wrap;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 18px 52px;
  }

  .sidebar {
    position: static;
  }

  .section-grid,
  .media-grid,
  .document-example-grid,
  .requirement-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 32px;
  }

  .lead {
    font-size: 17px;
  }
}

/* Keep blog pages published but hide Blog from site navigation. */
.sidebar a[href*="blog/"] {
  display: none;
}

.sidebar .sidebar-section:has(+ a[href*="blog/"]),
.sidebar .sidebar-section:has(+ a[href="index.html"]) {
  display: none;
}
