/* After-Action Report - deliberately its own light-theme visual register,
   independent of the app's dark design tokens in main.css. Per
   GRIMLIN_PLATFORM_DIRECTIVE.md Phase 1: "It must look like a document,
   not an app screen." Shown/hidden by renderAAR()/closeAAR() in js/app.js. */

#aar-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #FFFFFF;
  overflow-y: auto;
  display: none; /* toggled to 'block' by renderAAR() */
}

.aar-doc {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 56px 80px;
  color: #1A1D21;
  font-family: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.aar-toolbar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
}

.aar-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid #D8DCE1;
  background: #F5F6F8;
  color: #1A1D21;
  cursor: pointer;
}
.aar-btn:hover { background: #ECEEF1; }
.aar-btn-primary {
  background: #D9A23C;
  border-color: #D9A23C;
  color: #1A1305;
}
.aar-btn-primary:hover { background: #E4B55E; }

.aar-header {
  border-bottom: 2px solid #D9A23C;
  padding-bottom: 20px;
  margin-bottom: 32px;
}
.aar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.aar-brand-logo { width: 24px; height: 24px; }
/* GK-104: was a solid muted brown-gray, its own third treatment
   distinct from both the app (accent gold) and admin portal (plain
   white). Brought into the same two-tone "Grim"/"lin" system, using
   this document's own light-theme tokens (gold accent already used for
   .aar-header's border, dark body text already used for .aar-doc). */
.aar-brand-name { font-family: "JetBrains Mono", monospace; font-size: 13px; font-weight: 700; letter-spacing: 0.5px; color: #D9A23C; }
.aar-brand-name span { color: #1A1D21; }
.aar-doc-title { font-size: 28px; font-weight: 800; color: #1A1D21; margin-bottom: 6px; }
.aar-doc-subtitle { font-size: 14px; color: #6B7280; }

.aar-section { margin-bottom: 32px; }
.aar-section-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #8A621F;
  border-bottom: 1px solid #E5E7EB;
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.aar-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  margin: 14px 0 6px;
}
.aar-body-text { color: #1A1D21; }
.aar-list { margin: 0 0 0 20px; padding: 0; }
.aar-list li { margin-bottom: 6px; }

.aar-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.aar-table th, .aar-table td { text-align: left; padding: 8px 10px; vertical-align: top; }
.aar-table tr { border-bottom: 1px solid #EEF0F2; }
.aar-table th { color: #6B7280; font-weight: 600; width: 160px; }
.aar-table-grid thead th { background: #F5F6F8; font-family: "JetBrains Mono", monospace; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; width: auto; border-bottom: 1px solid #D8DCE1; }
.aar-table-compact td, .aar-table-compact th { font-size: 12px; padding: 6px 8px; }

.aar-attack-chain {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 4px;
}
.aar-attack-phase {
  flex: 1 1 140px;
  min-width: 130px;
  border: 1px solid #D8DCE1;
  border-radius: 10px;
  padding: 10px 12px;
  background: #FAFAFA;
  break-inside: avoid;
}
.aar-attack-phase-mitre {
  border-color: #D9A23C;
  background: #FDF8ED;
}
.aar-attack-phase-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: #8A621F;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.aar-attack-phase-badge {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: #D9A23C;
  color: #1A1305;
  margin-bottom: 6px;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.aar-attack-phase-badge-plain {
  background: #EEF0F2;
  color: #6B7280;
}
.aar-attack-phase-label {
  font-size: 13px;
  font-weight: 700;
  color: #1A1D21;
  margin-bottom: 2px;
}
.aar-attack-phase-title {
  font-size: 11px;
  color: #6B7280;
}
.aar-attack-chain-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #C6CBD2;
  font-size: 16px;
  flex: 0 0 auto;
  padding: 0 2px;
}

.aar-decision {
  border-left: 3px solid #D9A23C;
  padding: 4px 0 4px 16px;
  margin-bottom: 18px;
}
.aar-decision-header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; color: #8A621F; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px; }
.aar-decision-elapsed { color: #9CA3AF; font-weight: 600; white-space: nowrap; }
.aar-decision-prompt { font-size: 13px; color: #374151; font-style: italic; margin-bottom: 6px; }
.aar-decision-choice { font-size: 13.5px; margin-bottom: 4px; }
.aar-decision-consequence { font-size: 13px; color: #4B5563; }
/* GK-110: per-decision impact badges - e.g. "+2 Containment Effectiveness" -
   reusing this document's existing gold/muted palette rather than
   introducing new brand colors just for two badge variants. */
.aar-decision-deltas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.aar-decision-delta { font-family: "JetBrains Mono", monospace; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.aar-decision-delta-pos { background: #E7F3EC; color: #1E8E5A; }
.aar-decision-delta-neg { background: #FBEAEA; color: #B33A3A; }

.aar-metric-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.aar-metric-label { width: 220px; flex-shrink: 0; font-size: 13px; }
.aar-metric-bar-track { flex: 1; height: 8px; background: #EEF0F2; border-radius: 4px; overflow: hidden; }
.aar-metric-bar-fill {
  height: 100%;
  background: #D9A23C;
  border-radius: 4px;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.aar-metric-value { width: 44px; text-align: right; font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 700; }
.aar-metric-boolean { font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 6px; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.aar-boolean-good { background: #E7F5EC; color: #1E7A42; }
.aar-boolean-bad { background: #FBEAEA; color: #B3261E; }

.aar-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid #E5E7EB;
  font-size: 11px;
  color: #6B7280;
}
.aar-disclaimer { margin-top: 8px; line-height: 1.5; }

/* GK-068: Verified Skill Badge certificate - its own decorative
   register (double gold border, centered) rather than reusing
   .aar-section's left-aligned document layout, since this is meant to
   be screenshotted/printed standalone as a shareable credential, not
   read as a multi-page report. */
.cert-doc { display: flex; justify-content: center; padding: 20px 0; }
.cert-border {
  max-width: 620px;
  width: 100%;
  text-align: center;
  padding: 48px 40px;
  border: 2px solid #D9A23C;
  outline: 1px solid #D9A23C;
  outline-offset: -10px;
  border-radius: 4px;
}
.cert-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 28px; }
.cert-brand-logo { width: 24px; height: 24px; }
.cert-brand-name { font-family: "JetBrains Mono", monospace; font-size: 13px; font-weight: 700; letter-spacing: 0.5px; color: #D9A23C; }
.cert-brand-name span { color: #1A1D21; }
.cert-eyebrow { font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #8A621F; margin-bottom: 10px; }
.cert-title { font-size: 24px; font-weight: 800; color: #1A1D21; margin-bottom: 24px; }
.cert-body { font-size: 13.5px; color: #4B5563; line-height: 1.6; max-width: 440px; margin: 0 auto 16px; }
.cert-name { font-size: 26px; font-weight: 700; color: #1A1D21; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #E5E7EB; display: inline-block; }
.cert-meta { display: flex; justify-content: center; gap: 40px; margin: 24px 0; }
.cert-meta-label { display: block; font-family: "JetBrains Mono", monospace; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.5px; color: #9CA3AF; margin-bottom: 3px; }
.cert-meta-value { display: block; font-size: 13px; font-weight: 700; color: #1A1D21; }
.cert-disclaimer { margin-top: 20px; font-size: 10.5px; color: #9CA3AF; line-height: 1.5; }

@media print {
  .no-print { display: none !important; }
  #aar-overlay { position: static; overflow: visible; }
  .aar-doc { max-width: 100%; padding: 0; }
  .aar-section, .aar-decision, .aar-table { break-inside: avoid; }
  @page { margin: 0.75in; }
}
