/* Статьи блога: те же цвета, шрифты и капсулы, что на главной (src/index.css), но без Tailwind и без JS */
@font-face {
  font-family: 'Display';
  src: url('./rs-cyrillic.woff2') format('woff2');
  font-weight: 300 600;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Display';
  src: url('./rs-latin.woff2') format('woff2');
  font-weight: 300 600;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Onest';
  src: url('./onest-cyrillic.woff2') 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('./onest-latin.woff2') 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+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Display Fallback';
  src: local('Times New Roman'), local('TimesNewRomanPSMT'), local('Liberation Serif');
  size-adjust: 98%;
}
@font-face {
  font-family: 'Onest Fallback';
  src: local('Arial'), local('ArialMT'), local('Helvetica'), local('Roboto');
  size-adjust: 103%;
}

:root {
  color-scheme: light;
  --ink: #2b2a29;
  --ink-soft: #5f5d5a;
  --muted: #716e6b;
  --paper: #fff;
  --cloud: #f2f2f1;
  --cloud-2: #e9e9e7;
  --night: #262524;
  --line: #ebebea;
  --go: #0b7a50;
  --sans: 'Onest', 'Onest Fallback', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --display: 'Display', 'Display Fallback', serif;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.65 var(--sans); }
@media (min-width: 640px) { body { font-size: 18px; } }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
img { max-width: 100%; display: block; }
p, li, blockquote { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
::selection { background: #f4d6c6; color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.nw { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Шапка: отдельные стеклянные капсулы, как на главной */
.top { position: sticky; top: 0; z-index: 10; padding: 12px 12px 0; }
.top-in { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.glass {
  background: rgba(255, 255, 255, 0.74);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 0 0 1px rgba(28, 27, 26, 0.07), 0 10px 30px -14px rgba(28, 27, 26, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.logo { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.links { display: none; align-items: center; gap: 2px; height: 46px; padding: 0 6px; border-radius: 999px; }
.links a { padding: 8px 14px; border-radius: 999px; font-size: 15px; text-decoration: none; color: var(--ink-soft); transition: background-color .2s, color .2s; }
.links a:hover, .links a[aria-current] { background: #fff; color: var(--ink); }
.order { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; font-size: 15px; font-weight: 500; transition: background-color .2s, transform .2s; }
.order:hover { background: #000; }
.order:active { transform: scale(.97); }
@media (min-width: 860px) { .links { display: inline-flex; } }

/* Статья */
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.crumbs { margin: 40px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--cloud-2); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
h1 { font: 400 clamp(34px, 7vw, 64px)/1.02 var(--display); letter-spacing: -0.012em; margin: 18px 0 0; }
.lead { margin: 20px 0 0; font-size: clamp(18px, 2.4vw, 21px); line-height: 1.55; color: var(--ink-soft); }
.meta { display: flex; align-items: center; gap: 12px; margin: 26px 0 0; font-size: 14px; color: var(--muted); }
.meta img { width: 40px; height: 40px; border-radius: 999px; object-fit: cover; }
.meta b { display: block; color: var(--ink); font-weight: 500; font-size: 15px; }

.body { margin-top: 36px; }
.body > p, .body > ul, .body > ol { margin: 0 0 18px; }
.body h2 { font: 400 clamp(29px, 4.4vw, 38px)/1.08 var(--display); letter-spacing: -0.01em; margin: 56px 0 16px; }
.body h3 { font-size: 19px; line-height: 1.35; font-weight: 600; margin: 32px 0 8px; }
.body ul, .body ol { padding-left: 0; list-style: none; }
.body ul > li, .body ol > li { position: relative; padding-left: 30px; margin: 0 0 10px; }
.body ul > li::before { content: ''; position: absolute; left: 9px; top: .72em; width: 7px; height: 7px; border-radius: 99px; background: var(--ink); opacity: .55; }
.body ol { counter-reset: n; }
.body ol > li { counter-increment: n; }
.body ol > li::before { content: counter(n); position: absolute; left: 0; top: .18em; width: 22px; height: 22px; border-radius: 99px; background: var(--cloud); font-size: 13px; font-weight: 600; line-height: 22px; text-align: center; }
.body strong { font-weight: 600; }
.body blockquote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--cloud-2); color: var(--ink-soft); }

/* Оглавление */
.toc { margin: 32px 0 0; padding: 20px 22px; border-radius: 20px; background: var(--cloud); }
.toc p { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: t; }
.toc li { counter-increment: t; margin: 0; padding: 4px 0 4px 28px; position: relative; font-size: 16px; line-height: 1.4; }
.toc li::before { content: counter(t); position: absolute; left: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* Цифры крупно */
.stats { display: grid; gap: 10px; margin: 32px 0; grid-template-columns: 1fr; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { padding: 20px 20px 18px; border-radius: 20px; background: var(--cloud); }
.stat b { display: block; font: 400 44px/1 var(--display); letter-spacing: -0.01em; }
.stat span { display: block; margin-top: 10px; font-size: 15px; line-height: 1.4; }
.stat small { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }

/* Таблица: на телефоне листается вбок внутри рамки, страница не уезжает */
.body figure { margin: 28px 0; }
.body figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); background: var(--cloud); }
.body figure figcaption { margin: 10px 2px 0; font-size: 14px; color: var(--muted); }
.table { margin: 24px 0; overflow-x: auto; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); -webkit-overflow-scrolling: touch; }
.table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-weight: 500; color: var(--muted); background: var(--cloud); padding: 12px 14px; font-size: 14px; }
.table td { padding: 12px 14px; border-top: 1px solid var(--line); }
.table td:first-child { font-weight: 500; }
.table td:not(:first-child) { white-space: nowrap; }

/* Призыв: тёмная карточка с полем генератора, как на главной */
.cta { margin: 48px -8px; padding: 32px 24px; border-radius: 28px; background: var(--night); color: #fff; }
@media (min-width: 640px) { .cta { margin: 56px -24px; padding: 40px; } }
.cta h2 { font: 400 clamp(30px, 4.6vw, 40px)/1.05 var(--display); letter-spacing: -0.01em; margin: 0; }
.cta p { margin: 12px 0 0; color: rgba(255, 255, 255, .7); font-size: 16px; }
.cta form { display: flex; gap: 6px; margin-top: 22px; padding: 6px; border-radius: 18px; background: rgba(255, 255, 255, .1); }
.cta input { flex: 1; min-width: 0; height: 46px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: #fff; font: inherit; font-size: 16px; outline: none; }
.cta input::placeholder { color: rgba(255, 255, 255, .5); }
.cta form:focus-within { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .6); }
.cta button { flex-shrink: 0; height: 46px; padding: 0 18px; border: 0; border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; transition: transform .2s, background-color .2s; }
.cta button:hover { background: var(--cloud); }
.cta button:active { transform: scale(.97); }
.cta .alt { margin-top: 16px; font-size: 14px; }
.cta .alt a { color: #fff; }
.cta :focus-visible { outline-color: #fff; }

/* Автор и другие статьи */
.author { display: flex; gap: 16px; align-items: flex-start; margin: 48px 0 0; padding: 22px; border-radius: 20px; box-shadow: 0 0 0 1px var(--line); }
.author img { width: 56px; height: 56px; border-radius: 999px; object-fit: cover; flex-shrink: 0; }
.author b { display: block; font-weight: 600; }
.author p { margin: 4px 0 0; font-size: 15px; color: var(--ink-soft); line-height: 1.5; }
.updated { margin: 28px 0 0; font-size: 14px; color: var(--muted); }

/* Список статей */
.cards { display: grid; gap: 12px; margin: 36px 0 0; }
.card { display: block; padding: 24px; border-radius: 22px; background: var(--cloud); text-decoration: none; transition: background-color .2s; }
.card:hover { background: var(--cloud-2); }
.card h2 { font: 400 clamp(26px, 4vw, 32px)/1.08 var(--display); margin: 0; letter-spacing: -0.01em; }
.card p { margin: 10px 0 0; color: var(--ink-soft); font-size: 16px; line-height: 1.5; }
.card small { display: block; margin-top: 14px; font-size: 14px; color: var(--muted); }

/* Подвал как на главной */
.foot { padding: 12px; margin-top: 80px; }
.foot-in { max-width: 1416px; margin: 0 auto; border-radius: 28px; background: var(--night); color: #fff; padding: 48px 24px; }
.foot-grid { max-width: 1200px; margin: 0 auto; display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot-in { padding: 56px 40px; } .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot p { margin: 0; }
.foot .muted { color: rgba(255, 255, 255, .55); font-size: 14px; }
.foot .about { margin-top: 14px; max-width: 280px; color: rgba(255, 255, 255, .6); font-size: 14px; line-height: 1.6; }
.foot nav a { display: block; padding: 7px 0; color: rgba(255, 255, 255, .85); font-size: 15px; text-decoration: none; }
.foot nav a:hover { color: #fff; }
.foot .small { margin-top: 18px; font-size: 13px; color: rgba(255, 255, 255, .55); }
.foot .small a { color: inherit; }
.foot :focus-visible { outline-color: #fff; }
