:root {
  --paper: #faf7f2;
  --ink: #1c2431;
  --muted: #5b6572;
  --flag: #c2452d;
  --ok: #2d6a4f;
  --line: #d9d2c7;
  --accent: #274c77;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 Georgia, "Times New Roman", serif;
}
main { max-width: 46rem; margin: 0 auto; padding: 3rem 1.25rem 5rem; }
.eyebrow {
  font: 0.72rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 { font-size: 2.3rem; margin: 0.2rem 0 0.6rem; font-weight: 600; }
h2 { font-size: 1.15rem; margin: 0 0 0.5rem; }
.lede { color: var(--muted); }
.lede em, .result em { color: var(--flag); font-style: normal; font-weight: bold; }
.panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin: 1.4rem 0;
  background: #fffdf9;
}
.hidden { display: none; }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
#bar-fill { height: 100%; width: 0; background: var(--accent); transition: width .25s; }
.specs {
  font: 0.75rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  padding-left: 1rem;
}
textarea, button, input[type=range] { font: inherit; }
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  background: #fff;
  color: var(--ink);
  resize: vertical;
}
.controls { display: flex; align-items: center; gap: 1rem; margin: 0.8rem 0; flex-wrap: wrap; }
.controls label { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); }
button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 0.45rem 1.3rem;
  cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: wait; }
button:focus-visible, textarea:focus-visible, input:focus-visible { outline: 2px solid var(--flag); outline-offset: 2px; }
.result {
  font-size: 1.15rem;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  min-height: 3.2rem;
  white-space: pre-wrap;
}
.result mark {
  background: #f9ded7;
  color: var(--flag);
  border-bottom: 2px solid var(--flag);
  padding: 0 2px;
  border-radius: 3px;
}
.verdict { margin: 0.4rem 0 0; font-size: 0.9rem; color: var(--muted); }
.verdict.ok { color: var(--ok); }
.telemetry {
  font: 0.73rem/1.7 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  white-space: pre-wrap;
  margin-top: 0.8rem;
}
.notes p { font-size: 0.95rem; color: var(--muted); }
.muted { color: var(--muted); font-size: 0.85rem; font-weight: 400; }
select, input[type=text] {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  background: #fff;
  color: var(--ink);
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em; }
@media (prefers-reduced-motion: reduce) { #bar-fill { transition: none; } }
