/* Swapix AI blog: server-rendered pages in the same neutral system as the website. */
@font-face { font-family: Onest; src: url(fonts/onest-cyrillic.woff2?v=37268be) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; src: url(fonts/onest-latin.woff2?v=37268be) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Unbounded; src: url(fonts/unbounded-cyrillic.woff2?v=37268be) format("woff2"); font-weight: 200 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Unbounded; src: url(fonts/unbounded-latin.woff2?v=37268be) format("woff2"); font-weight: 200 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: dark;
  --bg: #1c1c1e;
  --bg-deep: #161618;
  --panel: #232326;
  --panel-2: #2b2b2f;
  --line: #313136;
  --line-2: #414147;
  --text: #ededf0;
  --text-2: #b6b6bd;
  --muted: #8e8e96;
  --primary: #f1f1f3;
  --primary-ink: #161618;
  --font-text: Onest, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: Unbounded, Onest, ui-sans-serif, system-ui, sans-serif;
  --gutter: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-text); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid rgb(241 241 243 / .9); outline-offset: 4px; border-radius: 6px; }
h1, h2, h3, h4 { overflow-wrap: anywhere; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; }
p { color: var(--text-2); }

.site-head, main, footer { width: min(1180px, 100%); margin: 0 auto; padding-inline: var(--gutter); }
.site-head { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: max(8px, env(safe-area-inset-top)) 8px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-name { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.03em; white-space: nowrap; }
.brand-name small { margin-left: 3px; color: var(--muted); font-family: var(--font-text); font-size: 13px; font-weight: 600; letter-spacing: 0; }
/* The old header (before the shared .public-header of site-header.css); kept scoped so it cannot style the new one. */
.site-head nav { display: flex; align-items: center; gap: 2px; }
.site-head nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 10px; color: var(--text-2); font-size: 15px; font-weight: 500; }
.site-head nav a:hover { background: var(--panel-2); color: var(--text); }
.site-head nav a[href^="/#"] { display: none; }
.site-head nav .cabinet { margin-left: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-size: 14px; font-weight: 650; }
.site-head nav .cabinet:hover { background: #fff; color: var(--primary-ink); }

.journal-intro { max-width: 680px; padding: 48px 0 32px; }
.journal-intro h1 { margin: 0 0 14px; font-size: clamp(34px, 9vw, 64px); }
.journal-intro p { margin: 0; font-size: 18px; }
.journal-intro.missing { padding-bottom: 80px; }
.journal-intro.missing .back { margin-top: 24px; }

.story-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.story-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); transition: border-color .15s ease, background-color .15s ease; }
.story-card:hover { border-color: var(--line-2); background: var(--panel-2); }
.story-card > a { height: 100%; display: flex; flex-direction: column; }
.story-card img, .cover-placeholder { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: 1px solid var(--line); }
.cover-placeholder { display: grid; place-items: center; background: linear-gradient(135deg, #2b2b2f, #1d1d20); color: var(--muted); font-size: 40px; }
.story-copy { flex: 1; display: flex; flex-direction: column; padding: 20px; }
.story-copy time { color: var(--muted); font-size: 13px; }
.story-copy h2 { margin: 10px 0 8px; font-size: 21px; line-height: 1.2; }
.story-copy p { margin: 0; font-size: 15px; }
.read { margin-top: auto; padding-top: 18px; color: var(--text); font-size: 14px; font-weight: 600; }
.empty { grid-column: 1 / -1; padding: 30px 0; color: var(--muted); }
.pagination { display: flex; justify-content: space-between; gap: 12px; padding: 28px 0; }
.pagination a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 12px; font-weight: 550; }
.pagination a:hover { background: var(--panel-2); }
.pagination a { color: var(--text-2); font-size: 15px; }
.pagination a:hover { color: var(--text); }

.article { max-width: 760px; margin: 0 auto; padding: 24px 0 64px; }
.back { min-height: 44px; display: inline-flex; align-items: center; margin-bottom: 18px; color: var(--text-2); font-weight: 500; }
.back:hover { color: var(--text); }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 14px; }
.article h1 { margin: 12px 0 16px; font-size: clamp(30px, 7.4vw, 54px); }
.lead { margin: 0; color: var(--text-2); font-size: 19px; line-height: 1.55; }
.article-cover { display: block; width: 100%; height: auto; margin: 32px 0 8px; border: 1px solid var(--line); border-radius: 18px; object-fit: cover; }
.prose { margin: 32px 0 40px; font-size: 17px; line-height: 1.75; overflow-wrap: anywhere; }
.prose p, .prose li { color: #d3d3d8; }
.prose h2 { margin: 44px 0 14px; font-size: 26px; }
.prose h3 { margin: 34px 0 10px; font-size: 21px; font-weight: 650; }
.prose h4 { margin: 28px 0 8px; font-size: 18px; font-weight: 650; }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.prose a:hover { text-decoration-color: var(--text); }
.prose ul { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose blockquote { margin: 26px 0; padding: 16px 20px; border-left: 3px solid var(--text-2); border-radius: 0 12px 12px 0; background: var(--panel); color: var(--text-2); }
.prose pre { padding: 18px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-deep); }
.prose code { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; font-size: .88em; }
.prose img { display: block; max-width: 100%; height: auto; margin: 28px auto; border-radius: 14px; }
.article-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 24px; border-top: 1px solid var(--line); }
.article-end .cabinet { min-height: 44px; display: inline-flex; align-items: center; padding: 0 18px; border-radius: 12px; background: var(--primary); color: var(--primary-ink); font-weight: 650; }

