/* Закупівельник – дизайн v2: білий сайт, чорні елементи, синій акцент логотипа.
   Попередній дизайн – git-тег design-v1. */
:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #3d3d3d;
  --muted: #737373;
  --line: #e7e7e7;
  --soft: #f5f5f5;
  --brand: #0075fd;      /* «За» в логотипі */
  --brand-ink: #002c6f;  /* решта логотипа */
  --radius: 14px;
  --pill: 999px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01"; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.05; letter-spacing: -.035em; font-weight: 700; margin: 48px 0 16px; }
.h2 { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin: 64px 0 20px; padding-top: 16px;
  border-top: 2px solid var(--ink); display: flex; justify-content: space-between; align-items: baseline; }
.more { font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.more:hover { color: var(--ink); }
.muted { color: var(--muted); }
.muted a, .foot a, .crumbs a, .card__snip a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.small { font-size: 13px; }
.lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 760px; letter-spacing: -.01em; }

/* шапка */
/* Шапка напівпрозора, але без backdrop-filter: розмиття в Chrome блимало (пропущені кадри, перша
   відмальовка після переходу між сторінками, пружинна прокрутка). Звичайна прозорість нічого не
   обчислює покадрово, тому блимати нема чому. Не повертати blur. */
.top { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--ink);
  background: linear-gradient(180deg, rgba(253, 253, 253, .95) 0%, rgba(241, 241, 241, .95) 55%, rgba(223, 223, 223, .96) 100%); }
/* смуга прочитання статті: лежить на нижній лінії шапки */
.readbar { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; }
.readbar__fill { display: block; height: 100%; background: var(--brand); transform: scaleX(0); transform-origin: 0 50%;
  will-change: transform; }
.top__row { display: flex; align-items: center; gap: 32px; min-height: 64px; flex-wrap: nowrap; position: relative; }
.logo { display: inline-flex; align-items: center; flex: none; }
.logo img { display: block; height: 34px; width: auto; }
/* Меню завжди в один рядок: коли пунктів більше, ніж місця, рядок прокручується вбік, а не переноситься
   й не виштовхує пошук униз. */
.nav { display: flex; gap: 4px; flex: 0 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { font-size: 14px; font-weight: 500; padding: 7px 14px; border-radius: var(--pill); color: var(--ink-2); white-space: nowrap; flex: none;
  transition: background .15s, color .15s; }
.nav a:hover { background: rgba(0, 0, 0, .06); color: var(--ink); }
@media (max-width: 1140px) { .top__row { gap: 16px; } .nav { gap: 0; } .nav a { padding: 7px 10px; } }
/* Пошук у шапці – лупа; поле розгортається ліворуч поверх меню (див. _topsearch.html) */
.search { margin-left: auto; flex: none; position: relative; width: 40px; height: 40px; }
.search__btn { position: absolute; right: 0; top: 0; z-index: 1; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--pill);
  background: transparent; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; transition: background .15s, color .15s; }
