/* Report-only presentation. Keep the authored Docs and DOCX content intact. */
.ap-doc {
  --excerpt-fill: #edf1f5;
  --excerpt-border: #d5dee7;
  --excerpt-label: #526477;
  font-family: inherit;
  color: #202522;
  overflow-wrap: anywhere;
}
.ap-doc [style*="font-family"] { font-family: inherit !important; }
.ap-doc p {
  font-size: 14px !important;
  line-height: 1.6 !important;
  margin: 0 0 12px !important;
}
.ap-doc p :is(span, a) { font-size: inherit !important; line-height: inherit !important; }
/* Keep authored list markers inside the reading column, including on phones. */
.ap-doc p[data-marker] { margin-left: 1.8em !important; }
.ap-doc h1 {
  font-size: 36px !important;
  font-weight: 400 !important;
  line-height: 1.15 !important;
  margin: 0 0 24px !important;
  letter-spacing: -.025em;
}
.ap-doc :is(h2, h3, h4, h5, h6) {
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  margin: 28px 0 10px !important;
}
.ap-doc :is(h1, h2, h3, h4, h5, h6) span {
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}

/* Export-only spacing is replaced by the same paragraph rhythm in both formats. */
.ap-doc [data-layout-spacer], .ap-doc > [data-web-spacing] { display: none !important; }
.ap-doc [data-docx-spacer] { height: 6px !important; }
.ap-doc .ap-doc-table,
.ap-doc .ap-doc-table > tbody,
.ap-doc .ap-doc-table > tbody > tr { display: block; width: 100%; }
.ap-doc .ap-doc-table { margin: 0 0 12px; }
.ap-doc .ap-doc-table td { display: block; width: 100%; box-sizing: border-box; }
.ap-doc .ap-doc-table tr:has(> td:empty) { display: none; }
.ap-doc td:has(> [data-layout-spacer]):not(:has(> :not([data-layout-spacer]))) { display: none; }
.ap-doc td[style*="background-color:#ffffff" i] { padding: 12px 0 6px !important; }
.ap-doc td[style*="background-color:#ffffff" i] p { margin: 0 !important; }
.ap-doc p:has(+ .ap-doc-table),
.ap-doc p:has(+ [data-report-role-block]),
.ap-doc p:has(+ [data-web-spacing] + [data-report-role-block]) { margin-bottom: 6px !important; }
.ap-doc .ap-doc-table + p { margin-top: 16px !important; }

/* Single-column source tables and normalized role blocks use the same bubble. */
.ap-doc :is(td[style*="border-left:3pt"], [data-report-role-block]) {
  background: var(--excerpt-fill) !important;
  border: 1px solid var(--excerpt-border) !important;
  border-radius: 8px;
  padding: 8px 12px !important;
  min-width: 0;
}
.ap-doc [data-report-role-block] { margin: 0 0 12px !important; }
.ap-doc [data-report-role-block] + [data-report-role-block],
.ap-doc [data-report-role-block] + [data-web-spacing] + [data-report-role-block] { margin-top: -8px !important; }
.ap-doc tr:has(> td[style*="border-left:3pt"]) + tr > td[style*="border-left:3pt"] { margin-top: 4px; }

/* Match both source palettes, including uppercase DOCX color values. */
.ap-doc :is([style*="background-color:#dbeafe" i], [style*="background-color:#eaf2fd" i]) {
  --excerpt-fill: #e8f0fc; --excerpt-border: #c9daf1; --excerpt-label: #44638a;
}
.ap-doc :is([style*="background-color:#fef9c3" i], [style*="background-color:#fff3d9" i]) {
  --excerpt-fill: #faf2dc; --excerpt-border: #eadbb2; --excerpt-label: #806b36;
}
.ap-doc [style*="background-color:#ede9fe" i] {
  --excerpt-fill: #eee8fa; --excerpt-border: #dbcfed; --excerpt-label: #74608f;
}
.ap-doc :is([style*="background-color:#dcfce7" i], [style*="background-color:#eaf5ee" i]) {
  --excerpt-fill: #e6f3eb; --excerpt-border: #c9e3d3; --excerpt-label: #466f54;
}
.ap-doc [style*="background-color:#ffedd5" i] {
  --excerpt-fill: #fbeade; --excerpt-border: #efd3bf; --excerpt-label: #8a6247;
}

/* Labels stay in the site font; excerpt bodies use a readable code font. */
.ap-doc :is(td[style*="border-left:3pt"], [data-report-role-block]) p {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
  font-size: 13px !important;
  font-style: normal !important;
  line-height: 1.5 !important;
  margin: 0 0 6px !important;
}
.ap-doc :is(td[style*="border-left:3pt"], [data-report-role-block]) p :is(span, a) {
  color: #343a38 !important;
  font-family: inherit !important;
  font-style: normal !important;
}
.ap-doc :is(td[style*="border-left:3pt"], [data-report-role-block]) p:last-child { margin-bottom: 0 !important; }
.ap-doc :is(td[style*="border-left:3pt"], [data-report-role-block]) > p:first-child {
  color: var(--excerpt-label) !important;
  font-family: 'OpenAI Sans', 'Helvetica Neue', Arial, sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  margin-bottom: 3px !important;
}
.ap-doc :is(td[style*="border-left:3pt"], [data-report-role-block]) > p:first-child :is(span, a) {
  color: inherit !important;
  font-weight: inherit !important;
  text-decoration: none !important;
}
.ap-doc :is(td[style*="border-left:3pt"], [data-report-role-block]) > p:first-child a:hover { text-decoration: underline !important; }

/* Model context spans the card; each complete authored date occupies one cell. */
.ap-doc td[style*="background-color:#f0f2f4" i] {
  --excerpt-fill: #f7f8f7; --excerpt-border: #e2e6e3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 20px;
  padding: 16px 20px !important;
  border-radius: 10px;
}
.ap-doc td[style*="background-color:#f0f2f4" i] p {
  background: transparent !important;
  font-family: 'OpenAI Sans', 'Helvetica Neue', Arial, sans-serif !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  margin: 0 !important;
}
.ap-doc td[style*="background-color:#f0f2f4" i] > p:first-child {
  grid-column: 1 / -1;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  margin: 0 !important;
}
.ap-doc td[style*="background-color:#f0f2f4" i] br { display: none; }

/* The chart file includes a blank bottom strip; keep its plotted area unchanged. */
.ap-doc img { display: block; max-width: 100%; height: auto; }
.ap-doc p:has(> img) { line-height: 0 !important; margin-bottom: 8px !important; }
.ap-doc p:has(> img[src="/assets/reports/source-chart.png"]) { aspect-ratio: 1800 / 720; overflow: hidden; }

/* Mobile uses full-width content and inline dates without horizontal scrolling. */
@media (max-width: 48rem) {
  main:has(> .ap-doc-layout) { padding-inline: 16px; }
  .ap-doc-layout { padding-top: 24px; }
  .ap-doc { width: 100%; max-width: 100%; }
  .ap-doc h1 { font-size: 28px !important; line-height: 1.2 !important; margin-bottom: 20px !important; }
  .ap-doc p { font-size: 16px !important; }
  .ap-doc :is(h2, h3, h4, h5, h6) { font-size: 20px !important; margin-bottom: 12px !important; }
  .ap-doc :is(td[style*="border-left:3pt"], [data-report-role-block]) { padding: 10px !important; }
  .ap-doc td[style*="background-color:#f0f2f4" i] { grid-template-columns: 1fr; gap: 6px; }
  .ap-doc td[style*="background-color:#f0f2f4" i] > p:first-child { margin-bottom: 4px !important; }
}
