:root {
  --law-ink: #172033;
  --law-muted: #5f6b7d;
  --law-line: #dce4ef;
  --law-soft: #f3f9f5;
  --law-accent: #187945;
  --law-accent-dark: #126337;
  --law-warm: #fff6dd;
}

html {
  scroll-behavior: smooth;
}

.law-article-page {
  background: #f5f7fb;
  color: var(--law-ink);
}

.law-article-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #d7e0ec;
  background:
    linear-gradient(90deg, rgba(7, 29, 20, 0.92) 0%, rgba(11, 51, 34, 0.78) 52%, rgba(12, 57, 37, 0.42) 100%),
    url("/assets/snt-obshchee-sobranie-pravlenie-217-fz-v1.webp") center 48% / cover no-repeat;
}

.law-article-hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 12, 28, 0.04), rgba(4, 12, 28, 0.3));
  content: "";
  pointer-events: none;
}

.law-article-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  padding-top: clamp(3rem, 6vw, 5.75rem);
  padding-bottom: clamp(3rem, 6vw, 5.75rem);
}

.law-article-hero__eyebrow {
  margin: 0 0 1.1rem;
  color: #c9f4d9;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.law-article-hero h1 {
  max-width: 930px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.25rem, 5vw, 4.35rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.32);
  text-wrap: balance;
}

.law-article-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  align-items: center;
  margin-top: 1.75rem;
  color: #edf3ff;
  font-size: 0.93rem;
}

.law-article-hero__meta > *:not(:last-child)::after {
  margin-left: 1.1rem;
  color: rgba(255, 255, 255, 0.55);
  content: "•";
}

.law-article-hero__meta a {
  color: #fff;
  font-weight: 700;
  text-underline-offset: 0.18em;
}

