:root {
  color-scheme: light dark;
  --bg: #fbfaf9;
  --panel: #ffffff;
  --ink: #1c1a17;
  --muted: #6b6560;
  --line: #e2ddd7;
  --accent: #2f6f4f;
  --bad: #a33a2c;
  --ok: #2f6f4f;
  --warn: #8a6d1f;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614;
    --panel: #201e1c;
    --ink: #ece8e3;
    --muted: #9a938c;
    --line: #35322e;
    --accent: #7fb894;
    --bad: #e08573;
    --ok: #7fb894;
    --warn: #d4b25a;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; padding: 2rem 1.25rem 4rem;
  background: var(--bg); color: var(--ink);
  font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
main { max-width: 46rem; margin: 0 auto; }
h1 { font-size: 1.35rem; margin: 0 0 .35rem; letter-spacing: -.01em; }
.sub { color: var(--muted); margin: 0 0 1.75rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .875rem; }
select, button, input[type="password"] {
  font: inherit; color: inherit;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); padding: .55rem .75rem;
}
input[type="password"] { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
button { cursor: pointer; font-weight: 600; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.quiet { border-color: transparent; background: transparent; color: var(--muted); font-weight: 500; }
button[disabled] { opacity: .45; cursor: not-allowed; }

.identity {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .6rem .9rem; margin-bottom: 1.25rem;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  font-size: .875rem;
}
.identity strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; }

#drop {
  border: 1.5px dashed var(--line); border-radius: 12px;
  padding: 2.25rem 1rem; text-align: center; color: var(--muted);
  background: var(--panel); transition: border-color .15s, background .15s;
}
#drop p { margin: 0 0 .75rem; }
#drop.hot { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }

table { width: 100%; border-collapse: collapse; margin-top: 1.25rem; font-size: .875rem; }
th, td { text-align: left; padding: .5rem .5rem .5rem 0; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
th.bar { width: 34%; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
progress { width: 100%; height: 6px; }
.state-done { color: var(--ok); font-weight: 600; }
.state-failed, .state-too-large { color: var(--bad); font-weight: 600; }
.state-hashing, .state-uploading { color: var(--warn); }

.actions { display: flex; gap: .6rem; align-items: center; margin-top: 1.25rem; flex-wrap: wrap; }
.note { font-size: .8125rem; color: var(--muted); margin-top: .6rem; }

#result, #signin-error {
  margin-top: 1.5rem; padding: 1rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel);
}
#result.bad, #signin-error { border-color: var(--bad); }
#result.good { border-color: var(--ok); }
#result pre { white-space: pre-wrap; word-break: break-word; margin: .5rem 0 0; font-size: .8125rem; color: var(--muted); }
#result ul { margin: .5rem 0 0; padding-left: 1.2rem; font-size: .875rem; }
