/* Sample report (/sample/). The page title on white, then the report on a pink sheet, set as
   the sober document actually delivered: Archivo in black, reference tables, no Courier but code.
   The report's markup is plain markdown output ({{sampleReport}}), so it is styled by element. */

/* ---------- White: title, provenance, what to look for ---------- */
.sample-top .page-title + .part {
  margin-top: var(--s7);
}
.sample-about .prose {
  max-width: 40em;
}
.sample-notice {
  margin-top: var(--s8);
}
.sample-notice .cap {
  margin-bottom: var(--s3);
}
.sample-points {
  display: grid;
  gap: var(--s4) var(--gap);
  counter-reset: pt;
}
.sample-points li {
  counter-increment: pt;
  padding-top: 8px;
  border-top: 2px solid var(--ink);
  font-size: var(--t-small);
  line-height: 1.45;
}
.sample-points li::before {
  content: counter(pt) ".";
  margin-right: 0.35em;
  font-weight: 700;
}
.sample-points b {
  font-weight: 750;
  font-stretch: 85%;
}
@media (min-width: 620px) {
  .sample-points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .sample-points {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- Pink: the report ---------- */
.sample-doc {
  max-width: 62rem;
  font-size: var(--t-body);
}
.sample-doc > * + * {
  margin-top: 0.9em;
}
.sample-doc > p,
.sample-doc > ul,
.sample-doc > ol {
  max-width: 40em;
}
.sample-doc > h2 {
  max-width: 34ch;
  font-size: clamp(1.75rem, 1.15rem + 1.9vw, 2.625rem);
  font-weight: 800;
  font-stretch: 70%;
  line-height: 1.02;
}
.sample-doc > h2 + table {
  margin-top: var(--s5);
}
.sample-doc > h3 {
  margin-top: var(--s7);
  font-size: var(--t-h3);
}
.sample-doc > h3 + * {
  margin-top: var(--s3);
}
.sample-doc > table {
  margin-top: var(--s4);
}
.sample-doc > table + p {
  margin-top: var(--s4);
}

/* the header block has no column heads: drop the empty head row */
.sample-doc thead:not(:has(th:not(:empty))) {
  display: none;
}
.sample-doc thead:not(:has(th:not(:empty))) + tbody tr:first-child > * {
  border-top: 2px solid var(--ink);
}
.sample-doc td > strong:only-child {
  font-weight: 650;
  font-stretch: 88%;
}
.sample-doc table td:first-child,
.sample-doc table th:first-child {
  min-width: 2.5em;
}
.sample-doc tbody td {
  overflow-wrap: break-word;
}
.sample-doc code {
  font-size: 0.92em;
}

/* lists are .prose lists (the article carries .prose); the evidence checklist has real tick boxes */
.sample-doc li:has(> input[type="checkbox"]) {
  padding-left: 0;
}
.sample-doc li:has(> input[type="checkbox"])::before {
  content: none;
}
.sample-doc input[type="checkbox"] {
  appearance: none;
  width: 1.05em;
  height: 1.05em;
  margin: 0 0.55em 0 0;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  background: transparent;
  vertical-align: -0.17em;
}

/* the close: signature, caveat, next step */
.sample-close {
  display: grid;
  gap: var(--s6);
  max-width: 62rem;
  margin-top: var(--s8);
}
.sample-doc table:has(th:nth-child(6)) td:nth-child(4) {
  white-space: nowrap;
}
.sample-close .signature {
  margin-top: 0;
}

/* phones: each table row becomes a ruled record. The report's tables come from markdown and
   carry no labels, so the labels are set here by table position, in the order the sample
   report has them: 1 header, 2 participants, 3 timeline, 4 rubric, 5 improvement actions.
   If docs/playtests/sample-after-action-report.md gains or loses a table, update these. */
@media (max-width: 700px) {
  .sample-doc > table,
  .sample-doc > table tbody,
  .sample-doc > table tr,
  .sample-doc > table td {
    display: block;
  }
  .sample-doc > table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .sample-doc > table tbody {
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
  }
  .sample-doc > table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px var(--s3);
    padding: 8px 0 10px;
    border-top: 1px solid var(--ink);
  }
  .sample-doc > table tr:first-child {
    border-top: 0;
  }
  .sample-doc > table td {
    min-width: 0;
    padding: 0;
    border: 0;
  }
  .sample-doc > table tbody tr:last-child > *,
  .sample-doc thead:not(:has(th:not(:empty))) + tbody tr:first-child > * {
    border: 0;
  }
  .sample-doc > table td::before {
    font-size: var(--t-cap);
    font-weight: 650;
    font-stretch: 88%;
  }

  /* 1 header: caption over value */
  .sample-doc > table:nth-of-type(1) td:first-child {
    font-size: var(--t-cap);
  }
  /* 2 participants: name, then role and job */
  .sample-doc > table:nth-of-type(2) td:first-child,
  .sample-doc > table:nth-of-type(4) td:first-child {
    font-weight: 700;
  }
  .sample-doc > table:nth-of-type(2) td:nth-child(2)::before {
    content: "Exercise role: ";
  }
  .sample-doc > table:nth-of-type(2) td:nth-child(3)::before {
    content: "Usual job role: ";
  }
  /* 3 timeline: time beside the event, who under it */
  .sample-doc > table:nth-of-type(3) tr {
    grid-template-columns: 5.6rem minmax(0, 1fr);
  }
  .sample-doc > table:nth-of-type(3) td:first-child {
    grid-row: span 2;
    font-weight: 700;
  }
  .sample-doc > table:nth-of-type(3) td:nth-child(3) {
    color: var(--ink-soft);
  }
  .sample-doc > table:nth-of-type(3) td:nth-child(3)::before {
    content: "Who: ";
  }
  /* 4 rubric: dimension and score on one line, evidence under */
  .sample-doc > table:nth-of-type(4) tr {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .sample-doc > table:nth-of-type(4) td:nth-child(2)::before {
    content: "Score (1–4) ";
  }
  .sample-doc > table:nth-of-type(4) td:nth-child(2) {
    font-weight: 700;
  }
  .sample-doc > table:nth-of-type(4) td:nth-child(3) {
    grid-column: 1 / -1;
  }
  /* 5 actions: number beside the action, the rest labelled under it */
  .sample-doc > table:nth-of-type(5) tr {
    grid-template-columns: 1.6rem minmax(0, 1fr);
  }
  .sample-doc > table:nth-of-type(5) td:first-child {
    grid-row: span 5;
    font-weight: 700;
  }
  .sample-doc > table:nth-of-type(5) td:nth-child(2) {
    margin-bottom: 4px;
  }
  .sample-doc > table:nth-of-type(5) td:nth-child(3)::before {
    content: "Owner: ";
  }
  .sample-doc > table:nth-of-type(5) td:nth-child(4)::before {
    content: "Due: ";
  }
  .sample-doc > table:nth-of-type(5) td:nth-child(5)::before {
    content: "Success measure: ";
  }
  .sample-doc > table:nth-of-type(5) td:nth-child(6)::before {
    content: "Status: ";
  }
}
