/* The evidence pack: an A4 document in the Press On look (cream page, charcoal
   ink, the ball's apricot as an accent). The brand fonts come from radar.css;
   everything else the pack needs is here, so a change to the radar screen
   can't move it. */
.pk-html {
  --pk-ink: #222226;
  --pk-ink-2: #55524e;
  --pk-page: #f7f0e5;
  --pk-paper: #fff;
  --pk-line: #dfd4c2;
  --pk-line-2: #e9e0d2;
  --pk-ball: #f79a5e;
  --pk-ball-soft: #fde4d0;
  --pk-worried: #eb6263;
  --pk-mixed: #8a8a8a;
  --pk-hopeful: #338ced;
  --pk-link: #1757ac;
  --pk-font: "Gabarito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pk-head: "Gabarito", system-ui, -apple-system, "Segoe UI", sans-serif;
}
/* radar.css fixes the radar screen to the window; a document scrolls */
html.pk-html, .pk-html body.pk { height: auto; overflow: visible; }
body.pk { margin: 0; background: var(--pk-page); color: var(--pk-ink); font-family: var(--pk-font); font-size: 15px; line-height: 1.45; }

/* ---- toolbar (screen only) */
.pk-toolbar {
  position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 24px; background: var(--pk-page); border-bottom: 1px solid var(--pk-line);
}
.pk-status { flex: 1; min-width: 200px; color: var(--pk-ink-2); font-size: 14px; }
.pk-btn {
  display: inline-block; background: var(--pk-paper); border: 1px solid #c7baa5; border-radius: 999px; padding: 8px 16px;
  font: inherit; font-size: 15px; color: var(--pk-ink); text-decoration: none; cursor: pointer;
}
.pk-btn:hover { border-color: var(--pk-ink); }
.pk-btn.primary { background: var(--pk-ink); color: var(--pk-page); border-color: var(--pk-ink); font-weight: 600; }
.pk-btn[disabled] { opacity: .45; cursor: default; }
.pk-btn:focus-visible, .pk a:focus-visible { outline: 3px solid var(--pk-hopeful); outline-offset: 2px; }

/* ---- the sheet: an A4 page on screen, the page itself in print */
.pk-frame { width: min(210mm, 100%); margin: 24px auto 48px; border-collapse: collapse; background: var(--pk-paper);
  box-shadow: 0 6px 30px rgba(60, 40, 20, .14); }
.pk-frame > tbody > tr > td { padding: 14mm 15mm 16mm; vertical-align: top; }
.pk-frame > thead { display: none; }   /* the running header is for printed pages */

header.pk-head { display: flex; align-items: flex-start; gap: 18px; padding: 0 0 12px; margin: 0 0 16px;
  border-bottom: 3px solid var(--pk-ball); }
.pk-logo { height: 30px; width: auto; flex: none; margin-top: 7px; color: var(--pk-ink); display: block; }
header.pk-head .pk-title { border-left: 2px solid var(--pk-line); padding-left: 18px; }
header.pk-head h1 { margin: 0; font-family: var(--pk-head); font-size: 26px; font-weight: 500; line-height: 1.15; }
.pk-sub { margin: 4px 0 0; color: var(--pk-ink-2); }
.pk-meta { margin: 6px 0 0; color: var(--pk-ink-2); font-size: 13px; }

/* ---- warnings: they decide how everything below is read */
.pk-sample { margin: 0 0 12px; padding: 10px 14px; border: 3px solid var(--pk-ink); border-radius: 8px;
  background: var(--pk-ball-soft); font-size: 16px; }