.law-article-layout {
  display: grid;
  grid-template-columns: minmax(225px, 285px) minmax(0, 850px);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  justify-content: center;
  padding-top: clamp(2rem, 4vw, 4rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.law-article-sidebar {
  position: sticky;
  top: 6.5rem;
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.law-article-toc {
  position: static;
  overflow: hidden;
  border: 1px solid var(--law-line);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 14px 35px rgba(23, 32, 51, 0.06);
}

.law-article-toc summary {
  padding: 1rem 1.1rem;
  color: #192943;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  list-style-position: inside;
}

.law-article-toc[open] summary {
  border-bottom: 1px solid var(--law-line);
}

.law-article-toc ul {
  max-height: calc(100vh - 26rem);
  margin: 0;
  padding: 0.8rem 0.65rem;
  overflow: auto;
  list-style: none;
  scrollbar-width: thin;
}

.law-article-toc li {
  padding-left: 0.1rem;
  color: #8a97a8;
  font-size: 0.76rem;
}

.law-article-toc a {
  display: block;
  padding: 0.34rem 0.45rem;
  border-radius: 0.45rem;
  color: #506078;
  line-height: 1.36;
  text-decoration: none;
}

.law-article-toc a:hover,
.law-article-toc a:focus-visible {
  background: #edf8f1;
  color: var(--law-accent-dark);
}

.law-article-sidebar-cta {
  padding: 1rem;
  border: 1px solid #b8d9c5;
  border-radius: 1rem;
  background: linear-gradient(145deg, #f6fcf8, #eaf7ef);
  box-shadow: 0 14px 35px rgba(23, 90, 53, 0.1);
}

.law-article-sidebar-cta__eyebrow {
  margin: 0 0 0.45rem;
  color: #287548;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.law-article-sidebar-cta h2 {
  margin: 0;
  color: #163d27;
  font-size: 1.08rem;
  line-height: 1.24;
  letter-spacing: -0.02em;
}

.law-article-sidebar-cta > p:not(.law-article-sidebar-cta__eyebrow) {
  margin: 0.65rem 0 0;
  color: #476354;
  font-size: 0.82rem;
  line-height: 1.5;
}

.law-article-sidebar-cta__mobile-copy {
  display: none;
}

.law-article-sidebar-cta > a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  margin-top: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.7rem;
  background: #187945;
  box-shadow: 0 8px 20px rgba(24, 121, 69, 0.2);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.law-article-sidebar-cta > a:hover {
  background: #116638;
  box-shadow: 0 11px 24px rgba(24, 121, 69, 0.27);
  transform: translateY(-1px);
}

.law-article-sidebar-cta > a:focus-visible {
  outline: 3px solid rgba(24, 121, 69, 0.25);
  outline-offset: 3px;
}

.law-article {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--law-line);
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 24px 60px rgba(23, 32, 51, 0.08);
}

.law-article__body {
  padding: clamp(1.45rem, 4vw, 4.25rem);
  font-size: clamp(1rem, 1.2vw, 1.08rem);
  line-height: 1.78;
}

.law-article__body > :first-child {
  margin-top: 0;
}

.law-article__body p {
  margin: 0 0 1.15rem;
}

.law-article__lead-paragraph {
  color: #33435b;
  font-size: clamp(1.08rem, 1.7vw, 1.24rem);
  line-height: 1.68;
}

.law-article__lead-paragraph:first-child {
  color: #172b4d;
  font-size: clamp(1.16rem, 2vw, 1.38rem);
}

.law-article__body h2,
.law-article__body h3,
.law-article__body h4 {
  color: #14213a;
  font-weight: 800;
  line-height: 1.19;
  letter-spacing: -0.025em;
  scroll-margin-top: 7rem;
  text-wrap: balance;
}

.law-article__body h2 {
  margin: clamp(3.4rem, 7vw, 5.6rem) 0 1.35rem;
  padding-top: 0.35rem;
  font-size: clamp(1.72rem, 3.1vw, 2.45rem);
}

.law-article__body h2::before {
  display: block;
  width: 3rem;
  height: 0.28rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--law-accent), #70b78e);
  content: "";
}

.law-article__body h3 {
  margin: 2.7rem 0 1rem;
  font-size: clamp(1.38rem, 2.2vw, 1.78rem);
}

.law-article__body h4 {
  margin: 2rem 0 0.8rem;
  font-size: clamp(1.15rem, 1.8vw, 1.38rem);
}

.law-article__body strong {
  color: #122b58;
  font-weight: 800;
}

.law-article__body ul,
.law-article__body ol {
  margin: 0.4rem 0 1.45rem;
  padding-left: 1.55rem;
}

.law-article__body li {
  margin: 0.42rem 0;
  padding-left: 0.25rem;
}

.law-article__body li::marker {
  color: var(--law-accent);
  font-weight: 800;
}

.law-article__body li > ul,
.law-article__body li > ol {
  margin-top: 0.35rem;
  margin-bottom: 0.45rem;
}

.law-article__body blockquote {
  margin: 1.7rem 0;
  padding: 1.2rem 1.35rem;
  border: 0;
  border-left: 0.34rem solid #f0aa25;
  border-radius: 0 0.75rem 0.75rem 0;
  background: var(--law-warm);
  color: #583c0b;
  font-size: 1.03em;
  font-weight: 700;
}

.law-article__body blockquote p {
  margin: 0;
}

.law-article__cta {
  display: flex;
  justify-content: center;
  margin: 1.7rem 0 1.35rem;
}

.law-article__cta a {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  max-width: 100%;
  padding: 0.85rem 1.05rem;
  border: 1px solid #8bc4a2;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, #f2fbf5, #e5f5ea);
  box-shadow: 0 8px 22px rgba(24, 121, 69, 0.1);
  color: #14532d;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.4;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.law-article__cta a span {
  flex: 0 0 auto;
  font-size: 1.25em;
  line-height: 1;
  transition: transform 160ms ease;
}

.law-article__cta a:hover {
  border-color: #4fa876;
  box-shadow: 0 12px 28px rgba(24, 121, 69, 0.17);
  transform: translateY(-1px);
}

.law-article__cta a:hover span {
  transform: translateX(0.18rem);
}

.law-article__cta a:focus-visible {
  outline: 3px solid rgba(24, 121, 69, 0.25);
  outline-offset: 3px;
}

.law-article__download {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
  margin: 2rem 0 1.7rem;
  padding: clamp(1.2rem, 3vw, 1.65rem);
  border: 1px solid #b9d5c5;
  border-radius: 1rem;
  background: linear-gradient(135deg, #f4fbf6, #e7f5eb);
  box-shadow: 0 14px 34px rgba(24, 121, 69, 0.12);
}

.law-article__download-icon {
  display: grid;
  min-height: 4.25rem;
  place-items: center;
  border-radius: 0.85rem;
  background: #187945;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.law-article__download-content {
  min-width: 0;
}

.law-article__download .law-article__download-eyebrow {
  margin: 0 0 0.3rem;
  color: #187945;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.law-article__download h3 {
  margin: 0;
  color: #163726;
  font-size: clamp(1.24rem, 2.3vw, 1.62rem);
  line-height: 1.2;
}

.law-article__download-content > p:not(.law-article__download-eyebrow) {
  margin: 0.65rem 0 1rem;
  color: #40594a;
  font-size: 0.95rem;
}

.law-article__download a {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: center;
  padding: 0.78rem 1rem;
  border-radius: 0.72rem;
  background: #187945;
  color: #fff;
  font-size: 0.94rem;
  font-weight: 850;
  line-height: 1.25;
  text-decoration: none;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.law-article__download a span {
  color: #d8f3e3;
  font-size: 0.78rem;
  font-weight: 700;
}

.law-article__download a:hover {
  background: #126337;
  box-shadow: 0 10px 22px rgba(24, 121, 69, 0.2);
  transform: translateY(-1px);
}

.law-article__download a:focus-visible {
  outline: 3px solid rgba(24, 121, 69, 0.28);
  outline-offset: 3px;
}

.law-article__body hr {
  height: 1px;
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  border: 0;
  background: linear-gradient(90deg, transparent, #cbd7e6 10%, #cbd7e6 90%, transparent);
}

.law-article__table-scroll {
  max-width: 100%;
  margin: 1.4rem 0 1.8rem;
  overflow-x: auto;
  border: 1px solid #d8e1ec;
  border-radius: 0.85rem;
  outline: none;
}

.law-article__table-scroll:focus-visible {
  box-shadow: 0 0 0 3px rgba(40, 88, 199, 0.2);
}

.law-article__body table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.94rem;
  line-height: 1.45;
}

.law-article__body th,
.law-article__body td {
  padding: 0.78rem 0.9rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.law-article__body th {
  background: #edf8f1;
  color: #14532d;
  font-weight: 800;
}

.law-article__body tbody tr:nth-child(even) {
  background: #f8fafc;
}

.law-article__body tbody tr:last-child td {
  border-bottom: 0;
}

.law-article__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  padding: 1.2rem clamp(1.45rem, 4vw, 4.25rem);
  border-top: 1px solid var(--law-line);
  background: var(--law-soft);
  font-size: 0.92rem;
}

.law-article__footer a {
  color: var(--law-accent-dark);
  font-weight: 750;
  text-underline-offset: 0.18em;
}

@media (max-width: 980px) {
  .law-article-layout {
    grid-template-columns: minmax(0, 850px);
  }

  .law-article-sidebar {
    position: static;
  }

  .law-article-toc ul {
    max-height: 22rem;
  }
}

@media (max-width: 640px) {
  .law-article-page {
    padding-bottom: 0;
  }

  .law-article-hero {
    background:
      linear-gradient(90deg, rgba(5, 30, 19, 0.9), rgba(10, 55, 36, 0.72)),
      url("/assets/snt-obshchee-sobranie-pravlenie-217-fz-v1.webp") 56% center / cover no-repeat;
  }

  .law-article-hero__inner {
    padding-top: 2.65rem;
    padding-bottom: 2.85rem;
  }

  .law-article__download {
    grid-template-columns: 3.25rem minmax(0, 1fr);
    gap: 0.85rem;
    padding: 1rem;
  }

  .law-article__download-icon {
    min-height: 3.25rem;
    border-radius: 0.7rem;
    font-size: 0.65rem;
  }

  .law-article__download a {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .law-article-hero h1 {
    font-size: clamp(2rem, 10vw, 2.65rem);
    line-height: 1.06;
  }

  .law-article-hero__meta {
    display: grid;
    gap: 0.45rem;
  }

  .law-article-hero__meta > *:not(:last-child)::after {
    content: none;
  }

  .law-article-layout {
    gap: 1rem;
    padding-top: 1.25rem;
    padding-bottom: 3.5rem;
  }

  .law-article,
  .law-article-toc {
    border-radius: 0.85rem;
  }

  .law-article-sidebar-cta {
    position: fixed;
    right: 0.65rem;
    bottom: 0.65rem;
    left: 0.65rem;
    z-index: 40;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 6.4rem;
    gap: 0.5rem;
    align-items: center;
    padding: 0.55rem;
    border-radius: 0.85rem;
    box-shadow: 0 16px 38px rgba(13, 67, 37, 0.24);
  }

  .law-article-sidebar-cta__eyebrow,
  .law-article-sidebar-cta h2,
  .law-article-sidebar-cta > p:not(.law-article-sidebar-cta__mobile-copy) {
    display: none;
  }

  .law-article-sidebar-cta > .law-article-sidebar-cta__mobile-copy {
    display: block;
    margin: 0;
    color: #244b34;
    font-size: 0.68rem;
    font-weight: 650;
    line-height: 1.28;
  }

  .law-article-sidebar-cta > a {
    min-height: 2.45rem;
    margin: 0;
    padding: 0.5rem 0.55rem;
    font-size: 0.74rem;
  }

  .law-article-toc ul {
    max-height: none;
    overflow: visible;
  }

  .law-article__body {
    padding: 1.25rem 1rem 2.25rem;
    line-height: 1.7;
  }

  .law-article__body h2 {
    margin-top: 3.25rem;
  }

  .law-article__body hr {
    margin-top: 2.8rem;
  }

  .law-article__cta a {
    display: flex;
    justify-content: space-between;
    width: 100%;
  }

  .law-article__footer {
    display: grid;
    padding: 1.1rem 1rem;
  }
}

@media print {
  .law-article-sidebar,
  .law-article__footer,
  .law-article__cta {
    display: none;
  }

  .law-article-layout {
    display: block;
    padding: 0;
  }

  .law-article {
    border: 0;
    box-shadow: none;
  }

  .law-article__body {
    padding: 0;
  }
}
