:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #555;
  --border: #e3e3e3;
  --code-bg: #f4f4f6;
  --code-fg: #b03050;
  --link: #1558d6;
  --cta-bg: #229ed9;
  --cta-fg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --fg: #e6e6e6;
    --muted: #a0a0a0;
    --border: #2c2c2c;
    --code-bg: #1f2630;
    --code-fg: #ffb86c;
    --link: #6ea8fe;
  }
}

* { box-sizing: border-box; }

/* Вертикальные отступы — только margin-bottom */
h1, h2, h3, h4, h5, h6, p, ul, ol, table, section, figure {
  margin-top: 0;
  margin-bottom: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1 {
  font-size: 2rem;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.page-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-size: 1.6rem;
  line-height: 1.25;
  margin-bottom: 0.5rem;
  border-bottom: none;
  padding-bottom: 0;
}

h2 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}

h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

p, li { font-size: 1rem; }
p { margin-bottom: 1rem; }

ul, ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.tagline {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 0.5rem;
}

.hero-text {
  flex: 1 1 0;
  min-width: 0;
}

.hero-image {
  flex: 0 0 240px;
  width: 240px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

@media (max-width: 640px) {
  .hero {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 1.25rem;
  }

  .hero-image {
    flex: 0 0 auto;
    width: 100%;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }
}

code {
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  font-family: "SF Mono", "Menlo", "Monaco", "Consolas", "Liberation Mono", monospace;
  font-size: 0.9em;
  font-weight: 500;
  white-space: nowrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th, td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cta {
  display: inline-block;
  background: var(--cta-bg);
  color: var(--cta-fg);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 1.5rem;
  transition: opacity 0.15s ease;
}

.cta:hover {
  opacity: 0.9;
  text-decoration: none;
  color: var(--cta-fg);
}

footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}
