/* ── Form Check Report ── */
.check-report-form { margin: 0 0 4px; font-size: 1.2rem; }
.check-report-summary { margin: 0 0 16px; color: #555; }
.check-report-calc { margin-bottom: 14px; padding: 10px 12px; border-left: 4px solid #ccc; break-inside: avoid; }
.check-report-calc--unreachable, .check-report-calc--no-result { border-left-color: #c0392b; }
.check-report-calc--ok { border-left-color: #2e8b57; }
.check-report-calc-title { margin: 0; font-size: 1.05rem; }
.check-report-status, .check-report-note, .check-report-missed { margin: 4px 0; font-size: 0.9rem; overflow-wrap: anywhere; }
.check-report-missed { color: #c0392b; }
.check-report-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.check-report-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 0.85rem; }
.check-report-none { color: #888; }
.check-report-seen { margin: 4px 0; font-size: 0.9rem; overflow-wrap: anywhere; }
.check-report-trials-wrap { margin-top: 20px; }
.check-report-table th, .check-report-table td { border: 1px solid #ddd; padding: 4px 8px; text-align: left; vertical-align: top; }
.check-report-table th { background: #f5f5f5; }

.check-report-answers { margin: 2px 0 0; padding-left: 18px; }
.check-report-answers li { margin: 0; }
.check-report-more { margin-top: 2px; padding: 0; border: 0; background: none; color: var(--c-accent, #2563eb); font: inherit; cursor: pointer; }
.check-report-more:hover { text-decoration: underline; }
@media print {
  /* a short summary: the answer-set table (can be thousands of rows), and the questionnaire JSON stay on screen */
  .check-report-trials-wrap, .check-report-source, .check-report-screen-only { display: none; }
  .check-report-reads::details-content { content-visibility: visible; display: block; } /* the question lists print open */
  .check-report-calc { break-inside: avoid; }
  /* no controls on paper: the list heading is plain text, without the disclosure triangle */
  .check-report-reads > summary { list-style: none; font-weight: 600; cursor: default; }
  .check-report-reads > summary::-webkit-details-marker { display: none; }
  .check-report-answers { padding-left: 16px; font-size: 0.8rem; columns: 2; }
  .check-report-formula { background: none; border: 1px solid #ccc; }
}

.check-report-source { margin: 0 0 16px; }
.check-report-source > summary { cursor: pointer; font-weight: 600; }
.check-report-json { margin: 8px 0 0; max-height: 70vh; min-height: 0; -webkit-overflow-scrolling: touch; }

.check-report-reads { margin: 4px 0; font-size: 0.9rem; }
.check-report-reads > summary { cursor: pointer; }

.check-report-formula-label { margin: 6px 0 2px; font-size: 0.8rem; font-weight: 600; color: #555; }
.check-report-formula { margin: 0 0 6px; padding: 6px 8px; background: #f5f5f5; font-size: 0.8rem; white-space: pre-wrap; overflow-wrap: anywhere; }


/* ── Upload block (standalone check page) ── */
.qdoc-btn[hidden] { display: none; }
.check-report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; padding: 6px 8px; border: 1px solid var(--c-border); border-radius: var(--r); background: var(--c-bg); } /* a toolbar: these act on the report, they do not switch anything */
.check-report-actions .qdoc-btn { padding: 3px 10px; min-height: 0; border-radius: var(--r-sm); font-size: 12.5px; box-shadow: var(--shadow-sm); }
.check-report-actions .qdoc-btn:hover { border-color: var(--c-primary); color: var(--c-primary-dk); }
.page-header-bar .qdoc-actions { margin-inline-start: 0; } /* the back link takes the right edge, as on the other pages */
.check-upload-mount, .check-mode-mount { max-width: 1024px; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }
.check-mode-mount { padding-top: 16px; }
.check-upload { margin-top: 16px; padding: 12px 16px 16px; border: 1px solid var(--c-border); border-radius: var(--r); background: var(--c-surface); box-shadow: var(--shadow-sm); }
.check-upload-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 12px 0; padding: 22px 12px; border: 2px dashed color-mix(in srgb, var(--c-text-2) 45%, var(--c-surface)); border-radius: var(--r); color: var(--c-text-2); text-align: center; cursor: pointer; overflow-wrap: anywhere; transition: border-color .15s, background .15s; }
.check-upload-drop:hover, .check-upload-drop--over { border-color: var(--c-primary); background: var(--c-primary-lt); }
.check-upload-drop strong { color: var(--c-text-1); font-weight: 600; }
.check-upload-drop--busy { opacity: .5; pointer-events: none; }
.check-upload-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--c-primary-lt); color: var(--c-primary); font-size: 18px; }
.check-upload-hint { font-size: 0.85rem; }
.check-upload-drop:focus-within { border-color: var(--c-primary); outline: 2px solid var(--c-primary); outline-offset: 1px; }
.check-upload-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; } /* the whole zone is the click target */
.check-upload-text { display: block; width: 100%; box-sizing: border-box; margin: 0 0 12px; padding: 8px 10px; border: 1px solid var(--c-border); border-radius: var(--r-sm); background: var(--c-surface); color: var(--c-text-1); font: 0.85rem monospace; resize: vertical; }
.check-upload-text:focus { outline: 2px solid var(--c-primary); outline-offset: 1px; }
.check-upload .qdoc-btn { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 600; }
.check-upload .qdoc-btn:hover { background: var(--c-primary-dk); }
.check-upload .qdoc-btn:disabled { opacity: .6; cursor: default; }
[hidden].check-upload-status, [hidden].check-upload-progress { display: none; }
.check-upload-status { margin: 12px 0 6px; font-size: 0.9rem; color: var(--c-text-2); }
.check-upload-progress { display: block; width: 100%; height: 10px; }
.check-upload-error { margin: 12px 0 0; padding: 8px 10px; border: 1px solid var(--c-err-border); border-radius: var(--r-sm); background: var(--c-err-bg); color: var(--c-err); white-space: pre-wrap; overflow-wrap: anywhere; }

.compare-sides { display: grid; gap: 12px; }
@media (min-width: 768px) { .compare-sides { grid-template-columns: 1fr 1fr; } }
.compare-source .check-upload-text { margin-top: 0; }

/* ── What do you want to do? ── */
.check-mode { display: grid; gap: 12px; }
@media (min-width: 768px) { .check-mode { grid-template-columns: 1fr 1fr; } }
.check-mode-tab { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--c-border); border-radius: var(--r); background: var(--c-surface); color: var(--c-text-1); font: inherit; text-align: left; cursor: pointer; box-shadow: var(--shadow-sm); transition: border-color .15s, background .15s; }
.check-mode-tab:hover { border-color: var(--c-primary); }
.check-mode-tab[aria-pressed="true"] { border-color: var(--c-primary); box-shadow: inset 0 0 0 1px var(--c-primary), var(--shadow-sm); background: var(--c-primary-lt); }
.check-mode-tab[aria-pressed="true"] strong { color: var(--c-primary-dk); }
.check-mode-hint { color: var(--c-text-2); font-size: 0.9rem; }
.check-mode[data-compact] .check-mode-tab { padding: 8px 14px; }
.check-mode[data-compact] .check-mode-hint { display: none; }
.check-upload > .check-upload-hint { margin: 0 0 12px; line-height: 1.45; }
.check-upload-option { display: block; margin: 0 0 12px; font-size: 0.9rem; color: var(--c-text-1); }

/* ── Intro on the empty page ── */
.check-intro { max-width: 760px; margin: 0 auto; padding: 24px 16px; text-align: left; color: var(--c-text-1); line-height: 1.5; }
.check-intro h2 { margin: 0 0 8px; font-size: 1.1rem; }
.check-intro p { margin: 0 0 12px; }
.check-intro dt { margin-top: 12px; font-weight: 600; }
.check-intro dd { margin: 2px 0 0; color: var(--c-text-2); }
.check-intro code { font-size: 0.9em; }
.check-intro-note { margin-top: 16px; font-size: 0.9rem; color: var(--c-text-2); }
.check-intro-note a { color: var(--c-primary); font-weight: 600; text-decoration: none; }
.check-intro-note a:hover { text-decoration: underline; }
