/* The Downloads menu (assets/downloads.js) and the print rules for the PDF views.
   Same colours and fonts as site.css; the menu opens on click only, so nothing here changes on :hover except a highlight. */
.dl { position: relative; margin-left: auto; }
.dl-btn { gap: 6px; }
.dl-caret { font-size: 12px; }
.dl-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(340px, calc(100vw - 32px)); background: var(--surface); color: var(--body);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 8px; }
.dl-panel[hidden] { display: none; }
.dl-group + .dl-group { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.dl-head { padding: 6px 10px 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-deep); }
.dl-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; }
.dl-item:hover, .dl-item:focus-visible { background: var(--gold-soft); outline: none; }
.dl-item:focus-visible { box-shadow: inset 0 0 0 2px var(--gold); }
.dl-item.dl-off { color: var(--muted); cursor: default; }
.dl-item.dl-off:hover { background: transparent; }
.dl-tag { font-size: 11px; font-weight: 700; letter-spacing: .05em; padding: 2px 7px; border-radius: 99px; background: var(--track); color: var(--muted); }
.dl-tag.pdf { background: var(--bad-bg); color: var(--bad); }
.dl-tag.csv { background: var(--ok-bg); color: var(--ok); }
.dl-status { margin: 6px 10px; padding: 8px 10px; border-radius: 8px; font-size: 14px; background: var(--wait-bg); color: var(--wait); }
.dl-status.t-bad { background: var(--bad-bg); color: var(--bad); }
.dl-help { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; padding: 8px 10px 4px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
@media (max-width: 720px) { .dl { margin-left: 0; } .nav { justify-content: flex-start; } }

/* Print views: one white page of black text, a cover, tables that repeat their heads, and the confidential line on every page. */
#dl-print { display: none; }
@media print {
  @page { margin: 16mm 14mm 18mm; }
  body.dl-printing > *:not(#dl-print) { display: none !important; }
  body.dl-printing { background: #fff !important; color: #141414 !important; }
  body.dl-printing #dl-print { display: block !important; font-family: var(--font); font-size: 10.5pt; line-height: 1.4; color: #141414; background: #fff; }
  #dl-print .dl-cover { border-top: 4px solid #b58900; padding: 10pt 0 8pt; margin-bottom: 12pt; border-bottom: 1px solid #ccc; }
  #dl-print .dl-co { font-weight: 700; font-size: 11pt; color: #8a6d00; letter-spacing: .03em; }
  #dl-print h1 { font-size: 24pt; margin: 4pt 0; color: #141414; }
  #dl-print h2 { font-size: 14pt; margin: 14pt 0 6pt; color: #141414; break-after: avoid; }
  #dl-print .dl-sub, #dl-print .dl-meta { margin: 2pt 0; color: #444; }
  #dl-print .dl-meta { font-weight: 600; }
  #dl-print .dl-note, #dl-print .dl-lede { margin: 6pt 0; padding: 6pt 8pt; background: #f6edd2; border-left: 3px solid #b58900; }
  #dl-print .dl-table { width: 100%; border-collapse: collapse; margin: 4pt 0 8pt; font-size: 9.5pt; }
  #dl-print .dl-table th { text-align: left; background: #ece7d8; border: 1px solid #bbb; padding: 4pt 6pt; }
  #dl-print .dl-table td { border: 1px solid #ccc; padding: 4pt 6pt; vertical-align: top; }
  #dl-print .dl-table thead { display: table-header-group; }
  #dl-print .dl-table tr { break-inside: avoid; }
  #dl-print .dl-counts td { text-align: center; font-size: 12pt; font-weight: 700; }
  #dl-print .dl-foot { position: fixed; bottom: 0; left: 0; right: 0; text-align: center; font-size: 8.5pt; color: #555; border-top: 1px solid #ccc; padding-top: 3pt; background: #fff; }
}
