/* ===== Переменные и сброс ===== */
:root {
  --bg: #ffffff;
  --bg-soft: #f6fbfe;
  --bg-card: #ffffff;
  --text: #1e2b3c;
  --text-dim: #5e7a93;
  --accent: #2c7da0;
  --accent-dark: #1a5c7a;
  --accent-soft: #e7f3fb;
  --border: #d4e6f1;
  --border-soft: #e4f0f8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Узкий контейнер для одностраничных материалов */
.container.narrow { max-width: 820px; }

/* ===== Шапка ===== */
.header {
  background-color: #ffffff;
  border-bottom: 2px solid #d4e6f1;
  padding: 16px 0;
  box-shadow: 0 2px 8px rgba(0, 120, 200, 0.04);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #1e2b3c;
  text-decoration: none;
}

.logo span {
  color: #2c7da0;
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: #2c3e50;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.nav a:hover,
.nav a.active {
  color: #2c7da0;
  border-bottom-color: #2c7da0;
}

.header-accent {
  height: 3px;
  background: linear-gradient(90deg, #d4e6f1, #a9cee8, #d4e6f1);
  width: 100%;
}

/* ===== Основная часть ===== */
main {
  flex: 1;
  padding: 40px 0 60px;
}

/* ===== Hero (главная) ===== */
.hero {
  background: linear-gradient(145deg, #f0f9ff 0%, #ffffff 80%);
  border-radius: 28px;
  padding: 40px 36px;
  margin-bottom: 48px;
  border: 1px solid #c9e2f0;
  box-shadow: 0 8px 20px rgba(44, 125, 160, 0.06);
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  color: #1e2b3c;
}

.hero h1 i {
  font-style: normal;
  background: #e1f0fa;
  padding: 2px 8px;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 500;
  color: #2c7da0;
  margin-left: 10px;
  vertical-align: middle;
}

.hero p {
  font-size: 1.15rem;
  color: #2a3f54;
  max-width: 720px;
  margin-bottom: 16px;
}

.hero .note {
  display: inline-block;
  background: #e7f3fb;
  padding: 10px 22px;
  border-radius: 40px;
  font-size: 1rem;
  font-weight: 500;
  color: #1c5f7a;
  border: 1px solid #b8d8ec;
  margin-top: 10px;
}

/* ===== Сетка плитки (главная) ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 20px;
}

.card-tile {
  background: #ffffff;
  border-radius: 24px;
  padding: 26px 22px 24px;
  border: 1px solid #d9eaf5;
  box-shadow: 0 6px 16px rgba(44, 125, 160, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.card-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px rgba(44, 125, 160, 0.12);
  border-color: #9fc9e3;
  text-decoration: none;
}

.card-img {
  width: 60px;
  height: 60px;
  background: #e1f0fa;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  color: #2c7da0;
  font-size: 28px;
  font-weight: 400;
  border: 1px solid #c2ddec;
}

.tile-install   .card-img::before { content: "⚙️"; font-size: 32px; }
.tile-create    .card-img::before { content: "📘"; font-size: 32px; }
.tile-wall      .card-img::before { content: "🧱"; font-size: 32px; }
.tile-wind      .card-img::before { content: "🌬️"; font-size: 32px; }
.tile-lisp      .card-img::before { content: "📜"; font-size: 32px; }
.tile-piles     .card-img::before { content: "🔩"; font-size: 32px; }
.tile-lineload  .card-img::before { content: "📏"; font-size: 32px; }
.tile-soft      .card-img::before { content: "🖥️"; font-size: 32px; }


.card-tile h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #1e2b3c;
  letter-spacing: -0.2px;
}

.card-tile p {
  font-size: 0.95rem;
  color: #3a5068;
  margin-bottom: 18px;
  flex: 1;
}

.badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 60px;
  background: #e7f3fb;
  color: #1c5f7a;
  align-self: flex-start;
  border: 1px solid #b8d8ec;
}

.badge.free {
  background: #e1f0fa;
  color: #1e6b8c;
}

.badge.paid {
  background: #ffffff;
  border: 1px solid #2c7da0;
  color: #2c7da0;
}

/* ===== Подвал ===== */
.footer {
  background-color: #f6fbfe;
  border-top: 2px solid #d4e6f1;
  padding: 28px 0;
  color: #2c3e50;
  font-size: 0.9rem;
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  text-decoration: none;
  color: #2c7da0;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #1a4e66;
  text-decoration: underline;
}

.copyright {
  color: #5e7a93;
  font-size: 0.85rem;
}

/* ===== Блоки страницы плагина ===== */
.block {
  margin-bottom: 56px;
  scroll-margin-top: 24px;
}
.block:last-child { margin-bottom: 0; }

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 12px;
}

h2::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 24px;
  background: var(--accent);
  border-radius: 4px;
  flex-shrink: 0;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

p { margin-bottom: 14px; color: #2a3f54; }
ul, ol { margin: 0 0 14px 22px; color: #2a3f54; }
li { margin-bottom: 6px; }

code {
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent-dark);
}

.path {
  display: inline-block;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85em;
  color: var(--accent-dark);
  word-break: break-all;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(44, 125, 160, 0.05);
}
.card p:last-child { margin-bottom: 0; }
.card p { font-size: 0.95rem; }

/* ===== Блок версий ===== */
.versions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.version {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 16px rgba(44, 125, 160, 0.05);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.version:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 24px rgba(44, 125, 160, 0.1);
  border-color: #9fc9e3;
}
.version h3 { margin-bottom: 10px; }
.version.free h3 { color: var(--text); }
.version.paid { border-color: var(--accent); }
.version.paid h3 { color: var(--accent); }
.version p { font-size: 0.9rem; margin-bottom: 6px; color: var(--text-dim); }
.version .btn { margin-top: auto; }

.price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  margin: 8px 0 4px;
}

/* ===== Кнопки ===== */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 60px;
  text-decoration: none;
  margin-top: 12px;
  font-size: 0.95rem;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  text-align: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 16px rgba(44, 125, 160, 0.2);
}
.btn:hover {
  background: var(--accent-dark);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  box-shadow: none;
}
.btn.ghost:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-color: var(--accent-dark);
}

/* ===== Видео ===== */
.video-box {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: 0 8px 20px rgba(44, 125, 160, 0.08);
}
.video-box iframe,
.video-box video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
  background: #000;
}

