:root {
  --fg: #111;
  --muted: #666;
  --line: #eee;
  --bg: #fff;

  --container: 1120px;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
}

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

a {
  color: inherit;
}

/* --- layout --- */

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

.section {
  padding: 72px 0;
}

.section__title {
  font-size: 32px;
  margin: 0 0 8px;
}

.section__lead {
  max-width: 640px;
  color: #555;
  margin: 0 0 32px;
}

/* --- header --- */

.site-header {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.nav__link {
  margin-right: 16px;
  text-decoration: none;
  color: #333;
}

/* --- hero --- */

.section--hero {
  background: #f7f9fc;
}

.hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}

.hero__media {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  align-self: center;
}

.hero__media img {
  width: 100%;
  height: auto;
  display: block;
  filter: contrast(1.02);
}
/* --- grid / cards --- */

.grid {
  display: grid;
  gap: 24px;
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: #fff;
}

/* --- buttons --- */

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}

.btn--primary {
  background: #2563eb;
  color: #fff;
}

.btn--secondary {
  border: 1px solid #2563eb;
  color: #2563eb;
}

.btn--link {
  color: #2563eb;
  padding: 0;
}

/* --- code --- */

.codeblock {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.codeblock__title {
  background: #f3f4f6;
  padding: 8px 12px;
  font-size: 14px;
}

pre {
  margin: 0;
  padding: 16px;
  background: #0f172a;
  color: #e5e7eb;
  overflow-x: auto;
}

/* --- faq --- */

.faq__item {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

/* --- footer --- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0;
  background: #fafafa;
}

/* --- comparison table --- */

.compare__table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.compare__th,
.compare__rowhead,
.compare__table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.compare__th {
  background: #f3f4f6;
  text-align: left;
  font-weight: 700;
}

.compare__rowhead {
  width: 220px;
  background: #fafafa;
  font-weight: 600;
  text-align: left;
}

.compare__table tr:last-child td,
.compare__table tr:last-child th {
  border-bottom: none;
}

.stars {
  letter-spacing: 1px;
  margin-right: 10px;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.small {
  font-size: 14px;
  color: #333;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--line);
}

.badge--yes {
  background: #eef2ff;
}

.badge--no {
  background: #ecfdf5;
}

.compare__cta {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- responsive --- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero__media {
    max-width: 680px;
  }
}

/* --- Features: capabilities foundation --- */
.capabilities {
  margin-top: 36px;
  padding: 28px 28px 24px;
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    #f8fafc 0%,
    #f3f6fb 100%
  );
  border: 1px solid #e6ebf2;
}

.capabilities__title {
  margin: 0 0 16px;
  font-size: 19px;          /* ↑ было 16 */
  font-weight: 700;
  color: #0f172a;
}

.capabilities__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px 24px;
}

.capabilities__item {
  position: relative;
  padding-left: 22px;
  font-size: 16px;          /* ↑ было 14 */
  line-height: 1.45;
  color: #1f2937;
}

.capabilities__item::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #2563eb;
  font-weight: 800;
}

.feature-card__link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
  font-size: 14px;
  color: #2563eb;
  text-decoration: none;
}

.feature-card__link:hover {
  text-decoration: underline;
}

/* ───────────────── Feature modal ───────────────── */

.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;                 /* top/right/bottom/left = 0 */
  z-index: 1000;
  display: grid;
  place-items: center;      /* центрируем контент */
  padding: 24px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.6);
}

.modal__content {
  position: relative;
  z-index: 1;
  width: min(960px, 92vw);
  max-height: 86vh;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #eee;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  padding: 16px;
  overflow: auto;
}

.modal__content img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #eee;
  background: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.modal__title {
  margin: 6px 44px 6px 6px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.modal__caption {
  margin: 0 44px 12px 6px;
  font-size: 14px;
  color: #475569;
}

/* Integrations list */
.integrations {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.integration {
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  background: #fff;
  padding: 18px 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.integration h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.integration p {
  margin: 0 0 10px;
  color: #334155;
  line-height: 1.6;
}


/* ───────────────── Code examples ───────────────── */

.code-examples {
  display: grid;
  gap: 32px;
  margin-top: 32px;
}

.code-example {
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  background: #ffffff;
  padding: 20px 22px;
}

.code-example h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.code-example p {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
}

.code-example p:last-of-type {
  margin-bottom: 14px;
}

/* --- code block --- */

.code-example pre {
  margin: 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: #0f172a;            /* deep navy */
  color: #e5e7eb;
  font-size: 13px;
  line-height: 1.55;
  overflow-x: auto;
  border: 1px solid #0b1220;
}

.code-example code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  white-space: pre;
}

/* --- subtle header separation --- */

.code-example + .code-example {
  position: relative;
}

.code-example + .code-example::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    #e6ebf2,
    transparent
  );
}

/* --- responsive tweaks --- */

@media (max-width: 800px) {
  .code-example {
    padding: 18px 16px;
  }

  .code-example h3 {
    font-size: 17px;
  }

  .code-example pre {
    font-size: 12.5px;
  }
}


/* ───────────────── Code examples accordions ───────────────── */

.code-examples {
  display: grid;
  gap: 14px;
  margin-top: 32px;
}

details.code-example {
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

summary.code-example__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.code-example__left {
  display: inline-flex;
  align-items: center;
  gap: 10px; /* расстояние между заголовком и бейджем */
}

summary.code-example__summary::-webkit-details-marker {
  display: none;
}

.code-example__title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.code-example__hint {
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
  border: 1px solid #dbe6ff;
  background: #eef2ff;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

summary.code-example__summary::after {
  content: "▾";
  font-size: 16px;
  color: #64748b;
  margin-left: 8px;
  transform: rotate(-90deg);
  transition: transform 0.15s ease;
}

details[open] summary.code-example__summary::after {
  transform: rotate(0deg);
}

.code-example__body {
  padding: 16px 18px 18px;
  border-top: 1px solid #e6ebf2;
}

.code-example__body p {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
}

.code-example__body p:last-of-type {
  margin-bottom: 12px;
}

/* code container + copy button */
.codeblock {
  position: relative;
}

.codeblock__copy {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color: #e5e7eb;
  cursor: pointer;
}

.codeblock__copy:hover {
  background: rgba(255,255,255,0.14);
}

.codeblock__copy:disabled {
  opacity: 0.7;
  cursor: default;
}

.codeblock pre {
  margin: 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: #0f172a;
  color: #e5e7eb;
  font-size: 13px;
  line-height: 1.55;
  overflow-x: auto;
  border: 1px solid #0b1220;
}

.codeblock code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  white-space: pre;
}

.toc-wrap{
  max-width: 1100px; /* подстрой под свой container */
  margin: 0 auto 22px;
  padding: 0 24px;
}

.toc{
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
}

.toc__list{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc__link{
  display: inline-block;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  border-radius: 10px;
}

.toc__link:hover{ text-decoration: underline; }

a.backtop {
  display: inline-block;
  margin-top: 12px;
}