:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --border: #e3e6ea;
  --text: #16191d;
  --muted: #5c646e;
  --accent: #2481cc;
  --accent-ink: #ffffff;
  --radius: 12px;
  --maxw: 860px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --surface: #1c2025;
    --border: #2a2f36;
    --text: #e8eaed;
    --muted: #9aa3ad;
    --accent: #4a9fe0;
    --accent-ink: #0d1013;
  }
}

* { box-sizing: border-box; }

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

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

/* header */
header {
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--bg);
  z-index: 10;
}
header .wrap {
  display: flex; align-items: center; gap: 16px;
  min-height: 60px; flex-wrap: wrap;
}
.brand {
  font-weight: 700; font-size: 17px; letter-spacing: -0.2px;
  color: var(--text); text-decoration: none; margin-right: auto;
}
nav a {
  color: var(--muted); text-decoration: none; font-size: 15px;
  padding: 4px 0; margin-left: 18px; white-space: nowrap;
}
nav a:hover, nav a[aria-current="page"] { color: var(--text); }

.langs { display: flex; gap: 6px; margin-left: 18px; }
.langs a {
  font-size: 13px; color: var(--muted); text-decoration: none;
  padding: 2px 7px; border: 1px solid var(--border); border-radius: 6px;
}
.langs a[aria-current="true"] { color: var(--text); border-color: var(--muted); }

/* content */
main { padding: 48px 0 64px; }
h1 { font-size: 34px; line-height: 1.2; letter-spacing: -0.6px; margin: 0 0 16px; }
h2 { font-size: 21px; letter-spacing: -0.3px; margin: 40px 0 12px; }
h3 { font-size: 17px; margin: 26px 0 8px; }
p { margin: 0 0 14px; }
.lead { font-size: 18px; color: var(--muted); margin-bottom: 28px; }
.muted { color: var(--muted); }
small { color: var(--muted); font-size: 14px; }
a { color: var(--accent); }

ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 7px; }

.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  text-decoration: none; font-weight: 600; font-size: 16px;
  padding: 12px 22px; border-radius: var(--radius);
}
.btn:hover { opacity: .9; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 20px 0 8px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; padding-left: 40px; position: relative; margin-bottom: 14px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 14px; font-weight: 600;
}

.price {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px; margin: 22px 0;
}
.price .amount { font-size: 32px; font-weight: 700; letter-spacing: -0.8px; }
.price .per { color: var(--muted); font-size: 16px; font-weight: 400; }

.table-scroll { overflow-x: auto; margin: 0 0 18px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-weight: 600; color: var(--muted); font-size: 14px; }
tbody tr:last-child td { border-bottom: none; }
.save { color: var(--accent); font-weight: 600; }

.note {
  border-left: 3px solid var(--border); padding: 2px 0 2px 16px;
  color: var(--muted); font-size: 15px; margin: 18px 0;
}

/* photos */
figure { margin: 26px 0; }
figure img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius); border: 1px solid var(--border);
}
figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; line-height: 1.55; }

/* макет сообщения, которое присылает бот */
.tg {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin: 24px 0;
}
.tg-bubble {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; max-width: 480px;
  font-size: 15px; line-height: 1.55;
}
.tg-text { margin: 0 0 12px; }
.tg-text u { text-decoration-color: var(--accent); text-underline-offset: 3px; }
.tg-sep { color: var(--border); letter-spacing: -1px; margin-bottom: 10px; user-select: none; }
.tg-meta { margin: 0 0 9px; font-size: 14px; }
.tg-meta:last-of-type { margin-bottom: 0; }
.tg-link { color: var(--accent); }
.tg-btns { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.tg-btns span {
  flex: 1; min-width: 110px; text-align: center;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 10px; font-size: 13px; color: var(--muted); background: var(--surface);
}

dl dt { font-weight: 600; margin-top: 16px; }
dl dd { margin: 4px 0 0; color: var(--muted); }

footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 40px; font-size: 14px; color: var(--muted);
}
footer .wrap { display: flex; gap: 8px 20px; flex-wrap: wrap; align-items: baseline; }
footer a { color: var(--muted); }
footer .legal { margin-left: auto; }

@media (max-width: 620px) {
  h1 { font-size: 27px; }
  main { padding: 34px 0 44px; }
  nav a { margin-left: 0; margin-right: 16px; }
  header .wrap { padding-top: 10px; padding-bottom: 10px; }
  .brand { margin-right: 0; width: 100%; }
  footer .legal { margin-left: 0; width: 100%; }
}
