/* Case report (printable dossier): a full-screen overlay outside the shell; printing hides the application and
   prints the page alone (the browser's dialog produces the PDF). */

.case-report {
  position: fixed;
  inset: 0;
  z-index: 4000;
  overflow: auto;
  background: var(--house-page);
}

.case-report__bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 45px;
  background: var(--house-blue);
  color: #fff;
}

.case-report__bar-title {
  margin-right: auto;
  font-size: 13px;
  color: var(--house-title-on-blue);
}

.case-report__bar .dxbl-btn:not(.commit-button) {
  border-color: #fff !important;
  background: transparent !important;
  color: #fff !important;
}

.case-report__page {
  max-width: 880px;
  margin: 20px auto 48px;
  padding: 38px 48px;
  background: #fff;
  color: #222;
  font-size: 13px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, .16);
}

.case-report__brand {
  margin-bottom: 6px;
  color: #586ba4;   /* the light theme's accent: a printed page is light whatever the screen shows */
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
}

.case-report__page h1 {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #586ba4;
  color: #35467a;
  font-size: 24px;
  font-weight: 400;
}

.case-report__page h2 {
  margin: 22px 0 8px;
  color: #35467a;
  font-size: 15px;
  font-weight: 500;
}

.case-report__node {
  color: #667;
  font-size: 13px;
  font-weight: 400;
}

.case-report__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 18px;
  margin: 6px 0 4px;
}

.case-report__map {
  max-width: 100%;
  border: 1px solid #dcdfe5;
  border-radius: 3px;
}

.case-report__more {
  color: #889;
}

.case-report__analysis {
  margin-top: 6px;
  break-inside: avoid;
}

.case-report__analysis .chart-svg {
  max-width: 620px;
  border-color: #eef1f9;
  background: #fafbfd;
}

.case-report__footer {
  margin-top: 30px;
  padding-top: 8px;
  border-top: 1px solid #dcdfe5;
  color: #889;
  font-size: 11px;
  text-align: center;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.report-table th {
  padding: 4px 8px;
  border: 1px solid #c9d0e4;
  background: #bbc4e0;
  color: #35467a;
  text-align: left;
  font-weight: 500;
}

.report-table td {
  padding: 3px 8px;
  border: 1px solid #e2e6ec;
}

.report-table .report-number {
  text-align: right;
}

.report-categories > div {
  margin: 3px 0;
}

@media print {
  body:has(.case-report) .application {
    display: none !important;
  }

  html,
  body,
  #app {
    height: auto;
    overflow: visible;
  }

  .case-report {
    position: static;
    overflow: visible;
    background: #fff;
  }

  .case-report__bar {
    display: none;
  }

  .case-report__page {
    max-width: none;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
}

.case-report__note {
  margin: 8px 0 12px;
  break-inside: avoid;
}

.case-report__note h3 {
  margin: 0 0 4px;
  font-size: 13px;
  color: #35467a;
}

.case-report__note p {
  margin: 0;
  white-space: pre-line;
  line-height: 1.5;
}

.report-muted {
  color: #6b7280;
}

/* Business model canvas pages in the report: the whole page, and each value proposition canvas under it. */
.case-report__bmc .bmc-board .chart-svg {
  width: 100%;
  max-width: 100%;
}

.case-report__bmc-pair {
  margin: 10px 0 2px;
  font-weight: 600;
  color: #35467a;
}

/* Evidence cards (i2's "All Cards" report) and their references from the tables. */
.report-evidence__ref {
  margin-left: 2px;
  color: #666;
  font-size: 9px;
}

.report-evidence__text {
  color: #666;
  white-space: pre-wrap;
}

.report-evidence--contradicts td:first-child {
  border-left: 3px solid #c0392b;
}

/* The narrative chronology: milestones stand out, silences are quiet lines of their own. */
.report-chronology td:first-child {
  white-space: nowrap;
}

.report-chronology__milestone td {
  background: #fff3e0;
  font-weight: 600;
}

.report-chronology__milestone td:first-child {
  border-left: 3px solid #e65100;
}

.report-chronology__gap td {
  color: #777;
  font-style: italic;
  background: #f6f7fa;
}

.report-chronology__against {
  color: #b3001b;
}

.case-report__method {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 2px 12px;
  margin: 0 0 12px;
  font-size: 13px;
}

.case-report__method > div {
  display: contents;
}

.case-report__method dt {
  color: #555;
  font-weight: 600;
}

.case-report__method dd {
  margin: 0;
}

.case-report__finding {
  margin: 0 0 12px;
  padding: 6px 10px;
  border-left: 3px solid #2a5db0;
  break-inside: avoid;
}

.case-report__finding h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.case-report__finding p {
  margin: 0 0 4px;
}

.case-report__finding-objects {
  font-size: 13px;
}

.case-report__finding-meta {
  color: #777;
  font-size: 11px;
}

.case-report__ownership {
    margin: 10px 0 14px;
    break-inside: avoid;
}

.case-report__ownership h3 {
    margin: 6px 0 2px;
}

.case-report__owner td:first-child {
    box-shadow: inset 3px 0 0 #f39c12;
}

.case-report__chains {
    font-size: 0.9em;
}

.case-report__warning {
    margin: 2px 0;
    color: #b3001b;
    font-size: 0.92em;
}

.case-report__muted {
    color: #666;
    font-size: 0.92em;
}
