/* Shared report diagnostics and the exact records reached from them. */
.diagnostics { margin: 24px 0; padding: 20px; border: 1px solid #e6decb; border-radius: 16px; background: #fcfaf5; color: #374151; scroll-margin-top: 24px; }
.diagnostics [hidden] { display: none !important; }
.diagnostics-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 15px; }
.diagnostics-symbol { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border: 1px solid #e7d9ba; border-radius: 10px; background: #f4ecd9; color: #8c6b30; font-size: 20px; font-weight: 700; }
.diagnostics-heading h2 { display: flex; align-items: center; gap: 9px; margin: 0 0 4px; font-size: 17px; line-height: 1.4; color: #685631; }
.diagnostics-heading p { margin: 0; color: #85775c; font-size: 12px; line-height: 1.6; }
.diagnostics-total { display: inline-flex; align-items: center; justify-content: center; min-width: 23px; height: 23px; padding: 0 6px; border-radius: 7px; background: #ece3d0; color: #806837; font-size: 11px; }
.diagnostics-list { display: grid; gap: 8px; min-width: 0; }
.diagnostics-issue { min-width: 0; border: 1px solid #e8e2d6; border-radius: 11px; background: #fff; overflow: hidden; }
.diagnostics-issue > summary { display: flex; align-items: center; gap: 11px; min-height: 52px; padding: 13px 15px; list-style: none; cursor: pointer; color: #61563e; }
.diagnostics-issue > summary::-webkit-details-marker { display: none; }
.diagnostics-issue > summary:hover { background: #fdfbf7; }
.diagnostics-issue > summary:focus-visible { outline: 2px solid #ba8a40; outline-offset: -3px; border-radius: 10px; }
.diagnostics-message { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.65; overflow-wrap: break-word; }
.diagnostics-record-count { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 25px; padding: 0 7px; border: 1px solid #eee6d7; border-radius: 7px; background: #faf6ed; color: #967947; font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 700; }
.diagnostics-chevron { flex: 0 0 18px; color: #a4916d; transition: transform .16s ease; }
.diagnostics-issue[open] > summary { border-bottom: 1px solid #eee9de; background: #fdfbf7; }
.diagnostics-issue[open] .diagnostics-chevron { transform: rotate(180deg); }
.diagnostics-issue-body { padding: 0 15px 14px; }
.diagnostics-hint { margin: 12px 0; color: #7f7461; font-size: 12px; line-height: 1.7; }
.diagnostics-records { list-style: none; margin: 0; padding: 0; }
.diagnostics-record { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; min-width: 0; padding: 13px 0; border-top: 1px solid #eceff1; }
.diagnostics-record:first-child { border-top: 0; padding-top: 4px; }
.diagnostics-record:last-child { padding-bottom: 0; }
.diagnostics-record-copy { flex: 1; min-width: 0; }
.diagnostics-record-copy > strong { display: block; color: #354354; font-size: 13px; font-weight: 650; line-height: 1.55; overflow-wrap: break-word; }
.diagnostics-record-copy > p { margin: 4px 0 0; color: #728092; font-size: 12px; line-height: 1.65; overflow-wrap: break-word; white-space: pre-line; }
.diagnostics-facts { display: flex; flex-wrap: wrap; gap: 5px 15px; margin: 8px 0 0; }
.diagnostics-facts > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 5px; min-width: 0; font-size: 11px; line-height: 1.65; }
.diagnostics-facts dt { color: #8a94a2; }
.diagnostics-facts dd { margin: 0; color: #536174; font-weight: 600; overflow-wrap: break-word; }
.diagnostics-actions { display: flex; flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 46%; }
.diagnostics-actions > a { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 7px 10px; border: 1px solid #dce4ec; border-radius: 8px; background: #f8fafc; color: #4c6c8c; font-size: 11px; line-height: 1.4; font-weight: 650; text-decoration: none; }
.diagnostics-actions > a:hover { border-color: #acbfce; background: #edf3f7; }
.diagnostics-actions > a:focus-visible { outline: 2px solid #617f9b; outline-offset: 2px; }
.diagnostics-actions > a > span { color: #8ba0b4; font-size: 13px; }
.diagnostics-search-tools { margin: 0 0 14px; }
.diagnostics-search-tools > label { display: block; margin-bottom: 6px; color: #7d725e; font-size: 11px; font-weight: 650; }
.diagnostics-search-control { display: flex; gap: 8px; }
.diagnostics-search-control > input { flex: 1; min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid #ded8ca; border-radius: 9px; background: #fff; color: #364152; font: inherit; font-size: 12px; }
.diagnostics-search-control > input::placeholder { color: #a09a8e; }
.diagnostics-search-control > button { min-height: 42px; padding: 7px 11px; border: 1px solid #ded8ca; border-radius: 9px; background: #fff; color: #87734c; font: inherit; font-size: 12px; cursor: pointer; }
.diagnostics-search-control > input:focus-visible, .diagnostics-search-control > button:focus-visible { outline: 2px solid #ba8a40; outline-offset: 2px; }
.diagnostics-search-status { margin: 6px 0 0; color: #8a7c62; font-size: 11px; }
.diagnostics-search-status:empty { display: none; }
.diagnostics-empty { margin: 12px 0 0; padding: 13px; border: 1px dashed #d8cdb6; border-radius: 9px; color: #8b7955; font-size: 12px; line-height: 1.7; }
[data-diagnostic-target] { scroll-margin-top: 130px; }
.diagnostics-focus { outline: 2px solid #d4a150 !important; outline-offset: 5px; border-radius: 8px; animation: diagnostics-arrival 1.8s ease-out; }
.diagnostics-context-note { margin: 8px 0; padding: 8px 10px; border: 1px solid #e6d9ba; border-radius: 8px; background: #fff9e9; color: #8a703c; font-size: 12px; line-height: 1.6; }
@keyframes diagnostics-arrival { from { box-shadow: 0 0 0 8px #edcc8c50; } to { box-shadow: 0 0 0 0 #edcc8c00; } }
@media (max-width: 700px) {
  [data-diagnostic-target] { scroll-margin-top: 190px; }
  .diagnostics { padding: 15px; border-radius: 13px; }
  .diagnostics-heading { gap: 10px; }
  .diagnostics-heading h2 { font-size: 16px; }
  .diagnostics-issue > summary { padding: 12px; gap: 8px; }
  .diagnostics-message { font-size: 12px; }
  .diagnostics-issue-body { padding: 0 12px 12px; }
  .diagnostics-record { flex-direction: column; gap: 9px; }
  .diagnostics-actions { justify-content: flex-start; max-width: 100%; }
  .diagnostics-actions > a { min-height: 40px; padding: 8px 10px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .diagnostics-chevron { transition: none; }
  .diagnostics-focus { animation: none; }
}
