:root {
  font-family: system-ui, sans-serif;
  font-size: 14px;
  color: #192b27;
  background: #fff;
  line-height: 1.5;
  --green: #087b55;
  --muted: #5c6c66;
  --line: #dbe4dd;
  --soft: #f5f8f6;
  --motion: 180ms ease;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
}
a {
  color: var(--green);
  text-underline-offset: 0.2em;
  transition: color var(--motion);
}
a:hover {
  color: #076746;
}
button,
input {
  font: inherit;
}
button,
.button {
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
.container {
  width: min(960px, 100% - 48px);
  margin-inline: auto;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  background: white;
  padding: 12px;
  z-index: 10;
}
.skip-link:focus {
  top: 12px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.site-header {
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-block: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.4rem;
  font-weight: 750;
  letter-spacing: -0.05em;
  text-decoration: none;
  color: #192b27;
}
.brand-dot {
  color: var(--green);
  margin-left: -7px;
}
.header-label {
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 18px;
  font-size: 0.86rem;
}
.header-inner nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-left: auto;
}
.header-inner nav a {
  text-decoration: none;
}
button,
.button {
  font-size: 0.86rem;
  font-weight: 600;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--green);
  transition:
    background var(--motion),
    border-color var(--motion),
    color var(--motion);
}
button:hover {
  background: #edf6f0;
  border-color: #a5c6b6;
}
button:active {
  background: #dfede4;
}
.button {
  display: inline-block;
  border-color: var(--green);
  background: var(--green);
  color: white;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
}
.button:hover {
  background: #076746;
  color: white;
}
.intro {
  padding: 26px 0 18px;
}
.eyebrow {
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  margin: 0 0 5px;
}
h1 {
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
  margin: 0;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 1.1rem;
  line-height: 1.4;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
}
h3 {
  font-size: 1rem;
  line-height: 1.45;
}
.lead {
  font-size: 1rem;
  color: var(--muted);
  max-width: 60ch;
  margin: 9px 0 0;
}
.search {
  min-width: 0;
  margin-top: 16px;
  animation: appear 220ms ease both;
}
.search-field {
  position: relative;
}
.search-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search input {
  width: 100%;
  min-height: 44px;
  padding: 11px 42px 11px 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: inherit;
  background: #fafcfb;
  transition:
    background var(--motion),
    border-color var(--motion),
    box-shadow var(--motion);
}
.search input:hover {
  border-color: #b7c9bd;
}
.search input:focus {
  background: white;
  border-color: var(--green);
  box-shadow: 0 0 0 3px #087b5510;
}
.search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.reset-query {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 30px;
  min-height: 30px;
  padding: 0;
  border-color: transparent;
  color: var(--muted);
}
.search input::placeholder {
  color: var(--muted);
  opacity: 1;
}
#search-result {
  font-size: 0.78rem;
  color: var(--muted);
  min-height: 1.5em;
  margin: 0;
  white-space: nowrap;
}
.notice {
  padding: 11px 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.86rem;
}
.topics-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.topic-nav {
  display: flex;
  flex: 1 1 760px;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}
.topic-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--muted);
  text-decoration: none;
  transition:
    background var(--motion),
    color var(--motion);
}
.topic-nav a:hover,
.topic-nav a[aria-current="location"] {
  background: #edf6f0;
  color: var(--green);
}
.nav-count {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 20px;
  height: 19px;
  padding-inline: 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}
.category {
  padding-block: 18px;
  scroll-margin-top: 16px;
}
.category-heading {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 12px;
}
.category-heading h2 {
  margin: 0 0 3px;
}
.category-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}
.section-number {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: #edf6f0;
  border-radius: 6px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 650;
}
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.article-card {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-decoration: none;
  color: inherit;
  overflow-wrap: anywhere;
  animation: appear 220ms ease both;
  transition:
    background var(--motion),
    border-color var(--motion),
    box-shadow var(--motion);
}
.article-card:hover {
  background: var(--soft);
  border-color: #8bac99;
  color: inherit;
  box-shadow: 0 2px 6px #192b2706;
}
.article-card h3 {
  margin: 0 0 6px;
}
.article-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.86rem;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  color: var(--green);
  font-size: 0.78rem;
}
.card-arrow {
  font-size: 1rem;
  transition: transform var(--motion);
}
.article-card:hover .card-arrow {
  transform: translateX(2px);
}
.support-box {
  margin: 12px 0 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--soft);
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
}
.support-box h2 {
  margin: 0 0 5px;
  font-size: 1rem;
}
.support-box > div {
  flex: 1;
  min-width: 0;
}
.support-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}
.support-box .button {
  flex-shrink: 0;
}
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 16px;
}
.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 20px;
  font-size: 0.8rem;
}
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 32px;
  padding: 22px 0 28px;
}
.article-heading h1 {
  font-size: clamp(1.6rem, 3.5vw, 2rem);
}
.updated {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 10px 0 0;
}
.article-body {
  font-size: 1.04rem;
  line-height: 1.7;
}
.article-body h2 {
  font-size: 1.15rem;
}
.article-body p {
  margin: 0 0 10px;
}
.article-body section {
  margin: 22px 0;
  scroll-margin-top: 16px;
}
.article-body p,
.article-body li {
  max-width: 72ch;
}
.article-body li {
  padding-left: 4px;
  margin-block: 6px;
}
.article-body ol {
  padding-left: 22px;
}
.article-sidebar {
  align-self: start;
  position: sticky;
  top: 16px;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}
.article-sidebar nav a {
  display: block;
  margin: 3px 0;
  padding: 6px 8px;
  margin-left: -8px;
  border-radius: 6px;
  font-size: 0.86rem;
  text-decoration: none;
  transition:
    background var(--motion),
    color var(--motion);
}
.article-sidebar nav a:hover {
  background: #edf6f0;
}
.sidebar-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  margin: 0 0 6px;
}
.article-sidebar .button {
  margin-top: 12px;
}
.related {
  margin-top: 20px;
}
.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 18px;
  font-size: 0.86rem;
}
.empty {
  padding: 22px;
  margin-block: 18px;
  border: 1px dashed #cbd5ce;
  border-radius: 8px;
  background: #fafcfb;
  animation: appear 220ms ease both;
}
.empty p {
  color: var(--muted);
}
@keyframes appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (max-width: 960px) {
  .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .header-label {
    display: none;
  }
  .article-layout {
    gap: 28px;
  }
  .support-box {
    align-items: flex-start;
    flex-direction: column;
  }
  .support-box > div {
    width: 100%;
  }
}
@media (max-width: 680px) {
  .container {
    width: calc(100% - 32px);
  }
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
  }
  .header-inner nav {
    gap: 12px;
  }
  .intro {
    padding-top: 22px;
  }
  .article-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
    grid-row: 1;
    border-left: 0;
    padding-left: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
  }
  .article-sidebar nav[aria-label="В этой статье"] {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .article-sidebar .sidebar-label {
    width: 100%;
  }
  .article-sidebar nav a {
    margin: 0;
    background: var(--soft);
  }
  .article-sidebar .related {
    display: none;
  }
  .support-box {
    padding: 14px;
    gap: 12px;
  }
}
@media (pointer: coarse) {
  button,
  .button,
  .topic-nav a,
  .article-sidebar nav a {
    min-height: 44px;
  }
  .search input {
    min-height: 52px;
    padding-right: 52px;
    font-size: 16px;
  }
  .reset-query {
    width: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
