/* Твой закон — редизайн v12 по макету «Редизайн главной tvoi-zakon.ru» и «Шрифтовая система».
   Spectral — заголовки и логотип; Golos Text — текст и интерфейс; IBM Plex Mono — даты, номера, счётчики.
   Подключается после style.css и переопределяет его. */
:root {
  --navy: #0D2C6C; --navy-2: #193773; --text: #33435F; --muted: #4A5875; --faint: #7A869C;
  --rule: #D9E1EE; --rule-2: #B9C6DD; --alt: #F6F8FC; --accent: #1F5BD8; --accent-soft: #E8EFFC;
  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --sans: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  /* старые токены → новая палитра */
  --ink: var(--navy); --ink-2: var(--text); --line: var(--rule); --line-2: var(--rule-2);
  --bg: #FFFFFF; --soft: #F1F4F9; --soft-2: #EEF2F8; --blue: var(--accent); --blue-ink: var(--accent);
  --blue-dark: var(--navy); --blue-soft: var(--accent-soft); --blue-ring: #D3DDF0; --hero: var(--navy);
  --radius: 6px;
}
body { background: #fff; color: var(--text); font-family: var(--sans); font-size: 16px; }
h1, h2 { font-family: var(--serif); color: var(--navy); font-weight: 700; letter-spacing: -0.01em; }
h3, h4 { font-family: var(--sans); color: var(--navy); letter-spacing: 0; }
a { color: var(--accent); }
a:hover { color: var(--navy); }
.wrap { max-width: 1344px; }
.muted { color: var(--muted); }

/* ---------- кнопки ---------- */
.btn, .hero-search button, .r-search button { background: var(--navy); color: #fff; border-radius: 8px; font-family: var(--sans); font-weight: 700; }
.btn:hover, .hero-search button:hover, .r-search button:hover { background: var(--navy-2); color: #fff; }
.btn-outline, .btn-ghost { border-color: var(--rule-2); color: var(--navy); border-radius: 8px; font-family: var(--sans); }
.btn-outline:hover, .btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-text { color: var(--navy); font-family: var(--sans); font-weight: 600; }

/* ---------- шапка ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(6px); }
.header-row { padding-top: 12px; padding-bottom: 12px; gap: 32px; }
.brand { gap: 12px; color: var(--navy); }
.logo-mark { color: var(--navy); flex: none; display: block; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 24px; color: var(--navy); letter-spacing: -0.01em; }
.brand-name.small { font-size: 18px; }
.main-nav { justify-content: center; gap: 32px; font-weight: 500; }
.main-nav a { color: var(--navy); font-size: 16px; }
.main-nav a:hover { color: var(--accent); }
.header-actions .btn { min-height: 44px; padding: 0 22px; }

/* ---------- первый экран ---------- */
.r-hero { border-bottom: 1px solid var(--rule); }
.r-hero .wrap { padding-top: 88px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 22px; }
.r-eyebrow, .eyebrow { margin: 0; font-family: var(--mono); font-size: 14px; font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--accent); }
.r-hero h1 { font-size: 72px; line-height: 1.04; max-width: 1060px; margin: 0; }
.r-lead { margin: 0; max-width: 640px; font-size: 20px; line-height: 1.55; color: var(--text); }
.r-search { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-width: 680px; }
.r-search label { font-size: 13px; font-weight: 600; color: var(--text); }
.r-search-row { display: flex; border: 1.5px solid var(--navy); border-radius: 9px; overflow: hidden; background: #fff; }
.r-search-row input { flex: 1; min-width: 0; border: 0 !important; border-radius: 0; min-height: 52px; padding: 0 16px; font: 16px var(--sans); color: var(--navy); outline: none; }
.r-search-row input:focus { box-shadow: inset 0 0 0 2px var(--blue-ring); }
.r-search-row button { border: 0; border-radius: 0; padding: 0 30px; font-size: 16px; cursor: pointer; }

/* ---------- секции ---------- */
.r-section { padding: 88px 0; }
.r-alt { background: var(--alt); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.r-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--navy); margin-bottom: 28px; flex-wrap: wrap; }
.r-head h2 { font-size: 44px; line-height: 1.1; margin: 4px 0 0; }
.r-head p { margin: 10px 0 0; color: var(--text); font-size: 17px; max-width: 760px; }
.r-num { display: block; font-family: var(--mono); font-size: 13px; color: var(--accent); }
.r-num.light { color: #A9BEEB; }
.r-more { font-weight: 700; text-decoration: none; white-space: nowrap; }
.r-caption { font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* ---------- типы организаций: строки реестра ---------- */
.r-types { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 56px; }
.r-type { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 26px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--navy); }
.r-type:hover strong { color: var(--accent); }
.r-type-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.r-type-name strong { font-size: 21px; font-weight: 700; line-height: 1.2; transition: color .15s; }
.r-type-name small { font-size: 14px; color: var(--muted); line-height: 1.35; }
.r-type-meta { font-family: var(--mono); font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; line-height: 1.6; padding-top: 4px; }

/* ---------- фильтры ---------- */
.r-pills, .r-subs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.pill { min-height: 40px; padding: 0 16px; border: 1.5px solid var(--rule-2); background: #fff; color: var(--navy); font-weight: 600; font-family: var(--sans); }
.pill:hover { border-color: var(--navy); color: var(--navy); }
.pill.is-sel { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip { border-radius: 6px; background: #fff; border: 1px solid var(--rule); color: var(--text); }
.chip.is-sel { background: var(--accent-soft); color: var(--navy); border-color: var(--accent); }
.filter-box { border-radius: 6px; border-color: var(--rule); }
.filter-label { color: var(--navy); }

/* ---------- лента: строки реестра ---------- */
.reg-list { background: #fff; border: 1px solid var(--rule); }
.reg-list .empty { border: 0; }
.feed { gap: 0; }
.feed > .reg-row { border: 1px solid var(--rule); border-bottom-width: 0; }
.feed > .reg-row:last-of-type { border-bottom-width: 1px; }
.reg-row { display: grid; grid-template-columns: 170px 1fr; gap: 0 36px; padding: 28px 28px; background: #fff; border: 0; border-radius: 0; border-bottom: 1px solid var(--rule); }
.reg-list .reg-row:last-child { border-bottom: 0; }
.reg-row.is-pinned { box-shadow: inset 3px 0 0 var(--accent); border-color: var(--rule); }
.reg-row.is-hidden { opacity: .55; }
.reg-side { display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 13px; color: var(--muted); min-width: 0; }
.reg-date { font-weight: 600; font-size: 14px; color: var(--navy); }
.reg-kind { line-height: 1.45; }
.reg-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.rb { font-family: var(--mono); font-size: 12px; line-height: 1; padding: 5px 8px; border-radius: 3px; }
.rb-new { background: var(--accent); color: #fff; }
.rb-soft { background: var(--accent-soft); color: var(--navy); }
.rb-warn { background: #FDECEF; color: #8E1F33; }
.reg-main { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 22px; row-gap: 8px; min-width: 0; }
.reg-main > h3 { flex-basis: 100%; margin: 0; font-size: 20px; line-height: 1.35; font-weight: 700; }
.reg-main .newslink { color: var(--navy); }
.reg-main .newslink:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.reg-main .ai { display: contents; }
.reg-main .ai-brief, .reg-main .ai-none, .reg-main .ai-wait, .reg-main .stages, .reg-main .admin-bar,
.reg-main .reg-note, .reg-main .rec-box, .reg-main .advice-lock, .reg-main .editor { flex-basis: 100%; }
.reg-main .ai-brief { font-size: 16px; color: var(--text); margin: 0; }
.reg-main .ai-none { color: var(--faint); font-style: normal; font-size: 15px; }
.reg-main .spoiler summary { color: var(--accent); font-weight: 700; font-size: 15px; }
.reg-main .spoiler summary::before { content: none; }
.reg-main .spoiler[open] { flex-basis: 100%; order: 20; }
.reg-main .advice-spoiler { order: 21; }
.reg-main .advice-spoiler summary { color: #8A4B0F; }
.reg-main .advice-spoiler[open] { flex-basis: 100%; }
.reg-src { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.reg-link { font-weight: 700; font-size: 15px; text-decoration: none; }
.reg-link:hover { text-decoration: underline; }
.reg-note { margin: 0; font-size: 13px; color: var(--faint); }
.reg-main .fav { margin-left: auto; }
.reg-main .stages { margin: 2px 0; }
.reg-main .admin-bar { order: 30; }
.spoiler .ai-full { border-left-color: var(--accent); background: var(--alt); }

/* ---------- пагинация ---------- */
.pager { margin-top: 26px; gap: 4px; }
.pg { border: 0; background: transparent; color: var(--navy); font-family: var(--sans); font-weight: 600; min-width: 38px; height: 38px; border-radius: 6px; }
.pg:hover { background: #fff; color: var(--accent); }
.pg.current { background: var(--navy); color: #fff; }
.pg-nav { font-family: var(--mono); font-weight: 500; font-size: 14px; color: var(--muted); }
.pg.disabled { background: transparent; color: #B4BDCC; }

/* ---------- блок подписки ---------- */
.r-promo { background: var(--navy); color: #fff; display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; padding: 56px 56px; }
.r-promo h2 { color: #fff; font-size: 44px; margin: 8px 0 14px; }
.r-promo p { margin: 0; color: #D8E1F3; font-size: 18px; line-height: 1.6; }
.r-promo ul { list-style: none; margin: 8px 0 26px; padding: 0; display: grid; gap: 12px; font-size: 18px; }
.r-promo li::before { content: '—'; color: #7FA2EA; margin-right: 12px; }
.r-btn-light { display: inline-flex; align-items: center; min-height: 52px; padding: 0 26px; background: #fff; color: var(--navy); font-weight: 700; border-radius: 8px; text-decoration: none; }
.r-btn-light:hover { background: #E8EFFC; color: var(--navy); }

/* ---------- подвал ---------- */
.site-footer { border-top: 1px solid var(--rule); margin-top: 0; background: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.1fr .8fr 1.1fr 1.2fr; gap: 32px; padding-top: 48px; padding-bottom: 64px; }
.footer-brand p { margin: 10px 0 0; color: var(--text); font-size: 15px; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: var(--navy); text-decoration: none; font-size: 15px; }
.footer-col a:hover { color: var(--accent); }
.footer-note { margin: 0; padding: 0; font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--muted); }

/* ---------- внутренние страницы: светлые «шапки» вместо тёмных ---------- */
.hero, .org-hero { background: #fff; color: var(--navy); border-bottom: 1px solid var(--rule); }
.hero h1, .org-hero h1 { color: var(--navy); font-family: var(--serif); }
.hero h1 { font-size: 56px; }
.hero-small h1 { font-size: 48px; }
.lead, .hero .lead, .org-hero .lead { color: var(--text); }
.hero-search input { border: 1.5px solid var(--navy); }
.hero-sources, .chip-dark { color: var(--muted); border-color: var(--rule-2); }
.org-hero .btn-outline { color: var(--navy); border-color: var(--rule-2); }
.org-hero .btn-outline:hover { color: var(--navy); border-color: var(--navy); }
.org-hero .org-logo { box-shadow: none; }
.sub-hero { background: var(--navy); }
.sub-hero h1 { color: #fff; }
.sub-hero .eyebrow { color: #A9BEEB; }
.final-cta { background: var(--navy); border-radius: 0; }
.final-cta h2 { color: #fff; }
.section-head h2, .section-head h1, .h-sub, .part-title, .admin h1, .profile h1, .mailing-head h1, .h2-plain { font-family: var(--serif); color: var(--navy); }
.detail, .panel, .auth-card, .act-card, .news-card:not(.reg-row), .org-card, .step, .seo-card, .kpi, .table-wrap, .terms, .benefit, .wizard-foot, .rec-card.example { border-radius: 6px; border-color: var(--rule); }
.detail-title { font-family: var(--sans); color: var(--navy); font-weight: 700; }
.panel-dark { background: var(--navy); border-radius: 6px; }
.tag { border-radius: 3px; font-size: 12px; }
.tag-org { background: var(--accent-soft); color: var(--navy); }
.tag-bill { background: var(--navy); font-family: var(--mono); font-weight: 500; }
.tag-new { background: var(--accent); color: #fff; font-family: var(--mono); font-weight: 500; }
.news-date, .facts dt { font-family: var(--mono); font-size: 13px; }
.parl-tab, .choice-box { border-radius: 6px; }
.parl-tab.is-sel { border-color: var(--navy); box-shadow: none; background: var(--alt); }
.parl-count b { font-family: var(--mono); color: var(--navy); }
.step-num, .step-n { background: var(--navy); font-family: var(--mono); border-radius: 6px; }
.big-num, .kpi strong, .num { font-family: var(--mono); }
.stages-label { font-family: var(--mono); font-weight: 600; font-size: 13px; }
.st-dot { font-family: var(--mono); }
.stages { --cur: var(--accent); }
.flash { border-radius: 6px; }
.admin-strip { background: #1B1440; }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .r-types { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .r-promo { grid-template-columns: 1fr; gap: 24px; padding: 36px 28px; }
  .main-nav { gap: 20px; }
}
@media (max-width: 640px) {
  .r-hero .wrap { padding-top: 48px; padding-bottom: 44px; gap: 16px; }
  .r-hero h1 { font-size: 40px; }
  .r-lead { font-size: 17px; }
  .r-section { padding: 52px 0; }
  .r-head h2, .r-promo h2 { font-size: 32px; }
  .r-types { grid-template-columns: 1fr; }
  .reg-row { grid-template-columns: 1fr; gap: 10px; padding: 20px 16px; }
  .reg-side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
  .reg-kind br { display: none; }
  .r-search-row button { padding: 0 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; padding-bottom: 40px; }
  .brand-name { font-size: 21px; }
  .hero h1, .hero-small h1 { font-size: 34px; }
  .main-nav { justify-content: flex-start; }
}

/* монохромные значки разделов и единый вид заголовков секций, как в макете */
.org-logo { background: var(--navy) !important; box-shadow: none; border-radius: 8px; }
.section-head { border-bottom: 2px solid var(--navy); padding-bottom: 14px; margin-bottom: 24px; }
.section-head h2, .section-head h1 { font-size: 40px; }
.org-hero-in { align-items: center; }
.org-hero h1 { font-size: 48px; }
.choice input:checked + .choice-box { border-color: var(--navy); box-shadow: 0 0 0 3px var(--blue-ring); background: var(--alt); }
.choice input:checked + .choice-box::after { background: var(--navy); }

/* тёмные блоки: светлый текст */
.sub-hero .lead, .sub-hero .r-lead { color: #D8E1F3; }
.sub-hero .sub-proof li { color: #C9D3E6; }

/* телефон: компактная, не прилипающая шапка; меню — одной прокручиваемой строкой */
@media (max-width: 640px) {
  .site-header { position: static; }
  .header-row { gap: 10px 14px; padding-top: 10px; padding-bottom: 8px; }
  .header-actions { margin-left: auto; }
  .header-actions .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
  .header-actions .btn-text { padding: 0 6px; font-size: 14px; }
  .main-nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; gap: 18px; padding: 4px 0 2px; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { white-space: nowrap; font-size: 15px; }
  .brand .logo-mark { width: 38px; height: 27px; }
}

.choice-ico .logo-mark { color: #fff; }
.mock-mail-head .logo-mark { color: var(--navy); }

/* =====================================================================
   v13: регион, цветные карточки типов, карточки новостей «мета сверху»,
   важность изменения, ход рассмотрения законопроекта
   ===================================================================== */

/* ---------- выбор региона в шапке ---------- */
.header-row { gap: 20px; }
.region-pick { position: relative; flex: none; }
.region-pick > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 7px 11px;
  border: 1px solid var(--rule-2); border-radius: 999px; color: var(--navy); font-weight: 600; font-size: 14px; background: #fff;
  user-select: none; transition: border-color .15s, box-shadow .15s; }
.region-pick > summary::-webkit-details-marker { display: none; }
.region-pick > summary:hover, .region-pick[open] > summary { border-color: var(--navy); box-shadow: 0 0 0 3px var(--accent-soft); }
.region-pick .rp-short { display: none; }
.region-pick .rp-caret { transition: transform .15s; }
.region-pick[open] .rp-caret { transform: rotate(180deg); }
.rp-menu { position: absolute; left: 0; top: calc(100% + 8px); z-index: 60; width: 260px; background: #fff; border: 1px solid var(--rule);
  border-radius: 12px; box-shadow: 0 16px 40px rgba(13,44,108,.16); padding: 8px; }
.rp-title { margin: 4px 8px 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.rp-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--navy); text-decoration: none; }
.rp-item:hover { background: var(--alt); color: var(--navy); }
.rp-item.is-sel { background: var(--accent-soft); }
.rp-item strong { display: block; font-size: 15px; }
.rp-item small { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.rp-check { width: 18px; color: var(--accent); font-weight: 700; text-align: center; }
.footer-regions a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer-regions a[aria-current] { font-weight: 700; text-decoration: none; }

/* ---------- цветные карточки типов организаций ---------- */
.org-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.org-card { --org: #1F5BD8; position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 22px 18px;
  border-radius: 16px; border: 1px solid color-mix(in srgb, var(--org) 22%, #fff);
  background: linear-gradient(160deg, color-mix(in srgb, var(--org) 13%, #fff) 0%, #fff 62%);
  box-shadow: inset 0 4px 0 var(--org); transition: transform .15s, box-shadow .15s, border-color .15s; overflow: hidden; }
.org-card::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: color-mix(in srgb, var(--org) 10%, transparent); pointer-events: none; }
.org-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--org) 45%, #fff);
  box-shadow: inset 0 4px 0 var(--org), 0 14px 30px color-mix(in srgb, var(--org) 18%, transparent); }
.org-card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.org-card-link:focus-visible { outline: 3px solid var(--org); outline-offset: 2px; }
.org-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.org-card .org-logo { background: var(--org) !important; color: #fff; border-radius: 14px !important; box-shadow: 0 6px 16px color-mix(in srgb, var(--org) 35%, transparent); }
.org-card-new { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--org); background: #fff;
  border: 1px solid color-mix(in srgb, var(--org) 35%, #fff); padding: 4px 9px; border-radius: 999px; position: relative; z-index: 2; }
.org-card h3 { margin: 4px 0 0; font-size: 21px; line-height: 1.2; color: var(--navy); }
.org-card:hover h3 { color: var(--org); }
.org-card-sub { margin: 0; font-weight: 600; font-size: 14px; color: color-mix(in srgb, var(--org) 75%, var(--navy)); }
.org-card-desc { margin: 2px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); flex: 1; }
.org-card-stats { display: flex; gap: 16px; margin: 12px 0 2px; padding-top: 12px; border-top: 1px dashed color-mix(in srgb, var(--org) 30%, #fff);
  font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.org-card-stats b { font-family: var(--mono); font-size: 16px; color: var(--navy); margin-right: 3px; }
.org-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.org-card-go { font-weight: 700; font-size: 14px; color: var(--org); }
.org-card-laws { position: relative; z-index: 2; font-size: 13px; font-weight: 600; color: var(--navy); text-decoration: none;
  padding: 6px 11px; border-radius: 8px; background: #fff; border: 1px solid color-mix(in srgb, var(--org) 30%, #fff); }
.org-card-laws:hover { border-color: var(--org); color: var(--org); }

/* ---------- карточка новости / законопроекта: мета сверху, суть снизу ---------- */
.ncard { display: block; padding: 0; background: #fff; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; }
.reg-list .ncard:last-child { border-bottom: 0; }
.feed > .ncard { border: 1px solid var(--rule); border-bottom-width: 0; }
.feed > .ncard:last-of-type { border-bottom-width: 1px; }
.ncard.is-pinned { box-shadow: inset 3px 0 0 var(--accent); }
.ncard.is-hidden { opacity: .55; }
.ncard-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 8px; padding: 16px 28px 12px; background: var(--alt);
  border-bottom: 1px solid var(--rule); }
.nc-date { font-family: var(--mono); font-weight: 600; font-size: 14px; color: var(--navy); margin-right: 4px; }
.nc-region, .nc-chip, .nc-org { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; line-height: 1; padding: 6px 10px;
  border-radius: 999px; background: #fff; border: 1px solid var(--rule); color: var(--text); white-space: nowrap; text-decoration: none; }
.nc-region { font-weight: 700; color: var(--navy); border-color: var(--rule-2); }
.nc-region::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.nc-region-spb::before, .nc-parl-spb::before { background: #0F8A7E; }
.nc-region-rf::before, .nc-parl-gd::before { background: #C2364F; }
.nc-parl-mo::before { background: #7A3FD1; }
.nc-org { --org: var(--accent); border-color: color-mix(in srgb, var(--org) 35%, #fff); color: color-mix(in srgb, var(--org) 80%, var(--navy)); font-weight: 600; }
.nc-org::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--org); }
a.nc-org:hover { background: color-mix(in srgb, var(--org) 10%, #fff); color: var(--navy); }
.nc-flags { display: inline-flex; gap: 6px; margin-left: auto; }
.nc-flags:empty { display: none; }
.ncard-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 28px 22px; min-width: 0; }
.ncard-body > h3 { margin: 0; font-size: 20px; line-height: 1.35; font-weight: 700; }
.ncard-body .newslink { color: var(--navy); }
.ncard-body .newslink:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.ncard-body .ai-brief { font-size: 16px; color: var(--text); margin: 0; }
.ncard-body .ai-none { color: var(--faint); font-size: 15px; margin: 0; }
.ncard-body .spoiler summary { color: var(--accent); font-weight: 700; font-size: 15px; }
.ncard-body .ai { display: flex; flex-direction: column; gap: 8px; }
.ncard-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding-top: 10px; border-top: 1px dashed var(--rule); }
.ncard-foot .reg-src { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.ncard-foot .reg-link { font-weight: 700; font-size: 14px; text-decoration: none; }
.ncard-foot .reg-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ncard-foot .fav { margin-left: auto; }
.ncard .reg-note { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- важность изменения ---------- */
.imp { --imp: #2E6B45; --imp-bg: #E8F3EC; position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 8px;
  border-radius: 999px; background: var(--imp-bg); color: var(--imp); font-size: 12.5px; font-weight: 700; line-height: 1; cursor: help;
  white-space: nowrap; outline: none; }
.imp-medium { --imp: #8A5A00; --imp-bg: #FFF2D6; }
.imp-high { --imp: #B4233C; --imp-bg: #FDE6EA; }
.imp-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.imp-bars i { width: 3px; border-radius: 1px; background: currentColor; opacity: .25; }
.imp-bars i:nth-child(1) { height: 5px; opacity: 1; }
.imp-bars i:nth-child(2) { height: 8px; }
.imp-bars i:nth-child(3) { height: 12px; }
.imp-medium .imp-bars i:nth-child(2), .imp-high .imp-bars i:nth-child(2), .imp-high .imp-bars i:nth-child(3) { opacity: 1; }
.imp::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translate(-50%, 4px); z-index: 70;
  width: max-content; max-width: 300px; white-space: normal; padding: 10px 12px; border-radius: 10px; background: var(--navy); color: #fff;
  font-size: 13px; font-weight: 400; line-height: 1.45; text-align: left; box-shadow: 0 10px 28px rgba(13,44,108,.28);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s, transform .15s, visibility .15s; }
.imp::before { content: ''; position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); border: 6px solid transparent;
  border-top-color: var(--navy); border-bottom: 0; opacity: 0; visibility: hidden; transition: opacity .15s, visibility .15s; z-index: 70; }
.imp:hover::after, .imp:focus-visible::after, .imp.tip-open::after { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.imp:hover::before, .imp:focus-visible::before, .imp.tip-open::before { opacity: 1; visibility: visible; }
.imp:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--imp) 30%, transparent); }
.imp-legend { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.imp-legend li { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 13.5px; color: var(--muted); line-height: 1.45; }

/* ---------- ход рассмотрения ---------- */
.process { margin: 26px 0; padding: 22px 24px; border: 1px solid var(--rule); border-radius: 14px; background: #fff; }
.process h2 { margin: 0 0 4px; font-size: 24px; }
.tl { list-style: none; margin: 14px 0 0; padding: 0; position: relative; }
.tl-stage { position: relative; padding: 0 0 18px 40px; }
.tl-stage::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--rule); }
.tl-stage:last-child::before { display: none; }
.tl-stage.tl-done::before { background: color-mix(in srgb, #1E8A3C 45%, #fff); }
.tl-stage-head { display: flex; align-items: center; gap: 10px; min-height: 28px; color: var(--navy); font-size: 16px; }
.tl-dot { position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px; font-weight: 700; background: #fff; border: 2px solid var(--rule-2); color: var(--muted); }
.tl-done .tl-dot { background: #1E8A3C; border-color: #1E8A3C; color: #fff; }
.tl-current .tl-dot { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-pending .tl-stage-head strong { color: var(--muted); font-weight: 600; }
.tl-events { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tl-ev { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--alt); }
.tl-planned { background: #fff; border: 1px dashed var(--rule-2); }
.tl-when { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--navy); line-height: 1.5; }
.tl-when small { display: block; font-weight: 400; color: var(--muted); }
.tl-planned .tl-when { color: var(--faint); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.tl-what { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tl-name { font-size: 13px; color: var(--muted); }
.tl-decision { margin: 0; font-size: 15px; color: var(--text); line-height: 1.5; }
.tl-meta { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.tl-files summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--accent); }
.tl-files ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.5; }
.tl-compact .tl-ev { grid-template-columns: 80px 1fr; padding: 8px 10px; }

/* ---------- админка ---------- */
.user-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.abtn.danger { color: #A3172F; border-color: #F0B9C3; }
.abtn.danger:hover:not(:disabled) { background: #FDECEF; border-color: #A3172F; }
.del-user > summary { list-style: none; cursor: pointer; display: inline-block; }
.del-user > summary::-webkit-details-marker { display: none; }
.del-form { margin-top: 8px; padding: 10px; border: 1px solid #F0B9C3; border-radius: 10px; background: #FFF7F8; display: flex; flex-direction: column; gap: 8px; max-width: 260px; }
.del-form p { margin: 0; color: #7A1F2E; }
.del-form input { width: 100%; }
.upload-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.upload-row input[type=file] { font-size: 14px; max-width: 100%; }
.code-input.is-sending { opacity: .6; }

@media (max-width: 1100px) {
  .org-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .region-pick .rp-name { display: none; }
  .region-pick .rp-short { display: inline; }
}
@media (max-width: 640px) {
  .org-cards { grid-template-columns: 1fr; gap: 14px; }
  .org-card { padding: 18px; }
  .ncard-top { padding: 12px 16px 10px; }
  .ncard-body { padding: 14px 16px 18px; }
  .ncard-body > h3 { font-size: 18px; }
  .nc-flags { margin-left: 0; }
  .imp::after { left: 0; transform: translate(0, 4px); max-width: min(300px, 80vw); }
  .imp:hover::after, .imp:focus-visible::after, .imp.tip-open::after { transform: translate(0, 0); }
  .imp::before { left: 18px; }
  .process { padding: 16px; }
  .tl-stage { padding-left: 36px; }
  .tl-ev { grid-template-columns: 1fr; gap: 4px; }
  .rp-menu { left: auto; right: -60px; }
}
