/* The check pages (/verify, /verify/<n>): loaded after site.css by those two templates only. Scoped .verify-* and
   .issuer-* rules on the site.css tokens; running text 16 px Plex Sans or larger, mono values 15 px, touch targets 44 px or larger. Markup contract:
   assets/js/README.md, "verify.js, verdict.js, issuer.js and confirm.js (the check page)". No letter grades here: the
   answer leads with the state line (#verify-state). */

/* no script: the control and the issuer card stay hidden and #verify-nojs shows. With script (site.js sets .js first,
   and the media feature covers paint before any script runs) the swap happens in CSS, so nothing shifts on load. */
.verify-ui, .issuer-card { display: none; }
.js .verify-ui, .js .issuer-card { display: flex; }
.js .verify-nojs { display: none; }
@media (scripting: enabled) {
  .verify-ui, .issuer-card { display: flex; }
  .verify-nojs { display: none; }
}
.verify-ui [hidden], .issuer-card [hidden] { display: none !important; }

.verify-tool { display: flex; flex-direction: column; gap: 32px; max-width: 760px; }
.verify-position { max-width: 560px; }
.verify-ui { flex-direction: column; gap: 20px; }

.verify-nojs { max-width: 640px; font-size: 16px; line-height: 1.5; color: var(--body); }
.verify-nojs code { font-size: 15px; color: var(--ink); }

/* the drop zone: the label is the target; the input is visually hidden but stays focusable */
.verify-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 132px;
  padding: 24px;
  background: var(--sheet);
  border: 1px dashed rgba(26, 28, 31, 0.36);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out), transform 150ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .verify-drop:hover { border-color: var(--verdigris); }
}
.verify-drop[data-dragging] { border-style: solid; border-color: var(--verdigris); background: color-mix(in srgb, var(--verdigris-tint) 30%, var(--sheet)); transform: scale(1.01); }
.verify-drop:focus-within { outline: 2px solid var(--verdigris); outline-offset: 3px; }
@supports selector(:has(*)) {
  .verify-drop:focus-within { outline: 0; }
  .verify-drop:has(.verify-file:focus-visible) { outline: 2px solid var(--verdigris); outline-offset: 3px; }
}
.verify-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
}
.verify-drop-title { font-size: 18px; font-weight: 500; color: var(--ink); }
.verify-drop-hint { font-size: var(--fs-small); line-height: 1.45; color: var(--muted); }

.verify-preview { display: flex; flex-direction: column; gap: 8px; }
.verify-preview img { align-self: flex-start; width: auto; max-width: 100%; max-height: 320px; height: auto; object-fit: contain; border: 1px solid var(--rule-strong); }
.verify-preview audio { width: 100%; min-height: 44px; }
.verify-preview-caption { font-family: var(--mono); font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }

.verify-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
/* Check file: the primary button once a file is chosen; before that (and while a check runs) clearly off but on the
   paper: no fill, an ink outline at 35%, the label at half ink, and no hover or press (lr-pages, 31 Oct 2026). The
   1 px border is there in both states, so the button keeps its size. */
.verify-submit { min-height: 48px; min-width: 44px; border: 1px solid transparent; cursor: pointer; }
.verify-submit:disabled { background: transparent; border-color: rgba(26, 28, 31, 0.35); color: rgba(26, 28, 31, 0.5); cursor: not-allowed; }
.verify-limits { flex: 1 1 260px; font-size: var(--fs-small); line-height: 1.45; color: var(--muted); }

/* the result region: data-state manifest | watermark | nothing | error | checking (verify.js) */
.verify-result {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--sheet);
  border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--rule-strong);
}
.verify-result[data-state="manifest"], .verify-result[data-state="watermark"] { border-left-color: var(--verdigris); }
.verify-result[data-state="error"] { border-left-color: var(--oxide); }
.verify-result[aria-busy="true"] .verify-heading { color: var(--muted); }
.verify-heading { font-size: 26px; line-height: 1.15; }
.verify-heading:focus { outline: 0; }
.verify-heading:focus-visible { outline: 2px solid var(--verdigris); outline-offset: 3px; }

