/* citep.ru — прототипы шаблонов (2026). Общие стили. */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f0f3f6; --line: #e1e6ec;
  --text: #17202a; --muted: #5b6776; --faint: #8a95a3;
  --brand: #0b6b53; --brand-2: #0e8a6b; --brand-soft: #e3f3ee;
  --accent: #f2a516; --danger: #c0392b; --warn-bg: #fff6e0; --warn-line: #f0d48a;
  --info-bg: #eaf2fb; --info-line: #b9d3ef;
  --radius: 12px; --radius-s: 8px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --tag: #7c3aed;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1418; --surface: #161d23; --surface-2: #1c252c; --line: #2a353e;
    --text: #e8edf2; --muted: #a3afbb; --faint: #7d8995;
    --brand: #3fc59d; --brand-2: #5fd8b2; --brand-soft: #173a31;
    --warn-bg: #3a2f12; --warn-line: #6b5520; --info-bg: #15283b; --info-line: #2b4a6b; --tag: #a78bfa;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -.01em; }
h2 { font-size: clamp(21px, 2.6vw, 26px); margin-top: 0; }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); } .small { font-size: 14px; } .xs { font-size: 12px; }

/* demo banner */
.demo { background: var(--warn-bg); border-bottom: 1px solid var(--warn-line); font-size: 13px; padding: 6px 0; text-align: center; }
.demo button { margin-left: 8px; font: inherit; border: 1px solid var(--warn-line); background: var(--surface); color: var(--text); border-radius: 6px; padding: 2px 8px; cursor: pointer; }

/* header */
.header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header .row { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { font-weight: 800; font-size: 20px; color: var(--text); letter-spacing: -.02em; }
.logo span { color: var(--brand); }
.nav { display: flex; gap: 18px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--text); font-size: 15px; white-space: nowrap; }
.search { border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; background: var(--surface-2); color: var(--muted); font-size: 14px; min-width: 160px; }
@media (max-width: 860px) { .search { display: none; } .header .row { gap: 14px; } }

/* breadcrumbs, meta */
.crumbs { font-size: 13px; color: var(--muted); padding: 14px 0 6px; }
.crumbs a { color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13px; color: var(--muted); margin: 6px 0 18px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-2), var(--brand)); display: inline-block; vertical-align: middle; margin-right: 6px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.badge.gray { background: var(--surface-2); color: var(--muted); }
.badge.warn { background: var(--warn-bg); color: #8a5a00; }

/* layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.layout.single { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 980px) { .layout { grid-template-columns: minmax(0, 1fr); } .aside { order: 2; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.section { margin: 0 0 22px; position: relative; }
.stack > * + * { margin-top: 12px; }

/* block annotations (toggle) */
.blk { position: relative; }
body.show-blocks .blk { outline: 2px dashed var(--tag); outline-offset: 4px; }
.blk-tag { display: none; position: absolute; top: -12px; left: 12px; background: var(--tag); color: #fff; font: 600 11px/1 var(--font); padding: 4px 7px; border-radius: 4px; z-index: 5; max-width: calc(100% - 24px); white-space: normal; }
body.show-blocks .blk-tag { display: block; }

/* lead */
.lead { font-size: 18px; color: var(--text); }
.answer { background: var(--brand-soft); border-left: 4px solid var(--brand); border-radius: var(--radius-s); padding: 14px 16px; }

/* filter */
.filter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: end; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field input[type=range] { width: 100%; accent-color: var(--brand); }
.field .val { font-weight: 700; }
select, .input, .field input[type=search], .field input[type=number] { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--text); font: inherit; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 12px; font-size: 14px; cursor: pointer; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
@media (max-width: 760px) { .filter { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--brand); color: #fff; border: 0; border-radius: var(--radius-s); padding: 11px 18px; font: 600 15px var(--font); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--brand-2); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn.block { width: 100%; }

/* offers */
.offers { display: grid; gap: 12px; }
.offer { display: grid; grid-template-columns: 170px repeat(4, minmax(0, 1fr)) 170px; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.offer .mfo { display: flex; gap: 10px; align-items: center; }
.logo-ph { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; color: var(--muted); flex: none; }
.offer .name { font-weight: 700; }
.kv .k { font-size: 12px; color: var(--muted); } .kv .v { font-weight: 700; }
.offer .cta { text-align: right; }
.ad { font-size: 11px; color: var(--faint); margin-top: 6px; line-height: 1.3; }
.offer .more { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.offers { container-type: inline-size; }
.kv .v { white-space: nowrap; }
@container (max-width: 820px) {
  .offer { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .offer .mfo { grid-column: 1 / -1; } .offer .cta { grid-column: 1 / -1; text-align: left; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
  .offer .cta .ad { margin-top: 0; }
}
@container (max-width: 480px) { .offer { grid-template-columns: 1fr 1fr; } }

/* tags, lists, tables */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; color: var(--text); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; padding: 12px 14px 12px 52px; background: var(--surface-2); border-radius: var(--radius-s); }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 11px; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.check { list-style: none; padding: 0; margin: 0; } .check li { padding-left: 26px; position: relative; margin: 6px 0; }
.check li::before { content: "✓"; position: absolute; left: 4px; color: var(--brand); font-weight: 800; }
.cross li::before { content: "✕"; color: var(--danger); }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; font-size: 14px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } @media (max-width: 800px) { .grid3 { grid-template-columns: 1fr; } }

/* callouts */
.note { background: var(--info-bg); border: 1px solid var(--info-line); border-radius: var(--radius-s); padding: 12px 14px; font-size: 15px; }
.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius-s); padding: 12px 14px; font-size: 15px; }
.cta-inline { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--brand-soft); border-radius: var(--radius); padding: 16px 18px; }

/* faq */
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--brand); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 8px 0 0; color: var(--muted); }

