/*
 * One neutral palette. No status colours anywhere: a green or a red on a finding would
 * render a verdict the report deliberately withholds, and the two readings of an
 * observation must never be styled so that one looks like the answer.
 *
 * System fonts only — no CDN, no third-party request, nothing that phones home.
 */

:root {
  --page: #fbfbfa;
  --ink: #1b1b1a;
  --muted: #6b6b66;
  --rule: #e2e2dd;
  --panel: #ffffff;
  --accent: #3a3a37;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #161614;
    --ink: #ecebe7;
    --muted: #9a9891;
    --rule: #2e2c29;
    --panel: #1e1d1b;
    --accent: #cfcdc7;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2.5rem 1.25rem 4rem;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

header,
main,
footer {
  max-width: var(--measure);
  margin-inline: auto;
}

h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}

.lede {
  margin: 0.4rem 0 2rem;
  color: var(--muted);
  max-width: 58ch;
}

/* Chooser ---------------------------------------------------------------- */

#dropzone {
  display: block;
  padding: 2.25rem 1.5rem;
  border: 1px dashed var(--rule);
  border-radius: 10px;
  background: var(--panel);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

#dropzone:hover,
#dropzone:focus-within,
#dropzone[data-active] {
  border-color: var(--accent);
}

.prompt {
  display: block;
  font-weight: 600;
}

.note {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.86rem;
  max-width: 46ch;
  margin-inline: auto;
}

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

#file:focus-visible + #status,
#dropzone:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

#status {
  min-height: 1.5rem;
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

#status[data-state="working"]::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  animation: ellipsis 1.2s steps(4, end) infinite;
}

@keyframes ellipsis {
  to {
    content: "...";
  }
}

/* Report ----------------------------------------------------------------- */

#report {
  margin-top: 2.5rem;
}

#report h2 {
  margin: 2rem 0 0.75rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}

.summary {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 1rem;
  margin: 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--panel);
  font-size: 0.86rem;
}

.summary dt {
  color: var(--muted);
}

.summary dd {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}

.finding {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--panel);
  margin-bottom: 0.75rem;
}

.statement {
  margin: 0;
  overflow-wrap: anywhere;
}

.finding .id {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

/* Both readings, identical styling. Neither is the answer. */
.readings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20ch), 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.reading {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.reading h3 {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.reading p {
  margin: 0;
  font-size: 0.88rem;
}

.evidence {
  margin-top: 1rem;
  font-size: 0.86rem;
}

.evidence summary {
  cursor: pointer;
  color: var(--muted);
}

.evidence dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 1rem;
  margin: 0.7rem 0 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--rule);
}

.evidence dt {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
}

.evidence dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.83rem;
}

footer p {
  margin: 0;
  max-width: 56ch;
}

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