@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('/assets/fonts/onest-latin.woff2') format('woff2'); 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: 'Onest'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('/assets/fonts/onest-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('/assets/fonts/onest-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('/assets/fonts/onest-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
/* DevNoPay — стили по дизайн-хендоффу. Токены ниже, компоненты по порядку страниц. */
:root {
  --bg: #E7EAF1;
  --surface: #FFFFFF;
  --surface-2: #F2F5F9;
  --ink: #121019;
  --ink-hover: #2A2733;
  --muted: #8A90A8;
  --muted-2: #A9AEC2;
  --text-2: #5B6178;
  --line: #E3E6EE;
  --line-soft: #EEF0F5;
  --accent: #D8FA3C;
  --accent-soft: #F1FCD3;
  --r-card: 24px;
  --r-btn: 16px;
  --gap: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; padding: 16px 24px 0;
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 400 15px/1.3 'Onest', system-ui, -apple-system, 'Segoe UI', 'Hiragino Sans', 'Yu Gothic UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--text-2); }
input, select, button { font-family: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; }
p { text-wrap: pretty; }
svg.ic { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

#header, main, #footer { width: 100%; max-width: 1360px; margin: 0 auto; }
main { flex: 1; display: flex; flex-direction: column; gap: 96px; padding-bottom: 96px; }
main > :first-child { padding-top: 24px; }

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

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 20px; border: 0; border-radius: var(--r-btn);
  background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-hover); color: #fff; }
.btn-outline { border: 1px solid var(--line); }
.btn-outline:hover { background: var(--surface-2); }
.btn-accent { background: var(--accent); }
.btn-soft { background: var(--surface-2); }
.btn-soft:hover { background: var(--bg); }
.btn-lg { height: 56px; }
.btn-icon { width: 52px; padding: 0; font-size: 18px; }
.chip-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-2); font-size: 15px; font-weight: 600; }

/* ---------- Шапка ---------- */
#header { display: flex; align-items: center; gap: 24px; padding: 8px 0 24px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 600; letter-spacing: -0.03em; }
.logo:hover { color: var(--ink); }
.logo-mark { height: 52px; padding: 0 14px; border-radius: 16px; background: var(--accent); color: var(--ink); display: grid; place-items: center; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
#header nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; margin-left: 24px; }
#header nav a { padding: 12px 18px; border-radius: 14px; font-size: 15px; font-weight: 500; transition: background .15s ease; }
#header nav a:hover, #header nav a.active { background: var(--surface); color: var(--ink); }
.header-side { display: flex; gap: 8px; }
.header-side .btn-soft { padding: 0 22px; }
.lang { position: relative; }
.lang > .btn { padding: 0 16px 0 18px; gap: 10px; }
.lang > .btn span { display: grid; color: var(--muted); }
.lang > .btn svg.ic { width: 14px; height: 14px; }
.lang-menu {
  position: absolute; top: 58px; right: 0; z-index: 10; min-width: 160px; padding: 4px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border-radius: 16px; box-shadow: 0 12px 32px rgba(18, 16, 25, .08);
}
.lang-menu a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 0; border-radius: 12px; background: transparent; font-size: 15px; text-align: left; }
.lang-menu a:hover, .lang-menu a.active { background: var(--surface-2); color: var(--ink); }
.lang-menu a span { color: var(--muted); }

/* ---------- Секции и заголовки ---------- */
.section { display: flex; flex-direction: column; gap: 28px; }
.section-head, .page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.head-text { display: flex; flex-direction: column; gap: 16px; }
.section-head h2 { font-size: clamp(40px, 4.4vw, 60px); letter-spacing: -0.04em; line-height: 1; }
.head-text p { font-size: 18px; color: var(--muted); max-width: 420px; line-height: 1.3; }
.section-head .head-text p { max-width: 360px; }
.page-head h1 { font-size: clamp(48px, 5.6vw, 76px); letter-spacing: -0.045em; line-height: 1; }
.search { height: 56px; width: min(100%, 420px); padding: 0 20px; border: 0; border-radius: 16px; background: var(--surface); font-size: 15px; outline: none; }
.notice { align-self: flex-start; padding: 10px 14px; border-radius: 12px; background: var(--surface); color: var(--text-2); font-size: 14px; }

.chips { display: flex; gap: 4px; flex-wrap: wrap; align-self: flex-start; padding: 4px; border-radius: 18px; background: var(--surface); }
.chips:empty { display: none; }
.chips button { padding: 12px 20px; border: 0; border-radius: 14px; background: transparent; font-size: 15px; font-weight: 500; transition: background .15s ease; }
.chips button:hover { background: var(--surface-2); }
.chips button.active { background: var(--ink); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--gap); }
.rows { display: flex; flex-direction: column; gap: var(--gap); }
.rows.group + .rows.group { margin-top: 8px; }
.group-title { margin: 16px 0 8px; font-size: 28px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.group-title .count { margin-left: 6px; font-size: 15px; color: var(--muted-2); letter-spacing: 0; }
.empty { padding: 48px; border-radius: var(--r-card); background: var(--surface); text-align: center; color: var(--muted); font-size: 16px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; color: var(--text-2); }
.pager button { width: 52px; height: 52px; border: 0; border-radius: 16px; background: var(--surface); font-size: 18px; }
.pager button:disabled { opacity: .4; cursor: default; }

/* ---------- Строка каталога ---------- */
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 18px; border-radius: var(--r-card); background: var(--surface); scroll-margin-top: 24px; }
.row.highlight { box-shadow: 0 0 0 2px var(--ink); }
.row-main { flex: 1 1 560px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 16px; align-items: center; min-width: 0; }
.row-id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.avatar { width: 52px; height: 52px; border-radius: 16px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 18px; flex-shrink: 0; }
.col { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.col .name { font-size: 17px; font-weight: 500; }
.col .val { font-size: 16px; font-weight: 500; }
.col .text { font-size: 15px; line-height: 1.3; }
.col .lbl { font-size: 12px; color: var(--muted-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; justify-self: start; }
.tag { padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 12px; font-weight: 500; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Главная ---------- */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; align-items: stretch; }
.hero-text { display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font-size: clamp(48px, 6.4vw, 88px); line-height: .98; letter-spacing: -0.045em; }
.hero-sub { font-size: 20px; line-height: 1.35; color: var(--muted); max-width: 440px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--gap); margin-top: auto; max-width: 520px; }
.stat { height: 190px; padding: 22px; border-radius: var(--r-card); background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; transition: background .15s ease; }
.stat:hover { background: #F7F9FB; color: var(--ink); }
.stat-top { display: flex; justify-content: space-between; align-items: flex-start; }
.stat .num { font-size: 44px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.stat:nth-child(2) .chip-icon { background: var(--accent-soft); }
.stat-label { font-size: 15px; line-height: 1.25; color: var(--text-2); }

.finder { padding: 24px; border-radius: var(--r-card); background: var(--surface); display: flex; flex-direction: column; gap: 16px; }
.segment { display: flex; gap: 4px; align-self: flex-start; padding: 4px; border-radius: 16px; background: var(--surface-2); }
.segment button { padding: 12px 22px; border: 0; border-radius: 12px; background: transparent; font-size: 15px; font-weight: 500; }
.segment button.active { background: var(--accent); }
.finder-title { font-size: 28px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.finder-sub { margin-top: 6px; font-size: 15px; color: var(--muted-2); }
.finder label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-2); }
.finder input { height: 56px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--surface-2); font-size: 15px; outline: none; }
.finder-results a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.finder-results b { font-weight: 500; }
.finder-results span { font-size: 13px; color: var(--muted); text-align: right; }
.finder > .btn { margin-top: auto; }

.sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--gap); }
.section-card { min-height: 300px; padding: 24px; border-radius: var(--r-card); background: var(--surface); display: flex; flex-direction: column; gap: 12px; transition: transform .15s ease; }
.section-card:hover { transform: translateY(-2px); color: var(--ink); }
.section-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.section-card h3 { font-size: 28px; letter-spacing: -0.03em; line-height: 1.05; }
.section-card .num { min-width: 52px; width: auto; padding: 0 12px; }
.section-card p { font-size: 15px; color: var(--muted); max-width: 240px; }
.section-card .open { margin-top: auto; display: flex; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 500; }
.section-card:nth-child(2) { background: var(--accent-soft); }
.section-card:nth-child(2) .num { background: var(--accent); }
.section-card:nth-child(4) { background: var(--surface-2); }
.section-card:nth-child(4) .num { background: var(--surface); }

