/* =========================================================================
   Печать (docs/web/ux.md, «Графики»): всегда светлая схема и без
   навигации. Операторский контур тёмный: без этого блока на бумагу шёл
   светлый текст тёмной темы по белому. Значения — светлой темы tokens.css;
   тест chart_print_styles_test сверяет их с :root, чтобы печать не разошлась
   с экраном.
   ========================================================================= */
@media print {
  /* :root[data-theme] — специфичнее [data-theme="dark"] из tokens.css, который подключается позже */
  :root, :root[data-theme] {
    color-scheme: light;
    --bg: #ffffff;
    --bg-elevated: #ffffff;
    --bg-sunken: #eff1f5;
    --text: #16171a;
    --text-muted: #5c5f68;
    --text-faint: #686b75;
    --border: #e6e8ed;
    --border-strong: #d4d7de;
    --link: #1f5bff;
    --accent: #1f5bff;
    --ok-text: #0b5e3a;
    --warn-text: #8a5200;
    --danger-text: #9c1f3d;
    --chart-bid: #1f5bff;
    --chart-submitted: #0a9c6b;
    --chart-fact: #16171a;
    --chart-shortfall: #c96f00;
    --chart-surplus: #4a85ff;
    --chart-band: #4a85ff;
    --chart-s1: #1f5bff;
    --chart-s2: #c96f00;
    --chart-s3: #0a8a5f;
    --chart-s4: #7a3fd1;
    --chart-muted: #7d8290;
    --chart-grid: #eceef2;
    --chart-heat-0: #b4c7f2;
    --chart-heat-1: #8fb0f5;
    --chart-heat-2: #5f8ef0;
    --chart-heat-3: #2f6bff;
    --chart-heat-4: #0a2f8f;
    --spark-dot: #a07c00;
  }
  html, body, :root[data-theme] body { background: #ffffff !important; color: var(--text); }
  .app-canvas { background-image: none !important; }
  .sidebar, .skip-link, .nav-toggle, .tabbar, .mobile-head, .topbar, .chart-readout, .page-head .button, .bid-usage, form { display: none !important; }
  .app { display: block; min-height: 0; }
  .content { padding: 0; max-width: none; }
  .panel, .cards article { box-shadow: none; break-inside: avoid; }
  /* на бумаге — широкая раскладка графика и раскрытые таблицы значений */
  .chart { container-type: normal; }
  .chart-narrow { display: none !important; }
  .chart-wide { display: block !important; }
  details.chart-table > summary { list-style: none; font-weight: 600; }
  details.chart-table::details-content { content-visibility: visible; display: block; }
  details.month-fold::details-content { content-visibility: visible; display: block; }
  /* пояснения плиток на бумаге — раскрыты, кнопка «Деталі» не печатается */
  details.ui-tile-more::details-content { content-visibility: visible; display: block; }
  details.ui-tile-more > summary { display: none; }
  .tblwrap { overflow: visible; }
}