.pk-warn { margin: 0 0 12px; padding: 8px 12px; border-left: 4px solid var(--pk-worried); background: #fdf0ee; }
.pk-early { margin: 0 0 6px; padding: 6px 10px; border-left: 4px solid var(--pk-ball); background: #fef6ef; font-size: 14px; }

/* ---- sections */
.pk-sec { margin: 0 0 16px; }
.pk-sec h2 { display: flex; align-items: baseline; gap: 10px; margin: 20px 0 8px; font-family: var(--pk-head);
  font-size: 19px; font-weight: 500; line-height: 1.25; break-after: avoid; }
.pk-no { flex: none; display: inline-block; min-width: 24px; height: 24px; line-height: 24px; padding: 0 4px; border-radius: 12px;
  background: var(--pk-ink); color: var(--pk-paper); font-family: var(--pk-font); font-size: 13px; font-weight: 600; text-align: center; }
.pk-sec h3 { margin: 14px 0 6px; font-family: var(--pk-head); font-size: 15px; font-weight: 500; break-after: avoid; }
.pk-sec p { margin: 6px 0; }
.pk-sec ul { margin: 6px 0; padding-left: 20px; }
.pk-sec li { margin: 3px 0; }
.pk-note { color: var(--pk-ink-2); font-size: 13px; }

/* at a glance */
.pk-where { display: grid; gap: 2px; margin: 0 0 10px; }
.pk-where > div { display: flex; gap: 12px; }
.pk-where dt { min-width: 4.2em; font-weight: 600; }
.pk-where dd { margin: 0; }
.pk-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 4px; }
.pk-facts > div { padding: 8px 10px; border: 1px solid var(--pk-line-2); border-radius: 8px; break-inside: avoid; }
.pk-k { color: var(--pk-ink-2); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.pk-v { font-family: var(--pk-head); font-size: 22px; font-weight: 500; line-height: 1.2; }
.pk-moods { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.pk-bar-mood { display: flex; gap: 2px; height: 14px; margin: 6px 0; }
.pk-seg { display: block; height: 100%; }
.pk-seg:first-child { border-radius: 3px 0 0 3px; }
.pk-seg:last-child { border-radius: 0 3px 3px 0; }
.pk-seg:only-child { border-radius: 3px; }
.pk-seg.worried { background: var(--pk-worried); }
.pk-seg.mixed { background: var(--pk-mixed); }
.pk-seg.hopeful { background: var(--pk-hopeful); }
.pk-icon { vertical-align: -1px; }
.pk-mood { white-space: nowrap; }

/* tables */
.pk-themes, .pk-voices { width: 100%; border-collapse: collapse; font-size: 13px; }
.pk-themes th, .pk-voices th { padding: 5px 6px; border-bottom: 1.5px solid var(--pk-line); color: var(--pk-ink-2);
  font-weight: 600; text-align: left; vertical-align: bottom; }
.pk-themes td, .pk-voices td { padding: 5px 6px; border-bottom: 1px solid var(--pk-line-2); vertical-align: top; }
.pk-themes .pk-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pk-themes .pk-split { width: 24%; vertical-align: middle; }
.pk-themes .pk-split .pk-bar-mood { margin: 0; height: 10px; }
.pk-themes tr.pk-zero td { color: var(--pk-ink-2); }
.pk-themes tfoot td { font-weight: 600; border-top: 1.5px solid var(--pk-line); border-bottom: none; }
.pk-themes tr, .pk-voices tr { break-inside: avoid; }

.pk-voices { font-size: 12px; table-layout: fixed; }
.pk-voices .c-no { width: 4%; }
.pk-voices .c-id { width: 13%; }
.pk-voices .c-time { width: 8%; }
.pk-voices .c-place { width: 14%; }
.pk-voices .c-themes { width: 15%; }
.pk-voices .c-mood { width: 10%; }
.pk-voices td { overflow-wrap: anywhere; }
.pk-voices .pk-quote { font-style: normal; }   /* people's own words: upright, in quote marks (D14) */
.pk-voices .pk-after { margin-top: 3px; color: var(--pk-ink-2); font-size: 11.5px; }
.pk-voices .pk-after strong { color: var(--pk-ink); font-weight: 600; }
.pk-voices tr:target td { background: var(--pk-ball-soft); }
.pk-repeats td { color: var(--pk-ink-2); }
.pk-id { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 11px; }
.pk-tag { display: block; width: fit-content; margin-top: 3px; padding: 0 5px; border-radius: 4px; background: var(--pk-ink);
  color: var(--pk-paper); font-family: var(--pk-font); font-size: 10px; font-weight: 600; white-space: nowrap; }
.pk-nowrap { white-space: nowrap; }

/* the brief */
.pk-brief { padding-left: 12px; border-left: 3px solid var(--pk-line); }
.pk-brief h3:first-child { margin-top: 0; }
.pk-cite { color: var(--pk-link); font-size: .85em; text-decoration: none; white-space: nowrap; }
.pk-cite.missing { color: var(--pk-worried); }
.pk-shifts li { margin: 5px 0; }

.pk-appendix { break-before: page; }

/* narrow screens (a phone opening the public page); print has its own rules below */
@media screen and (max-width: 760px) {
  .pk-toolbar { position: static; padding: 10px 12px; }
  .pk-frame { margin: 0; box-shadow: none; }
  .pk-frame > tbody > tr > td { padding: 18px 14px; }
  .pk-frame { table-layout: fixed; }
  .pk-facts { grid-template-columns: repeat(2, 1fr); }
  .pk-themes { font-size: 12px; }
  .pk-themes th, .pk-themes td { padding: 4px 3px; }
  .pk-themes th.pk-num { white-space: normal; }
  .pk-themes th:last-child, .pk-themes td:last-child { display: none; }   /* the mood split bar */
  .pk-voices .c-no, .pk-voices td:first-child, .pk-voices .c-place, .pk-voices td:nth-child(4) { display: none; }
  header.pk-head { flex-direction: column; gap: 8px; }
  header.pk-head .pk-title { border-left: none; padding-left: 0; }
}

/* ---- print and "Save as PDF" */
@page {
  size: A4;
  margin: 12mm 13mm 14mm;
  @bottom-left { content: "Press On evidence pack"; font-size: 8pt; color: #55524e; }
  @bottom-right { content: "Page " counter(page) " of " counter(pages); font-size: 8pt; color: #55524e; }
}
@media print {
  html.pk-html, .pk-html body.pk { background: #fff; }
  body.pk { font-size: 10pt; }
  .pk-html * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pk-toolbar { display: none; }
  .pk-frame { width: 100%; margin: 0; box-shadow: none; }
  .pk-frame > tbody > tr > td { padding: 0; }
  .pk-frame > thead { display: table-header-group; }   /* repeats on every printed page */
  .pk-runhead { padding-bottom: 4mm; }
  .pk-run { padding-bottom: 1.5mm; border-bottom: 1px solid var(--pk-line); color: var(--pk-ink-2); font-size: 8pt; }
  .pk-run-sample { margin-bottom: 2mm; padding: 1.8mm; background: var(--pk-ink); color: #fff; font-size: 10pt;
    font-weight: 700; letter-spacing: .05em; text-align: center; }
  header.pk-head h1 { font-size: 20pt; }
  .pk-sec h2 { font-size: 14pt; }
  .pk-v { font-size: 16pt; }
  .pk-voices { font-size: 8.5pt; }
  .pk-voices .pk-after { font-size: 8pt; }
  .pk-id { font-size: 7.5pt; }
  .pk-themes { font-size: 9pt; }
  .pk-note, .pk-meta { font-size: 8.5pt; }
  .pk-sample, .pk-warn, .pk-early { break-inside: avoid; }
  .pk-voices tr:target td { background: none; }
}
