:root {
  --bg: #f5f1e9;
  --surface: #fffdf8;
  --surface-2: #ece8de;
  --surface-3: #e8eee8;
  --ink: #141918;
  --muted: #626b66;
  --line: #ded7cb;
  --line-strong: #c7bdad;
  --green: #1b6b58;
  --green-dark: #0e3f36;
  --brick: #b76043;
  --steel: #355f76;
  --gold: #c58d2f;
  --shadow: 0 24px 60px rgba(31, 34, 30, 0.13);
  --shadow-soft: 0 14px 32px rgba(31, 34, 30, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.92), rgba(245, 241, 233, 0.9) 44%, rgba(238, 241, 235, 0.86)),
    repeating-linear-gradient(90deg, rgba(20, 25, 24, 0.035) 0 1px, transparent 1px 76px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(183, 96, 67, 0.22);
}

a {
  color: var(--green);
  text-decoration-color: rgba(27, 107, 88, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--green-dark);
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(53, 95, 118, 0.28);
  outline-offset: 3px;
}

h1,
h2,
h3,
p,
li,
td,
th,
a,
dt,
dd,
small {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: 0;
}

.site-header {
  align-items: center;
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(222, 215, 203, 0.86);
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  min-height: 74px;
  padding: 0 5vw;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: 1.18rem;
  font-weight: 850;
  gap: 0.62rem;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.brand::before {
  background:
    linear-gradient(90deg, transparent 42%, rgba(255, 255, 255, 0.65) 42% 58%, transparent 58%),
    linear-gradient(135deg, var(--green), var(--steel));
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 10px 20px rgba(27, 107, 88, 0.22);
  content: "";
  height: 1.9rem;
  width: 1.9rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  justify-content: flex-end;
}

.nav a,
.button {
  border-radius: 8px;
  color: var(--ink);
  line-height: 1.2;
  padding: 0.66rem 0.88rem;
  text-decoration: none;
}

.nav a {
  border: 1px solid transparent;
  color: #34403d;
  font-size: 0.95rem;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: rgba(232, 238, 232, 0.92);
  border-color: rgba(27, 107, 88, 0.16);
  color: var(--green-dark);
}

.hero {
  align-items: center;
  display: grid;
  gap: 4rem;
  grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1.1fr);
  margin: 0 auto;
  max-width: 1320px;
  min-height: 640px;
  padding: 4.8rem 5vw 3.2rem;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 4rem;
  line-height: 1.02;
  margin: 0 0 1.35rem;
  max-width: 820px;
}

.hero p,
.lead,
.section p,
.site-footer {
  color: var(--muted);
}

.hero p,
.lead {
  font-size: 1.13rem;
}

.hero p {
  max-width: 680px;
}

.hero-media {
  aspect-ratio: 16 / 10;
  background: #ddd6cc;
  border: 1px solid rgba(255, 253, 248, 0.7);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 0;
  min-height: 430px;
  overflow: hidden;
  position: relative;
}

