:root {
  color-scheme: light dark;
  --text: #1f2328;
  --muted: #59636e;
  --background: #ffffff;
  --panel: #f6f8fa;
  --border: #d1d9e0;
  --accent: #0969da;
  --warning: #fff8c5;
  --warning-border: #d4a72c;
  --good: #1a7f37;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6edf3;
    --muted: #9198a1;
    --background: #0d1117;
    --panel: #151b23;
    --border: #3d444d;
    --accent: #4493f8;
    --warning: #2e2a12;
    --warning-border: #9e6a03;
    --good: #3fb950;
  }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
}

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

.sentence {
  font-size: 1.35rem;
  margin: 0.5rem 0 1rem;
}

.document {
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
  overflow-wrap: anywhere;
}

.document pre {
  background: var(--panel);
  border-radius: 6px;
  font-size: 0.85rem;
  overflow-x: auto;
  padding: 0.75rem;
}

.document table {
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

.document th,
.document td {
  border: 1px solid var(--border);
  padding: 0.25rem 0.5rem;
}

.document .link {
  text-decoration: underline dotted;
}

.document .image {
  color: var(--muted);
}

details {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 0.5rem 0;
  padding: 0.25rem 0.75rem;
}

summary {
  color: var(--accent);
  cursor: pointer;
}

.end {
  height: 1px;
}

button {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  margin: 1rem 0.5rem 0 0;
  padding: 0.7rem 1.2rem;
}

button.sign {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

button:disabled {
  opacity: 0.55;
}

.warning {
  background: var(--warning);
  border: 1px solid var(--warning-border);
  border-radius: 6px;
  padding: 0.75rem;
}

.earlier li {
  margin: 0.4rem 0;
}

.earlier li.warns .verdict {
  font-weight: 600;
}

.earlier li.signed .verdict {
  color: var(--good);
}

.command {
  display: block;
  font-size: 0.85rem;
  margin-top: 0.2rem;
  overflow-wrap: anywhere;
}

.result {
  box-sizing: border-box;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  width: 100%;
}

.problem {
  border-left: 4px solid var(--warning-border);
  padding-left: 0.75rem;
}

footer {
  color: var(--muted);
  font-size: 0.8rem;
  padding: 1rem;
  text-align: center;
}