/* ===== Галерея ===== */
.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.gallery figure {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  overflow: hidden;
  margin: 0;
  box-shadow: 0 6px 16px rgba(44, 125, 160, 0.05);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.gallery figure:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 24px rgba(44, 125, 160, 0.1);
  border-color: #9fc9e3;
}
.gallery img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
}
.gallery figcaption {
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--text-dim);
  background: var(--bg-soft);
  border-top: 1px solid var(--border-soft);
}

/* ===== Лайтбокс ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 40, 60, 0.92);
  z-index: 100;
  padding: 20px;
  cursor: zoom-out;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* ===== Примечания ===== */
.note {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-top: 10px;
}

/* ===== Адаптивность ===== */
@media (max-width: 700px) {
  .header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .nav {
    width: 100%;
    justify-content: flex-start;
    gap: 18px;
    flex-wrap: wrap;
  }
  .hero {
    padding: 28px 20px;
    border-radius: 22px;
  }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .grid { gap: 18px; }
  .card-tile { padding: 20px 18px; }
  .footer .container { gap: 10px; }
  main { padding: 32px 0 48px; }
  .block { margin-bottom: 44px; }
  h2 { font-size: 1.2rem; }
}

@media (max-width: 560px) {
  .versions { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .logo { font-size: 1.5rem; }
  .hero h1 { font-size: 1.6rem; }
  .hero .note { font-size: 0.9rem; padding: 8px 16px; }
  .card-tile h3 { font-size: 1.2rem; }
  h2 { font-size: 1.1rem; }
}

pre {
  background: #f6fbfe;
  border: 1px solid #d4e6f1;
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #1e2b3c;
}

pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: inherit;
  font-size: inherit;
}

/* На узких экранах — меньше шрифт и отступы */
@media (max-width: 560px) {
  pre {
    padding: 14px 16px;
    font-size: 0.78rem;
    border-radius: 10px;
  }
}



  .compare-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0 1.25rem;
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    background: var(--bg-card);
    box-shadow: 0 4px 14px rgba(44, 125, 160, 0.05);
  }

  .compare-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 0.92rem;
    line-height: 1.5;
    background: transparent;
  }

  .compare-table thead th {
    background: var(--bg-soft);
    color: var(--text);
    font-weight: 600;
    text-align: left;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
  }

  .compare-table tbody th {
    text-align: left;
    font-weight: 600;
    color: var(--text);
    background: var(--bg-card);
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-soft);
    white-space: nowrap;
  }

  .compare-table tbody td {
    padding: 12px 18px;
    color: #2a3f54;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: top;
  }

  .compare-table tbody tr:last-child th,
  .compare-table tbody tr:last-child td {
    border-bottom: none;
  }

  /* Чередование строк — мягкое, в цветах --bg-soft */
  .compare-table tbody tr:nth-child(even) th,
  .compare-table tbody tr:nth-child(even) td {
    background: var(--bg-soft);
  }

  /* Акцентная колонка «Интерполятор» */
  .compare-table tbody td.compare-table__best {
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-weight: 600;
  }

  .compare-table thead th.compare-table__best {
    background: #d6ebf8;
    color: var(--accent-dark);
  }

  /* Ховер строки — как у .version / .gallery */
  .compare-table tbody tr:hover th,
  .compare-table tbody tr:hover td {
    background: #eef7fd;
  }
  .compare-table tbody tr:hover td.compare-table__best {
    background: #dceefb;
  }

  @media (max-width: 560px) {
    .compare-table {
      font-size: 0.82rem;
    }
    .compare-table thead th,
    .compare-table tbody th,
    .compare-table tbody td {
      padding: 10px 12px;
    }
  }

  /* Скрытый caption для скринридеров */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
