/* SPDX-License-Identifier: Apache-2.0 */
:root {
  color-scheme: light dark;
  --accent: #3b82f6;
}

* {
  box-sizing: border-box;
}

body {
  font: 16px/1.5 system-ui, sans-serif;
  margin: 0;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

main {
  width: 100%;
  max-width: 32rem;
}

h1 {
  margin: 0 0 0.25rem;
}

.tagline {
  margin: 0 0 1.5rem;
  opacity: 0.8;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.field > span {
  font-weight: 600;
}

fieldset {
  border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  border-radius: 0.5rem;
}

input[type="file"],
input[type="number"] {
  padding: 0.4rem;
}

button {
  padding: 0.6rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  border: 0;
  border-radius: 0.5rem;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.hidden {
  display: none;
}

#status {
  margin-top: 1rem;
  min-height: 1.5rem;
}

#status.error {
  color: #dc2626;
}

code {
  background: color-mix(in srgb, currentColor 12%, transparent);
  padding: 0 0.25rem;
  border-radius: 0.25rem;
}

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

.colophon {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, currentColor 15%, transparent);
  font-size: 0.875rem;
  opacity: 0.75;
}

/* Top bar on the app page (links to the explainer + source). */
.topbar {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
  font-size: 0.875rem;
  opacity: 0.75;
}

/* "How it works" article page */
.back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.lead {
  font-size: 1.05rem;
  opacity: 0.9;
}

h2 {
  margin: 2.25rem 0 0.5rem;
  font-size: 1.2rem;
}

main ul,
main ol {
  padding-left: 1.25rem;
}

main li {
  margin: 0.4rem 0;
}
