/* Статьи сайта (web/src/site.ts): светлая тема, как главная и разбор. Кегль не меньше 13px. */

html.light {
  color-scheme: light;
  --bg: #f4f5f4; --surface: #ffffff; --surface2: #eef0ef; --border: #e3e7e6;
  --text: #0b1112; --sec: #3d4748; --muted: #6b7677; --dim: #9aa3a2;
  --accent: #0e6b60; --accent-ink: #ffffff; --live: #0e8a7a; --brand: #0e6b60;
  --plus: #138a4f; --minus: #d43d3d; --warn: #b8690e;
}
html.light body { background: radial-gradient(1200px 700px at 50% 0, #ffffff, var(--bg) 70%); }
html.light .site-nav a { color: #2a3334; }
html.light .site-nav a:hover, html.light .site-nav a[aria-current=page] { background: #e8ebea; color: var(--text); }
html.light .logo .kopi { color: #b8924a; }
html.light .btn.ghost { color: var(--text); box-shadow: inset 0 0 0 1.5px #0b111226; }
.site-nav { margin-left: auto; }

h1, h2, h3 { color: var(--text); }

/* Раздел и лента */
.news-head { margin-top: 16px; max-width: 820px; }
.news-head h1 { font-size: 48px; line-height: 1.05; letter-spacing: -1.8px; margin: 10px 0 12px; }
.lead { font-size: 19px; color: var(--sec); margin: 0 0 20px; max-width: 760px; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; font-weight: 600; font-size: 15px; color: var(--sec); }
.chips a:hover { color: var(--text); border-color: #c9d1cf; }
.news-cat { margin-top: 48px; }
.news-cat h2 { font-size: 28px; letter-spacing: -0.7px; margin: 0 0 6px; }
.news-cat h2 a { text-decoration: none; }
.sec-lead { color: var(--muted); margin: 0 0 16px; max-width: 760px; }
.all { color: var(--brand); font-weight: 700; text-decoration: none; }
.reads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.read { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; box-shadow: 0 1px 2px #0b11120a; }
.read:hover { border-color: #c9d1cf; box-shadow: 0 6px 20px #0b111212; }
.read small { color: var(--brand); font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.read-bank { width: 22px; height: 22px; border-radius: 6px; }
.read b { font-size: 18px; line-height: 1.3; }
.read span { color: var(--sec); font-size: 15px; }

/* Статья: текст + закреплённая колонка (оглавление, призыв) */
.art-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: start; }
.art-side { position: sticky; top: 24px; margin-top: 120px; }
.side-sticky { display: grid; gap: 16px; }
.art-side .toc { margin: 0; }
.art-side .toc ol { padding-left: 20px; }
.art-side .toc li { font-size: 14px; }
.toc-inline { display: none; }
.side-card { display: grid; gap: 8px; justify-items: start; padding: 22px; border-radius: 24px; background: linear-gradient(160deg, #e3f2ef, #ffffff 70%); border: 1px solid #cfe5e0; }
.side-card img { width: 112px; height: auto; margin: -6px 0 2px -6px; }
.side-card b { font-size: 19px; line-height: 1.25; }
.side-card span { color: var(--sec); font-size: 14px; line-height: 1.5; }
.side-card .btn { margin-top: 6px; padding: 12px 18px; font-size: 15px; }
.side-card.dark { background: linear-gradient(160deg, #13302c, #0b1112); border-color: #1d5c55; }
.side-card.dark b { color: #fff; }
.side-card.dark span { color: #c5d6d3; }
.side-card.dark .btn { background: #fff; color: #0b1112; }
.h2-bank { width: 32px; height: 32px; border-radius: 9px; vertical-align: -5px; margin-right: 12px; box-shadow: inset 0 0 0 1px #0b111217; }
.h1-bank { width: 48px; height: 48px; border-radius: 14px; vertical-align: -6px; margin-right: 14px; box-shadow: inset 0 0 0 1px #0b111217; }

/* Статья */
.article { max-width: 760px; margin-top: 16px; min-width: 0; }
.crumbs { color: var(--muted); font-size: 14px; margin: 0; }
.crumbs a { color: var(--brand); text-decoration: none; }
.article h1 { font-size: 46px; line-height: 1.08; letter-spacing: -1.6px; margin: 12px 0 14px; }
.meta { color: var(--muted); font-size: 14px; margin: -6px 0 8px; }
.meta a { color: var(--muted); }
.body h2 { font-size: 28px; letter-spacing: -0.6px; margin: 44px 0 12px; scroll-margin-top: 20px; }
.body h3 { font-size: 20px; letter-spacing: -0.3px; margin: 28px 0 8px; }
.body p, .body li { color: var(--sec); font-size: 17px; line-height: 1.65; }
.body li { margin: 6px 0; }
.body b { color: var(--text); }
.body a { color: var(--brand); text-underline-offset: 3px; }
.body mark { background: #fbeccc; color: #4a3305; padding: 0 4px; border-radius: 4px; font-weight: 700; }
.body blockquote { margin: 24px 0; padding: 16px 22px; border-left: 3px solid var(--brand); background: var(--surface); border-radius: 0 16px 16px 0; color: var(--text); font-size: 18px; line-height: 1.5; box-shadow: 0 1px 2px #0b11120a; }
.body figure { margin: 24px 0; }
.body figure img { width: 100%; height: auto; border-radius: 20px; border: 1px solid var(--border); display: block; }
.body figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
/* Шаги — нумерованные кружки */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 16px 0; }
.steps li { counter-increment: step; position: relative; padding: 14px 18px 14px 60px; margin: 10px 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 13px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: 15px; display: grid; place-items: center; }
/* Таблицы */
.tw { overflow-x: auto; margin: 18px 0; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); }
.tw table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tw th { text-align: left; font-weight: 700; font-size: 13px; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface2); }
.tw td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--sec); vertical-align: top; }
.tw tr:last-child td { border-bottom: 0; }
.toc { margin: 22px 0 8px; padding: 18px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.toc ol { margin: 8px 0 0; padding-left: 22px; }
.toc a { color: var(--brand); text-decoration: none; }
.toc li { margin: 4px 0; font-size: 16px; }
.app-action { margin: 16px 0; }
.sources { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); }
.sources h2 { font-size: 18px; margin: 0 0 8px; }
.sources li { color: var(--muted); font-size: 14px; margin: 4px 0; }
.sources a { color: var(--muted); }

/* Призывы: разбор и приложение */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 32px 0; padding: 24px 26px; border-radius: 24px; background: linear-gradient(120deg, #0e6b60, #0b4f47); color: #fff; }
.cta div { display: grid; gap: 6px; }
.cta b { font-size: 21px; color: #fff; }
.cta span { color: #d5ebe7; font-size: 15px; line-height: 1.5; }
.cta .btn { flex: none; background: #fff; color: #0b1112; }
.cta-app { background: linear-gradient(120deg, #1c2526, #0b1112); }
.more-reads { margin-top: 56px; }
.more-reads h2 { font-size: 26px; letter-spacing: -0.6px; margin: 0 0 14px; }

@media (max-width: 1060px) {
  .art-grid { grid-template-columns: minmax(0, 1fr); }
  .art-side { display: none; }
  .toc-inline { display: block; }
}
@media (max-width: 960px) { .reads { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .cta { flex-direction: column; align-items: stretch; }
}
@media (max-width: 600px) {
  .news-head h1, .article h1 { font-size: 32px; letter-spacing: -1px; }
  .h1-bank { width: 40px; height: 40px; border-radius: 12px; margin-right: 10px; }
  .lead { font-size: 17px; }
  .body p, .body li { font-size: 16px; }
  .body h2 { font-size: 24px; }
  .steps li { padding: 12px 14px 12px 52px; }
  /* Таблицы — карточками: без горизонтальной прокрутки. */
  .tw { overflow: visible; background: none; border: 0; }
  .tw thead { display: none; }
  .tw table, .tw tbody, .tw tr, .tw td { display: block; width: 100%; }
  .tw tr { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px 16px; margin-bottom: 10px; }
  .tw td { padding: 3px 0; border: 0; }
  .tw td:first-child { font-weight: 700; color: var(--text); padding-bottom: 6px; }
  .tw td[data-label]::before { content: attr(data-label) ': '; color: var(--muted); font-size: 13px; }
  .steps li::before { left: 12px; }
}

/* «Как поможет Копибара» — отдельная карточка в конце статьи: факты банка/метода выше, про приложение — здесь. */
.kopi-help { position: relative; margin: 36px 0; padding: 24px 26px 8px; border-radius: 24px; background: linear-gradient(160deg, #e3f2ef, #ffffff 70%); border: 1px solid #cfe5e0; }
.kopi-help > img { position: absolute; top: -28px; right: 18px; width: 88px; height: auto; }
.kopi-help h2 { margin-top: 0; padding-right: 88px; }
@media (max-width: 640px) { .kopi-help { padding: 22px 18px 6px; } .kopi-help > img { width: 64px; top: -20px; } .kopi-help h2 { padding-right: 56px; } }
.kopi-help .store-badge { display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px 10px 16px; border-radius: 14px; background: #0b1112; color: #fff; text-decoration: none; font-weight: 700; font-size: 20px; line-height: 1.1; }
.kopi-help .store-badge small { display: block; font-size: 13px; font-weight: 500; opacity: .85; }
.kopi-help .store-badge svg { width: 28px; height: 28px; }
.kopi-help .store-badge:hover { filter: brightness(1.25); }
