/* A2 standalone shell. System fonts; no imported or dependent assets. */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f5f5f1;
  color: #17181a;
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-wrap: anywhere;
}
main { max-width: 60rem; margin: auto; padding: 2rem 1.25rem; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; }
h2 { font-size: 1.3rem; line-height: 1.3; }
section { padding: 1.25rem; background: #fff; border: 1px solid #d8d7cf; border-radius: 8px; }
a { color: #14523a; text-underline-offset: 3px; }
a, button { min-height: 44px; display: inline-flex; align-items: center; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #1f6b4a; outline-offset: 3px; }
.cae-chrome { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; background: #fff; border-block: 1px solid #d8d7cf; }
.cae-brand { font-size: 1.25rem; font-weight: 700; text-decoration: none; }
.cae-development { padding: 0.75rem; background: #fff3cd; border: 1px solid #947024; color: #59400b; font-weight: 600; }
.cae-failure { padding: 1rem; border: 2px solid #934019; background: #fff5ee; color: #702b10; }
.cae-note, .cae-hint, .cae-status { color: #454a50; }
.cae-field { margin: 1.5rem 0; min-width: 0; }
label { display: block; font-weight: 600; }
.cae-hint { font-size: 0.9rem; margin: 0.25rem 0 0.5rem; }
input[type="file"] { display: block; width: 100%; max-width: 100%; min-height: 44px; padding: 0.65rem; border: 1px solid #72777e; border-radius: 4px; font: inherit; color: inherit; background: #fff; }
.cae-warning { padding: 1rem; border: 2px solid #947024; background: #fff3cd; color: #59400b; font-weight: 600; }
.cae-warning:empty { display: none; }
.cae-facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.5rem 1rem; }
.cae-facts dt { font-weight: 600; }
.cae-facts dd { margin: 0; }
.cae-coverage { padding-left: 1.25rem; }
button { font: inherit; font-weight: 600; padding: 0.6rem 1rem; color: #fff; background: #14523a; border: 1px solid #14523a; border-radius: 5px; cursor: pointer; }
button:hover { background: #0f402d; }
input[type="date"], input[type="number"], select, textarea { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 44px; margin: 0.4rem 0 1rem; padding: 0.65rem; border: 1px solid #72777e; border-radius: 4px; font: inherit; color: inherit; background: #fff; }
textarea { resize: vertical; }
input[type="checkbox"] { width: 1.25rem; height: 1.25rem; }
.cae-approval, .cae-finding { min-width: 0; margin: 1rem 0; padding: 1rem; border: 1px solid #72777e; border-radius: 4px; }
.cae-finding h4 { margin-top: 0; }
#cae-review, #cae-report, #cae-review-files, #cae-saved-source, #cae-csv-actions, #cae-print-actions { margin: 1rem 0; }
.cae-print-only { display: none; }
#cae-review-files label { margin-top: 1rem; }
.cae-csv-controls { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cae-failure:empty { display: none; }
button:disabled, input:disabled { opacity: 0.65; cursor: not-allowed; }
@media (max-width: 30rem) {
  main { padding: 1.25rem 1rem; }
  section { padding: 1rem; }
  button { width: 100%; justify-content: center; }
  .cae-csv-controls { flex-direction: column; gap: 0.5rem; }
  .cae-facts { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
  .cae-facts dd { margin-bottom: 0.75rem; }
}

/* A3.6 native print evidence. Screen keeps the interactive workbench; print
   renders only the read-only evidence report. Monochrome-safe, no background
   dependence, no remote asset. */
@page { size: A4; margin: 16mm 14mm; }
@media print {
  .cae-chrome, .cae-development, .cae-note, noscript { display: none; }
  main > h1, main > h2, main > p { display: none; }
  section[aria-labelledby="cae-heading"] > h2, section[aria-labelledby="cae-heading"] > p { display: none; }
  #cae-workbench > button, #cae-workbench > p { display: none; }
  /* Mounted modules append either a section or bare controls, so exclude every
     direct child of a mount except the print report itself. */
  #cae-workbench > div > *:not(.cae-print-only) { display: none; }
  .cae-print-only { display: block; }
  body { background: #fff; color: #000; font-size: 10.5pt; line-height: 1.4; }
  main { max-width: none; padding: 0; }
  #cae-print-report { border: 0; padding: 0; }
  .cae-print-header { border-bottom: 2px solid #000; margin-bottom: 0.6rem; padding-bottom: 0.3rem; }
  .cae-print-header h2 { font-size: 15pt; margin: 0; }
  .cae-print-subtitle { font-size: 10pt; font-style: italic; margin: 0.2rem 0 0; }
  .cae-print-section { margin: 0.75rem 0; break-inside: auto; }
  .cae-print-section h3 { font-size: 12pt; margin: 0 0 0.3rem; border-bottom: 1px solid #000; break-after: avoid; page-break-after: avoid; }
  .cae-print-warning { border: 2px solid #000; padding: 0.4rem 0.5rem; font-weight: 700; break-inside: avoid; }
  .cae-print-facts { display: grid; grid-template-columns: 34% 1fr; gap: 0.15rem 0.6rem; margin: 0.3rem 0; }
  .cae-print-facts dt { font-weight: 700; }
  .cae-print-facts dd { margin: 0; }
  .cae-print-record { border: 1px solid #000; padding: 0.4rem 0.5rem; margin: 0.4rem 0; break-inside: auto; }
  .cae-print-record h4 { font-size: 11pt; margin: 0 0 0.25rem; break-after: avoid; page-break-after: avoid; }
  .cae-print-table { width: 100%; border-collapse: collapse; margin: 0.3rem 0; table-layout: auto; }
  .cae-print-table thead { display: table-header-group; }
  .cae-print-table tfoot { display: table-footer-group; }
  .cae-print-table th, .cae-print-table td { border: 1px solid #000; padding: 0.2rem 0.3rem; text-align: left; vertical-align: top; font-size: 9.5pt; }
  .cae-print-table th { font-weight: 700; }
  .cae-print-table tr { break-inside: avoid; page-break-inside: avoid; }
  .cae-print-followup { margin: 0.3rem 0 0 1.1rem; padding: 0; }
  .cae-print-followup li { margin-bottom: 0.25rem; break-inside: avoid; }
  #cae-print-report, #cae-print-report * { overflow-wrap: anywhere; word-break: break-word; max-width: 100%; }
  #cae-print-report a[href]::after { content: ""; }
}
