/* Calm, legible, mobile-first. One bold element: the drop zone fills as the upload runs.
   System fonts only: no third-party requests from a page that handles personal uploads. */
:root {
  --bg: #edf1ef;
  --surface: #ffffff;
  --ink: #15201b;
  --muted: #52615a;
  --line: #b9c8c1;
  --accent: #1e5a4c;
  --accent-ink: #ffffff;
  --fill: #cfe3da;
  --error: #a3261b;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101714;
    --surface: #18221e;
    --ink: #e8efec;
    --muted: #9db0a7;
    --line: #34463f;
    --accent: #6fc3a8;
    --accent-ink: #0b1512;
    --fill: #24463a;
    --error: #ff8a7a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}
.page {
  max-width: 34rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 9vh, 6rem) 1.25rem 3rem;
}

h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 0.75rem; }
h1 { font-size: clamp(2rem, 7vw, 2.75rem); line-height: 1.1; }
h2 { font-size: 1.6rem; line-height: 1.2; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.masthead { margin-bottom: 2rem; }
.instructions { white-space: pre-line; max-width: 60ch; }

.drop {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 11rem;
  padding: 1.5rem;
  border: 2px dashed var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  overflow: hidden;
}
.drop.is-dragover { border-color: var(--accent); border-style: solid; }
.drop.is-uploading { cursor: default; border-style: solid; border-color: var(--accent); }
.drop-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--p, 0%);
  background: var(--fill);
  transition: width 0.35s ease-out;
}
.drop-body { position: relative; display: grid; gap: 0.35rem; min-width: 0; }
.drop-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.drop-hint { color: var(--muted); }
#file:focus-visible + .drop { outline: 3px solid var(--accent); outline-offset: 3px; }

.limits { margin-top: 0.75rem; font-size: 0.95rem; }
.error { color: var(--error); font-weight: 500; }

button {
  display: block;
  width: 100%;
  min-height: 3.25rem;
  margin: 1.25rem 0 1rem;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 1.05rem/1 var(--sans);
  cursor: pointer;
}
button:disabled { opacity: 0.45; cursor: not-allowed; }
button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (min-width: 40rem) { button { width: auto; padding: 0 2rem; } }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) { .drop-fill { transition: none; } }
