:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #1d1c1a;
  --ink-soft: #57534e;
  --line: #e6e2da;
  --accent: #b45309;
  --accent-soft: #fef3c7;
  --good: #15803d;
  --good-soft: #f0fdf4;
  --warn: #b91c1c;
  --warn-soft: #fef2f2;
  --radius: 10px;
  --wrap: 860px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── шапка ── */
.site-head {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.head-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { font-size: 22px; }
.brand-text {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-tag {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

/* ── вкладки ── */
.tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.tabs-row {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-top: 8px;
  padding-bottom: 8px;
}
.tabs-row::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  padding: 7px 13px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14.5px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.tab:hover { background: var(--surface); border-color: var(--line); }
.tab[aria-current="page"] {
  background: var(--accent-soft);
  color: #7c2d12;
  border-color: #fcd9a4;
  font-weight: 600;
}

/* ── содержимое ── */
main { padding: 30px 0 60px; }

.panel[hidden] { display: none; }

h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 34px 0 10px;
  padding-top: 4px;
}
h3 { font-size: 16px; margin: 0 0 6px; }

.lead {
  font-size: 17.5px;
  color: var(--ink-soft);
  margin: 0 0 22px;
}

p { margin: 0 0 14px; }

/* ── картинки ── */
.hero { margin: 0 0 26px; }
.hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
figcaption {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* ── таблицы ── */
.table-scroll { overflow-x: auto; margin: 0 0 18px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { background: #f6f4ef; font-weight: 600; font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }

/* ── списки ── */
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 7px; }

.ticks, .crosses, .steps { list-style: none; padding-left: 0; }
.ticks li, .crosses li { padding-left: 26px; position: relative; }
.ticks li::before {
  content: "✓";
  position: absolute;
  left: 4px;
  color: var(--good);
  font-weight: 700;
}
.crosses li::before {
  content: "✕";
  position: absolute;
  left: 4px;
  color: var(--warn);
  font-weight: 700;
}
.steps { counter-reset: step; }
.steps li {
  counter-increment: step;
  padding-left: 32px;
  position: relative;
  margin-bottom: 12px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: #7c2d12;
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ── промпт-блоки ── */
.prompt-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius);
  padding: 12px 15px;
  margin: 0 0 14px;
}
.prompt-block.good { border-left-color: var(--good); }
.prompt-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
pre {
  margin: 0;
  font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── карточки ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.card p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

/* ── выноски ── */
.callout {
  background: var(--good-soft);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 13px 16px;
  margin: 18px 0;
  font-size: 15px;
}
.callout.warn {
  background: var(--warn-soft);
  border-color: #fecaca;
}

/* ── FAQ ── */
details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 9px;
}
summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15.5px;
}
details p { margin: 10px 0 0; color: var(--ink-soft); font-size: 15px; }

/* ── подвал ── */
.site-foot {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 22px 0;
}
.site-foot p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

@media (max-width: 560px) {
  h1 { font-size: 25px; }
  .lead { font-size: 16.5px; }
  .brand-tag { display: none; }
}
