.performance-heading { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.performance-heading h2 { margin: 0; font-size: 15px; }
.performance-list { display: grid; gap: 10px; }
.performance-card { background: var(--p-panel-2); border: 1px solid var(--p-line); border-radius: 8px; padding: 12px 14px; min-width: 0; }
.performance-card h3 { margin: 0 0 4px; font-size: 14px; overflow-wrap: anywhere; }
.performance-context, .performance-label { font-size: 12px; color: var(--p-muted); overflow-wrap: anywhere; line-height: 1.5; }
.performance-values { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 16px; margin: 12px 0 8px; }
.performance-values > div { display: grid; gap: 3px; min-width: 0; }
.performance-values strong { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.performance-more { font-size: 12px; color: var(--p-muted); }
.performance-more > summary { cursor: pointer; padding: 5px 0; }
.performance-explanation p { margin: 6px 0; line-height: 1.5; overflow-wrap: anywhere; }
.performance-warning { color: var(--p-muted); font-size: 12px; line-height: 1.5; }
.performance-run-summary { color: var(--p-ink); }
.timing-dialog { width: min(840px, calc(100vw - 48px)); max-height: 85dvh; padding: 0; border: 1px solid var(--p-line); border-radius: var(--p-radius); background: var(--p-bg); color: var(--p-ink); }
.timing-dialog::backdrop { background: rgb(0 0 0 / 55%); }
.timing-dialog[open] { display: flex; flex-direction: column; }
.timing-dialog-header { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--p-line); }
.timing-dialog-header h2 { font-size: 16px; margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.timing-dialog-note { padding: 12px 18px 0; margin: 0; white-space: pre-line; }
.timing-dialog-scroll { overflow-y: auto; min-height: 0; }
.timing-dialog-header { flex-shrink: 0; }
.timing-dialog-body { padding: 12px 18px 18px; }
.timing-photo-list { margin: 8px 0 12px; }
.timing-photo { border-bottom: 1px solid var(--p-line); padding: 8px 0; }
.timing-photo-heading { display: flex; align-items: center; gap: 10px; padding: 0; }
.timing-photo a { color: var(--p-ink); }
.timing-photo-image { display: inline-flex; flex: none; }
.timing-photo img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; flex: none; }
.timing-photo-info { display: grid; min-width: 0; flex: 1; gap: 3px; }
.timing-photo-info strong { font-size: 13px; overflow-wrap: anywhere; }
.timing-photo-duration { font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; max-width: 100px; }
.timing-attempts { margin: 0; font-size: 12px; }
.timing-attempts .provider-note:empty, .timing-attempts ol:empty { display: none; }
.timing-attempts p { margin: 2px 0; }
.timing-attempts ol { margin: 0; padding: 0; list-style: none; }
.timing-attempts li { padding: 1px 0; line-height: 1.5; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .performance-values { grid-template-columns: 1fr; gap: 10px; }
  .performance-values > div { grid-template-columns: 1fr auto; column-gap: 12px; }
  .performance-values .performance-label:last-child { grid-column: 1 / -1; }
  .performance-values strong { font-size: 16px; text-align: right; }
  .timing-dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .timing-dialog-header, .timing-dialog-body { padding: 12px 14px; }
  .timing-dialog-note { padding: 12px 14px 0; }
}

.performance-page { max-width: 1120px; margin: 0 auto; padding: 26px 24px 60px; }
.performance-back { font-size: 13px; color: var(--p-ink); }
.performance-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; }
.performance-page h1 { font-size: 24px; margin: 8px 0; }
.performance-intro { font-size: 14px; color: var(--p-muted); margin: 4px 0 24px; }
.performance-page .provider-note, .timing-dialog .provider-note { font-size: 12px; color: var(--p-muted); line-height: 1.5; }
.performance-views { display: flex; gap: 24px; border-bottom: 1px solid var(--p-line); margin-bottom: 24px; }
.performance-views a { padding: 10px 0; color: var(--p-muted); text-decoration: none; border-bottom: 2px solid transparent; font-size: 14px; }
.performance-views a[aria-current] { color: var(--p-ink); border-color: var(--p-accent); font-weight: 700; }
.performance-section-title { font-size: 16px; margin: 0; }
.performance-runs { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.performance-runs th { text-align: left; font-size: 12px; color: var(--p-muted); font-weight: 500; padding: 12px; border-bottom: 1px solid var(--p-line); }
.performance-runs td { padding: 16px 12px; border-bottom: 1px solid var(--p-line); vertical-align: top; overflow-wrap: anywhere; line-height: 1.5; }
.performance-runs th:nth-child(1) { width: 29%; }
.performance-runs th:nth-child(2) { width: 32%; }
.performance-runs th:nth-child(3) { width: 25%; }
.performance-runs th:nth-child(4) { width: 14%; }
.run-detail-link { font-weight: 650; color: var(--p-ink); }
.performance-paging { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.run-detail-summary { padding-bottom: 16px; border-bottom: 1px solid var(--p-line); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.run-detail-summary p:first-child { margin-top: 0; }
.timing-section-title { font-size: 14px; margin: 16px 0 8px; }
.p-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 700px) {
  .performance-page { padding: 20px 16px 40px; }
  .performance-page h1 { font-size: 21px; }
  .performance-runs, .performance-runs tbody { display: block; }
  .performance-runs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .performance-runs tr { display: grid; grid-template-columns: 1fr auto; padding: 14px 0; gap: 10px 16px; border-bottom: 1px solid var(--p-line); }
  .performance-runs td { display: block; padding: 0; border: 0; min-width: 0; }
  .performance-runs td:nth-child(1), .performance-runs td:nth-child(2) { grid-column: 1 / -1; }
  .performance-runs td:last-child::before { content: 'Total time'; display: block; font-size: 12px; color: var(--p-muted); }
  .performance-paging { flex-wrap: wrap; }
}

.performance-setup { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; font-weight: 600; margin: 8px 0 4px; line-height: 1.5; overflow-wrap: anywhere; }
.performance-setup > span { min-width: 0; }
.performance-values > div:nth-child(2) strong { font-size: 16px; }

.run-metric-sections { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; }
.run-metric-sections h3 { margin: 8px 0; font-size: 14px; }
.run-metric-sections > section { min-width: 0; }
.run-metrics { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; margin: 12px 0; }
.run-metrics dt { color: var(--p-muted); }
.run-metrics dd { margin: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .run-metric-sections { grid-template-columns: 1fr; gap: 6px; }
  .timing-attempts { margin-left: 0; }
}