.carousel-nav { display: flex; gap: 4px; }
.home-articles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.home-articles > :nth-child(n+5) { display: none; }

.faq-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: var(--gap); }
.faq-wrap .head-text { padding: 8px 24px 24px 0; }
.faq-wrap h2 { font-size: clamp(40px, 4.4vw, 60px); letter-spacing: -0.04em; line-height: 1; }
.faq { padding: 12px 24px; border-radius: var(--r-card); background: var(--surface); }
.faq-item { border-bottom: 1px solid var(--line-soft); }
.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { font-size: inherit; }
.faq-item button { width: 100%; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border: 0; background: transparent; font-size: 17px; font-weight: 500; text-align: left; }
.faq-item.closed p { display: none; }
.faq-item .when-open, .faq-item.closed .when-closed { display: block; }
.faq-item .when-closed, .faq-item.closed .when-open { display: none; }
.faq-item p { margin-bottom: 18px; font-size: 15px; line-height: 1.45; color: var(--text-2); max-width: 560px; }

/* ---------- Карточка статьи ---------- */
.article-card { min-height: 260px; padding: 22px; border-radius: var(--r-card); background: var(--surface); display: flex; flex-direction: column; gap: 10px; transition: background .15s ease; }
.article-card:hover { background: #FBFCFD; color: var(--ink); }
.article-card .kb-tag { align-self: flex-start; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); font-size: 12px; font-weight: 500; }
.article-card h3 { font-size: 24px; letter-spacing: -0.03em; line-height: 1.08; overflow-wrap: anywhere; }
.article-card p { font-size: 15px; color: var(--muted-2); }
.article-card .date { margin-top: auto; font-size: 12px; color: var(--muted-2); }
.article-card .cover { margin-top: auto; height: 170px; border-radius: 16px; background: var(--surface-2) center / cover no-repeat; }
.article-card .cover + .date { margin-top: 0; }