.search__btn:hover { background: rgba(0, 0, 0, .06); color: var(--ink); }
.search .search__btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.search input { position: absolute; right: 0; top: 0; height: 40px; width: 40px; padding: 0 44px 0 18px; opacity: 0; pointer-events: none;
  background: #fff; transition: width .2s ease, opacity .15s, border-color .15s; }
.search.is-open input { width: min(380px, calc(100vw - 32px)); opacity: 1; pointer-events: auto; box-shadow: 0 4px 16px rgba(0, 0, 0, .08); }
.search.is-open .search__btn { color: var(--brand); }
.artsearch { max-width: 760px; margin: 0 0 24px; }
.search input, .filters input, .filters select {
  font: inherit; font-size: 14px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--pill);
  background: var(--soft); color: var(--ink); min-width: 0; outline: none; transition: border-color .15s, background .15s;
}
.search input:focus, .filters input:focus, .filters select:focus { border-color: var(--brand); background: #fff; }

/* головна */
.hero { padding: 40px 0 8px; border-bottom: 1px solid var(--line); padding-bottom: 48px; }
.hero h1 { font-size: clamp(40px, 7vw, 88px); max-width: 1000px; margin-top: 32px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.feature { display: flex; flex-direction: column; gap: 12px; padding: 28px; min-height: 220px; background: var(--ink); color: #fff;
  border-radius: var(--radius); transition: transform .2s; }
.feature strong { font-size: 22px; line-height: 1.2; letter-spacing: -.02em; font-weight: 650; }
.feature .muted { color: #a3a3a3; font-size: 15px; margin-top: auto; }
.feature:hover { transform: translateY(-3px); }
.feature__kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; color: var(--brand); }
.feature .feature__kicker { color: #6fb1ff; }
.rubgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.rub { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 15px; font-weight: 500; transition: background .15s, color .15s, border-color .15s; }
.rub span { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; transition: color .15s; }
.rub:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.rub:hover span { color: #a3a3a3; }
.rub--empty { color: var(--muted); }
.featured { display: block; margin-top: 32px; padding: 40px; background: var(--ink); color: #fff; border-radius: var(--radius); transition: transform .15s; }
.featured:hover { transform: translateY(-3px); }
.featured .feature__kicker { color: #6fb1ff; }
.featured strong { display: block; max-width: 900px; margin: 14px 0 12px; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.12; letter-spacing: -.025em; font-weight: 650; }
.featured p { max-width: 760px; margin: 0; color: #c9c9c9; font-size: 17px; line-height: 1.45; }
.featured__dates { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 28px; padding-top: 20px; border-top: 1px solid #333; font-size: 14px; color: #c9c9c9; }
.featured__dates b { display: block; color: #fff; font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.artlist { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.artlist li { border-bottom: 1px solid var(--line); }
.artlist a { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 14px 4px; transition: background .15s; }
.artlist a:hover { background: var(--soft); }
.artlist time { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.artlist strong { font-weight: 550; line-height: 1.35; }
.usedin { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; row-gap: 2px; align-items: baseline; margin: 8px 0 0; font-size: 14px; line-height: 1.45; }
.usedin__label { grid-column: 1; grid-row: 1; color: var(--muted); }
.usedin__link { grid-column: 2; justify-self: start; min-width: 0; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.usedin__link--extra { display: none; }
.usedin__more { grid-column: 2; justify-self: start; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--brand); font: inherit; font-weight: 500; white-space: nowrap; cursor: pointer; }
.usedin.is-open .usedin__link { white-space: normal; }
.usedin.is-open .usedin__link--extra { display: block; }
.tofind { margin: 24px 0; padding: 16px 20px; border: 1px solid #e0a800; border-radius: var(--radius); background: #fff9e6; }
.tofind strong { display: block; margin-bottom: 6px; }
.tofind ul { margin: 0; padding-left: 20px; }
.tag-find { color: #8a6400; font-weight: 600; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 200px; padding: 8px 0 28px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.bar__fill { width: 100%; background: var(--ink); border-radius: 6px 6px 2px 2px; min-height: 3px; transition: opacity .15s; }
.bars:hover .bar__fill { opacity: .25; }
.bars .bar:hover .bar__fill { opacity: 1; }
.bar__label { position: absolute; bottom: -24px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* картки */
.cards { display: grid; border-top: 1px solid var(--line); }
.card { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.card__meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); }
.card__title { font-size: 19px; line-height: 1.35; letter-spacing: -.015em; font-weight: 600; margin: 0; max-width: 900px; }
.card__title a { background-image: linear-gradient(var(--ink), var(--ink)); background-size: 0 1.5px; background-repeat: no-repeat;
  background-position: 0 100%; transition: background-size .25s; }
.card__title a:hover { background-size: 100% 1.5px; }
.card__snip { margin: 0; color: var(--ink-2); font-size: 15px; max-width: 860px; }
.src { font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.src::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--ink); }
.src--radnuk::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); }
.src--rada::before, .src--own::before { border-radius: 2px; }
.period { color: var(--muted); }
.period:hover { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; font-weight: 500; padding: 3px 11px; border-radius: var(--pill); border: 1px solid var(--line); color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s; }
.chip:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip--aud { background: var(--soft); border-color: var(--soft); }

/* база */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.filters input[name=q] { flex: 1 1 280px; }
.filters select { appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%230a0a0a' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.filters button, .btn { font: inherit; font-size: 14px; font-weight: 600; padding: 10px 22px; border-radius: var(--pill); border: 1px solid var(--ink);
  background: var(--ink); color: #fff; cursor: pointer; display: inline-block; transition: background .15s, color .15s; }
.filters button:hover, .btn:hover { background: #fff; color: var(--ink); }
.pager { display: flex; gap: 16px; justify-content: center; align-items: center; margin: 32px 0; font-size: 14px; }
.pager a { padding: 8px 18px; border: 1px solid var(--ink); border-radius: var(--pill); font-weight: 500; }
.pager a:hover { background: var(--ink); color: #fff; }
.crumbs { margin-top: 32px; font-size: 13px; color: var(--muted); }
.doc h1 { max-width: 920px; font-size: clamp(28px, 4vw, 44px); }
.docmeta { display: grid; grid-template-columns: 200px 1fr; gap: 0; border-top: 2px solid var(--ink); font-size: 14px; margin: 24px 0; max-width: 920px; }
.docmeta dt, .docmeta dd { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.docmeta dt { color: var(--muted); }
.docmeta dd a { text-decoration: underline; text-underline-offset: 3px; }
.docmeta dd.chips a { text-decoration: none; }
.teaser { margin: 32px 0; padding: 32px; background: var(--soft); border-radius: var(--radius); max-width: 920px; }
.teaser p:first-child { font-size: 18px; line-height: 1.6; color: var(--ink-2); margin-top: 0; }
.related { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.related li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.related a { font-weight: 500; }

/* хронологія, рубрики */
.periods { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.periodcard { display: flex; flex-direction: column; gap: 4px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius);
  transition: background .15s, color .15s, border-color .15s; }
.periodcard strong { font-size: 15px; line-height: 1.3; }
.periodcard .muted { font-size: 13px; }
.periodcard b { font-size: 32px; letter-spacing: -.03em; margin-top: auto; padding-top: 12px; }
.periodcard:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.periodcard:hover .muted { color: #a3a3a3; }
.tl { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); }
.tl th, .tl td { text-align: left; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tl th { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.tl td a b { font-size: 17px; }
.hbar { display: inline-block; width: 140px; height: 6px; background: var(--soft); border-radius: 3px; margin-right: 10px; overflow: hidden; vertical-align: middle; }
.hbar span { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.rublist { display: grid; border-top: 2px solid var(--ink); }
.rubrow { display: grid; grid-template-columns: 280px 1fr 80px; gap: 24px; align-items: center; padding: 18px 12px; border-bottom: 1px solid var(--line);
  transition: background .15s, color .15s; }
.rubrow strong { font-size: 17px; font-weight: 600; }
.rubrow b { text-align: right; font-variant-numeric: tabular-nums; font-size: 17px; }
.rubrow:hover { background: var(--ink); color: #fff; }
.rubrow:hover .muted { color: #a3a3a3; }

/* стаття */
.post { max-width: 760px; margin: 0 auto; }
.post__head { padding-bottom: 28px; margin-bottom: 40px; border-bottom: 2px solid var(--ink); }
.post__head h1 { font-size: clamp(34px, 5vw, 54px); }
.post__meta { font-size: 14px; color: var(--muted); margin-bottom: 0; }
.checked { color: var(--brand); font-weight: 500; }
.checked::before { content: "✓ "; }
.prose { font-size: 18px; line-height: 1.75; color: #1a1a1a; }
.prose h2 { font-size: 28px; line-height: 1.2; letter-spacing: -.025em; margin: 56px 0 16px; }
.prose h3 { font-size: 20px; letter-spacing: -.015em; margin: 36px 0 10px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; margin: 24px 0; display: block; overflow-x: auto; border-top: 2px solid var(--ink); }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 12px 16px 12px 0; text-align: left; vertical-align: top; }
.prose th { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.prose blockquote { margin: 32px 0; padding: 24px 28px; background: var(--ink); color: #fff; border-radius: var(--radius); font-size: 17px; line-height: 1.6; }
.prose blockquote p { margin: 0; }
.prose ol, .prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose em { color: var(--muted); }
.lawtext { font-size: 16px; line-height: 1.65; max-width: 860px; }
.lawtext p { margin: .4em 0; }

.foot { margin-top: 96px; padding: 32px 24px 56px; border-top: 2px solid var(--ink); font-size: 14px; display: grid; gap: 4px; }
.foot p { margin: 0; }
.foot__rights { color: var(--muted); font-size: 13px; max-width: 760px; }
.foot__rights:first-of-type { margin-top: 8px; }
.post__rights { margin: 40px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); max-width: 760px; }

@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .top__row { gap: 12px; padding-top: 10px; flex-wrap: wrap; position: static; }
  .nav { order: 3; width: 100%; margin: 0 -14px; }
  .search input { font-size: 16px; } /* менше 16px – і iOS збільшує сторінку під час фокуса */
  .logo img { height: 28px; }
  .docmeta { grid-template-columns: 1fr; }
  .docmeta dt { border-bottom: 0; padding-bottom: 0; }
  .rubrow { grid-template-columns: 1fr auto; }
  .rubrow .muted { display: none; }
  .hide-sm { display: none; }
  .prose { font-size: 17px; }
  .feature { min-height: 0; }
}

/* Чернетки: редакторська черга */
.notice { padding: 12px 16px; border: 1px solid var(--brand); border-radius: var(--radius); color: var(--ink); background: #f3f8ff; }
.pick { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--ink); cursor: pointer; }
.pick input { width: 18px; height: 18px; }
.tag-wait { font-size: 12px; font-weight: 600; color: var(--brand); }
.note { width: 100%; max-width: 860px; font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); box-sizing: border-box; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn--ghost { background: #fff; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.summary { white-space: pre-wrap; font: inherit; font-size: 14px; background: #fafafa; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; overflow-x: auto; }
.log { border-collapse: collapse; width: 100%; font-size: 14px; }
.log th, .log td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
@media (max-width: 640px) {
  .featured { padding: 24px; }
  .artlist a { grid-template-columns: 1fr; gap: 2px; }
}

/* Форум */
.fsr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fhp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.js .nojs { display: none; }
.fhead { padding-bottom: 8px; }
.fhead h1 { font-size: clamp(32px, 4.6vw, 52px); margin: 40px 0 10px; }
.fhead .lead { margin: 0 0 24px; }
.ask { border: 1.5px solid var(--ink); border-radius: 18px; background: #fff; padding: 6px; transition: box-shadow .15s, border-color .15s; }
.ask:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(0, 117, 253, .12); }
.ask textarea { display: block; width: 100%; border: 0; outline: 0; resize: none; background: transparent; color: var(--ink);
  font: inherit; font-size: 18px; line-height: 1.45; letter-spacing: -.01em; padding: 12px 14px 6px; max-height: 50vh; }
.ask textarea::placeholder { color: var(--muted); }
.ask__foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 4px 6px 6px 14px; }
.ask__hint { margin-right: auto; font-size: 13px; color: var(--muted); }
.ask .btn:disabled { opacity: .55; cursor: default; }
.ask--reply { margin-top: 28px; }
.ask--reply textarea { font-size: 16px; }
.btn--sm { padding: 7px 16px; font-size: 13px; }
.ferror { margin: 4px 14px 8px; color: #b3261e; font-size: 14px; font-weight: 500; }
.fname { margin: 10px 2px 0; font-size: 13px; color: var(--muted); }
.fname summary { cursor: pointer; width: fit-content; list-style: none; }
.fname summary::-webkit-details-marker { display: none; }
.fname summary:hover { color: var(--ink); }
.fname b { color: var(--ink-2); font-weight: 600; }
.fname__form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.fname__form input[name=name] { font: inherit; font-size: 14px; padding: 7px 14px; border: 1px solid var(--line); border-radius: var(--pill); outline: 0; flex: 0 1 240px; min-width: 0; }
.fname__form input[name=name]:focus { border-color: var(--brand); }
.fname__roles { display: flex; gap: 4px; }
.fname__roles input { position: absolute; opacity: 0; }
.fname__roles span { display: block; padding: 6px 12px; border-radius: var(--pill); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); cursor: pointer; }
.fname__roles input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.fname__roles input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.flayout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; margin-top: 32px; align-items: start; }
.fmain { min-width: 0; }
.flayout:not(:has(.fside)) { grid-template-columns: minmax(0, 1fr); }
.fside { position: sticky; top: 88px; }
.flabel { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
#forum-live .flabel + .flist { margin-bottom: 24px; }
#forum-live .flist { margin-top: 0; }
.ftabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.ftabs a { font-size: 14px; font-weight: 500; padding: 7px 14px; border-radius: var(--pill); color: var(--ink-2); }
.ftabs a:hover { background: var(--soft); }
.ftabs a.is-on { background: var(--ink); color: #fff; }
.flist { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.frow { border-bottom: 1px solid var(--line); }
.frow__link { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 8px 16px 0; transition: background .12s; }
.frow__link:hover { background: var(--soft); }
.frow__count { display: flex; flex-direction: column; align-items: center; line-height: 1.15; color: var(--ink-2); }
.frow__count b { font-size: 20px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.frow__count small { font-size: 11px; color: var(--muted); }
.frow__count.is-solved b, .frow__count.is-solved small { color: #0a7a3e; }
.frow__count.is-empty b { color: var(--muted); }
.frow__main { display: grid; gap: 5px; min-width: 0; }
.frow__title { font-size: 17px; line-height: 1.35; font-weight: 600; letter-spacing: -.012em; }
.frow__snip { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.frow__meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 13px; color: var(--muted); }
.frow__people { display: flex; padding-left: 8px; }
.frow__people .av { margin-left: -8px; box-shadow: 0 0 0 2px #fff; }
.fchip { font-size: 12px; padding: 1px 9px; border-radius: var(--pill); background: #eef5ff; color: var(--brand-ink); font-weight: 500; }
mark { background: #dcebff; color: inherit; border-radius: 3px; padding: 0 1px; }
.fempty, .fnext { color: var(--muted); font-size: 15px; margin: 16px 0; }
.farts { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.farts a { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .12s; }
.farts a:hover { border-color: var(--ink); }
.farts strong { font-size: 15px; line-height: 1.35; font-weight: 600; }
.farts span { font-size: 13px; line-height: 1.4; color: var(--muted); }
.frubs { display: grid; gap: 2px; margin-bottom: 24px; }
.frubs a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 12px; border-radius: 10px; font-size: 14px; color: var(--ink-2); }
.frubs a:hover { background: var(--soft); }
.frubs a.is-on { background: var(--ink); color: #fff; }
.frubs span { color: var(--muted); font-variant-numeric: tabular-nums; }

.av { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-size: 12px; font-weight: 600; letter-spacing: .01em; }
.av--0 { background: #dcebff; color: #0b4aa2; }
.av--1 { background: #e3f4e8; color: #17663a; }
.av--2 { background: #fdeadb; color: #99481a; }
.av--3 { background: #efe6fb; color: #5b34a0; }
.av--4 { background: #fbe4ea; color: #a12a4d; }
.av--5 { background: #e7eef2; color: #37505f; }
.frole { font-size: 12px; font-weight: 500; color: var(--muted); }
.frole::before { content: "· "; }

.flayout--thread { margin-top: 12px; }
.fq h1 { font-size: clamp(25px, 3.2vw, 36px); line-height: 1.16; letter-spacing: -.025em; margin: 12px 0 14px; font-weight: 650; }
.fq__by { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; font-size: 14px; color: var(--muted); }
.fq__by b { color: var(--ink); font-weight: 600; }
.fsolved { color: #0a7a3e; font-weight: 600; font-size: 13px; }
.ftext { font-size: 16px; line-height: 1.6; color: #1a1a1a; overflow-wrap: anywhere; }
.ftext p { margin: 0 0 .7em; }
.ftext p:last-child { margin-bottom: 0; }
.ftext a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ftext--q { margin-top: 16px; font-size: 17px; }
.fnotice { margin: 20px 0 0; padding: 12px 16px; border: 1px solid var(--brand); border-radius: var(--radius); background: #f3f8ff; font-size: 14px; }
#answers { margin: 36px 0 0; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.fpost { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 88px; }
.fpost:target { background: #f3f8ff; box-shadow: -10px 0 0 #f3f8ff, 10px 0 0 #f3f8ff; }
.fpost--accepted { margin: 14px 0 0; padding: 16px; border: 1.5px solid #0a7a3e; border-radius: var(--radius); background: #f4fbf6; }
.fpost__badge { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #0a7a3e; }
.fpost__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin-bottom: 4px; font-size: 14px; }
.fpost__head b { font-weight: 600; }
.fpost__head time { color: var(--muted); font-size: 13px; }
.fpost__head time::before { content: "· "; }
.fpost__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fvote { font: inherit; font-size: 13px; font-weight: 500; padding: 4px 12px; border: 1px solid var(--line); border-radius: var(--pill); background: #fff; color: var(--ink-2); cursor: pointer; transition: border-color .12s, background .12s, color .12s; }
.fvote:hover { border-color: var(--ink); }
.fvote.is-on { background: #eef5ff; border-color: var(--brand); color: var(--brand-ink); }
.fvote.is-ok { border-color: #0a7a3e; color: #0a7a3e; background: #fff; }
.fvote--static { cursor: default; color: var(--muted); }
.fvote--static:hover { border-color: var(--line); }
.fdisclaimer { margin: 20px 2px 0; font-size: 13px; color: var(--muted); }
.fside__links { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; font-size: 14px; line-height: 1.4; }
.fside__links a { font-weight: 500; }
.fside__links a:hover { color: var(--brand); }
.fside__links small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

.ask__art { display: flex; align-items: center; gap: 8px; margin: 6px 8px 0; padding: 7px 8px 7px 12px; border-radius: 10px;
  background: #eef5ff; font-size: 13px; color: var(--ink-2); }
.ask__art span { flex: 1; min-width: 0; }
.ask__art a { color: var(--brand-ink); font-weight: 600; }
.ask__unpin { flex: none; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--muted);
  font-size: 18px; line-height: 1; cursor: pointer; }
.ask__unpin:hover { background: rgba(0, 0, 0, .07); color: var(--ink); }
.ask__rubs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 2px 8px 0; padding: 0 6px; font-size: 13px; }
.ask__rublist { display: contents; }
.ask__rub { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 12px; border-radius: var(--pill); background: #eef5ff; color: var(--brand-ink); font-weight: 500; }
.ask__rub.is-new { background: #fff7e6; color: #7a4b00; }
.ask__rub small { font-size: 11px; font-weight: 400; opacity: .8; }
.ask__unrub { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 15px; line-height: 1; cursor: pointer; }
.ask__unrub:hover { background: rgba(0, 0, 0, .08); }
.ask__add summary { list-style: none; cursor: pointer; padding: 3px 12px; border: 1px dashed var(--line); border-radius: var(--pill); color: var(--ink-2); }
.ask__add summary::-webkit-details-marker { display: none; }
.ask__add summary:hover { border-color: var(--ink); }
.ask__add[open] summary { display: none; }
.ask__addbox { display: inline-flex; gap: 6px; align-items: center; }
.ask__addbox input { font: inherit; font-size: 14px; width: 240px; max-width: 60vw; padding: 5px 12px; border: 1px solid var(--line); border-radius: var(--pill); outline: 0; background: #fff; }
.ask__addbox input:focus { border-color: var(--brand); }
.ask__rubhint { color: var(--muted); }
html:not(.js) .js-only { display: none; }
.fadmin__newrub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.ffilter { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }
.ffilter a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.fart { display: grid; gap: 2px; margin-top: 18px; padding: 12px 16px; border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: 10px; transition: border-color .12s; }
.fart:hover { border-color: var(--brand); }
.fart small { font-size: 12px; color: var(--muted); }
.fart strong { font-size: 15px; line-height: 1.35; font-weight: 600; }
.post__forum { color: var(--brand); font-weight: 500; }
.artforum { margin-top: 56px; scroll-margin-top: 88px; }
.artforum .h2 { margin-top: 0; }
.artforum .askline { margin-top: 24px; }
.askline { margin-top: 56px; padding: 24px; background: var(--soft); border-radius: var(--radius); }
.askline label { display: block; margin-bottom: 12px; font-size: 16px; }
.askline div { display: flex; gap: 8px; }
.askline input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--pill); background: #fff; outline: 0; }
.askline input:focus { border-color: var(--brand); }

.fadmin { display: grid; gap: 12px; margin-top: 24px; max-width: 920px; }
.fadmin__item { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 88px; }
.fadmin__item.is-hidden, .fadmin__post.is-hidden { opacity: .55; }
.fadmin__item h2 { margin: 0 0 4px; font-size: 17px; line-height: 1.35; letter-spacing: -.01em; }
.fadmin__item p { margin: 0 0 10px; }
.fadmin__rubs { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.fadmin__rubs details { display: contents; }
.fadmin__rubs summary { list-style: none; }
.fadmin__rubs summary::-webkit-details-marker { display: none; }
.fadmin__all { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.frub { font: inherit; font-size: 13px; padding: 4px 12px; border-radius: var(--pill); border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
.frub:hover { border-color: var(--ink); }
.frub.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.frub.is-suggested { border-color: var(--brand); color: var(--brand); font-weight: 500; }
.fadmin__row { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; margin-top: 12px; }
.fadmin__posts { flex: 1; min-width: 240px; }
.fadmin__posts summary { width: fit-content; list-style: none; }
.fadmin__posts summary::-webkit-details-marker { display: none; }
.fadmin__post { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.45; }
.fadmin__post p { margin: 0; }

@media (max-width: 900px) {
  .flayout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .fside { position: static; }
  .frubs { display: flex; flex-wrap: wrap; gap: 4px; }
  .frubs a { padding: 5px 12px; border: 1px solid var(--line); border-radius: var(--pill); gap: 6px; font-size: 13px; }
}
@media (max-width: 760px) {
  .fhead h1 { margin-top: 24px; }
  .ask textarea, .ask__addbox input { font-size: 16px; } /* менше 16px – і iOS збільшує сторінку під час фокуса */
  .frow__link { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding-right: 0; }
  .frow__people { display: none; }
  /* пунктів меню більше, ніж уміщує телефон: рядок прокручується вбік, а не переноситься */
  .nav { flex-wrap: nowrap; margin: 0 -10px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 10px; white-space: nowrap; flex: none; }
  .frow__count small { display: none; }
  .frow__title { font-size: 16px; }
  .askline div { flex-direction: column; }
  .askline .btn { align-self: flex-start; }
}

/* заборонене ПЗ та обладнання */
.banhome { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px 40px; align-items: center; margin-top: 40px;
  padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.banhome__text { display: grid; gap: 8px; }
.banhome__text strong { font-size: 24px; line-height: 1.2; letter-spacing: -.02em; font-weight: 650; }
.banhome__text a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.banhome__text p { margin: 0; color: var(--ink-2); font-size: 15px; }
.banhome__search { display: flex; gap: 8px; }
.banhome__search input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 12px 18px; border: 1px solid var(--line);
  border-radius: var(--pill); background: #fff; outline: none; }
.banhome__search input:focus { border-color: var(--brand); }
.banmeta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 4px 0; font-size: 14px; }
.banmeta a { text-decoration: underline; text-underline-offset: 3px; }
.banchips { margin: 4px 0 16px; }
.banchips .chip span { color: var(--muted); margin-left: 4px; font-variant-numeric: tabular-nums; }
.banchips .chip:hover span, .chip--on span { color: #a3a3a3; }
.chip--on { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters select { max-width: 100%; }
.bancard .card__title { font-size: 17px; }
.banorig { color: var(--muted); font-weight: 400; }
.banbasis { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) {
  .banhome { grid-template-columns: 1fr; padding: 20px; }
  .banhome__search { flex-direction: column; }
  .filters select { flex: 1 1 100%; }
}
.bantag { font-weight: 600; color: #8a6400; }
.bantag--off { color: #b42318; }
.bancard--off .card__title { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--muted); }
.banhist summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.banhist ul { margin: 4px 0 8px; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.banhist p { margin: 8px 0 0; }
.bantable { overflow-x: auto; }
.nowrap { white-space: nowrap; }
.banbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 8px 0 12px; }
.banbar .muted { margin: 0; }
.banview { display: inline-flex; padding: 3px; border-radius: var(--pill); background: var(--soft); border: 1px solid var(--line); }
.banview a { font-size: 13px; font-weight: 600; padding: 6px 16px; border-radius: var(--pill); color: var(--ink-2); }
.banview a.is-on { background: var(--ink); color: #fff; }
.banview a:not(.is-on):hover { color: var(--ink); }
/* Таблиця виходить за колонку сайту на всю ширину вікна й іде донизу сторінки; ширша за екран – гортається вбік. */
.bangrid { position: relative; left: 50%; transform: translateX(-50%); width: calc(100vw - 32px); overflow-x: auto;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bangrid:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.bantbl { border-collapse: separate; border-spacing: 0; font-size: 13px; line-height: 1.4; min-width: 1100px; width: 100%; }
.bantbl th, .bantbl td { padding: 7px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.bantbl th:last-child, .bantbl td:last-child { border-right: 0; }
.bantbl thead th { position: sticky; top: var(--banhead, 0px); z-index: 1; background: var(--soft); font-size: 12px; font-weight: 600; color: var(--ink-2); min-width: 90px; }
.bantbl td.num, .bantbl th:first-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 0; width: 1%; }
.bantbl td.name { font-weight: 600; min-width: 200px; }
.bantbl td.basis { min-width: 220px; color: var(--ink-2); }
.bantbl tbody tr:nth-child(even) td { background: #fafafa; }
.bantbl tbody tr:hover td { background: #f0f6ff; }
.bantbl tr.is-off td.name { text-decoration: line-through; color: var(--muted); }
.bantbl .banhist summary { font-size: 12px; font-weight: 500; }
.bantbl .banhist p { font-size: 12px; margin: 4px 0 0; min-width: 220px; }
.bantbl th:last-child, .bantbl td:last-child { min-width: 140px; }
.bantbl td:nth-child(3), .bantbl td:nth-child(5) { min-width: 140px; }
/* Коли таблиця вміщується в екран, гортання вбік не потрібне: тоді заголовок прилипає під шапкою сайту. */
@media (min-width: 1180px) {
  .bangrid { overflow: visible; }
  .bantbl { --banhead: 65px; }
}

/* Посилання в тексті – як заголовки в переліку статей: при наведенні лінія проростає зліва направо.
   Колір і фон не змінюються. Ті, що були підкреслені, лишають тонку сіру лінію в спокої. */
.lead a, .tofind a, .post__meta a, .banbasis a, .muted a, .foot a, .crumbs a, .card__snip a, .usedin__link, .banmeta a, .docmeta dd:not(.chips) a, .prose a, .ffilter a, .ftext a,
.related a, .ask__art a, .post__forum, .bantbl a, .usedin__more {
  --rest: transparent; text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(var(--rest), var(--rest));
  background-size: 0 1.5px, 100% 1px; background-position: 0 100%, 0 100%; background-repeat: no-repeat;
  padding-bottom: 1px; transition: background-size .25s; }
.lead a, .tofind a, .post__meta a, .banbasis a, .muted a, .foot a, .crumbs a, .card__snip a, .usedin__link, .banmeta a, .docmeta dd:not(.chips) a, .prose a, .ffilter a, .ftext a {
  --rest: color-mix(in srgb, currentColor 22%, transparent); }
.lead a:hover, .tofind a:hover, .post__meta a:hover, .banbasis a:hover, .muted a:hover, .foot a:hover, .crumbs a:hover, .card__snip a:hover, .usedin__link:hover, .banmeta a:hover, .docmeta dd:not(.chips) a:hover,
.prose a:hover, .ffilter a:hover, .ftext a:hover, .related a:hover, .ask__art a:hover, .post__forum:hover, .bantbl a:hover, .usedin__more:hover {
  background-size: 100% 1.5px, 100% 1px; }
/* сторінка документа з реєстру: текст копії */
.post .doc__title { font-size: clamp(24px, 3vw, 36px); line-height: 1.15; }
.doc__note { font-size: 14px; color: var(--muted); margin: 8px 0 24px; padding: 10px 16px; background: var(--soft); border-radius: 10px; max-width: 760px; }
.doc__text { max-width: 760px; font-size: 17px; line-height: 1.7; }
.doc__text p { margin: 0 0 12px; overflow-wrap: anywhere; }

/* «Перевір себе»: тест на сторінці /tests/<slug> (inproc/quiz.py, static/quiz.js) */
.quiz { margin: 8px 0 32px; padding: 28px 28px 24px; border: 2px solid var(--ink); border-radius: var(--radius); }
.quiz__intro { margin: 0 0 20px; font-size: 15px; color: var(--muted); }
.prose .quiz__list { list-style: none; padding: 0; margin: 0; counter-reset: q; }
.prose .quiz__q { counter-increment: q; margin: 0; padding: 20px 0; border-top: 1px solid var(--line); }
.quiz__text { margin: 0 0 12px; font-weight: 600; line-height: 1.5; }
.quiz__text::before { content: counter(q) ". "; color: var(--muted); }
.quiz__opts { display: flex; flex-direction: column; gap: 8px; }
.quiz__opt { font: inherit; font-size: 16px; line-height: 1.45; text-align: left; padding: 12px 16px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--soft); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.quiz__opt:hover:not(:disabled) { border-color: var(--ink); background: #fff; }
.quiz__opt:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.quiz__opt:disabled { cursor: default; color: var(--ink-2); }
.quiz__opt.is-right { border-color: #1a7f37; background: #dcf1e0; color: var(--ink); }
.quiz__opt.is-right::after { content: " ✓"; color: #1a7f37; font-weight: 700; }
.quiz__opt.is-wrong { border-color: #c62828; background: #fbdcdc; color: var(--ink); }
.quiz__opt.is-wrong::after { content: " ✕"; color: #c62828; font-weight: 700; }
.quiz__why { margin: 12px 0 0; padding: 12px 16px; background: var(--soft); border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0;
  font-size: 15px; line-height: 1.6; }
.quiz__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px;
  border-top: 1px solid var(--line); }
.quiz__foot[hidden], .quiz__why[hidden] { display: none; }
.quiz__score { margin: 0; font-weight: 600; }
.quiz__error { padding: 12px 16px; border: 2px dashed #c62828; border-radius: 10px; color: #c62828; font-size: 15px; }
@media (max-width: 600px) { .quiz { padding: 20px 16px 16px; } }
/* посилання зі статті на її тест */
.quizlink { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; align-items: center; margin: 48px 0 0; padding: 20px 24px;
  border: 2px solid var(--ink); border-radius: var(--radius); transition: background .15s, color .15s; }
.quizlink__kicker { grid-column: 1; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.quizlink__text { grid-column: 1; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.quizlink__go { grid-column: 2; grid-row: 1 / span 2; font-size: 14px; font-weight: 600; padding: 10px 20px; border-radius: var(--pill);
  background: var(--ink); color: #fff; white-space: nowrap; }
.quizlink:hover { background: var(--ink); color: #fff; }
.quizlink:hover .quizlink__kicker { color: #8fc0ff; }
.quizlink:hover .quizlink__go { background: #fff; color: var(--ink); }
.quizback { display: flex; align-items: center; gap: 20px; margin: 0 0 48px; }
@media (max-width: 600px) {
  .quizlink { grid-template-columns: 1fr; padding: 16px; }
  .quizlink__go { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
}

/* Реєстр санкцій РНБО: /sanktsii і картка суб'єкта /sanktsii/<sid> (inproc/sanctions.py) */
.sancform input[name=q] { flex: 1 1 100%; font-size: 16px; padding: 13px 20px; }
.sancform select[name=decree] { max-width: 260px; }
.sancform select[name=country] { max-width: 240px; }
.sancban { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; padding: 0 6px; cursor: pointer; }
.sancban input { width: 16px; height: 16px; accent-color: var(--ink); }
.sanctag { font-weight: 600; color: #b42318; }
.sanctag--off { color: var(--muted); font-weight: 500; }
.sancban-tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: var(--pill); background: #b42318; color: #fff; }
.sanccard .card__title { font-size: 17px; }
.sanccard--off .card__title a { color: var(--muted); }
.sancids { display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: 14px; }
.sancids > span { overflow-wrap: anywhere; }
.sanc__title { font-size: clamp(24px, 3vw, 36px); line-height: 1.2; letter-spacing: -.02em; margin-bottom: 4px; max-width: 920px; }
.sanc__translit { margin: 0 0 20px; color: var(--muted); font-size: 17px; }
.sanc__status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 16px 20px; border-radius: var(--radius);
  background: var(--soft); max-width: 920px; box-sizing: border-box; }
.sanc__status.is-on { background: #fdecea; }
.sanc__status.is-on > strong { color: #b42318; }
.sanc__code { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.docmeta dd { overflow-wrap: anywhere; }
.sanclist { list-style: none; margin: 0 0 32px; padding: 0; max-width: 920px; }
.sanclist li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sanclist__no { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.sanclist strong { font-size: 15px; }
.sanclist p { margin: 2px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.sanclist li.is-ban { background: #fdecea; border-radius: 10px; padding: 12px; margin: 4px 0; border-bottom: 0; }
.sanclist li.is-ban strong, .sanclist li.is-ban .sanclist__no { color: #b42318; }
.sancacts { border-top: 2px solid var(--ink); max-width: 920px; }
.sancact { padding: 14px 0 14px 16px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.sancact.is-on { border-left-color: #b42318; }
.sancact__head { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; font-size: 15px; }
.sancact__head time { font-variant-numeric: tabular-nums; color: var(--muted); }
.sancact__head a, .sancact__state a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.sancact__state { margin: 4px 0; font-size: 14px; color: var(--ink-2); }
.sancact .banhist li { margin: 4px 0; }
@media (max-width: 700px) {
  .sancform select { max-width: none !important; flex: 1 1 100%; }
}

/* Висновки ДАСУ: /vysnovky-dasu, картка /vysnovky-dasu/<UA-M-…> і блок на головній (inproc/dasu.py) */
.dasuform select { max-width: 280px; }
.dasu__title { font-size: clamp(22px, 2.6vw, 30px); }
.dasumore { flex: 1 1 100%; order: 10; }
.dasumore summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 4px 2px; width: max-content; }
.dasumore__grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dasuform button[type=submit] { order: 11; }
.dasutopics { align-items: center; margin-top: -8px; }
.dasuok { font-weight: 600; color: #1a7f37; }
.dasucard { min-width: 0; overflow-wrap: anywhere; }
.dasucard .card__title { font-size: 17px; }
.dasucard--ok .card__title a { color: var(--ink-2); }
.dasuchips { margin-top: 2px; }
.dasuchips .chip { font-size: 12px; }
.dasulinks { margin: 16px 0 0; }
.dasutext { margin-top: 8px; overflow-wrap: anywhere; }
.dasuhome__list a { min-width: 0; overflow-wrap: anywhere; }
.dasutext h2 { font-size: 20px; margin: 32px 0 12px; }
.dasutext p { font-size: 16px; line-height: 1.65; }
.dasuviol { font-weight: 600; }
.dasupost { margin: 0 0 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; }
.dasupost p { font-size: 15px; margin: 8px 0 0; }
.dasuhome { margin-top: 64px; }
.dasuhome__box { margin-top: 0; }
.dasuhome__list { margin-top: 16px; border-top: 0; }
.dasuhome__list a > span { display: grid; gap: 2px; }
.dasuhome__list small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.dasuhome__tag { font-size: 13px; line-height: 1.4; }
.dasuhome__more { margin: 12px 0 0; }
.dasuhome__stat { margin-top: 24px; }
@media (max-width: 760px) {
  .dasuform select { max-width: none; flex: 1 1 100%; }
  .dasuhome__list a { grid-template-columns: 1fr; gap: 2px; }
}

/* Статистика висновків ДАСУ (/vysnovky-dasu/statystyka) і бічна плашка – у стилі чорної діаграми «Матеріали за роками»
   (.bars): чорне – з порушеннями, синій з логотипа – без порушень; смуги «усунуто» теж чорні. Наведення на стовпчик чи смугу блідить решту. */
:root { --c-bad: var(--ink); --c-ok: var(--brand); --c-good: var(--ink); --grid: var(--line); }
main.wrap { position: relative; }
.cgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 48px; margin: 40px 0 32px; }
.cbox { border-top: 2px solid var(--ink); padding: 16px 0 4px; min-width: 0; }
.cbox--wide { margin-top: 28px; }
.cbox__title { font-size: 17px; font-weight: 650; letter-spacing: -.01em; margin: 0 0 4px; }
.cbox__sub { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.clegend { display: flex; gap: 16px; margin: 0 0 8px; font-size: 12px; color: var(--ink-2); }
.clegend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px 3px 1px 1px; }
.sw--bad { background: var(--c-bad); } .sw--ok { background: var(--c-ok); }
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; z-index: 5; left: 50%; bottom: calc(100% + 6px);
  transform: translateX(-50%); width: max-content; max-width: 260px; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: #fff;
  font-size: 12px; font-weight: 500; line-height: 1.35; white-space: normal; text-align: left; pointer-events: none; }
/* стовпчики за роками */
.ychart { display: flex; align-items: flex-end; gap: 8px; height: 220px; padding-top: 22px; border-bottom: 1px solid var(--grid); }
.ycol { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.ycol__cap { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--ink-2);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.ycol__bar { position: relative; display: flex; flex-direction: column; gap: 2px; width: 90%; max-width: 89px; min-height: 3px;
  transition: opacity .15s; }
.ycol__ok { background: var(--c-ok); border-radius: 6px 6px 0 0; min-height: 0; }
.ycol__bad { background: var(--c-bad); border-radius: 0 0 2px 2px; min-height: 0; }
.ycol__bad:first-child { border-radius: 6px 6px 2px 2px; }
.ycol__label { position: absolute; top: 100%; margin-top: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ycol__share { position: absolute; top: 100%; margin-top: 22px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ychart:not(.ychart--small) { margin-bottom: 44px; }
.ychart:not(.ychart--small):hover .ycol__bar, .ychart.has-on .ycol__bar { opacity: .25; }
.ychart .ycol:hover .ycol__bar, .ychart .ycol.is-on .ycol__bar { opacity: 1; }
.ychart:hover .ycol.is-on:not(:hover) .ycol__bar { opacity: .25; }
.ycol.is-on .ycol__label { color: var(--ink); font-weight: 700; }
.ychart--small { height: 70px; padding-top: 0; gap: 4px; margin-bottom: 18px; }
.ychart--small .ycol__bar { width: 100%; max-width: 14px; gap: 1px; }
.ychart--small .ycol__ok { border-radius: 3px 3px 0 0; }
.ychart--small .ycol__label { font-size: 10px; margin-top: 3px; }
/* горизонтальні смуги */
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hbars a { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr) 56px; align-items: center; gap: 10px; padding: 5px 6px;
  border-radius: 8px; font-size: 14px; }

.hbars__label { line-height: 1.3; color: var(--ink); }
.hbars__track { height: 14px; display: block; }
.hbars__fill { display: block; height: 100%; min-width: 3px; border-radius: 2px 6px 6px 2px; background: var(--c-bad); transition: opacity .15s; }
.hbars:hover .hbars__fill, .hbars:hover .spark { opacity: .25; }
.hbars a:hover .hbars__fill, .hbars a:hover .spark { opacity: 1; }
.hbars a:hover .hbars__label, .hbars a:hover .hbars__value { color: var(--ink); }
.hbars--good .hbars__fill { background: var(--c-good); }
.hbars__value { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.hbars a[data-tip]:hover::after { left: auto; right: 0; transform: none; }
.trendlist a { grid-template-columns: minmax(0, 42%) minmax(0, 1fr) 48px 56px; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 22px; transition: opacity .15s; }
.spark__col { flex: 1; background: var(--muted); border-radius: 2px 2px 1px 1px; min-height: 1px; }
.spark__col:last-child { background: var(--ink); }
.ctable { margin-top: 12px; font-size: 13px; }
.ctable summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }
.ctable table { border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
.ctable th, .ctable td { padding: 4px 14px 4px 0; text-align: left; border-bottom: 1px solid var(--line); }
/* Плашка статистики ДАСУ (_dasu_charts.html, stat_card): на головній і на сторінці висновків. Зліва текст, легенда
   й посилання, справа стовпчики на всю висоту. На сторінці висновків (--aside) на дуже широкому екрані вона
   стоїть вузькою карткою в лівому полі. */
.dasuside { margin: 4px 0 16px; }
.dasuside__card { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft);
  transition: border-color .15s, background .15s;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); grid-template-rows: repeat(5, auto) 1fr;
  grid-template-areas: "k chart" "num chart" "lead chart" "norms chart" "legend chart" "go chart"; column-gap: 40px; padding: 20px 24px; }
.dasuside__card:hover { border-color: var(--ink); background: #fff; }
.dasuside__num { font-size: 34px; line-height: 1; letter-spacing: -.03em; font-weight: 700; color: var(--ink); }
.dasuside__text { font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.dasuside__go { font-size: 13px; font-weight: 600; color: var(--brand); align-self: end; }
.dasuside__k { grid-area: k; } .dasuside__num { grid-area: num; } .dasuside__lead { grid-area: lead; }
.dasuside__norms { grid-area: norms; } .dasuside__go { grid-area: go; }
.dasuside .ychart--small { grid-area: chart; margin: 0 0 20px; height: auto; min-height: 180px; align-self: stretch; gap: 10px; }
.dasuside .ychart--small .ycol__bar { max-width: 72px; gap: 2px; }
.dasuside .ychart--small .ycol__ok { border-radius: 6px 6px 0 0; }
.dasuside .ychart--small .ycol__label { font-size: 12px; margin-top: 4px; }
.dasuside .clegend { grid-area: legend; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; margin: 4px 0 0; }
@media (min-width: 1720px) {
  .dasuside--aside { position: absolute; top: 40px; bottom: 0; right: calc(100% - 24px + 40px); width: 230px; margin: 0; }
  .dasuside--aside .dasuside__card { position: sticky; top: 90px; padding: 18px; grid-template-columns: 1fr; grid-template-rows: none;
    grid-template-areas: "k" "num" "lead" "chart" "legend" "norms" "go"; }
  .dasuside--aside .ychart--small { height: 70px; min-height: 0; gap: 4px; margin: 8px 0 18px; }
  .dasuside--aside .ychart--small .ycol__bar { max-width: 14px; gap: 1px; }
  .dasuside--aside .ychart--small .ycol__ok { border-radius: 3px 3px 0 0; }
  .dasuside--aside .ychart--small .ycol__label { font-size: 10px; margin-top: 3px; }
  .dasuside--aside .clegend { margin: 0; }
}
@media (max-width: 640px) {
  .dasuside__card { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "k" "num" "lead" "chart" "legend" "norms" "go"; }
  .dasuside .ychart--small { min-height: 140px; gap: 6px; margin-top: 8px; }
}
@media (max-width: 760px) {
  .cgrid { grid-template-columns: 1fr; }
  .cgrid { gap: 32px; }
  .hbars a, .trendlist a { grid-template-columns: minmax(0, 1fr) 48px; }
  .hbars__track { grid-column: 1 / -1; grid-row: 2; }
  .spark { display: none; }
  .ychart { gap: 4px; }
  .ycol__cap { font-size: 10px; }
}
