/* PDF-Inspect styles. Shared shell styles live in scaffold/scaffold.css. */

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }

/* ---------- sidebar pieces ---------- */
.side-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-dim); margin: 22px 0 10px; font-weight: 600;
}
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  display: flex; justify-content: space-between; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.check-list li span { font-family: var(--mono); color: var(--accent); }
.engine-line { margin-top: 18px; font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
.engine-line[data-stage="ready"] { color: var(--good); }
.engine-line[data-stage="failed"] { color: var(--bad); }

.file-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.file-name { font-weight: 600; overflow-wrap: anywhere; }
.file-meta { color: var(--text-dim); font-size: 12px; margin-top: 4px; font-family: var(--mono); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.stat-value { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--text-dim); font-size: 12px; }
.stat.warn .stat-value { color: var(--warn); }

.download-buttons { display: grid; gap: 8px; }
.toggle { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 13px; cursor: pointer; }
.toggle input { accent-color: var(--accent); width: 16px; height: 16px; }
.fineprint { color: var(--text-dim); font-size: 12px; margin-top: 18px; line-height: 1.5; }

/* ---------- upload hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 24px;
  margin-bottom: 22px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: linear-gradient(90deg, #070b10 0%, #0b1017 100%);
}
.hero:has(.hero-art) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.hero-copy { padding: 28px 32px; }
.hero h1 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.05; margin: 0 0 14px; letter-spacing: -0.5px; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--text-dim); font-size: 15px; line-height: 1.6; margin: 0; max-width: 44ch; }
.hero-art { width: 100%; height: 100%; object-fit: cover; display: block; max-height: 300px;
  mask-image: linear-gradient(90deg, transparent 0, #000 18%); -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18%); }

.banner { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; border: 1px solid; line-height: 1.5; overflow-wrap: anywhere; }
.banner.bad { border-color: rgba(255,90,95,.5); background: rgba(255,90,95,.08); color: #ffc9ca; }

/* ---------- analyze ---------- */
.analyze-panel {
  max-width: 560px; margin: 8vh auto; text-align: center; padding: 36px 28px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
}
.analyze-panel h2 { margin: 0 0 10px; font-size: 20px; }
.progress-percent { font-family: var(--mono); font-size: 40px; font-weight: 700; color: var(--accent); min-height: 52px; }
.progress-track { height: 8px; background: var(--panel-2); border-radius: 99px; overflow: hidden; margin: 14px 0; border: 1px solid var(--border); }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-strong), #ffa04a); transition: width .25s ease; }
.progress-track.is-indeterminate .progress-fill { width: 35%; animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.progress-label { color: var(--text-dim); font-size: 13px; min-height: 1.4em; }
@media (prefers-reduced-motion: reduce) {
  .progress-track.is-indeterminate .progress-fill { animation: none; width: 100%; opacity: .4; }
}

/* ---------- highlights ---------- */
.highlights { background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; }
.highlights h2 { font-size: 13px; font-family: var(--mono); letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.highlights ul { margin: 0; padding-left: 18px; line-height: 1.6; }
.highlights li { overflow-wrap: anywhere; }
.highlights li.good::marker { color: var(--good); }
.highlights li.warn::marker { color: var(--warn); }

/* ---------- report table ---------- */
.print-header { display: none; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.report { width: 100%; border-collapse: collapse; }
.report col.c-name { width: 19%; }
.report col.c-desc { width: 29%; }
.report thead th {
  position: sticky; top: 0; background: var(--panel-2); text-align: left; padding: 11px 14px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.report .section-row th {
  text-align: left; padding: 16px 14px 8px; font-size: 12px; font-family: var(--mono); letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent); background: rgba(252,122,5,.04); border-bottom: 1px solid var(--border);
}
.report tbody tr:not(.section-row) > * { padding: 12px 14px; vertical-align: top; border-bottom: 1px solid var(--border); text-align: left; }
.report th.name { font-weight: 600; white-space: nowrap; }
.report td.desc { color: var(--text-dim); line-height: 1.5; }
.report td.value { line-height: 1.5; overflow-wrap: anywhere; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 9px; vertical-align: 1px; background: var(--border); }
.dot.found { background: var(--good); }
.dot.error { background: var(--bad); }
.dot.locked { background: var(--warn); }
.summary { font-weight: 500; }
.empty { color: var(--text-dim); font-family: var(--mono); font-size: 13px; }
.empty.error { color: var(--bad); }
.empty.locked { color: var(--warn); }
.note { color: var(--text-dim); font-size: 12px; margin-top: 4px; }
.flag { color: var(--warn); font-size: 13px; margin-top: 4px; }
.flag::before { content: "⚠ "; }
.report details { margin-top: 6px; }
.report summary { cursor: pointer; color: var(--accent); font-size: 13px; width: fit-content; }
.report summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.detail {
  margin-top: 6px; padding: 8px 10px; max-height: 420px; overflow: auto; background: #070b10;
  border: 1px solid var(--border); border-radius: 6px; font-family: var(--mono); font-size: 12px; line-height: 1.6;
}
.detail > div { white-space: pre-wrap; }

.hide-empty .report tr[data-status]:not([data-status="found"]) { display: none; }
.hide-empty .report tbody:not(:has(tr[data-status="found"])) { display: none; }

/* Stack the table into cards on phones. */
@media (max-width: 700px) {
  .report, .report tbody, .report tr, .report th, .report td { display: block; width: 100%; }
  .report thead, .report colgroup { display: none; }
  .report tbody tr:not(.section-row) { border-bottom: 1px solid var(--border); padding: 10px 0; }
  .report tbody tr:not(.section-row) > * { border: 0; padding: 4px 14px; }
  .report th.name { white-space: normal; font-size: 15px; }
  .hero, .hero:has(.hero-art) { grid-template-columns: 1fr; }
  .hero-copy { padding: 22px 20px 0; }
  .hero-art { max-height: 180px; mask-image: none; -webkit-mask-image: none; }
}

/* ---------- print ---------- */
@media print {
  @page { margin: 14mm; }
  * { color: #000 !important; background: transparent !important; box-shadow: none !important; }
  .print-header { display: block; margin-bottom: 12px; font-size: 11px; line-height: 1.5; }
  .print-brand { font-size: 18px; font-weight: 700; }
  .highlights { border: 1px solid #999; border-left: 3px solid #000; }
  .table-wrap { overflow: visible; border: 0; }
  .report { font-size: 10px; }
  .report thead { display: table-header-group; }
  .report thead th { position: static; border-bottom: 1.5px solid #000; }
  .report tbody tr:not(.section-row) > * { border-bottom: 1px solid #ccc; padding: 6px 8px; }
  .report tr { break-inside: avoid; }
  .report .section-row th { border-bottom: 1.5px solid #000; padding-top: 14px; break-after: avoid; }
  .report summary { display: none; }
  .detail { max-height: none; overflow: visible; border: 0; padding: 2px 0 0; font-size: 9px; }
  .dot { display: none; }
  .note, .flag, .empty { font-size: 9px; }
  .banner { border: 1px solid #000; }
}