/* ---------- Статья ---------- */
.article-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--gap); align-items: start; }
.article { grid-column: span 2; min-width: 0; padding: clamp(24px, 4vw, 48px); border-radius: var(--r-card); background: var(--surface); display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 720px) { .article { grid-column: auto; } }
.back { align-self: flex-start; height: 44px; padding: 0 16px; border-radius: 12px; font-size: 14px; }
.article .meta { font-size: 13px; color: var(--muted-2); }
.article h1 { font-size: clamp(36px, 4.4vw, 56px); letter-spacing: -0.04em; line-height: 1.02; overflow-wrap: anywhere; }
.article .lead { font-size: 20px; color: var(--muted); line-height: 1.4; max-width: 640px; }
.article-body { font-size: 17px; line-height: 1.6; overflow-wrap: anywhere; }
.article-body > * { max-width: 680px; margin: 0 0 1em; }
.article-body h2 { margin-top: 1.6em; font-size: 28px; letter-spacing: -0.03em; line-height: 1.1; }
.article-body h3 { margin-top: 1.4em; font-size: 22px; letter-spacing: -0.02em; line-height: 1.15; }
.article-body a { text-decoration: underline; text-underline-offset: 3px; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body li { margin-bottom: .4em; }
.article-body figure, .article-body pre, .article-body table { max-width: 100%; }
.article-body figure { margin: 1.5em 0; }
.article-body img { display: block; max-width: 100%; height: auto; border-radius: 16px; }
.article-body img.channel-banner { max-width: 240px; }
.article-body figcaption { margin-top: 8px; font-size: 13px; color: var(--muted-2); }
.article-body blockquote { padding: 16px 20px; border-radius: 16px; background: var(--surface-2); }
.article-body pre { padding: 16px; border-radius: 16px; background: var(--surface-2); overflow-x: auto; font: 14px/1.5 ui-monospace, 'Cascadia Mono', Consolas, 'SFMono-Regular', Menlo, monospace; }
.article-body code { padding: 2px 6px; border-radius: 6px; background: var(--surface-2); font: .9em ui-monospace, 'Cascadia Mono', Consolas, 'SFMono-Regular', Menlo, monospace; }
.article-body pre code { padding: 0; background: none; font-size: inherit; }
.article-body table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.article-body td, .article-body th { padding: 8px 12px; border: 1px solid var(--line); text-align: left; }
.tg-block { margin-top: 16px; padding: 24px; border-radius: 20px; background: var(--surface-2); display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.tg-block .chip-icon { background: var(--accent); }
.tg-block-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 4px; }
.tg-block-text span { font-size: 12px; color: var(--muted); }
.tg-block-text p { font-size: 16px; line-height: 1.4; font-weight: 500; }
.tg-block .btn { padding: 0 28px; }
.article-links { display: flex; flex-wrap: wrap; gap: 8px; }
.aside { display: flex; flex-direction: column; gap: var(--gap); }
.aside-head { padding: 24px; border-radius: var(--r-card); background: var(--accent-soft); display: flex; flex-direction: column; gap: 12px; }
.aside-head h2 { font-size: 24px; font-weight: 500; letter-spacing: -0.03em; }
.aside-head p { font-size: 15px; color: var(--text-2); }
.more-item { padding: 20px; border-radius: var(--r-card); background: var(--surface); display: flex; justify-content: space-between; gap: 12px; transition: background .15s ease; }
.more-item:hover { background: #FBFCFD; color: var(--ink); }
.more-item b { display: block; margin-bottom: 6px; font-size: 17px; font-weight: 500; line-height: 1.2; overflow-wrap: anywhere; }
.more-item small { font-size: 12px; color: var(--muted-2); }

/* ---------- О проекте ---------- */
.about-lead { font-size: 20px; color: var(--muted); max-width: 620px; line-height: 1.35; }
.about-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: var(--gap); }
.about-card { min-height: 280px; padding: 28px; border-radius: var(--r-card); background: var(--surface); display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 24px; }
.about-card:nth-child(2) { background: var(--surface-2); }
.about-card-top { display: flex; justify-content: space-between; gap: 16px; }
.about-card h2 { font-size: 32px; letter-spacing: -0.03em; line-height: 1.05; overflow-wrap: anywhere; }
.about-card:nth-child(1) .chip-icon { background: var(--accent); }
.about-card:nth-child(2) .chip-icon { background: var(--surface); }
.about-card p { margin-top: auto; font-size: 16px; line-height: 1.5; color: var(--text-2); max-width: 460px; }

/* ---------- Футер ---------- */
#footer { padding: 32px; border-radius: 28px 28px 0 0; background: var(--ink); color: #fff; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.footer-col { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.footer-col > span, .footer-col small { font-size: 12px; color: var(--muted); }
.footer-col a { color: #C9CCD8; font-size: 14px; }
.footer-col a:hover { color: #fff; }
#footer .logo { font-size: 22px; color: #fff; }
.footer-col p { font-size: 14px; color: var(--muted); line-height: 1.4; max-width: 240px; }
#footer .to-top { align-self: flex-end; width: 52px; height: 52px; border: 1px solid #3A3744; border-radius: 16px; background: transparent; color: #fff; display: grid; place-items: center; }
#footer .btn { padding: 0 24px; color: var(--ink); font-size: 15px; }

/* ---------- Модалки и toast ---------- */
dialog.modal { width: min(100% - 32px, 480px); padding: 32px; border: 0; border-radius: 28px; background: var(--surface); color: var(--ink); }
dialog.modal[open] { display: flex; flex-direction: column; gap: 20px; }
dialog.modal::backdrop { background: rgba(18, 16, 25, .45); backdrop-filter: blur(8px); }
.modal .chip-lg { width: 56px; height: 56px; border-radius: 18px; background: var(--surface-2); display: grid; place-items: center; }
.modal .chip-lg.accent { background: var(--accent); }
.modal-text { display: flex; flex-direction: column; gap: 12px; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.modal h2 { font-size: 32px; letter-spacing: -0.035em; line-height: 1.05; }
.modal-text p { font-size: 16px; line-height: 1.45; color: var(--text-2); }
.plate { padding: 14px 16px; border-radius: 16px; background: var(--surface-2); display: flex; align-items: center; gap: 12px; }
.plate-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; flex-shrink: 0; }
.plate-icon.brand { width: auto; padding: 0 8px; background: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: -0.02em; }
.plate b { display: block; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.plate small { font-size: 12px; color: var(--muted); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.modal-actions .btn { padding: 0 24px; }
.modal-close { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--text-2); display: grid; place-items: center; }
.modal-close:hover { background: var(--surface-2); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 110; padding: 14px 20px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14px; }

@media (max-width: 640px) {
  body { padding: 12px 16px 0; }
  #header nav { margin-left: 0; order: 3; flex-basis: 100%; }
  .header-side { margin-left: auto; }
  main { gap: 64px; padding-bottom: 64px; }
  .row-actions .btn { flex: 1 1 auto; }
}
