/* ═══════════════════════════════════════════════════════════════
   Финспектр — стили статейного движка
   Дизайн-система лендинга: белый грунт, чернила, синий продукта,
   Golos Text + Unbounded (лого) + IBM Plex Mono (данные), призма.
   Токены оформления — в /css/tokens.css, здесь их не дублировать.
   ═══════════════════════════════════════════════════════════════ */

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%; scroll-behavior:smooth}
html,body{max-width:100vw; overflow-x:hidden}
body{
  margin:0; background:var(--paper); color:var(--ink);
  font-family:var(--font-head); font-size:17px; line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%; height:auto}
a{color:var(--brand)}
a:hover{text-decoration:none}
:focus-visible{outline:2px solid var(--brand); outline-offset:2px}
/* .container — в /css/tokens.css (общая сетка). */
.skip-link{position:absolute; left:-9999px; top:0; background:var(--ink); color:#fff; padding:10px 18px; z-index:200}
.skip-link:focus{left:0}
.text-center{text-align:center}

/* Призма, шапка и мобильное меню — в /css/nav.css (общие для всех страниц). */

/* ── кнопки ── */
.btn{display:inline-block; text-decoration:none; font-weight:600; border-radius:8px;
  transition:transform .15s, box-shadow .15s, background .15s, color .15s; text-align:center}
.btn--primary{background:var(--ink); color:var(--paper); font-size:16px; padding:14px 26px}
.btn--primary:hover{transform:translateY(-1px); box-shadow:0 10px 24px -12px rgba(15,19,25,.5)}
.btn--sm{font-size:14.5px; padding:9px 18px; border-radius:6px}

/* ── хлебные крошки ── */
.section--breadcrumbs{padding:18px 0 0; font-size:13.5px; color:var(--ink-soft)}
.section--breadcrumbs a{color:var(--ink-soft); text-decoration:none}
.section--breadcrumbs a:hover{color:var(--ink)}
.section--breadcrumbs ol,.section--breadcrumbs ul{list-style:none; display:flex; flex-wrap:wrap; gap:6px; margin:0; padding:0}
.section--breadcrumbs li{display:flex; align-items:center; gap:6px}
.section--breadcrumbs li+li::before{content:"·"; color:var(--ink-soft)}

/* ── секции ── */
.section{padding:56px 0}
.section__title{font-size:clamp(24px,3.4vw,32px); font-weight:800; letter-spacing:-.015em; margin:0 0 26px}

/* ── шапка статьи ── */
.article__header{padding:40px 0 8px}
.article__header--with-image{display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:56px; align-items:start}
.article__header-text{min-width:0}
.article__header--with-image .article__header-text{max-width:58ch}
.article__hero{margin:0; border-radius:16px; overflow:hidden; aspect-ratio:1/1;
  border:1px solid var(--line); box-shadow:0 20px 48px -28px rgba(15,19,25,.3)}
.article__hero img{display:block; width:100%; height:100%; object-fit:cover}
@media(max-width:960px){
  .article__header--with-image{grid-template-columns:minmax(0,1fr); gap:24px}
  .article__hero{max-width:420px}
}
.article__category{display:inline-block; font-size:12.5px; font-weight:700; letter-spacing:.09em;
  text-transform:uppercase; color:var(--brand); margin-bottom:14px}
.article__title{font-size:clamp(30px,4.6vw,44px); font-weight:800; line-height:1.12;
  letter-spacing:-.02em; margin:0; text-wrap:balance}
.article__meta{display:flex; gap:18px; margin-top:16px; font-size:13.5px; color:var(--ink-soft)}
.article__date,.article__read-time{font-family:var(--font-mono); font-size:12.5px}
.article__author{font-weight:600; color:var(--ink)}

/* ── раскладка: контент + сайдбар ── */
.article__layout{display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:56px; padding:34px 0 72px}
/* Грид-элемент здесь .article__content, а не .article__body: разметка в article.php
   вкладывает body внутрь content. Без min-width:0 на самом элементе он не сжимается
   ниже собственного содержимого (у грид-элементов min-width по умолчанию auto),
   и широкая таблица вылезает за колонку вместо прокрутки внутри .table-wrap. */
.article__content{grid-column:1; grid-row:1; min-width:0}
.article__body{min-width:0}
.article__sidebar{grid-column:2; grid-row:1; display:flex; flex-direction:column; gap:16px; align-self:stretch; min-width:0}
.article-toc{position:sticky; top:76px}
@media(max-width:960px){
  .article__layout{grid-template-columns:minmax(0,1fr); gap:34px}
  .article__content,.article__sidebar{grid-column:1}
  .article__content{grid-row:2}
  .article__sidebar{grid-row:1}
  .article-toc{position:static}
}

/* ── оглавление ── */
.article-toc{background:var(--paper-deep); border:1px solid var(--line-soft);
  border-radius:12px; padding:20px 22px}
.article-toc__title{font-size:13px; font-weight:700; letter-spacing:.09em; text-transform:uppercase;
  color:var(--ink-soft); margin:0 0 12px}
/* Интервал между пунктами заметно больше межстрочного внутри пункта — иначе
   многострочные пункты сливаются в сплошной текст и границы не читаются. */
.article-toc__list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:14px}
.article-toc__item--level-3{padding-left:16px}
.article-toc__link{display:block; color:var(--ink-soft); text-decoration:none;
  font-size:14.5px; line-height:1.28}
