/* Foreground artwork prints even when browser background graphics are disabled. */
body.report-print::before{content:url("/brand/goldleaf/goldleaf-logo-b.png");display:block;width:500px;height:55px;zoom:.36;margin:0 0 50px;break-after:avoid}
/* In-app export delivery; native dialog supplies focus containment and Escape. */
.rp-export-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; box-sizing: border-box; background: var(--panel); color: var(--text); }
.rp-export-dialog iframe { display: block; width: 100%; height: calc(100% - 10rem); border: 0; }
.rp-export-dialog textarea { display: block; width: 100%; height: 60vh; box-sizing: border-box; }
/* Reports ledger and header search. Builds on styles.css tokens (gold/black) and sales.css (sp-*). No external assets. */
.rp-page { --rp-gold: var(--gold, #c9a227); --rp-line: var(--line, rgba(201,162,39,.28)); --rp-ink: var(--text, #f3ead2);
  display: grid; gap: 0; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
#rp-content { display: grid; gap: 14px; min-width: 0; }
.rp-page * { box-sizing: border-box; }
.rp-head { border-bottom: 3px double var(--rp-line); padding-bottom: 10px; }
.rp-head p { margin: 2px 0 0; }
.rp-kicker { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--rp-gold); font-weight: 700; }
.rp-title { margin: 0; font-family: var(--font-display, inherit); font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.01em; }
.rp-title:focus { outline: none; }
.rp-msg { border: 1px solid var(--rp-line); border-left: 4px solid var(--rp-gold); border-radius: var(--radius-sm, 8px); padding: 8px 12px; }
.rp-msg-danger { border-left-color: var(--danger, #c4553a); }
.rp-msg-warning { border-left-color: var(--warning, #d9932b); }
.rp-msg-success { border-left-color: var(--success, #4f9a69); }
.rp-msg:empty { padding: 0; margin: 0; border: 0; min-height: 1px; }
.rp-msg:not(:empty) { margin-bottom: 14px; }
.rp-controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin: 0; }
.rp-field { display: grid; gap: 4px; min-width: 0; }
.rp-field label, .rp-lab { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted, inherit); }
.rp-field select, .rp-field input { min-height: 36px; max-width: 100%; }
.rp-period { display: flex; gap: 10px; border: 0; padding: 0; margin: 0; min-width: 0; flex-wrap: wrap; }
.rp-period legend { padding: 0; margin-bottom: 4px; }
.rp-segs, .rp-toggle { display: inline-flex; gap: 0; border: 1px solid var(--rp-line); border-radius: 999px; overflow: hidden; }
.rp-seg { border: 0; border-radius: 0; background: transparent; }
.rp-seg-on { background: var(--rp-gold); color: var(--bg, #14110a); }
.rp-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rp-note { margin: 0; color: var(--warning, #d9932b); font-size: .9rem; }
.rp-split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.rp-side { display: grid; gap: 14px; min-width: 0; }
.rp-card { min-width: 0; }
.rp-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: start; }
.rp-fig { margin: 8px 0 0; min-width: 0; }
.rp-svg { display: block; width: 100%; height: auto; max-width: 100%; }
.rp-svg text { font-size: 12px; fill: var(--muted, #b5a98a); font-variant-numeric: tabular-nums; }
.rp-tick line { stroke: var(--rp-line); stroke-dasharray: 2 4; }
.rp-axis { stroke: var(--rp-gold); stroke-width: 1.2; }
.rp-line { fill: none; stroke: var(--rp-gold); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.rp-area { fill: var(--rp-gold); opacity: .1; }
.rp-dot { fill: var(--bg, #14110a); stroke: var(--rp-gold); stroke-width: 1.6; }
.rp-dot-solo { fill: var(--rp-gold); }
.rp-gap { stroke: var(--rp-ink); opacity: .14; stroke-dasharray: 1 3; }
.rp-cap { margin: 6px 0 0; }
.rp-sk-chart { height: 220px; border-radius: var(--radius-sm, 8px); }
.rp-twrap { max-width: 100%; margin-top: 8px; }
.rp-twrap[hidden] { display: none; }
.rp-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rp-table th, .rp-table td { padding: 6px 8px; border-bottom: 1px solid var(--rp-line); text-align: left; overflow-wrap: anywhere; }
.rp-num { text-align: right !important; }
.rp-missing td { color: var(--muted, inherit); font-style: italic; }
.rp-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.rp-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rp-hist-i { border-left: 2px solid var(--rp-line); padding: 2px 0 2px 10px; }
.rp-hist-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rp-kind { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; border: 1px solid var(--rp-gold); color: var(--rp-gold); border-radius: 4px; padding: 1px 6px; }
.rp-meta { margin: 2px 0 0; font-size: .82rem; color: var(--muted, inherit); }
.rp-empty-mark { border-color: var(--rp-gold); }
.rp-neutral h1 { font-size: 1.3rem; }

/* Header search */
.gs { position: relative; min-width: 0; width: min(100%, 340px); }
.gs-input { width: 100%; min-height: 36px; border: 1px solid var(--line, rgba(201,162,39,.3)); border-radius: 999px; padding: 6px 14px; background: transparent; color: inherit; }
.gs-input:focus { outline: 2px solid var(--gold, #c9a227); outline-offset: 1px; }
.gs-list { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; max-height: min(70vh, 460px); overflow-y: auto; overflow-x: hidden;
  background: var(--panel, #1b170e); border: 1px solid var(--line-strong, rgba(201,162,39,.5)); border-radius: var(--radius-sm, 8px); box-shadow: var(--shadow, 0 10px 30px rgba(0,0,0,.4)); padding: 4px; }
.gs-list[hidden] { display: none; }
.gs-gh { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--gold, #c9a227); padding: 8px 10px 4px; }
.gs-opt { display: grid; gap: 2px; padding: 8px 10px; border-radius: 6px; cursor: pointer; overflow-wrap: anywhere; }
.gs-opt:hover, .gs-active { background: rgba(201,162,39,.16); }
.gs-active { box-shadow: inset 3px 0 0 var(--gold, #c9a227); }
.gs-t { font-weight: 600; }
.gs-s { font-size: .82rem; color: var(--muted, inherit); }
.gs-note { padding: 10px; font-size: .88rem; color: var(--muted, inherit); display: flex; gap: 8px; align-items: center; }
.gs-sk { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--gold, #c9a227); opacity: .5; }

@media (max-width: 720px) {
  .rp-split { grid-template-columns: minmax(0, 1fr); }
  .rp-controls { display: grid; grid-template-columns: minmax(0, 1fr); }
  .rp-period { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rp-field select, .rp-field input { width: 100%; }
  .rp-card-head .rp-actions { width: 100%; }
  .rp-svg text { font-size: 15px; }
  .gs { width: 100%; }
  .gs-list { position: fixed; left: 8px; right: 8px; top: auto; max-height: 60dvh; }
}
@media (prefers-reduced-motion: reduce) { .rp-page *, .gs * { transition: none !important; animation: none !important; } }

/* Print documents (server HTML opened from a verified blob; links /reports.css pinned to this origin). */
body.report-print { margin: 0; padding: 24px 28px; background: #fbf8ef; color: #1d1a12; font: 13px/1.45 Georgia, "Times New Roman", serif; }
body.report-print header { border-bottom: 3px double #b8901f; padding-bottom: 10px; margin-bottom: 16px; }
body.report-print header h1 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
body.report-print header p { margin: 4px 0 0; color: #5d5440; font-size: 12px; }
body.report-print main { display: block; }
body.report-print main h2 { font-size: 15px; margin: 18px 0 6px; color: #7a5f12; text-transform: uppercase; letter-spacing: .1em; }
body.report-print table { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
body.report-print th, body.report-print td { border-bottom: 1px solid #d8ccaa; padding: 5px 6px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
body.report-print thead th { border-bottom: 2px solid #b8901f; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
body.report-print tbody tr:nth-child(even) { background: #f3ecd8; }
body.report-print footer { margin-top: 18px; border-top: 1px solid #d8ccaa; padding-top: 8px; font-size: 11px; color: #5d5440; }
@media print {
  @page { margin: 14mm 12mm; }
  body.report-print { padding: 0; background: #fff8ec; color: #111; }
  body.report-print thead { display: table-header-group; }
  body.report-print tfoot { display: table-footer-group; }
  body.report-print tr, body.report-print td, body.report-print th { break-inside: avoid; page-break-inside: avoid; }
  body.report-print tbody tr:nth-child(even) { background: none; }
  body.report-print header, body.report-print footer { break-after: avoid; }
  body.report-print a { color: inherit; text-decoration: none; }
}