/* reviews */
.review { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px; background: var(--surface); }
.stars { color: var(--accent); letter-spacing: 1px; }

/* toc, aside */
.toc { font-size: 14px; } .toc ol { padding-left: 18px; margin: 0; } .toc li { margin: 6px 0; }
.aside .card { position: sticky; top: 84px; }
.mini-offer { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mini-offer:last-child { border-bottom: 0; }

/* brand card head */
.brand-head { display: grid; grid-template-columns: 84px 1fr auto; gap: 18px; align-items: center; }
.brand-head .logo-ph { width: 84px; height: 84px; font-size: 26px; border-radius: 18px; }
.req { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 18px; margin-top: 16px; font-size: 14px; }
.req .k { color: var(--muted); font-size: 12px; }
.subnav { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 18px 0 0; overflow-x: auto; }
.subnav a { padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.subnav a.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
@media (max-width: 760px) { .brand-head { grid-template-columns: 64px 1fr; } .brand-head .logo-ph { width: 64px; height: 64px; } .brand-head .cta { grid-column: 1 / -1; } .req { grid-template-columns: 1fr 1fr; } }

/* hero (главная) */
.hero { background: linear-gradient(160deg, var(--brand) 0%, #0a4f3e 100%); color: #fff; border-radius: 0 0 24px 24px; padding: 34px 0 30px; margin-bottom: 26px; }
.hero h1 { color: #fff; } .hero .lead { color: rgba(255,255,255,.88); }
.hero .card { color: var(--text); margin-top: 18px; }
.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cats a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: var(--text); }
.cats a b { display: block; margin-bottom: 4px; } .cats a span { font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .cats { grid-template-columns: 1fr 1fr; } }
.trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; text-align: center; }
.trust b { display: block; font-size: 22px; color: var(--brand); } @media (max-width: 700px) { .trust { grid-template-columns: 1fr 1fr; } }

/* article */
.prose { max-width: 760px; } .prose h2 { margin-top: 30px; } .prose ul, .prose ol { padding-left: 22px; }
.sources li { font-size: 14px; color: var(--muted); }

/* footer */
.footer { margin-top: 40px; background: var(--surface); border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
.footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 20px; }
.footer a { color: var(--muted); display: block; margin: 4px 0; }
.footer .disc { margin-top: 18px; font-size: 12px; line-height: 1.5; border-top: 1px solid var(--line); padding-top: 14px; }
@media (max-width: 760px) { .footer .cols { grid-template-columns: 1fr 1fr; } }