footer { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 32px; padding-block: 26px max(26px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer a:hover { color: var(--text); }

@media (min-width: 620px) {
  :root { --gutter: 28px; }
  .site-head nav a[href^="/#"] { display: inline-flex; }
  .journal-intro { padding: 72px 0 40px; }
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .article { padding-top: 40px; }
  .prose { font-size: 18px; }
}
@media (min-width: 960px) {
  .story-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* @blogai: breadcrumbs, article header, table of contents, call to action, related articles, feeds. */
.crumbs { max-width: 760px; margin: 0 auto; padding-top: 20px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: '/'; margin: 0 8px; color: var(--line-2); }
.crumbs a { min-height: 32px; display: inline-flex; align-items: center; color: var(--text-2); }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { overflow: hidden; max-width: 46ch; text-overflow: ellipsis; white-space: nowrap; }
.crumbs + .article { padding-top: 12px; }
.article-head { margin: 0; }
.article-meta .byline { color: var(--text-2); font-weight: 600; }
.lang-link { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.lang-link:hover { color: var(--text); }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: 84px; }
.prose ol { padding-left: 24px; }
.prose ol li + li { margin-top: 6px; }
.toc { margin: 32px 0 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.toc-title { margin: 0 0 8px; color: var(--text); font-size: 15px; font-weight: 650; }
/* Headings often carry their own numbers ("1. Create a bot"), so the list shows none. */
.toc ol { margin: 0; padding: 0; list-style: none; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.toc ol ol { margin-top: 4px; padding-left: 16px; border-left: 1px solid var(--line); font-size: 14px; }
.toc li + li { margin-top: 4px; }
.toc a { color: var(--text-2); }
.toc a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.cta-card { display: grid; gap: 16px; align-items: center; margin: 36px 0; padding: 22px; border: 1px solid var(--line-2); border-radius: 18px; background: linear-gradient(135deg, #2b2b2f, #1f1f22); }
.cta-card p { margin: 0; }
.cta-card .cta-title { margin-bottom: 6px; color: var(--text); font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.prose .cta-card p { color: var(--text-2); }
.prose .cta-card .cta-title, .cta-card .cta-title { color: var(--text); }
.cta-button, .prose a.cta-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; justify-self: start; padding: 0 22px; border-radius: 12px; background: var(--primary); color: var(--primary-ink); font-weight: 650; text-decoration: none; white-space: nowrap; }
.cta-button:hover, .prose a.cta-button:hover { background: #fff; }
.article-end a { color: var(--text-2); font-weight: 500; }
.article-end a:hover { color: var(--text); }
.article-end span { color: var(--muted); font-size: 14px; }
.related { max-width: 1180px; margin: 0 auto; padding: 8px 0 32px; }
.related > h2 { margin: 0 0 18px; font-size: clamp(24px, 5vw, 32px); }
.story-copy h3 { margin: 10px 0 8px; font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; }
.feeds { display: flex; gap: 14px; margin-top: 16px !important; font-size: 14px !important; }
.feeds a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.feeds a:hover { color: var(--text); }
@media (min-width: 620px) {
  .cta-card { grid-template-columns: minmax(0, 1fr) auto; padding: 26px 28px; }
  .cta-button, .prose a.cta-button { justify-self: end; }
}

/* The documents (src/web/legal.js): the link to all blog articles under «Из блога». */
.legal-more { margin: 16px 0 0; }
.legal-more a { color: var(--text-2); font-weight: 600; }
.legal-more a:hover { color: var(--text); }
