:root {
  --paper: #F7F4EE;
  --ink: #1B1B19;
  --muted: #5E5A52;
  --rule: #DDD6C9;
  --green: #2F5D4F;
  --green-dark: #234739;
  --green-tint: #E8EFEA;
  --measure: 34rem;
  --gap: 1.5rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "tnum" 1;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- шапка --- */

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.75rem 0 1.25rem;
  flex-wrap: wrap;
}

.top a { color: var(--ink); text-decoration: none; }
.top .name { font-weight: 600; letter-spacing: -0.01em; }
.top nav { display: flex; gap: 1.25rem; font-size: 0.875rem; }
.top nav a { color: var(--muted); }
.top nav a:hover, .top nav a:focus-visible { color: var(--green); }
.top nav a[aria-current="page"] { color: var(--ink); }

/* --- типографика --- */

h1 {
  font-size: clamp(2rem, 5.5vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 1rem 0 1.25rem;
  max-width: 20ch;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0 0 1.25rem;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

p { margin: 0 0 1rem; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 38rem;
}

.note { font-size: 0.9375rem; color: var(--muted); }

a { color: var(--green); }
a:hover, a:focus-visible { color: var(--green-dark); }

/* --- секции --- */

section { padding: 3rem 0; border-top: 1px solid var(--rule); }
section.hero { padding-top: 1.5rem; border-top: 0; }

/* --- строки-ведомость --- */

.rows { border-top: 1px solid var(--rule); }

.row {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0 2rem;
  padding: 1.125rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.row .k { color: var(--muted); font-size: 0.9375rem; }
.row .v { max-width: var(--measure); }
.row .v p { margin-bottom: 0; }

@media (max-width: 34rem) {
  .row { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* --- строка-ссылка на сегмент --- */

.pick { border-top: 1px solid var(--rule); }

.pick a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1.5rem;
  padding: 1.375rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
}

.pick a:hover, .pick a:focus-visible { background: var(--green-tint); }
.pick .t { font-weight: 600; }
.pick .d { grid-column: 1 / -1; color: var(--muted); font-size: 0.9375rem; max-width: var(--measure); }
.pick .go { color: var(--green); font-size: 0.9375rem; align-self: center; }

/* --- шаги --- */

ol.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }

ol.steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

ol.steps li:first-child { border-top: 1px solid var(--rule); }
ol.steps li::before { content: counter(s); color: var(--green); font-weight: 600; }
ol.steps p { margin: 0; color: var(--muted); font-size: 0.9375rem; }

/* --- кнопки --- */

.actions { display: flex; flex-wrap: wrap; gap: 0.875rem; align-items: center; margin-top: 1.75rem; }

.btn {
  display: inline-block;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.btn:hover, .btn:focus-visible { background: var(--green-dark); color: #fff; }

.alt { color: var(--green); text-decoration: none; border-bottom: 1px solid var(--rule); }
.alt:hover, .alt:focus-visible { border-bottom-color: var(--green); }

/* --- цены --- */

.price { border-top: 1px solid var(--rule); }

.price div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}

.price .s { max-width: 26rem; }
.price .n { white-space: nowrap; font-weight: 600; }

/* --- демо --- */

figure { margin: 0; }

figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

figcaption { font-size: 0.9375rem; color: var(--muted); margin-top: 0.75rem; max-width: var(--measure); }

.figs { display: grid; gap: 2rem; }
.figs figcaption { max-width: none; }

/* --- faq --- */

.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }

.faq summary {
  cursor: pointer;
  padding: 1rem 0;
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--green); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details > *:not(summary) { margin: 0 0 1.125rem; color: var(--muted); max-width: var(--measure); }

/* --- подвал --- */

footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 3rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

footer p { margin-bottom: 0.5rem; max-width: 40rem; }
footer a { color: var(--muted); }
footer a:hover, footer a:focus-visible { color: var(--green); }

/* --- доступность --- */

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* --- широкие экраны: заголовок секции уходит в левую колонку --- */

@media (min-width: 62rem) {
  .wrap { max-width: 66rem; padding: 0 3rem; }

  .top { padding: 2.25rem 0 1.5rem; }

  section { padding: 3.5rem 0; }

  section:not(.hero) {
    display: grid;
    grid-template-columns: 14rem 1fr;
    gap: 0 4rem;
    align-items: start;
  }

  section:not(.hero) > h2 {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    font-size: 1.1875rem;
    color: var(--muted);
  }

  section:not(.hero) > *:not(h2) { grid-column: 2; }

  .hero {
    display: grid;
    grid-template-columns: 14rem 1fr;
    gap: 0 4rem;
    padding-top: 2.5rem;
  }

  .hero > * { grid-column: 2; }
  .hero h1 { margin-top: 0; font-size: 3.25rem; }

  .row { grid-template-columns: 9rem 1fr; }

  footer {
    display: grid;
    grid-template-columns: 14rem 1fr;
    gap: 0 4rem;
  }

  footer p:first-child { grid-column: 1; grid-row: 1; margin: 0; }
  footer p:not(:first-child) { grid-column: 2; }
}
