/* Always light, whatever the system prefers; color-scheme also keeps native controls light. */
:root {
  --bg: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --faint: #d6d6d6;
  --bad: #a3271f;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

h1 { font-size: 1.25rem; font-weight: 600; margin: 0 0 1rem; }
h2 { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.02em; margin: 0 0 0.75rem; color: var(--muted); }
p { margin: 0 0 1rem; }
a { color: inherit; text-underline-offset: 0.2em; }

.notice, .hint, .facts, .state { color: var(--muted); }
.error { color: var(--bad); }

/* index */

.submit { max-width: 26rem; }

label {
  display: block;
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}

input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.45rem 0;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  color-scheme: light;
  border: 0;
  border-bottom: 1px solid var(--faint);
  border-radius: 0;
}

input:focus { outline: none; border-bottom-color: var(--ink); }
input[type=file] { border: 0; padding: 0.25rem 0; }

.numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 1.5rem;
}

.hint:empty { display: none; }

button {
  font: inherit;
  padding: 0.55rem 1.4rem;
  color: var(--bg);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

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

/* status */

.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 3rem 2.5rem;
}

.cell { min-width: 0; }

.preview { display: block; margin: 0 0 0.75rem; }

.preview img {
  display: block;
  width: 100%;
  height: auto;
}

.facts { font-size: 0.875rem; margin-bottom: 0.4rem; }

.files { font-size: 0.875rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }

.delete { margin-top: 4rem; }

.delete button {
  padding: 0;
  font-size: 0.8125rem;
  color: var(--muted);
  background: none;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  border-radius: 0;
}
