:root {
  --yc-doc-green: #0f7657;
  --yc-doc-green-dark: #0a5a43;
  --yc-doc-mint: #eff8f4;
  --yc-doc-border: #dbe6e1;
  --yc-doc-text: #26332f;
  --yc-doc-muted: #65736e;
  --yc-doc-card: #ffffff;
}

.yc-documents {
  color: var(--yc-doc-text);
  background: #fff;
  font-family: inherit;
}

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

.yc-documents__container {
  width: min(100% - 32px, 896px);
  margin-inline: auto;
}

.yc-documents__hero {
  padding: 44px 0 40px;
  background: linear-gradient(180deg, var(--yc-doc-mint), #fff);
}

.yc-documents__hero h1 {
  margin: 20px 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.yc-documents__hero p {
  max-width: 720px;
  margin: 0;
  color: var(--yc-doc-muted);
  font-size: 18px;
  line-height: 1.65;
}

.yc-documents__breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--yc-doc-muted);
  font-size: 14px;
}

.yc-documents a {
  color: var(--yc-doc-green-dark);
  text-underline-offset: 3px;
}

.yc-documents a:focus-visible,
.yc-documents button:focus-visible,
.yc-documents input:focus-visible {
  outline: 3px solid rgba(15, 118, 87, 0.35);
  outline-offset: 3px;
}

.yc-documents__section {
  padding: 42px 0 0;
}

.yc-documents__section--catalog {
  padding-bottom: 70px;
}

.yc-documents__section h2 {
  margin: 0 0 22px;
  font-size: clamp(25px, 4vw, 34px);
  line-height: 1.2;
}

.yc-documents__quick-list,
.yc-documents__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.yc-documents__quick-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.yc-documents__quick-list a {
  display: flex;
  min-height: 58px;
  height: 100%;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid rgba(15, 118, 87, 0.28);
  border-radius: 14px;
  background: var(--yc-doc-mint);
  color: var(--yc-doc-text);
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
}

.yc-documents__quick-list a:hover {
  border-color: var(--yc-doc-green);
  background: #e5f4ed;
}

.yc-documents__search-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 650;
}

.yc-documents__search {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--yc-doc-border);
  border-radius: 12px;
  background: #fff;
  color: var(--yc-doc-text);
  font: inherit;
}

.yc-documents__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.yc-documents__filters button {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--yc-doc-border);
  border-radius: 999px;
  background: #fff;
  color: var(--yc-doc-text);
  cursor: pointer;
  font: inherit;
}

.yc-documents__filters button[aria-pressed="true"] {
  border-color: var(--yc-doc-green);
  background: var(--yc-doc-green);
  color: #fff;
}

.yc-documents__count {
  margin: 16px 0;
  color: var(--yc-doc-muted);
}

.yc-documents__list {
  display: grid;
  gap: 12px;
}

.yc-documents__list li[hidden] {
  display: none;
}

.yc-documents__list li > div {
  position: relative;
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid var(--yc-doc-border);
  border-radius: 14px;
  background: var(--yc-doc-card);
  transition: border-color 160ms ease, background-color 160ms ease;
}

.yc-documents__list li > div:hover,
.yc-documents__list li > div:focus-within {
  border-color: var(--yc-doc-green);
  background: var(--yc-doc-mint);
}

.yc-documents__list a {
  min-width: 0;
  flex: 1;
  color: var(--yc-doc-text);
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}

.yc-documents__list a::after {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  content: "";
}

.yc-documents__list span {
  flex: 0 0 auto;
  color: var(--yc-doc-muted);
  font-size: 13px;
  font-weight: 700;
}

.yc-documents__help {
  margin: 24px 0 0;
  color: var(--yc-doc-muted);
}

.yc-document__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 24px 0 0;
}

.yc-document__meta div {
  display: flex;
  gap: 6px;
}

.yc-document__meta dt {
  font-weight: 700;
}

.yc-document__meta dd {
  margin: 0;
}

.yc-document__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.yc-document__back,
.yc-document__download {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.yc-document__download {
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--yc-doc-green);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}

.yc-document__notice {
  margin: 20px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--yc-doc-green);
  border-radius: 8px;
  background: var(--yc-doc-mint);
  color: var(--yc-doc-muted);
}

.yc-document__content {
  overflow-wrap: anywhere;
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid var(--yc-doc-border);
  border-radius: 18px;
  background: #fff;
  line-height: 1.7;
}

.yc-document__content h2:first-child {
  margin-top: 0;
}

.yc-document__content h1,
.yc-document__content h2,
.yc-document__content h3,
.yc-document__content h4 {
  margin-top: 1.5em;
  line-height: 1.3;
}

.yc-document__content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.yc-document__content td,
.yc-document__content th {
  min-width: 150px;
  padding: 8px 10px;
  border: 1px solid var(--yc-doc-border);
  vertical-align: top;
}

.yc-document__content img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 767px) {
  .yc-documents__container {
    width: min(100% - 24px, 896px);
  }

  .yc-documents__hero {
    padding: 30px 0;
  }

  .yc-documents__quick-list {
    grid-template-columns: 1fr;
  }

  .yc-documents__filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .yc-documents__filters button {
    width: 100%;
    text-align: left;
  }

  .yc-documents__list li > div {
    align-items: flex-start;
  }

  .yc-document__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .yc-document__download,
  .yc-document__back {
    justify-content: center;
    text-align: center;
  }
}
