/* R2PQ verification page.
   Reuses the site's palette but deliberately quieter: this is an instrument,
   not a landing page. No glow, no animation beyond a single progress pulse,
   no colour used as the only carrier of meaning. */

:root {
  --bg: #04070d;
  --panel: rgba(13, 22, 38, .72);
  --line: rgba(94, 234, 212, .14);
  --line-soft: rgba(148, 163, 184, .16);
  --teal: #5eead4;
  --txt: #dbeafe;
  --dim: #7c93b3;
  --ok: #6ee7b7;
  --bad: #f87171;
  --warn: #fbbf24;
  --neutral: #7c93b3;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

/* An author `display` rule beats the UA stylesheet's [hidden] rule, so a
   section styled `display: grid` stays visible even with the hidden
   attribute set. Restore the attribute's meaning explicitly. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* --- skip past chrome for keyboard users -------------------------------- */
a, button, summary, textarea, [tabindex] { outline-offset: 3px; }
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- chrome ------------------------------------------------------------- */
.site-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
}
.logo {
  font-weight: 700; font-size: 1.15rem; letter-spacing: .04em;
  color: var(--txt); text-decoration: none;
}
.logo span { color: var(--teal); }
.back { color: var(--dim); text-decoration: none; font-size: .9rem; }
.back:hover, .back:focus-visible { color: var(--teal); }

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 22px 72px;
}

/* --- intro -------------------------------------------------------------- */
.kicker {
  text-transform: uppercase; letter-spacing: .16em;
  font-size: .72rem; color: var(--teal); margin: 0 0 10px;
}
h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.4rem);
  line-height: 1.2; margin: 0 0 16px; font-weight: 650;
}
.lead { color: var(--dim); margin: 0 0 20px; max-width: 62ch; }

.privacy {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .88rem; color: var(--dim);
  border-left: 2px solid var(--line);
  padding: 10px 0 10px 14px; margin: 0 0 8px; max-width: 62ch;
}
.privacy-mark { color: var(--teal); flex: none; line-height: 1.5; }

/* --- panels ------------------------------------------------------------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 24px;
  margin-top: 26px;
}
.panel h2 {
  font-size: 1.05rem; font-weight: 600; margin: 0 0 16px;
  letter-spacing: .01em;
}
.panel h3 { font-size: .95rem; font-weight: 600; margin: 26px 0 8px; }

/* --- controls ----------------------------------------------------------- */
.input-actions {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px;
}
.btn {
  display: inline-block; cursor: pointer;
  font: inherit; font-size: .9rem;
  padding: 9px 16px; border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent; color: var(--txt);
  text-decoration: none;
}
.btn:hover, .btn:focus-visible { border-color: var(--teal); }
.btn-primary { background: rgba(94, 234, 212, .1); border-color: var(--teal); }
.btn-quiet { border-color: var(--line-soft); color: var(--dim); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.paste-area label {
  display: block; font-size: .85rem; color: var(--dim); margin-bottom: 6px;
}
textarea {
  width: 100%; resize: vertical; min-height: 120px;
  font-family: var(--mono); font-size: .8rem; line-height: 1.5;
  color: var(--txt); background: rgba(4, 7, 13, .6);
  border: 1px solid var(--line-soft); border-radius: 6px; padding: 12px;
}
.hint { font-size: .8rem; color: var(--dim); margin: 8px 0 14px; }

/* --- status ------------------------------------------------------------- */
.status {
  border: 1px solid var(--line-soft);
  border-left-width: 3px;
  border-radius: 8px; padding: 16px 18px;
}
.status-label {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 6px; font-size: 1.05rem; font-weight: 650;
  letter-spacing: .01em;
}
.status-mark { font-size: 1rem; flex: none; }
.status-detail { margin: 0; color: var(--dim); font-size: .9rem; }

.status-ready    { border-left-color: var(--neutral); }
.status-working  { border-left-color: var(--teal); }
.status-verified { border-left-color: var(--ok); }
.status-partial  { border-left-color: var(--warn); }
.status-invalid  { border-left-color: var(--bad); }
.status-unable   { border-left-color: var(--neutral); }

.status-verified .status-mark, .status-verified #status-title { color: var(--ok); }
.status-partial  .status-mark, .status-partial  #status-title { color: var(--warn); }
.status-invalid  .status-mark, .status-invalid  #status-title { color: var(--bad); }
.status-working  .status-mark { color: var(--teal); }

/* --- trust boundaries --------------------------------------------------- */
.boundaries-heading { margin-top: 28px; }
.boundaries-intro { font-size: .85rem; color: var(--dim); margin: 0 0 14px; max-width: 60ch; }

.boundaries { list-style: none; margin: 0; padding: 0; }
.boundary {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-top: 1px solid var(--line-soft);
}
.boundary:last-child { border-bottom: 1px solid var(--line-soft); }
.b-mark {
  flex: none; width: 1.1em; text-align: center;
  font-size: .95rem; line-height: 1.6; color: var(--neutral);
}
.b-body { min-width: 0; }
.b-body h4 {
  margin: 0; font-size: .9rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
}
.b-question { margin: 2px 0 4px; font-size: .84rem; color: var(--dim); }
.b-result { margin: 0; font-size: .88rem; overflow-wrap: anywhere; }

.b-pass .b-mark, .b-pass .b-result { color: var(--ok); }
.b-fail .b-mark, .b-fail .b-result { color: var(--bad); }
.b-none .b-mark, .b-none .b-result { color: var(--neutral); }

/* --- what this does / does not establish -------------------------------- */
.meaning {
  display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 28px;
}
.meaning h3 { margin-top: 0; }
.meaning ul { margin: 0; padding-left: 18px; }
.meaning li { font-size: .86rem; color: var(--dim); margin-bottom: 8px; }

/* --- technical detail --------------------------------------------------- */
.tech { margin-top: 26px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.tech summary {
  cursor: pointer; font-size: .88rem; color: var(--teal);
  list-style: revert;
}
.tech-body { margin-top: 14px; }
.kv { display: grid; grid-template-columns: minmax(140px, 32%) 1fr; gap: 6px 16px; }
.kv dt { font-size: .8rem; color: var(--dim); }
.kv dd {
  margin: 0; font-family: var(--mono); font-size: .78rem;
  overflow-wrap: anywhere;
}
.tech h4 {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--dim); margin: 20px 0 8px;
}
.path-warning {
  font-size: .8rem; color: var(--warn);
  border-left: 2px solid var(--warn); padding-left: 10px; margin: 12px 0;
}

/* --- tamper explanation -------------------------------------------------- */
.tamper-explain:empty { display: none; }
.tamper-explain {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.tamper-explain h3 { margin: 0 0 10px; }
.tamper-explain ul { margin: 0 0 12px; padding-left: 18px; }
.tamper-explain li {
  font-size: .86rem; color: var(--dim); margin-bottom: 8px;
}
.tamper-explain .hint { margin: 0; }

/* --- footer ------------------------------------------------------------- */
.site-foot {
  border-top: 1px solid var(--line-soft);
  padding: 22px; text-align: center;
  font-size: .82rem; color: var(--dim);
}
.site-foot a { color: var(--dim); }

/* --- responsive --------------------------------------------------------- */
@media (max-width: 620px) {
  main { padding: 28px 16px 56px; }
  .panel { padding: 18px 16px; }
  .meaning { grid-template-columns: 1fr; gap: 20px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
  .input-actions .btn { flex: 1 1 auto; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
