:root {
  --background: #ffffff;
  --text: #1b1f24;
  --muted: #57606a;
  --border: #d0d7de;
  --accent: #1f6feb;
  --error: #b42318;
  --notice-background: #fff8c5;
  --code-background: #f2f4f6;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0d1117;
    --text: #e6edf3;
    --muted: #9198a1;
    --border: #3d444d;
    --accent: #4493f8;
    --error: #ff7b72;
    --notice-background: #3b2e00;
    --code-background: #1c2128;
  }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: system-ui, sans-serif;
  line-height: 1.5;
}

main,
footer {
  box-sizing: border-box;
  max-width: 42rem;
  margin: 0 auto;
  padding: 1rem;
}

[hidden] {
  display: none !important;
}

h1 {
  margin-bottom: 0.25em;
}

h2 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

a {
  color: var(--accent);
}

code,
pre {
  background: var(--code-background);
  border-radius: 4px;
}

code {
  padding: 0.1em 0.3em;
  overflow-wrap: anywhere;
}

pre {
  min-height: 4rem;
  padding: 0.75rem;
  overflow: auto;
  white-space: pre-wrap;
}

.notice {
  background: var(--notice-background);
  border-left: 4px solid var(--accent);
  padding: 0.5rem 0.75rem;
}

.hint,
footer {
  color: var(--muted);
  font-size: 0.9rem;
}

footer a + a,
footer a + span {
  margin-left: 1rem;
}

.row {
  display: flex;
  gap: 0.5rem;
}

.row input {
  flex: 1;
  min-width: 0;
}

input[type="text"],
button {
  font: inherit;
  padding: 0.4em 0.6em;
}

#status[data-kind="error"] {
  color: var(--error);
}

#status {
  white-space: pre-line;
}

#trust-line {
  display: block;
  margin: 0.5rem 0;
}

nanoflash-button {
  --nanoflash-button-background: var(--accent);
}

footer span::before {
  content: " - ";
}

footer span:empty::before {
  content: "";
}
