:root { color-scheme: light dark; }

body {
  font-family: system-ui, sans-serif;
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1rem;
  line-height: 1.5;
}

h1 { margin-top: 0; }
h1 a { color: inherit; text-decoration: none; }

form { display: flex; gap: 0.5rem; margin: 1.5rem 0; }
form.stacked { flex-direction: column; align-items: stretch; }
form.inline { display: inline; margin: 0; gap: 0; }

input[type=url],
input[type=email],
input[type=password] { flex: 1; padding: 0.5rem; font: inherit; }

button { padding: 0.5rem 1rem; font: inherit; cursor: pointer; }

.hint { color: #888; font-size: 0.9rem; }
.error { color: #b00; }

/* Label text available to screen readers but visually hidden, so the
   clean placeholder-driven look is kept while inputs stay labelled. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
pre { background: rgba(127,127,127,0.15); padding: 0.75rem; border-radius: 4px; overflow-x: auto; }

header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 1rem; }
header nav { font-size: 0.9rem; }

.nav-link {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

/* Determinate progress bars (download + stem generation status). appearance:none
   replaces the native control, whose default look animates a moving segment on
   some platforms (and bounces when indeterminate) — we always pass a value, so
   this renders a clean fill that grows. */
progress {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 220px;
  max-width: 55%;
  height: 12px;
  vertical-align: middle;
  border: 1px solid rgba(127, 127, 127, 0.4);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(127, 127, 127, 0.15);
}
progress::-webkit-progress-bar { background: rgba(127, 127, 127, 0.15); }
progress::-webkit-progress-value {
  background: #3a7afe;
  border-radius: 6px;
  transition: width 0.3s ease;
}
progress::-moz-progress-bar { background: #3a7afe; }