.article-toc__link:hover{color:var(--brand)}

/* ── CTA в сайдбаре ── */
.sidebar-cta{background:var(--ink); color:#EDEBE4; border-radius:14px; padding:24px}
.sidebar-cta__title{display:block; font-size:18px; font-weight:800; color:#fff; margin:0 0 4px; text-wrap:balance}
.sidebar-cta__subtitle,.sidebar-cta__text{display:block; font-size:14px; color:#B8C0CC; margin:0 0 16px; line-height:1.5; text-wrap:balance}
.cta-block__title,.cta-block__text,.article-cta-inline p{text-wrap:balance}
.sidebar-cta__btn{display:block; background:#fff; color:var(--ink); font-weight:700;
  font-size:15px; padding:13px; border-radius:8px; text-decoration:none; text-align:center;
  transition:transform .15s}
.sidebar-cta__btn:hover{transform:translateY(-1px)}

/* ── тело статьи ── */
.article__body{max-width:720px; font-size:17.5px; min-width:0}
.article__body .lead{font-size:19px; line-height:1.6; color:var(--ink)}
.article__body p{margin:0 0 18px}
.article__body h2{font-size:clamp(23px,3vw,28px); font-weight:800; letter-spacing:-.01em;
  margin:44px 0 16px; line-height:1.2; scroll-margin-top:80px}
.article__body h3{font-size:20px; font-weight:700; margin:32px 0 12px; scroll-margin-top:80px}
.article__body ul,.article__body ol{margin:0 0 18px; padding-left:26px}
.article__body li{margin-bottom:8px}
.article__body li::marker{color:var(--brand)}
.article__body blockquote{margin:26px 0; padding:18px 24px; border-left:3px solid var(--brand);
  background:var(--paper-deep); border-radius:0 10px 10px 0; color:var(--ink)}
.article__body blockquote p:last-child{margin:0}

/* Цитата из судебного акта. Отдельный вид, потому что таких блоков в статьях
   много и подряд: сплошной текст с кавычками внутри абзацев читается тяжело,
   а вынесенная цитата даёт глазу опору и сразу отделяет позицию суда
   от нашего изложения. Источник — в <cite> внизу блока. */
.article__body blockquote.quote-court{position:relative; margin:28px 0; padding:20px 24px 18px;
  border-left:3px solid var(--brand); background:var(--paper-deep); border-radius:0 10px 10px 0}
.article__body blockquote.quote-court p{font-size:1.02em; line-height:1.6; color:var(--ink)}
.article__body blockquote.quote-court cite{display:block; margin-top:12px; font-style:normal;
  font-size:.86em; line-height:1.45; color:var(--ink-soft)}
.article__body blockquote.quote-court cite::before{content:"— "}
@media (max-width:640px){
  .article__body blockquote.quote-court{padding:16px 16px 14px}
  .article__body blockquote.quote-court p{font-size:1em}
}
.article__body code{font-family:var(--font-mono); font-size:.88em; background:var(--paper-deep);
  padding:2px 6px; border-radius:4px}
.article__body strong{font-weight:700}
.article__body figure{margin:28px 0}
.article__body figure img{border-radius:12px; border:1px solid var(--line);
  box-shadow:0 18px 44px -26px rgba(15,19,25,.3)}
.article__body figcaption{font-size:13.5px; color:var(--ink-soft); margin-top:10px; line-height:1.5}
.article__body hr{border:none; border-top:1px solid var(--line); margin:36px 0}

/* таблицы (в т.ч. сортируемые) */
.article__body .table-wrap{overflow-x:auto; margin:26px 0}
.article__body table{border-collapse:collapse; width:100%; font-size:15px}
.article__body th,.article__body td{text-align:left; padding:11px 14px; border-bottom:1px solid var(--line); vertical-align:top}
/* Заголовки НЕ nowrap: длинная шапка вроде «Ставка берётся на дату» задавала
   колонке минимальную ширину, таблица переставала помещаться в колонку статьи
   и уезжала в горизонтальную прокрутку. Перенос в шапке дешевле прокрутки. */
.article__body thead th{font-size:12px; letter-spacing:.07em; text-transform:uppercase;
  color:var(--ink-soft); background:var(--paper-deep); font-weight:700}
.article__body table[data-interactive="sortable"] th[data-sort]{cursor:pointer}
.article__body table[data-interactive="sortable"] th[data-sort]:hover{color:var(--ink)}
.article__body td.num,.article__body th.num{font-family:var(--font-mono); font-variant-numeric:tabular-nums; white-space:nowrap}

/* ── inline-CTA внутри статьи ── */
.article-cta-inline,.cta-block{background:var(--paper-deep); border:1px solid var(--line-soft);
  border-radius:14px; padding:26px 28px; margin:34px 0}
.cta-block__title{font-size:19px; font-weight:800; margin:0 0 8px}
.cta-block__text{color:var(--ink-soft); font-size:15.5px; margin:0 0 18px; line-height:1.55}
.section--cta{padding-top:0}

/* ── FAQ-аккордеон ── */
.article-faq{margin:34px 0}
.faq-item{background:var(--card); border:1px solid var(--line-soft); border-radius:10px; margin-bottom:10px}
.faq-item__question{width:100%; text-align:left; background:none; border:none; cursor:pointer;
  font-family:var(--font-head); font-weight:600; font-size:16.5px; color:var(--ink);
  padding:16px 44px 16px 20px; position:relative}
.faq-item__question .icon{display:none}
.faq-item__question::after{content:"+"; position:absolute; right:18px; top:50%; transform:translateY(-50%);
  font-size:22px; font-weight:500; color:var(--ink-soft); transition:transform .2s}
.faq-item.open .faq-item__question .icon{display:none}
.faq-item__question::after{transform:translateY(-50%) rotate(45deg)}
.faq-item__answer{display:none; padding:0 20px 18px; color:var(--ink-soft); font-size:15.5px; line-height:1.6}
.faq-item.open .faq-item__answer{display:block}
.faq-item__answer b,.faq-item__answer strong{color:var(--ink)}

/* ── чек-лист с прогрессом ── */
.article-checklist{background:var(--paper-deep); border:1px solid var(--line-soft);
  border-radius:14px; padding:24px; margin:34px 0}
.checklist-progress{height:8px; background:rgba(15,19,25,.1); border-radius:99px; margin-bottom:6px; overflow:hidden}
.checklist-progress__bar{height:100%; width:0; border-radius:99px; transition:width .3s;
  background:linear-gradient(90deg,#0080ff,#34c759)}
.checklist-progress__text{font-family:var(--font-mono); font-size:12.5px; color:var(--ink-soft); margin-bottom:14px}
.checklist-item{display:flex; gap:12px; align-items:flex-start; padding:9px 0; font-size:15.5px}
.checklist-item__input{margin-top:4px; accent-color:var(--brand); width:17px; height:17px; flex:none}

/* ── калькулятор ── */
.article-calculator{background:var(--paper-deep); border:1px solid var(--line-soft);
  border-radius:14px; padding:26px 28px; margin:34px 0}
.article-calculator h3{margin-top:0; margin-bottom:20px; font-size:19px; font-weight:800; letter-spacing:-.01em}
.calc-field{margin-bottom:16px}
.calc-label{display:block; font-size:12px; font-weight:700; letter-spacing:.07em; text-transform:uppercase;
  color:var(--ink-soft); margin-bottom:8px}
.calc-input{width:100%; padding:12px 14px; background:var(--card); color:var(--ink);
  border:1px solid var(--line); border-radius:10px; outline:none;
  font-family:var(--font-mono); font-size:15.5px; font-variant-numeric:tabular-nums;
  transition:border-color .15s, box-shadow .15s}
.calc-input:focus{border-color:var(--brand); box-shadow:0 0 0 3px rgba(37,99,235,.14)}
.calc-input::placeholder{color:var(--ink-soft); opacity:.55}
select.calc-input{font-family:var(--font-head); appearance:none; cursor:pointer;
  background-image:linear-gradient(45deg,transparent 50%,var(--ink-soft) 50%),linear-gradient(135deg,var(--ink-soft) 50%,transparent 50%);
  background-position:calc(100% - 19px) calc(50% + 2px),calc(100% - 14px) calc(50% + 2px);
  background-size:5px 5px,5px 5px; background-repeat:no-repeat; padding-right:38px}
.calc-btn{display:block; width:100%; margin-top:4px; padding:13px 20px;
  background:var(--ink); color:var(--paper); border:none; border-radius:8px; cursor:pointer;
  font-family:var(--font-head); font-size:15px; font-weight:700;
  transition:transform .15s, box-shadow .15s}
.calc-btn:hover{transform:translateY(-1px); box-shadow:0 10px 24px -12px rgba(15,19,25,.5)}
.calc-btn:active{transform:translateY(0); box-shadow:none}
.calc-result{display:flex; justify-content:space-between; align-items:baseline; gap:16px;
  margin-top:20px; padding:16px 18px; background:var(--card);
  border:1px solid var(--line); border-left:3px solid var(--brand); border-radius:0 10px 10px 0}
.calc-result__label{font-size:13.5px; color:var(--ink-soft); flex:none}
/* Калькулятор с несколькими результатами: четыре границы периода подозрительности
   не помещаются в один слот .calc-result__value. Строки заполняет движок
   по атрибуту data-calc-out. */
.calc-rows{display:grid; gap:1px; background:var(--line-soft); border:1px solid var(--line-soft);
           border-radius:10px; overflow:hidden; margin-top:16px}
.calc-row{display:flex; justify-content:space-between; align-items:baseline; gap:14px;
          background:var(--card); padding:11px 16px}
.calc-row__label{font-size:13.5px; color:var(--ink-soft)}
.calc-row__label b{color:var(--ink); font-weight:600}
/* Текстовое значение в строке (не число): моноширинный tabular-nums
   разгоняет буквы, поэтому для слов возвращаем обычный шрифт. */
.calc-row__value--text{font-family:var(--font-head); font-variant-numeric:normal}
.calc-row__value{font-family:var(--font-mono); font-variant-numeric:tabular-nums;
                 font-size:15.5px; font-weight:600; white-space:nowrap}
@media (max-width:640px){
  .calc-row{flex-direction:column; align-items:flex-start; gap:3px}
}

.calc-result__value{font-family:var(--font-mono); font-variant-numeric:tabular-nums;
  font-size:19px; font-weight:600; color:var(--ink); text-align:right; line-height:1.35}

/* ── листинг статей ── */
.articles-intro{max-width:62ch; margin:-14px 0 26px; color:var(--ink-soft); font-size:17px; line-height:1.6}
  .article-filters{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:30px}
.article-filter{font-size:14px; font-weight:600; color:var(--ink-soft); text-decoration:none;
  border:1.5px solid var(--line); border-radius:20px; padding:7px 16px; transition:all .15s}
.article-filter:hover{color:var(--ink); border-color:var(--ink)}
.article-filter.active{background:var(--ink); color:#fff; border-color:var(--ink)}
.articles-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:22px}
@media(max-width:960px){.articles-grid{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.articles-grid{grid-template-columns:1fr}}
.article-card{background:var(--card); border:1px solid var(--line-soft); border-radius:14px;
  overflow:hidden; display:flex; flex-direction:column; transition:box-shadow .2s, transform .2s}
.article-card:hover{transform:translateY(-2px); box-shadow:0 22px 48px -28px rgba(15,19,25,.35)}
.article-card__image{aspect-ratio:16/9; overflow:hidden; background:var(--paper-deep)}
.article-card__image img{width:100%; height:100%; object-fit:cover; display:block}
.article-card__content{padding:20px 22px 22px; display:flex; flex-direction:column; gap:10px; flex:1}
.article-card__category{font-size:11.5px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:var(--brand)}
.article-card__title{font-size:17.5px; font-weight:700; line-height:1.3; margin:0}
.article-card__title a{color:var(--ink); text-decoration:none}
.article-card__title a:hover{color:var(--brand)}
.article-card__excerpt{font-size:14.5px; color:var(--ink-soft); line-height:1.5; margin:0; flex:1}
.article-card__meta{display:flex; justify-content:space-between; align-items:baseline; gap:12px;
  font-family:var(--font-mono); font-size:12px; color:var(--ink-soft);
  margin-top:4px; padding-top:12px; border-top:1px solid var(--line-soft)}

/* ── related ── */
.section--related{background:var(--paper-deep)}

/* ── подвал (как на лендинге) ── */
/* Подвал — в /css/footer.css (общий для всех страниц). */

/* ── мобильная полировка статей ── */
@media(max-width:600px){
  
  .article__header{padding:26px 0 4px}
  
  .article__title{font-size:clamp(26px,7vw,34px)}
  
  .article__meta{flex-wrap:wrap; gap:8px 14px}
  
  .article__body{font-size:16.5px}
  
  .article__body h2{font-size:23px; margin:34px 0 14px}
  
  .article__body h3{font-size:19px}
  
  .article__body .lead{font-size:17.5px}
  
  .article__layout{padding:24px 0 48px; gap:26px}
  
  .article-toc,.sidebar-cta,.article-checklist,.article-cta-inline,.cta-block,.article-calculator{padding:18px 20px}
  
  .article-calculator h3{font-size:17.5px; margin-bottom:16px}
  
  .calc-input{font-size:16px}
  
  .calc-result{flex-direction:column; align-items:flex-start; gap:6px; padding:14px 16px}
  
  .calc-result__value{font-size:18px; text-align:left}
  
  .article__body table{font-size:14px}
  
  .article__body th,.article__body td{padding:9px 10px}
  
  .article__body blockquote{padding:14px 16px}
  
  .article__hero{max-width:none}
  
  .footer__links{gap:28px}
  
  .footer__content{gap:24px}
  
  .section{padding:40px 0}
}

/* ── Страницы авторов ─────────────────────────────────────────────────────
   Профиль над именем — он объясняет, почему статью подписал именно этот автор:
   темы делятся по профилю, а не по очереди. */
.author-profile{
  font-size:13px; letter-spacing:.09em; text-transform:uppercase;
  color:var(--ink-soft); font-weight:600; margin:0 0 6px;
}
.author-facts{margin:0 0 28px; padding-left:20px}
.author-facts li{margin-bottom:6px; line-height:1.5}

.author-cards{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(320px, 1fr));
  gap:28px; margin:32px 0 8px;
}
.author-card{
  background:var(--card); border:1px solid var(--line);
  border-radius:14px; padding:26px 28px;
}
.author-card p{margin:0 0 12px}
.author-card__name{font-size:24px; margin:0 0 2px}
.author-card__name a{color:var(--ink); text-decoration:none}
.author-card__name a:hover{color:var(--brand)}
.author-card__role{color:var(--ink-soft); font-size:15px}
.author-card__topics{color:var(--ink-soft)}
.author-card__count{margin:0}
.author-card__count a{color:var(--brand); font-weight:600}

@media(max-width:720px){
  .author-cards{grid-template-columns:1fr; gap:20px}
  .author-card{padding:22px 20px}
}

/* ── HTML-карта сайта и список статей автора ──────────────────────────────
   Две служебные страницы: /karta-sajta/ и /ob-avtore/. Списки в две колонки —
   при десятках статей одна колонка растягивает страницу на несколько экранов,
   и обзор, ради которого карта и делается, теряется. */
.sitemap-list,
.author-articles{
  columns:2; column-gap:40px;
  padding-left:20px; margin:0 0 32px;
  font-size:16px;
}
.sitemap-list li,
.author-articles li{break-inside:avoid; margin-bottom:8px; line-height:1.5}
.sitemap-list a,
.author-articles a{color:var(--ink); text-decoration:underline; text-underline-offset:3px; text-decoration-color:var(--line)}
.sitemap-list a:hover,
.author-articles a:hover{color:var(--brand); text-decoration-color:currentColor}
.author-articles time{display:block; font-size:13.5px; color:var(--ink-soft); font-family:var(--font-mono)}
.sitemap-count{color:var(--ink-soft); font-weight:400; font-size:.85em}
.sitemap-cat-desc{color:var(--ink-soft); margin:-8px 0 16px; max-width:70ch}

@media(max-width:720px){
  .sitemap-list,
  .author-articles{columns:1}
}
