/* ---------------------------------------------------------------- data group
   Pages of the "Open data" section (reports, registers, plans, vacancies).
   Only what base.css lacks; tokens only. */

/* Scanned report inside an accordion: show the whole sheet, never crop it. */
.pg-indicators figure{margin:var(--space-5) 0 0}
.pg-indicators figure img{display:block; width:100%; height:auto;
  border:1px solid var(--border); border-radius:var(--radius)}
.pg-indicators figcaption{margin-top:var(--space-2); font-size:var(--text-sm); color:var(--muted-fg)}

/* Stat tiles whose value is a date or a range ("2021–2025", "05.09.2026")
   would overflow a quarter-width column at the 3xl size. */
:is(.pg-reports-hub,.pg-national,.pg-plan,.pg-openprop,.pg-vacancies,.pg-announcement,.pg-auction,.pg-law-exec) .stat-num{
  font-size:var(--text-2xl); overflow-wrap:anywhere}

/* Tables and notices nested in an accordion answer keep their own spacing. */
:is(.pg-indicators,.pg-gifts) .answer > * + *{margin-top:var(--space-5)}
.pg-report .answer .prose{max-width:none}

/* Month cards on the legislation timeline: the "details" sits under the note. */
.pg-law-exec .timeline .faq{margin-top:var(--space-3)}
.pg-law-exec .timeline .faq details{margin-bottom:0}

/* Notice / pill spacing inside a box card. */
.pg-announcement .box > p:first-child{margin-top:0}
.pg-auction td .pill{margin-right:var(--space-2)}

/* Indicator tables sit inside an accordion answer, narrower than a page column:
   let them fit instead of scrolling sideways, and keep the name column wide. */
.pg-indicators .answer table{min-width:0}
.pg-indicators .answer td:first-child{width:50%}

/* The page class wraps the whole body, so .designed > * + * no longer reaches
   the blocks; give them the same rhythm here. */
:is(.pg-report,.pg-reports-hub,.pg-national,.pg-plan,.pg-collegium,.pg-openlaw,.pg-openprop,
    .pg-indicators,.pg-law-exec,.pg-gifts,.pg-auction,.pg-vacancies,.pg-announcement,.pg-audit) > * + *{
  margin-top:var(--space-6)}

/* ---------- "Открытый бюджет": the quarterly report as design-system blocks (tools/make_budget_page.py) */
.dataset-report{margin-top:var(--space-7)}
.dataset-report .lead{margin:0; font-size:var(--text-lg); line-height:var(--lh-body); color:var(--slate)}
.dataset-report .budget-block > h2{font-size:var(--text-2xl)}
.budget-stats .stat-num{font-variant-numeric:tabular-nums}
.budget-table td.n,.budget-table th.n{font-variant-numeric:tabular-nums}
.budget-table caption{text-align:left}
.budget-code,.budget-date{white-space:nowrap; font-variant-numeric:tabular-nums; color:var(--muted-fg); font-size:var(--text-sm)}
.budget-lines summary{font-weight:600}
.budget-lines details > .table-wrap{margin:0 var(--space-5) var(--space-5)}
.budget-empty{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--space-3)}
.budget-empty li{display:flex; flex-direction:column; gap:var(--space-1); padding:var(--space-4);
  background:var(--card); border:1px solid var(--border); border-radius:var(--radius); color:var(--slate); line-height:var(--lh-snug)}
.budget-app{font-size:var(--text-xs); font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--muted-fg)}
@media (max-width:600px){ .budget-empty{grid-template-columns:1fr} }
.budget-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:1100px){ .budget-stats{grid-template-columns:repeat(2,minmax(0,1fr))} }
.dataset-report .budget-table th[scope="row"]{min-width:11rem}
.dataset-report .budget-table :is(th,td){padding-left:var(--space-3); padding-right:var(--space-3)}
.dataset-report .budget-table :is(th,td):first-child{padding-left:var(--space-5)}
.dataset-report .budget-table :is(th,td):last-child{padding-right:var(--space-5)}
/* Rebuilt dataset pages (tools/make_dataset_pages.py): commission cards, grant projects, announcement archive. */
.dataset-report .people{display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:var(--space-4)}
.dataset-report .person{margin:0}
.dataset-report .person h3{margin:0 0 var(--space-2)}
.dataset-report .grant{padding:var(--space-6); background:var(--card); border:1px solid var(--border); border-radius:var(--radius-lg)}
.dataset-report .grant > h2{font-size:var(--text-xl)}
.dataset-report .grant .passport{margin:0}
.grant-goals{margin:0; padding-left:1.2em; color:var(--slate); line-height:var(--lh-body)}
.grant-goals li + li{margin-top:var(--space-2)}
.dataset-report .grant .timeline{margin-top:0}
.budget-lots{font-variant-numeric:tabular-nums; font-size:var(--text-sm); color:var(--slate); min-width:9rem}
.dataset-report + *{margin-top:var(--space-7)}
.dataset-report .block-h2{font-size:var(--text-2xl)}
