:root {
  --text: #1c2027;
  --muted: #5b6472;
  --border: #dfe3ea;
  --accent: #3b5bdb;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.site {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: baseline;
  padding: 18px max(20px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--border);
}

.site footer, footer.site { border: 0; }

header.site { position: sticky; top: 0; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); }

.brand { font-weight: 700; text-decoration: none; color: var(--text); }

nav { display: flex; flex-wrap: wrap; gap: 12px; font-size: 14px; }

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

main {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

h1 { font-size: 30px; line-height: 1.25; margin: 0 0 18px; }
h2 { font-size: 22px; margin: 34px 0 12px; }
h3 { font-size: 18px; margin: 26px 0 10px; }
h4 { font-size: 16px; margin: 22px 0 8px; }

p, li { color: var(--text); }

a { color: var(--accent); }

hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }

code {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 13.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-word;
}

pre {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
}

pre code { background: none; border: 0; padding: 0; font-size: 13px; }

blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}

blockquote > :first-child { margin-top: 0; }
blockquote > :last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 18px 0; }

table { border-collapse: collapse; width: 100%; font-size: 14.5px; }

th, td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }

th { background: var(--bg-soft); }

ul, ol { padding-left: 22px; }

li { margin: 4px 0; }

li.task { list-style: none; display: flex; gap: 8px; margin-left: -20px; }
li.task .box { color: var(--muted); flex: 0 0 auto; }

del { color: var(--muted); }

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }
img[alt="Иконка приложения"] { width: 96px; height: 96px; margin: 0 0 8px; }
img[alt="Экран приложения"] { border: 1px solid var(--border); max-height: 640px; width: auto; margin: 18px auto; }

footer.site {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
}

@media print {
  header.site { position: static; }
  nav, footer.site { display: none; }
  main { max-width: none; padding: 0; }
  a { color: inherit; }
}
