/* Админка tg-monitor — «Редакция»: бумажный фон, тонкие линии вместо карточек, антиква для чтения
   (Source Serif 4), гротеск для интерфейса (IBM Plex Sans), один акцент — киноварь. Шрифты свои (CSP: только 'self'). */
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(fonts/source-serif-4-cyrillic-wght-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(fonts/source-serif-4-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/ibm-plex-sans-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fonts/ibm-plex-sans-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #FBFBF9; --card: #FFFFFF; --text: #1A1A18; --muted: #5C5C57; --faint: #8A8A84;
  --border: #D8D8D2; --rule: #E4E4DE; --ink: #1A1A18; --logo-noise: #ABABA3;
  --accent: #B4361A; --accent-hover: #7E2410; --accent-text: #FBFBF9;
  --ok: #1F6B3A; --warn: #8A5300; --bad: #A4161A;
  --ok-bg: #E6F0E8; --warn-bg: #F6ECDA; --bad-bg: #F7E3E0; --hit-bg: #F2EFE6;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413; --card: #1B1B19; --text: #ECEAE3; --muted: #A9A79F; --faint: #7E7C76;
    --border: #383733; --rule: #2A2926; --ink: #ECEAE3; --logo-noise: #5E5D58;
    --accent: #EE8466; --accent-hover: #F6B19C; --accent-text: #141413;
    --ok: #79C894; --warn: #E6B35C; --bad: #F0857B;
    --ok-bg: #1C2B20; --warn-bg: #2E2614; --bad-bg: #321C1A; --hit-bg: #24221E;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
code { background: var(--hit-bg); padding: 0 4px; font-size: .92em; }
h1, h2 { margin: 0 0 8px; }
h1 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
     margin-top: 32px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.muted, .sub { color: var(--muted); }
.sub { font-size: 13px; }
.err-text, .bad-text { color: var(--bad); }
.err-text { font-size: 13px; max-width: 520px; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* шапка: бренд, разделы, пользователь; подразделы — второй строкой */
.top { display: flex; align-items: baseline; gap: 12px 32px; padding: 14px 32px; border-bottom: 1px solid var(--ink); flex-wrap: wrap; background: var(--bg); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -.01em; color: var(--text); align-self: center; }
.brand:hover { color: var(--text); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark .noise { fill: var(--logo-noise); }
.brand-mark .signal { fill: var(--accent); }
.brand-dot { color: var(--accent); font-size: .8em; padding: 0 .08em; vertical-align: .06em; }
.top nav { display: flex; gap: 4px 22px; flex: 1; flex-wrap: wrap; font-size: 14px; }
.top nav a { color: var(--muted); padding-bottom: 2px; border-bottom: 2px solid transparent; }
.top nav a:hover { color: var(--text); text-decoration: none; }
.top nav a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.me { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.me img { width: 22px; height: 22px; border-radius: 50%; }
.me form { margin: 0; }
.subnav { display: flex; gap: 4px 20px; flex-wrap: wrap; padding: 10px 32px; border-bottom: 1px solid var(--rule); font-size: 13px; }
.subnav a { color: var(--muted); }
.subnav a[aria-current] { color: var(--text); font-weight: 600; }

main { max-width: 1180px; margin: 0 auto; padding: 32px 32px 80px; }
/* раздел «Вакансии» — широкие таблицы реестра и отчётов: на всю ширину окна */
main.wide { max-width: none; }
/* таблицы — на всю ширину, ячейки переносят текст (без горизонтальной прокрутки на десктопе) */
main.wide .report-body table { width: 100%; max-width: none; }
main.wide .report-body th, main.wide .report-body td { max-width: none; overflow-wrap: break-word; word-break: normal; }
/* …а текст — колонкой по центру, как в новостях (width: 100% — иначе flex-элемент сжимается до содержимого) */
main.wide .report-body > :not(table), main.wide .report > .digest-meta, main.wide .report .lead { width: 100%; max-width: 760px; margin-left: auto; margin-right: auto; }
main.wide .report-body { overflow-wrap: break-word; }
@media (max-width: 700px) {
  main { padding: 24px 16px 56px; } .top, .subnav { padding-inline: 16px; }
  .top { justify-content: space-between; }
  .top nav { order: 3; flex: 0 0 100%; flex-wrap: nowrap; overflow-x: auto; gap: 18px; padding-bottom: 2px; }
  .top nav a, .subnav a { white-space: nowrap; }
  .subnav { flex-wrap: nowrap; overflow-x: auto; }
}
.card { background: var(--card); border: 1px solid var(--rule); padding: 16px 18px; }
.empty { text-align: center; color: var(--muted); padding: 40px 24px; }

.flash { padding: 10px 14px; margin-bottom: 16px; background: var(--ok-bg); border-left: 3px solid var(--ok); }
.flash.warn { background: var(--warn-bg); border-left-color: var(--warn); }
.flash.err { background: var(--bad-bg); border-left-color: var(--bad); }

.btn { display: inline-block; padding: 7px 14px; min-height: 34px; border: 1px solid var(--border); background: transparent;
       color: var(--text); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink); text-decoration: none; color: var(--text); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.sm { padding: 4px 10px; min-height: 28px; font-size: 13px; }
.btn.danger, .link.danger { color: var(--bad); }
.btn.wide { display: block; text-align: center; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; font-size: 14px; color: var(--text); background: var(--card); border: 1px solid var(--border); padding: 7px 10px; min-height: 34px; }
textarea { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
label.check { display: inline-flex; align-items: center; gap: 6px; }
form { margin: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; margin-bottom: 24px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.stats .card.stat { border: 0; border-right: 1px solid var(--rule); background: transparent; padding: 16px 20px 18px; }
.stats .card.stat:last-child { border-right: 0; }
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.stat .value { font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1.2; }
.stat .value.small { font-family: var(--sans); font-size: 18px; font-weight: 600; padding-top: 8px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; background: var(--faint); vertical-align: middle; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); }

.toolbar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .add { display: flex; gap: 8px; flex: 1; min-width: 280px; }
.toolbar .add input { flex: 1; min-width: 0; }

/* таблицы — линейки, без коробок */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--ink); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--hit-bg); }
tr.disabled td { opacity: .55; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.actions { white-space: nowrap; text-align: right; }
.actions > form, .actions > details { display: inline-block; vertical-align: top; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; background: var(--warn-bg); margin-left: 4px; }
.tag.hit { background: var(--hit-bg); color: var(--accent); margin: 0 4px 4px 0; }
.job-facets { margin: 2px 0 6px; } .job-facets .tag { margin: 0 4px 4px 0; background: var(--hit-bg); }
.job-facets .tag.cy-yes { background: var(--ok-bg); color: var(--ok); } .job-facets .tag.cy-no { background: var(--bad-bg); color: var(--bad); }
.job-facets .tag.cy-maybe { background: var(--warn-bg); color: var(--warn); }
.job-facets .tag.fit-hi { background: var(--ok-bg); color: var(--ok); } .job-facets .tag.fit-mid { background: var(--warn-bg); color: var(--warn); }
.job-facets .tag.fit-lo { opacity: .7; }

details.more { position: relative; }
details.more summary { list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more .menu { position: absolute; right: 0; top: 100%; z-index: 5; background: var(--card); border: 1px solid var(--ink);
                     padding: 6px 0; min-width: 210px; box-shadow: 0 8px 24px rgba(0,0,0,.12); text-align: left; }
details.more .menu button { display: block; width: 100%; text-align: left; padding: 7px 14px; }
details.more .menu button:hover { background: var(--hit-bg); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.filters.card { border: 0; border-bottom: 1px solid var(--rule); padding: 0 0 16px; background: transparent; }
details.rating-filter .menu { left: 0; right: auto; width: max-content; padding: 8px 12px 10px; }
.rating-filter summary.on { border-color: var(--accent); color: var(--accent); }
.rating-grid { display: grid; grid-template-columns: repeat(6, auto); gap: 4px 10px; }
.rating-grid label, .stage-list label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rating-grid input[type=checkbox], .stage-list input[type=checkbox] { min-height: 0; padding: 0; margin: 0; }
.rating-grid label.wide { grid-column: span 6; }
.stage-list { display: flex; flex-direction: column; gap: 4px; white-space: nowrap; }
.rating-picks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rule); }
details.more .menu .rating-picks button { display: inline-block; width: auto; padding: 2px 8px; border: 1px solid var(--rule); }
.filters input[type=search] { flex: 1; min-width: 220px; }
.post { margin-bottom: 12px; }
.post header { display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; margin-bottom: 6px; font-size: 13px; }
.post .ext { margin-left: auto; }
.post .id { font-size: 12px; }
.post .text { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--serif); font-size: 16px; line-height: 1.55; }
.post summary { cursor: pointer; list-style: none; }
.post details[open] summary { display: none; }
.pager { text-align: center; }

.settings { max-width: 820px; }
.settings .row { display: flex; gap: 16px; flex-wrap: wrap; }
.settings .row label { display: flex; flex-direction: column; gap: 4px; }
.settings > .tags, .settings > label.check { margin: 10px 0; display: flex; flex-wrap: wrap; }

.inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.narrow { width: 110px; }
.narrow-wide { width: 180px; }
.add-consumer { margin-top: 16px; justify-content: flex-start; }
.add-consumer input[name=consumer] { flex: 1; min-width: 200px; }

.login { max-width: 380px; margin: 14vh auto 0; text-align: center; }
.login .btn { margin-top: 16px; }
.login.card { background: transparent; border: 0; }
.login-mark { display: block; margin: 0 auto 16px; }
.login h1 { font-family: var(--sans); font-weight: 600; font-size: 32px; letter-spacing: -.01em; }

/* вкладки — текстовые, активная подчёркнута */
.tabs { display: flex; gap: 4px 22px; flex-wrap: wrap; margin-bottom: 20px; font-size: 14px; }
.tabs a { color: var(--muted); padding-bottom: 3px; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.toolbar > a.btn { align-self: center; }
.grow { flex: 1; }
.sticky { position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 8px 0; align-items: center; }
details.more .menu .groups-edit { padding: 6px 14px 10px; border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
details.more .menu .groups-edit label { display: flex; padding: 2px 0; }
details.more .menu .groups-edit .btn { margin-top: 6px; }
.menu-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.group-card { margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.group-card .row { display: flex; gap: 12px; flex-wrap: wrap; }
.group-card label { display: flex; flex-direction: column; gap: 4px; }
.group-card label.grow { flex: 1; min-width: 200px; }
.actions-row { display: flex; gap: 8px; }
.inline.left { justify-content: flex-start; flex-wrap: nowrap; }
.maint { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.maint-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.maint h2 { margin: 0; border: 0; padding: 0; }
.maint .row label, .retention-groups label { display: flex; flex-direction: column; gap: 4px; }
.retention-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.problems-banner { display: block; color: inherit; }
.problems-banner:hover { text-decoration: none; color: inherit; filter: brightness(.97); }
.problems { margin: 0; padding-left: 4px; list-style: none; display: grid; gap: 4px; }
.section-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.band.above { border-color: var(--accent); }
.pair { display: grid; grid-template-columns: 4em 1fr 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.pair > div { min-width: 0; overflow-wrap: anywhere; }
.pair .sim { font-variant-numeric: tabular-nums; font-weight: 600; }
@media (max-width: 700px) { .pair { grid-template-columns: 1fr; } }
.attention { color: var(--warn); font-weight: 700; cursor: help; }
.warn-text { color: var(--warn); max-width: 420px; }

/* ===== экран выпуска: колонка чтения + оглавление слева (дайджесты, Tech Brief) ===== */
.reader { display: flex; flex-wrap: wrap; gap: 48px; }
.reader > .toc { flex: 1 1 180px; max-width: 220px; font-size: 14px; line-height: 2; position: sticky; top: 16px; align-self: flex-start; }
.reader > .toc .section-label { margin-bottom: 6px; }
.reader > .toc a, .reader > .toc span.off { display: flex; justify-content: space-between; gap: 8px; color: var(--text); }
.reader > .toc a:hover { color: var(--accent); text-decoration: none; }
.reader > .toc span.off { color: var(--faint); }
.reader > .toc .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.reader > .toc .follows-mini { margin-top: 24px; line-height: 1.4; display: grid; gap: 8px; }
.reader > .reader-main { flex: 999 1 560px; min-width: 0; max-width: 760px; }
@media (max-width: 900px) {
  .reader { gap: 24px; }
  .reader > .toc { position: static; max-width: none; flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 18px; line-height: 1.6; }
  .reader > .toc a, .reader > .toc span.off { display: inline-flex; }
  .reader > .toc .section-label { flex-basis: 100%; }
  .reader > .toc .follows-mini { display: none; }
}

.digest { display: flex; flex-direction: column; gap: 0; }
.digest.card { background: transparent; border: 0; padding: 0; }
.digest-meta { display: flex; gap: 8px 22px; flex-wrap: wrap; align-items: baseline; color: var(--muted);
               font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.digest-meta .edition { font-weight: 600; color: var(--accent); }
.digest h1 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.08; margin: 18px 0 14px; max-width: 900px; text-wrap: balance; }
.digest .lead { margin: 0 0 32px; font-family: var(--serif); font-size: 20px; line-height: 1.5; color: var(--muted); max-width: 760px; }
.digest .health { background: var(--warn-bg); border-left: 3px solid var(--warn); padding: 10px 14px; font-size: 14px; margin-bottom: 24px; }
.country { padding-top: 8px; scroll-margin-top: 16px; }
.country h2 { margin: 40px 0 0; }
.country:first-of-type h2 { margin-top: 8px; }
.country > p { margin: 12px 0 4px; color: var(--muted); font-family: var(--serif); font-size: 17px; line-height: 1.55; }
.item { padding: 20px 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 16px; }
.item h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 22px; line-height: 1.25; font-weight: 600; text-wrap: balance; }
.item p { margin: 0 0 8px; overflow-wrap: anywhere; font-family: var(--serif); font-size: 17px; line-height: 1.6; max-width: 70ch; }
.item.low h3 { font-size: 18px; font-weight: 600; }
.item.high h3 { font-size: 26px; }
.item .imp { display: inline-block; font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .06em;
             text-transform: uppercase; padding: 2px 8px; vertical-align: 5px; margin-right: 8px; }
.item.high .imp { background: var(--bad-bg); color: var(--bad); }
.item.low .imp { background: var(--hit-bg); color: var(--muted); }
.item .imp.dev { background: var(--ok-bg); color: var(--ok); }
.item .foot { display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted);
              border-top: 1px solid var(--rule); padding-top: 10px; margin-top: 12px; }
.item .foot .applies { color: var(--muted); }
.item .sources a { margin-right: 12px; }
.digest > .sub { margin-top: 24px; font-size: 13px; }
.digest-nav { display: flex; gap: 8px 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; font-size: 14px; }
.archive { margin-top: 48px; }
.archive.card { background: transparent; border: 0; padding: 0; }
.archive .section-label { padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.archive a.row { display: grid; grid-template-columns: 11em 5em 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); color: inherit; }
.archive a.row:hover { text-decoration: none; background: var(--hit-bg); }
.archive .headline { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-family: var(--serif); font-size: 17px; }
@media (max-width: 700px) { .archive a.row { grid-template-columns: 1fr; gap: 0; } .archive .headline { white-space: normal; } }

/* отметки читателя: текстовые кнопки в подвале пункта */
.marks { display: inline-flex; gap: 6px; margin-left: auto; }
.marks button { font: inherit; font-size: 13px; min-height: 32px; padding: 4px 12px; border: 1px solid var(--border);
                background: transparent; color: var(--muted); cursor: pointer; }
.marks button:hover { border-color: var(--ink); color: var(--text); }
.marks button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.follows { margin-bottom: 24px; display: grid; gap: 8px; }
.follows.card { background: var(--hit-bg); border: 0; padding: 14px 16px; }
.follow { display: flex; gap: 6px 12px; align-items: baseline; flex-wrap: wrap; }
.follow .title { flex: 1; min-width: 200px; }

/* радар вакансий */
.pill { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .06em; padding: 1px 8px; white-space: nowrap;
        background: var(--hit-bg); color: var(--muted); }
.pill.good { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.nowrap { white-space: nowrap; }
table.jobs .job-title { min-width: 260px; max-width: 420px; }
table.jobs .job-title strong { font-family: var(--serif); font-size: 17px; }
table.jobs .job-facets { margin-top: 4px; }
details.why summary { cursor: pointer; }
details.why p { margin: 4px 0 0; overflow-wrap: anywhere; }
meter.bar { width: 80px; height: 8px; vertical-align: middle; accent-color: var(--accent); }
.report { margin-bottom: 24px; display: flex; flex-direction: column; gap: 12px; }
.report.card { background: transparent; border: 0; border-top: 1px solid var(--ink); padding: 16px 0 0; }
.report .lead { margin: 0; font-family: var(--serif); font-size: 18px; color: var(--muted); }
.report-body { overflow-x: auto; overflow-wrap: anywhere; font-family: var(--serif); font-size: 17px; line-height: 1.6; }
.report-body h2 { margin-top: 24px; } .report-body h3 { font-size: 19px; margin: 18px 0 6px; }
.report-body h2:first-child, .report-body h3:first-child { margin-top: 0; }
.report-body table { margin: 8px 0 16px; font-family: var(--sans); font-size: 13px; width: max-content; max-width: none; }
.report-body td { max-width: 36em; }
.report-body th, .report-body td { padding: 7px 9px; }
.report-body ul, .report-body ol { padding-left: 22px; }
.archive.reports a.row { grid-template-columns: 11em 6em 1fr; }
@media (max-width: 700px) { .archive.reports a.row { grid-template-columns: 1fr; } }

/* Tech Brief */
.brief .lbl { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.brief .lbl::after { content: " · "; }
.brief .for-me { background: var(--hit-bg); padding: 12px 16px; }
.brief .for-me .lbl { color: var(--accent); }
.digest.brief h1 { font-size: clamp(32px, 4.4vw, 50px); }
.brief .item.numbered { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 16px; }
.brief .item.numbered .no { font-family: var(--serif); font-size: 40px; line-height: 1; font-weight: 600; color: var(--accent); }
.brief .item.compact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 14px 0; }
.brief .item.compact h3 { font-family: var(--sans); font-size: 16px; margin: 0; }
.brief .item.compact p { font-size: 16px; margin: 4px 0 0; grid-column: 1; }
.brief .item.compact .rel { grid-column: 2; grid-row: 1; font-variant-numeric: tabular-nums; color: var(--muted); }
.brief .item.compact .foot { grid-column: 1 / -1; border-top: 0; padding-top: 0; margin-top: 6px; }
.brief .scores { font-variant-numeric: tabular-nums; color: var(--text); }
.brief .scores b { font-weight: 600; }
.brief .status { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.brief .status.ADOPT, .brief .status.TRIAL { color: var(--ok); }
.brief .status.ASSESS { color: var(--warn); }
.brief .item.radar { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 0 16px; }
.brief .item.radar h3 { font-size: 19px; }
.brief .legacy h1 { font-size: 30px; margin-top: 0; } .brief .legacy h2 { margin-top: 32px; }
.brief .legacy h3, .brief .legacy h4 { font-size: 19px; margin: 18px 0 6px; }
.brief .legacy p { margin: 0 0 8px; }
.archive a.brief-row { grid-template-columns: 7em 4.5em 1fr; }
@media (max-width: 700px) { .archive a.brief-row { grid-template-columns: 1fr; } .brief .item.numbered { grid-template-columns: 1fr; } .brief .item.radar { grid-template-columns: 1fr; } }

/* KPI-пятёрки лидеров (стек): название слева, цифра справа */
.stat .rank { list-style: none; margin: 8px 0 6px; padding: 0; display: grid; gap: 4px; }
.stat .rank li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-size: 15px; }
.stat .rank li:first-child { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.stat .rank li span { min-width: 0; overflow-wrap: anywhere; }
.stat .rank b { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.stat .rank b.up { color: var(--ok); }
.stat .rank b.down { color: var(--bad); }

/* поиск в шапке и на странице поиска */
.top-search input { min-height: 32px; width: 200px; padding: 5px 10px; font-size: 14px; }
.top-search input:focus { width: 280px; }
@media (max-width: 700px) { .top-search { order: 2; } .top-search input, .top-search input:focus { width: 130px; } }
.search-big { display: flex; gap: 8px; margin: 8px 0 20px; max-width: 760px; }
.search-big input { flex: 1; font-size: 18px; min-height: 46px; font-family: var(--serif); }
.item p mark, .search mark { background: var(--hit-bg); color: var(--text); padding: 0 2px; box-shadow: inset 0 -2px 0 var(--accent); }

/* библиотека */
.tags-toc a.auto { color: var(--muted); font-style: italic; }
.tags-toc a[aria-current] { color: var(--accent); font-weight: 600; }
.applies .auto, .tagline .auto { font-style: italic; }
.country h2 a { color: inherit; } .country h2 .n { color: var(--faint); }
.article-row h3 a { color: var(--text); } .article-row h3 a:hover { color: var(--accent); }
.tagline { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; margin: 0 0 32px; }
.tagline a.auto { color: var(--muted); }
.article .lead { margin-bottom: 16px; }
.article-body { font-family: var(--serif); font-size: 18px; line-height: 1.65; max-width: 720px; overflow-wrap: break-word; }
.article-body h2 { font-family: var(--serif); font-size: 26px; text-transform: none; letter-spacing: 0; color: var(--text);
                   border: 0; padding: 0; margin: 36px 0 12px; font-weight: 700; }
.article-body h3 { font-size: 21px; margin: 28px 0 10px; } .article-body h4 { font-size: 18px; margin: 24px 0 8px; }
.article-body p, .article-body ul, .article-body ol, .article-body blockquote, .article-body table { margin: 0 0 16px; }
.article-body img { display: block; max-width: 100%; height: auto; margin: 20px auto; }
.article-body pre { font-size: 14px; line-height: 1.5; background: var(--hit-bg); padding: 14px 16px; overflow-x: auto; }
.article-body :not(pre) > code { font-size: .88em; }
.article-body blockquote { border-left: 3px solid var(--accent); padding: 2px 0 2px 16px; color: var(--muted); }
.article-body table { font-family: var(--sans); font-size: 14px; display: block; overflow-x: auto; }
.article-body mark { background: var(--warn-bg); color: var(--text); }

/* правка рейтинга и тегов статьи (уходит в Obsidian через агента) */
.article-edit { margin: 0 0 32px; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.article-edit form { display: inline; margin: 0; }
.article-edit .rate { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 10px; font-size: 14px; color: var(--muted); }
.article-edit .rate select { margin-left: 6px; font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--border); padding: 2px 4px; }
.tagline.edit { margin: 0; align-items: center; gap: 8px 10px; }
.chip { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--border); padding: 1px 4px 1px 8px; background: var(--card); }
.chip.auto { border-style: dashed; }
.chip.auto a { color: var(--muted); font-style: italic; }
.chip button { border: 0; background: none; color: var(--faint); cursor: pointer; font: inherit; line-height: 1; padding: 2px 4px; }
.chip button:hover, .chip button:focus-visible { color: var(--accent); }
.add-tag { display: inline-flex !important; gap: 6px; align-items: center; }
.add-tag input { font: inherit; font-size: 14px; color: var(--text); background: var(--card); border: 1px solid var(--border); padding: 2px 8px; width: 12em; max-width: 50vw; }
.sync { font-size: 13px; margin: 8px 0 0; }
.sync.pending { color: var(--warn); }

/* поиск: спиннер, пока сервер ищет */
.search-big button { position: relative; min-width: 84px; }
.search-big.busy button .label { visibility: hidden; }
.search-big.busy button::after, .top-search.busy::after {
  content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite; }
.search-big.busy button::after { position: absolute; inset: 0; margin: auto; }
.top-search { position: relative; }
.top-search.busy::after { position: absolute; right: 10px; top: 0; bottom: 0; margin: auto 0; color: var(--muted); width: 12px; height: 12px; }
.search-busy { min-height: 1.4em; margin: -12px 0 8px; font-size: 13px; color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .search-big.busy button::after, .top-search.busy::after { animation-duration: 2.4s; } }
.result-tags { margin: 8px 0 0; font-size: 13px; gap: 4px 12px; }
.edit-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 10px; }
.edit-row .rate { margin-bottom: 0; }
.move-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.move-pending { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.move-pending form { margin: 0; }
