/* Styling for the in-browser verifier. A separate file because the page runs under
   style-src 'self' with no 'unsafe-inline' -- the verifier does not get to run under a looser
   policy than the pages it vouches for. */

:root {
  --ink: #16181d;
  --muted: #5b6270;
  --line: #dfe3ea;
  --bg: #ffffff;
  --panel: #f7f8fa;
  --pass: #0a7a3d;
  --fail: #b0121a;
  --unproven: #8a6100;
  --accent: #123a6b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eaee;
    --muted: #9aa3b2;
    --line: #2a2f38;
    --bg: #111318;
    --panel: #191c22;
    --pass: #4ec97e;
    --fail: #ff7b7b;
    --unproven: #e0b34a;
    --accent: #8fb6ec;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 2rem 1.25rem 5rem;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

main { max-width: 46rem; margin: 0 auto; }

h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; margin: 2.25rem 0 0.6rem; letter-spacing: -0.005em; }

p { margin: 0 0 0.9rem; }

.lede { font-size: 1.06rem; color: var(--muted); }

.fineprint { font-size: 0.9rem; color: var(--muted); }

code, .mono, textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

code {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.05em 0.35em;
  font-size: 0.9em;
  word-break: break-all;
}

.callout {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 1rem 1.1rem 0.3rem;
  margin: 1.5rem 0;
}

.callout h2 { margin-top: 0.2rem; }

button {
  font: inherit;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0.45em 1em;
  cursor: pointer;
}

button:disabled { opacity: 0.55; cursor: progress; }

button + button {
  margin-left: 0.5rem;
  background: transparent;
  color: var(--accent);
}

/* Status and verdict lines */
#status { margin-left: 0.6rem; color: var(--muted); font-size: 0.94rem; }
#status.working::after { content: " …"; }
#status.fail { color: var(--fail); font-weight: 600; }

.verdict { font-weight: 600; padding: 0.6rem 0.8rem; border-radius: 6px; border: 1px solid var(--line); }
.verdict:empty { display: none; }
.verdict.pass { color: var(--pass); border-color: currentColor; }
.verdict.fail { color: var(--fail); border-color: currentColor; }
.verdict.unproven { color: var(--unproven); border-color: currentColor; }
.warn { color: var(--unproven); }
.warn:empty { display: none; }

/* Individual checks */
.checks { display: flex; flex-direction: column; gap: 0.4rem; margin: 0.8rem 0; }

.check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.check .mark { font-weight: 700; line-height: 1.4; flex: none; width: 1em; text-align: center; }
.check.pass .mark { color: var(--pass); }
.check.fail .mark { color: var(--fail); }
.check.unproven .mark { color: var(--unproven); }
.check.fail { border-color: var(--fail); }

.ctitle { font-weight: 600; }
.cdetail { color: var(--muted); font-size: 0.92rem; word-break: break-word; }

/* Audit path */
#treeout ol { padding-left: 1.4rem; }
#treeout li { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; word-break: break-all; }
#treeout .mono { font-size: 0.85rem; word-break: break-all; }

select { font: inherit; padding: 0.2em 0.4em; }

/* Tamper playground */
textarea {
  width: 100%;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.7rem;
  resize: vertical;
}

@media (max-width: 34rem) {
  body { padding: 1.25rem 0.9rem 4rem; }
  h1 { font-size: 1.55rem; }
  button + button { margin-left: 0; margin-top: 0.5rem; }
}
