/* Те же токены, что у витрины (fastoshop/app/storefront/static/style.css):
   клиент переходит с лендинга в демо-магазин и не должен почувствовать стык. */
:root {
  --bg: #fdfcfa;
  --surface: #fff;
  --text: #1c1a17;
  --muted: #6f6a62;
  --line: #e7e2da;
  --accent: #b4532a;
  --accent-hover: #9a4522;
  --accent-soft: #fbf1ec;
  --ok: #1f7a45;
  --radius: 12px;
  --shadow:
    0 1px 2px rgba(28, 26, 23, 0.05), 0 8px 24px -12px rgba(28, 26, 23, 0.15);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171513;
    --surface: #201d1a;
    --text: #f2ece4;
    --muted: #a49c91;
    --line: #322d28;
    --accent: #e0784a;
    --accent-hover: #ef8c60;
    --accent-soft: #2b211b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  }
}

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

body {
  /* Системные шрифты: веб-шрифт стоил бы 100 КБ и один блокирующий запрос на
     странице, которая продаёт скорость. */
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--accent);
}

header,
section,
footer {
  max-width: 1000px;
  margin: 0 auto;
  padding-inline: 20px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
  flex-wrap: wrap;
}
.brand {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
}
header nav {
  display: flex;
  gap: 20px;
  align-items: center;
  font-weight: 600;
}
header nav a {
  color: var(--muted);
  text-decoration: none;
}
header nav a:hover {
  color: var(--accent);
}

h1 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
h2 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}
p {
  margin-bottom: 14px;
}
.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 62ch;
}
.muted {
  color: var(--muted);
}
section {
  padding-block: 56px;
}
section + section {
  border-top: 1px solid var(--line);
}

.btn,
.btn-ghost {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s;
}
.btn {
  background: var(--accent);
  color: #fff;
}
.btn:hover {
  background: var(--accent-hover);
}
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
}
.btn-ghost:hover {
  background: var(--accent-soft);
}
.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.shot {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 28px;
}

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 28px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.step {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.split {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: center;
}
@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
}
th,
td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
td.price {
  font-weight: 700;
  white-space: nowrap;
}
.wrap {
  overflow-x: auto;
}

.plan {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--surface);
}
.plan.main {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.plan .amount {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.plan ul {
  margin: 14px 0 0 18px;
  padding: 0;
  color: var(--muted);
}
.plan li {
  margin-bottom: 6px;
}

details {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
summary {
  font-weight: 600;
  cursor: pointer;
}
details p {
  margin: 10px 0 0;
  color: var(--muted);
}

.note {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 24px;
}

footer {
  padding-block: 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}
footer a {
  color: inherit;
}

/* Статья блога. Пять классов и ни одного больше: BLOG_RULES.md запрещает
   заводить новые, иначе через десять статей вёрстка расползётся. */
.post {
  max-width: 68ch;
}
.post h2 {
  margin-top: 36px;
}
.post h3 {
  margin-top: 24px;
}
.post p,
.post li {
  font-size: 1.05rem;
}
.post ul,
.post ol {
  margin: 0 0 14px 22px;
  padding: 0;
}
.post li {
  margin-bottom: 8px;
}
.post-byline {
  color: var(--muted);
  margin-bottom: 2px;
}
.post-date {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 28px;
}
.post .cta {
  margin-top: 36px;
}

/* Таблица в статье шире экрана телефона — прокручиваем её саму, а не страницу. */
.table-wrap {
  overflow-x: auto;
  margin-bottom: 14px;
}
.table-wrap table {
  min-width: 480px;
}

.post-card {
  display: block;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.post-card:hover h2 {
  color: var(--accent);
}
.post-card h2 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}
.post-card p {
  color: var(--muted);
  margin-bottom: 4px;
}