.hero-media::after {
  background: linear-gradient(90deg, rgba(20, 25, 24, 0.18), rgba(20, 25, 24, 0.02) 46%, transparent);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.hero-media img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.hero-media figcaption {
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid rgba(255, 253, 248, 0.9);
  border-radius: 8px;
  bottom: 1rem;
  box-shadow: 0 12px 30px rgba(20, 25, 24, 0.13);
  color: var(--ink);
  display: grid;
  gap: 0.12rem;
  left: 1rem;
  max-width: min(360px, calc(100% - 2rem));
  padding: 0.9rem 1rem;
  position: absolute;
  z-index: 1;
}

.hero-media figcaption span {
  color: var(--brick);
  font-size: 0.77rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hero-media figcaption strong {
  font-size: 1rem;
  line-height: 1.25;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  align-items: center;
  background: rgba(255, 253, 248, 0.56);
  border: 1px solid var(--line);
  display: inline-flex;
  font-weight: 760;
  justify-content: center;
  min-height: 2.95rem;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.button:hover {
  background: var(--surface);
  border-color: rgba(27, 107, 88, 0.28);
  box-shadow: var(--shadow-soft);
  color: var(--green-dark);
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  border-color: transparent;
  box-shadow: 0 16px 30px rgba(27, 107, 88, 0.23);
  color: #ffffff;
}

.button.primary:hover {
  background: linear-gradient(135deg, #1f7661, #0b352d);
  color: #ffffff;
}

.hero-metrics {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 2.1rem 0 0;
  max-width: 680px;
}

.hero-metrics div {
  background: rgba(255, 253, 248, 0.66);
  border: 1px solid rgba(222, 215, 203, 0.78);
  border-radius: 8px;
  min-height: 96px;
  padding: 0.9rem;
}

.hero-metrics dt {
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 850;
}

.hero-metrics dd {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.18rem 0 0;
}

.eyebrow {
  align-items: center;
  color: var(--brick);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 850;
  gap: 0.5rem;
  letter-spacing: 0;
  margin: 0 0 0.6rem;
  text-transform: uppercase;
}

.eyebrow::before {
  background: currentColor;
  border-radius: 999px;
  content: "";
  height: 0.48rem;
  width: 0.48rem;
}

.material-strip,
.section,
.content-layout {
  margin: 0 auto;
  max-width: 1180px;
  padding-left: 5vw;
  padding-right: 5vw;
}

.material-strip {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-bottom: 1.2rem;
  padding-top: 0.6rem;
}

.material-strip a {
  background: rgba(20, 25, 24, 0.94);
  border: 1px solid rgba(255, 253, 248, 0.12);
  border-radius: 8px;
  color: #fffdf8;
  display: grid;
  gap: 0.25rem;
  min-height: 122px;
  padding: 1rem;
  text-decoration: none;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.material-strip a:hover {
  background: #0f4036;
  box-shadow: var(--shadow-soft);
  color: #fffdf8;
  transform: translateY(-2px);
}

.material-strip span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
}

.material-strip strong {
  font-size: 1.1rem;
  line-height: 1.2;
}

.material-strip small {
  color: rgba(255, 253, 248, 0.72);
  font-size: 0.9rem;
  line-height: 1.35;
}

.section,
.content-layout {
  padding-bottom: 4.8rem;
  padding-top: 4.8rem;
}

.section-heading {
  max-width: 780px;
}

.section h2,
.content-layout h1,
.content-layout h2,
.content-layout h3 {
  line-height: 1.14;
}

.section h2 {
  font-size: 3rem;
  margin: 0.25rem 0 1rem;
}

.chooser-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 2.2rem;
}

.chooser-grid article,
.side-panel,
.compact-steps li,
.feature-list section {
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(222, 215, 203, 0.92);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(31, 34, 30, 0.055);
}

.chooser-grid article {
  display: flex;
  flex-direction: column;
  min-height: 244px;
  overflow: hidden;
  padding: 1.25rem;
  position: relative;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.chooser-grid article::before {
  background: linear-gradient(90deg, var(--green), var(--steel), var(--gold), var(--brick));
  content: "";
  height: 3px;
  inset: 0 0 auto;
  position: absolute;
}

.chooser-grid article:hover {
  border-color: rgba(27, 107, 88, 0.3);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.chooser-grid span {
  color: var(--steel);
  font-size: 0.9rem;
  font-weight: 850;
}

.chooser-grid h3 {
  font-size: 1.15rem;
  margin: 0.62rem 0;
}

.chooser-grid p {
  margin-bottom: 0;
}

.split {
  align-items: start;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
}

.compact-steps {
  display: grid;
  gap: 0.85rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.compact-steps li {
  border-left: 4px solid var(--green);
  padding: 1rem 1.1rem;
}

.content-layout {
  align-items: start;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr) 310px;
  max-width: 1320px;
}

.hero > *,
.split > *,
.content-layout > *,
.prose,
.side-panel {
  min-width: 0;
}

.prose {
  background: rgba(255, 253, 248, 0.58);
  border-left: 1px solid rgba(222, 215, 203, 0.86);
  padding-left: 2rem;
}

.prose h1 {
  font-size: 3.45rem;
  line-height: 1.04;
  margin: 0.25rem 0 1rem;
  max-width: 900px;
}

.prose h2 {
  font-size: 2rem;
  margin: 2.35rem 0 1rem;
}

.prose h3 {
  margin-bottom: 0.4rem;
}

.lead {
  color: var(--muted);
  margin-bottom: 1.7rem;
  max-width: 860px;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(31, 34, 30, 0.04);
  overflow-x: auto;
}

table {
  background: var(--surface);
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

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

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

th {
  background: var(--surface-3);
  color: var(--green-dark);
  font-size: 0.92rem;
}

.formula-card {
  background:
    linear-gradient(135deg, rgba(232, 238, 232, 0.96), rgba(255, 253, 248, 0.96)),
    var(--surface-3);
  border: 1px solid #d4dccf;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(31, 34, 30, 0.05);
  padding: 1.15rem 1.2rem;
}

.formula-card p {
  margin: 0.25rem 0;
}

.feature-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-list section {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(246, 244, 238, 0.96));
  padding: 1rem;
}

.feature-list section:nth-child(2n) {
  border-top-color: rgba(183, 96, 67, 0.32);
}

.feature-list h2,
.feature-list h3 {
  margin-top: 0;
}

.check-list {
  display: grid;
  gap: 0.7rem;
  list-style: none;
  padding: 0;
}

.check-list li {
  background: rgba(232, 238, 232, 0.78);
  border-left: 4px solid var(--green);
  border-radius: 0 8px 8px 0;
  padding: 0.88rem 1rem;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.steps li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(31, 34, 30, 0.05);
  min-height: 110px;
  padding: 1.05rem 1.1rem 1.05rem 3.55rem;
  position: relative;
}

.steps li::before {
  background: linear-gradient(135deg, var(--brick), var(--gold));
  border-radius: 999px;
  color: #ffffff;
  content: counter(step);
  counter-increment: step;
  display: grid;
  font-weight: 850;
  height: 1.9rem;
  left: 1rem;
  place-items: center;
  position: absolute;
  top: 1.12rem;
  width: 1.9rem;
}

.steps h3 {
  margin: 0 0 0.25rem;
}

.steps p {
  margin: 0;
}

.side-panel {
  align-self: start;
  display: grid;
  gap: 0.9rem;
  padding: 1.25rem;
  position: sticky;
  top: 96px;
}

.side-panel h2 {
  font-size: 1.08rem;
  margin: 0;
}

.side-panel ol {
  margin: 0;
  padding-left: 1.2rem;
}

.side-panel a {
  background: var(--surface-3);
  border: 1px solid rgba(27, 107, 88, 0.12);
  border-radius: 8px;
  color: var(--green-dark);
  padding: 0.58rem 0.72rem;
  text-decoration: none;
}

.side-panel a:hover {
  background: #dfeade;
  border-color: rgba(27, 107, 88, 0.25);
}

.site-footer {
  background: rgba(20, 25, 24, 0.95);
  border-top: 1px solid rgba(255, 253, 248, 0.12);
  color: rgba(255, 253, 248, 0.76);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  padding: 2rem 5vw;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1060px) {
  .hero {
    gap: 2.2rem;
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero h1 {
    font-size: 3.25rem;
  }

  .hero-media {
    min-height: 360px;
  }

  .chooser-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 940px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
    padding-bottom: 1rem;
    padding-top: 1rem;
    position: static;
  }

  .nav {
    justify-content: flex-start;
    width: 100%;
  }

  .split,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .material-strip {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .site-header,
  .section,
  .content-layout,
  .hero,
  .material-strip {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .section,
  .content-layout {
    padding-bottom: 3.2rem;
    padding-top: 3.2rem;
  }

  .hero {
    gap: 1.2rem;
    padding-bottom: 1.2rem;
    padding-top: 2rem;
  }

  .hero h1 {
    font-size: 2.25rem;
    line-height: 1.08;
  }

  .hero p,
  .lead {
    font-size: 1.03rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1.25rem;
  }

  .button {
    justify-content: center;
  }

  .hero-metrics,
  .chooser-grid,
  .feature-list {
    grid-template-columns: 1fr;
  }

  .hero-media {
    min-height: 240px;
  }

  .hero-media figcaption {
    position: static;
    max-width: none;
  }

  .nav a {
    padding-left: 0.56rem;
    padding-right: 0.56rem;
  }

  .section h2 {
    font-size: 2rem;
  }

  .prose {
    border-left: 0;
    padding-left: 0;
  }

  .prose h1 {
    font-size: 2.18rem;
  }

  .prose h2 {
    font-size: 1.55rem;
  }

  .table-wrap {
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  thead {
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  tbody tr {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(31, 34, 30, 0.045);
    margin-bottom: 0.75rem;
    overflow: hidden;
  }

  td {
    border-bottom: 1px solid var(--line);
    display: grid;
    font-size: 0.92rem;
    gap: 0.65rem;
    grid-template-columns: 7.2rem minmax(0, 1fr);
    padding: 0.72rem;
  }

  td::before {
    color: var(--green-dark);
    content: "Контекст";
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1.25;
    text-transform: uppercase;
  }

  td:nth-child(1)::before {
    content: "Параметр";
  }

  td:nth-child(3)::before {
    content: "Проверка";
  }
}
