/* Detailed results share the application's burgundy and rose palette. */
.report-section {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  scroll-margin-top: 24px;
}

.report-section *, .report-lightbox * { min-width: 0; }
#open-report { margin-top: 16px; }
.report-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.report-heading-group { flex: 1; }
.report-header-actions { display: flex; flex-direction: column; align-items: stretch; flex: 0 1 310px; gap: 10px; }
.report-header-actions .report-verdict { flex: none; }
.report-new-video { align-self: flex-end; }
.report-eyebrow { margin-bottom: 5px; color: #8c3a59; font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
#report-heading { margin: 0; color: var(--ink); font-size: 29px; line-height: 1.25; letter-spacing: -.8px; }
.report-filename { margin-top: 8px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.report-verdict { display: flex; flex-direction: column; align-items: flex-start; flex: 0 1 300px; gap: 4px; padding: 12px 16px; border: 1px solid #efd9ac; border-radius: 13px; background: #fff8e9; color: #875912; }
.report-verdict strong { font-size: 14px; line-height: 1.45; }
.report-verdict[data-verdict="no_violation"] { border-color: #c9e2d3; background: #f1faf4; color: #276647; }
.report-total { font-size: 12px; line-height: 1.45; }
.report-mode-notice { margin-top: 16px; padding: 10px 13px; border: 1px solid #f0d2de; border-radius: 10px; background: #fff4f8; color: #82415a; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }

.report-layout { display: grid; grid-template-columns: minmax(215px, 270px) minmax(0, 1fr); align-items: start; gap: 24px; margin-top: 25px; }
.report-layout.report-layout-clean { grid-template-columns: minmax(0, 1fr); }
.report-layout-clean .report-clean-state { margin-top: 0; }
.report-sidebar { min-width: 0; padding: 17px 12px; border: 1px solid #f0e1e7; border-radius: 15px; background: #fffbfc; }
.report-list-title { margin: 0 5px 13px; color: var(--ink); font-size: 15px; font-weight: 700; }
.report-event-list { display: flex; flex-direction: column; gap: 8px; list-style: none; margin: 0; padding: 0; }
.report-event-list > li { margin: 0; }
.report-event-button { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 3px 10px; width: 100%; min-height: 74px; padding: 12px 10px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--ink); text-align: left; transition: background .16s, border-color .16s; }
.report-event-button:hover { background: #fff0f6; border-color: #f3d4e0; }
.report-event-button[aria-current="true"] { border-color: #d15584; background: #ffedf4; box-shadow: inset 3px 0 0 var(--pink); }
.report-event-number { display: flex; align-items: center; justify-content: center; grid-row: 1 / span 2; width: 27px; height: 27px; border-radius: 8px; background: #fff; color: #97425f; font-size: 11px; font-weight: 650; }
.report-event-button[aria-current="true"] .report-event-number { background: var(--pink); color: #fff; }
.report-event-name { grid-column: 2; color: var(--ink); font-size: 12px; line-height: 1.5; font-weight: 650; overflow-wrap: anywhere; }
.report-event-meta { grid-column: 2; color: #7e5364; font-size: 11px; line-height: 1.5; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.report-main { display: flex; flex-direction: column; gap: 23px; }
.report-event-content { display: flex; flex-direction: column; gap: 22px; }
.report-event-detail { min-width: 0; }
.report-event-title { margin: 0 0 10px; color: var(--ink); font-size: 22px; line-height: 1.35; font-weight: 700; letter-spacing: -.4px; overflow-wrap: anywhere; }
.report-time-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; max-width: 100%; padding: 8px 11px; border: 1px solid #ebc3d2; border-radius: 9px; background: #fff5f9; color: #9a204e; font-size: 12px; line-height: 1.45; font-weight: 650; font-variant-numeric: tabular-nums; white-space: normal; overflow-wrap: anywhere; transition: background .16s, border-color .16s; }
.report-time-button:hover:not(:disabled) { border-color: #cd7597; background: #ffebf3; }
.report-description { margin-top: 15px; color: #564a51; font-size: 14px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.report-evidence { padding-top: 20px; border-top: 1px solid var(--border); }
.report-evidence h4 { margin: 0 0 13px; color: var(--ink); font-size: 15px; font-weight: 700; }
.report-frame-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 12px; }
.report-frame { margin: 0; }
.report-frame-open { display: block; width: 100%; padding: 0; overflow: hidden; border: 1px solid #ecdae2; border-radius: 11px; background: #faf6f8; cursor: zoom-in; transition: border-color .16s, box-shadow .16s; }
.report-frame-open:hover { border-color: #c7668d; box-shadow: 0 3px 12px rgb(100 8 43 / 8%); }
.report-frame-image { display: block; width: 100%; height: 150px; object-fit: contain; background: #faf6f8; }
.report-frame figcaption { padding-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.report-frame-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.report-frame .report-time-button { width: 100%; padding: 7px; font-size: 11px; }
.report-frame-note, .report-evidence-note { margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.report-frame-error, .report-lightbox-error { margin-top: 9px; padding: 12px; border: 1px solid #edd4b8; border-radius: 10px; background: #fff7e9; color: #825728; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.report-video-review { padding-top: 20px; border-top: 1px solid var(--border); }
.report-video-review h3 { margin: 0 0 12px; color: var(--ink); font-size: 16px; font-weight: 700; }
.report-video { display: block; width: 100%; max-height: 420px; aspect-ratio: 16 / 9; border: 1px solid #e7dde2; border-radius: 12px; background: #211920; object-fit: contain; }
.report-video-feedback { margin-top: 11px; color: #86502c; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.report-video-note { margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.report-video-host:empty { display: none; }
.report-source-picker { margin-top: 12px; padding: 16px; border: 1px solid #ecd3df; border-radius: 12px; background: #fff8fb; }
.report-source-explanation { color: #644d58; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.report-source-button { margin-top: 12px; }
.report-source-metadata { margin-top: 11px; color: var(--muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.report-source-error { margin-top: 11px; padding: 10px 12px; border: 1px solid #e9c3d0; border-radius: 9px; background: #fff0f4; color: #992248; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.report-source-status { margin-top: 10px; color: #684759; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.report-source-status:empty { display: none; }
.report-clean-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 185px; margin-top: 24px; padding: 30px 24px; border: 1px solid #dcebe1; border-radius: 15px; background: #f6fbf8; text-align: center; }
.report-clean-state h3 { margin: 0; color: #276647; font-size: 23px; line-height: 1.35; }
.report-clean-state p { max-width: 70ch; color: #4e695b; font-size: 14px; line-height: 1.7; }
.report-clean-state .icon { width: 36px; height: 36px; color: #327c57; }

.report-lightbox { width: min(1080px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 21px; overflow: auto; border: 1px solid #ecd5df; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 28px 100px rgb(44 0 17 / 24%); }
.report-lightbox[open] { display: flex; flex-direction: column; gap: 13px; }
.report-lightbox::backdrop { background: rgb(35 13 25 / 63%); backdrop-filter: blur(4px); }
.report-lightbox-header { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 14px; }
.report-lightbox-header h2 { margin: 0; color: var(--ink); font-size: 20px; line-height: 1.35; letter-spacing: -.4px; overflow-wrap: anywhere; }
.report-dialog-close { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 9px; border: 1px solid #e9d8df; border-radius: 11px; background: #fff7fa; color: #8b1d48; font-size: 23px; }
.report-dialog-close:hover { background: #ffeaf2; }
.report-lightbox .report-mode-notice { flex: 0 0 auto; margin-top: 0; font-size: 11px; padding: 7px 11px; }
.report-lightbox-media { flex: 0 0 auto; }
.report-lightbox-image { display: block; width: 100%; height: min(61dvh, 620px); min-height: 100px; object-fit: contain; border: 1px solid #efe6eb; border-radius: 11px; background: #f9f5f7; }
.report-lightbox-caption { color: #65515b; font-size: 12px; line-height: 1.6; text-align: center; overflow-wrap: anywhere; }
.report-lightbox-actions { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; flex-wrap: wrap; gap: 10px; }
.report-lightbox-actions button { min-height: 44px; }
.report-section button:focus-visible, .report-lightbox button:focus-visible { outline: 3px solid #8b1245; outline-offset: 3px; }
.report-section .report-event-button:focus-visible { outline-offset: -3px; }

@media (max-width: 1180px) {
  .report-section { padding: 23px; }
  .report-layout { grid-template-columns: minmax(190px, 230px) minmax(0, 1fr); gap: 20px; }
  .report-event-title { font-size: 20px; }
  .report-frame-grid { gap: 9px; }
  .report-frame-image { height: 124px; }
}
@media (max-width: 980px) {
  .report-layout { grid-template-columns: minmax(165px, 200px) minmax(0, 1fr); gap: 17px; }
  .report-sidebar { padding: 14px 8px; }
  .report-event-button { grid-template-columns: 25px minmax(0, 1fr); gap: 3px 8px; padding: 11px 8px; }
  .report-event-number { width: 25px; height: 25px; }
  .report-frame-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .report-frame-image { height: 145px; }
}
@media (max-width: 740px) {
  .report-section { padding: 22px; border-radius: 18px; }
  .report-header { flex-direction: column; gap: 16px; }
  .report-header-actions { flex: none; width: 100%; }
  .report-new-video { align-self: stretch; }
  #report-heading { font-size: 26px; }
  .report-verdict { flex: none; width: 100%; }
  .report-layout { grid-template-columns: 1fr; gap: 23px; margin-top: 21px; }
  .report-sidebar { padding: 16px 12px; }
  .report-event-list { max-height: 300px; overflow-y: auto; padding: 3px; scrollbar-gutter: stable; }
  .report-event-button { grid-template-columns: 28px minmax(0, 1fr); gap: 3px 10px; min-height: 70px; padding: 12px 11px; }
  .report-event-number { width: 27px; height: 27px; }
  .report-event-name { font-size: 13px; }
  .report-frame-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-frame-image { height: 130px; }
  .report-lightbox { width: calc(100% - 20px); max-height: calc(100dvh - 20px); padding: 15px; border-radius: 16px; }
  .report-lightbox-header h2 { font-size: 18px; }
  .report-lightbox-image { height: 52dvh; min-height: 90px; }
}
@media (max-width: 540px) {
  .report-section { padding: 18px; }
  #report-heading { font-size: 24px; }
  .report-event-title { font-size: 20px; }
  .report-description { font-size: 13px; line-height: 1.8; }
  .report-frame-grid { grid-template-columns: 1fr; gap: 16px; }
  .report-frame-image { height: 185px; }
  .report-frame .report-time-button { width: auto; min-width: 120px; }
  .report-clean-state { min-height: 185px; padding: 24px 16px; }
  .report-clean-state h3 { font-size: 21px; }
  .report-clean-state p { font-size: 13px; }
  .report-lightbox[open] { gap: 10px; }
  .report-lightbox-actions { justify-content: stretch; gap: 8px; }
  .report-lightbox-actions button { flex: 1 1 110px; padding-left: 12px; padding-right: 12px; font-size: 12px; }
  .report-lightbox-image { height: 45dvh; }
}
@media (prefers-reduced-motion: reduce) {
  .report-section *, .report-lightbox * { transition: none !important; }
}