/* the state line: data-state confirmed | signed | claimed | disagree | shared | nothing (issuer.js state()) */
.verify-state {
  padding: 10px 14px;
  background: var(--paper);
  border-left: 3px solid var(--rule-strong);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.verify-state[data-state="confirmed"], .verify-state[data-state="signed"] { border-left-color: var(--verdigris); }
.verify-state[data-state="disagree"] { border-left-color: var(--oxide); }

.verify-summary { font-size: 16px; line-height: 1.5; color: var(--body); overflow-wrap: anywhere; }
.verify-summary:empty, .verify-signals:empty, .verify-caveats:empty { display: none; }

.verify-signals { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule-mid); }
.verify-signal {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-mid);
}
.verify-signal-name { font-size: var(--fs-small); font-weight: 600; color: var(--ink); }
.verify-signal-status { font-family: var(--mono); font-size: 15px; line-height: 1.45; color: var(--body); overflow-wrap: anywhere; }
.verify-signal-detail { font-size: var(--fs-small); line-height: 1.5; color: var(--body); overflow-wrap: anywhere; }
.verify-signal-detail:empty { display: none; }
.verify-signal[data-present="false"] .verify-signal-name { color: var(--muted); font-weight: 500; }
/* the product's sentences (issuer.js mirrors issuer_text word for word, verdict.js the signal statuses) start lower
   case in the DOM, as the CLI prints them; on the page each line starts with a capital */
.verify-state::first-letter, .verify-summary::first-letter, .verify-signal-status::first-letter,
.verify-signal-detail::first-letter, .verify-confirm-status::first-letter, .issuer-domain::first-letter { text-transform: uppercase; }

.verify-crossref { padding: 12px 14px; background: var(--paper); border: 1px solid var(--rule); font-size: var(--fs-small); line-height: 1.5; color: var(--ink); }
.verify-caveats { margin: 0; padding: 12px 0 0; list-style: none; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--rule); }
.verify-caveat { font-size: var(--fs-small); line-height: 1.5; color: var(--body); overflow-wrap: anywhere; }
.verify-next { font-size: var(--fs-small); line-height: 1.5; color: var(--body); }
.verify-next a, .issuer-url { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; overflow-wrap: anywhere; }

/* the routed confirmation (confirm.js): data-outcome confirmed | not_confirmed | attestation_failed | unsigned |
   no_answer (issuer claims) or asking | too_large | rate_limited | failed | no_webcrypto (page only) */
.verify-confirm { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; background: var(--paper); border: 1px solid var(--rule); }
.verify-confirm[data-outcome="confirmed"] { border-color: var(--verdigris); }
.verify-confirm[data-outcome="attestation_failed"], .verify-confirm[data-outcome="unsigned"] { border-color: var(--oxide); }
.verify-confirm-button { min-height: 44px; cursor: pointer; }
.verify-confirm-button:disabled { color: var(--muted); cursor: progress; }
.verify-confirm-note { font-size: var(--fs-small); line-height: 1.45; color: var(--muted); }
.verify-confirm-status { font-family: var(--mono); font-size: 15px; line-height: 1.5; color: var(--body); overflow-wrap: anywhere; }
.verify-confirm-download { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }

/* the issuer card (/verify/<n>): data-state active | lapsed | revoked | pending | not_registered | not_listed | offline */
.issuer-card {
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: var(--sheet);
  border: 1px solid var(--rule-strong);
  border-top: 3px solid var(--rule-strong);
}
.issuer-card[data-state="active"] { border-top-color: var(--verdigris); }
.issuer-card[data-state="lapsed"], .issuer-card[data-state="revoked"] { border-top-color: var(--oxide); }
.issuer-title { font-family: var(--sans); font-size: var(--fs-small); font-weight: 600; letter-spacing: 0; color: var(--muted); }
.issuer-number { font-family: var(--mono); color: var(--ink); }
.issuer-name { font-family: var(--serif); font-size: 30px; line-height: 1.15; color: var(--ink); overflow-wrap: anywhere; }
.issuer-domain { font-family: var(--mono); font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.issuer-status, .issuer-since, .issuer-names { font-size: 16px; line-height: 1.5; color: var(--body); overflow-wrap: anywhere; }
.issuer-checker { font-size: var(--fs-small); line-height: 1.45; color: var(--muted); }
.issuer-name:empty, .issuer-since:empty, .issuer-snapshot:empty { display: none; }
.issuer-url-none { font-size: var(--fs-small); color: var(--muted); }
.issuer-snapshot { font-family: var(--mono); font-size: 15px; color: var(--muted); }

/* How to read the answer: the states */
.verify-howto { display: flex; flex-direction: column; gap: 24px; }
.verify-outcomes { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.verify-outcome dt { font-size: 16px; font-weight: 600; color: var(--ink); }
.verify-outcome dd { margin: 6px 0 0; font-size: var(--fs-small); line-height: 1.5; color: var(--body); }

@media (max-width: 700px) {
  .verify-outcomes { grid-template-columns: minmax(0, 1fr); }
  .verify-drop { min-height: 112px; padding: 20px; }
  .verify-result, .issuer-card { padding: 20px; }
  .verify-heading { font-size: 22px; }
  .issuer-name { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .verify-drop[data-dragging] { transform: none; }
}
