/* The sample audit: two letter-size pages on screen, and when printed or saved as PDF. */
.report-bar { background: var(--tint); border-bottom: 1px solid var(--line); padding: 12px 0; }
.report-bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; }
.report-bar p { margin: 0; }
.report-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.report { background: var(--tint); padding: 8px 0 24px; }
.page {
  background: var(--sheet); max-width: 8.5in; margin: 24px auto; padding: 0.55in 0.6in;
  border: 1.5px solid var(--line);
}
.page-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 20px; }
.page-head .wordmark { font-size: 1.15rem; }
.page-meta { color: var(--muted); font-size: 0.9rem; }
.page h1 { font-size: 1.9rem; margin-bottom: 0.2em; }
.page h2 { font-size: 1.15rem; margin: 1.4em 0 0.5em; }
.page h3 { font-size: 1.05rem; margin: 1.3em 0 0.4em; }
.page .page-title { font-size: 1.5rem; margin-top: 0; }
.report-sub, .caption { color: var(--muted); }

.ledger { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); margin: 18px 0 8px; }
.ledger div { padding: 10px 12px 10px 0; }
.ledger div + div { border-left: 1px solid var(--line); padding-left: 12px; }
.ledger dt { font-size: 0.9rem; color: var(--muted); line-height: 1.3; }
.ledger dd { margin: 4px 0 0; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ledger small { display: block; font-size: 0.9rem; font-weight: 400; color: var(--muted); line-height: 1.3; }

.totals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px; }
.totals .figure { font-size: 2.1rem; font-weight: 700; line-height: 1.2; margin: 0 0 4px; font-variant-numeric: tabular-nums; }
.totals p { margin-bottom: 0.4em; }

.histogram { width: 100%; height: auto; display: block; margin: 4px 0 10px; }
.histogram .bin-under { fill: var(--marker); stroke: var(--ink); stroke-width: 1.5; }
.histogram .bin-middle { fill: var(--bar); }
.histogram .bin-protect { fill: var(--protect); stroke: var(--ink); stroke-width: 1.5; }
.histogram text { fill: var(--ink); font-family: inherit; text-anchor: middle; }
.histogram .bin-count { font-size: 17px; font-weight: 700; }
.histogram .bin-label { font-size: 15px; }
.histogram .rate-label { font-size: 15px; font-weight: 700; }
.histogram .rate-line { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 5 4; }
.histogram .baseline { stroke: var(--ink); stroke-width: 1.5; }

.groups { width: 100%; border-collapse: collapse; }
.groups th, .groups td { text-align: left; padding: 9px 8px 9px 0; border-top: 1px solid var(--line); vertical-align: top; }
.groups thead th { font-weight: 400; font-size: 0.9rem; color: var(--muted); border-top: 0; }
.groups thead th + th { text-align: right; }
.groups td { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.groups .detail { display: block; font-weight: 400; font-size: 0.9rem; color: var(--muted); }

.hours-bar { display: flex; height: 30px; border: 1.5px solid var(--ink); border-radius: 4px; overflow: hidden; margin: 6px 0 10px; }
.hours-on_site { background: var(--ink); }
.hours-drive { background: var(--bar); }
.hours-other { background: var(--tint); }
.hours-legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.hours-legend .swatch { display: inline-block; width: 14px; height: 14px; border: 1.5px solid var(--ink); border-radius: 2px; margin-right: 8px; vertical-align: -1px; }

.first-look { margin-top: 10px; }
.page-foot { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 0.9rem; color: var(--muted); }

@media (max-width: 720px) {
  .page { margin: 12px 10px; padding: 22px 18px; }
  .ledger { grid-template-columns: 1fr 1fr; }
  .ledger div:nth-child(3) { border-left: 0; padding-left: 0; }
  .ledger div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .totals { grid-template-columns: 1fr; }
}

@media print {
  @page { size: letter; margin: 0.45in; }
  .site-header, .site-footer, .report-bar, .skip { display: none !important; }
  .report { background: none; padding: 0; }
  .page { border: 0; margin: 0; padding: 0; max-width: none; break-after: page; }
  .page:last-child { break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* 2026-11-16: tighter print so page 1 fits a letter page (it ran about 230px over). */
  html { font-size: 10.5pt; }
  .page-head { margin-bottom: 10px; padding-bottom: 6px; }
  .page h1 { font-size: 1.7rem; }
  .page h2 { margin: 0.8em 0 0.35em; }
  .page h3 { margin: 0.8em 0 0.3em; }
  .page p { margin: 0 0 0.5em; }
  .ledger { margin: 10px 0 4px; }
  .ledger div { padding-top: 6px; padding-bottom: 6px; }
  .totals .figure { font-size: 1.8rem; }
  .histogram { width: 72%; margin: 0 auto 4px; }
  .groups th, .groups td { padding: 4px 8px 4px 0; }
  .page-foot { margin-top: 12px; padding-top: 6px; }
  .page .ticks li { margin-bottom: 0.25em; }
}

/* Full-report preview: the customer map. Grey town, so only the customers carry color. */
.town-map { width: 100%; height: auto; display: block; border: 1.5px solid var(--line); border-radius: 4px; margin: 6px 0 10px; }
.map-ground { fill: #F1F3F2; }
.map-park { fill: #DDE4E0; }
.map-creek { fill: none; stroke: #CDD6DC; stroke-width: 16; }
.map-streets line { stroke: #FFFFFF; stroke-width: 9; stroke-linecap: round; }
.map-label, .map-shop text { paint-order: stroke; stroke: #F1F3F2; stroke-width: 4px; stroke-linejoin: round; }
.map-label { font-size: 13px; fill: var(--muted); font-family: inherit; }
.map-shop rect { fill: var(--ink); }
.map-shop text { font-size: 14px; font-weight: 700; fill: var(--ink); font-family: inherit; }
.pin-under circle { fill: var(--marker); stroke: var(--ink); stroke-width: 2; }
.pin-under text { font-size: 14px; font-weight: 700; fill: var(--ink); text-anchor: middle; font-family: inherit; }
.pin-protect { fill: var(--protect); stroke: var(--ink); stroke-width: 1.5; }
.pin-middle circle { fill: var(--bar); }
.pin-middle path { fill: none; stroke: #FFFFFF; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.map-legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 0 0 10px; }
.map-legend li { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.map-legend svg { width: 24px; height: 24px; }
.map-note { background: var(--tint); border-left: 4px solid var(--ink); padding: 10px 14px; }

@media (prefers-contrast: more) {
  .page, .ledger, .ledger div + div, .groups th, .groups td, .page-foot, .town-map { border-width: 2px; }
  .report-bar, .map-note { border: 2px solid var(--ink); }
  .histogram .bin-middle { stroke: var(--ink); stroke-width: 1.5; }
  .map-label { fill: var(--ink); }
}
