/* PDF import report: built on presto.css's palette. */
.imp { padding-bottom: 64px; }
.imp-head { padding: 28px 0 8px; }
.imp-head h1 { margin: 0; font-size: 2rem; }
.imp-sub { margin: 4px 0 0; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin: 16px 0; }
.card h2 { margin: 0 0 12px; font-size: 1.15rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn { display: inline-block; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 10px; padding: 9px 16px; font: inherit; font-size: .95rem; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn:hover { filter: brightness(1.05); }
input[type=password] { font: inherit; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); min-width: 0; flex: 1 1 200px; }
.muted { color: var(--muted); font-size: .95rem; }
.err { color: #c0392b; margin: 10px 0 0; }

.job-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.job-title h2 { margin: 0; overflow-wrap: anywhere; }
.badge { font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); text-transform: capitalize; }
.badge.done { background: color-mix(in srgb, var(--teal) 16%, transparent); color: var(--teal); }
.badge.failed { background: #f8d7d3; color: #a12a1c; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 16px; margin: 14px 0; }
.facts div { min-width: 0; }
.facts dt { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.stages { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.stages li { display: grid; grid-template-columns: 22px 130px 1fr auto; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); }
.stages .ico { width: 12px; height: 12px; border-radius: 50%; background: var(--line); display: inline-block; }
.stages .done .ico { background: var(--teal); }
.stages .running .ico { background: var(--accent); animation: pulse 1s infinite alternate; }
.stages .failed .ico { background: #c0392b; }
.stages .skipped .ico { background: transparent; border: 2px solid var(--line); box-sizing: border-box; }
.stages .name { font-weight: 600; }
.stages .detail { color: var(--muted); overflow-wrap: anywhere; }
.stages .time { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
@keyframes pulse { from { opacity: .35; } to { opacity: 1; } }
#downloads { margin-top: 14px; }

/* The whole window's width: each original page beside the same page of the result, at the same size. */
main.imp { max-width: none; }
#score-note { margin: 0 0 10px; }
#score-note:empty { display: none; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; align-items: start; }
.compare img { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: zoom-in; }
.compare .res { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.compare .res:empty { border-style: dashed; aspect-ratio: 612 / 792; background: transparent; }
.compare .res svg { display: block; }
.score-render { position: absolute; left: -10000px; top: 0; }
#rerun { margin-left: auto; }

.page { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 18px; align-items: start; }
.page img { border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: zoom-in; width: 100%; }
.page .meta { color: var(--muted); font-size: .9rem; margin: 0 0 10px; }
.page .changes { margin: 0 0 12px; padding: 10px 12px; background: var(--bg); border-radius: 8px; font-size: .95rem; }
.bars { width: 100%; border-collapse: collapse; font-size: .85rem; }
.bars th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.bars td { padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: top; font-family: ui-monospace, "SF Mono", Consolas, monospace; overflow-wrap: anywhere; }
.bars td.n, .bars td.len { font-family: inherit; font-weight: 600; white-space: nowrap; }
.bars td.len { font-weight: 400; }
.bars tr.changed td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.bars .short { color: #c0392b; font-weight: 600; }
.bars ins { text-decoration: none; background: color-mix(in srgb, var(--teal) 22%, transparent); border-radius: 3px; }
.bars del { text-decoration: line-through; color: #c0392b; }
.bars-wrap { overflow-x: auto; margin-top: 16px; }
.bars td:nth-child(2), .bars td:nth-child(3) { width: 45%; }

.recent { width: 100%; border-collapse: collapse; font-size: .92rem; }
.recent th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px; border-bottom: 1px solid var(--line); }
.recent td { padding: 6px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
#warnings { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }

.zoom { position: fixed; inset: 0; background: rgba(0,0,0,.75); display: flex; align-items: flex-start; justify-content: center; overflow: auto; z-index: 50; padding: 16px; cursor: zoom-out; }
.zoom img { max-width: min(1100px, 100%); background: #fff; }

@media (max-width: 720px) {
  .page { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .stages li { grid-template-columns: 22px 1fr auto; }
  .stages .name { grid-column: 2; grid-row: 1; }
  .stages .time { grid-column: 3; grid-row: 1; }
  .stages .detail { grid-column: 2 / 4; grid-row: 2; }
  .recent th:nth-child(2), .recent td:nth-child(2) { display: none; }
}
