:root {
  color-scheme: light;
  --ink: #16251e;
  --muted: #617067;
  --paper: #f4efe4;
  --card: #fffdf8;
  --line: #d8d3c7;
  --accent: #d8532b;
  --accent-dark: #a83a1b;
  --green: #267553;
  --shadow: 0 24px 70px rgba(31, 43, 36, .10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(216, 83, 43, .10), transparent 28rem),
    linear-gradient(135deg, rgba(255,255,255,.4), transparent 45%),
    var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  width: min(100% - 32px, 720px);
  margin: 0 auto;
  padding: max(48px, 8vh) 0 64px;
}

header { margin: 0 0 34px; }

.eyebrow {
  margin-bottom: 18px;
  color: var(--accent);
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .19em;
}

h1 {
  max-width: 650px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.65rem, 9vw, 5rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .96;
}

.intro {
  max-width: 530px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  line-height: 1.55;
}

.card {
  padding: clamp(24px, 6vw, 46px);
  border: 1px solid rgba(22, 37, 30, .10);
  border-radius: 4px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.card > div:nth-child(2), .privacy > div:nth-child(2) { min-width: 0; }

.number {
  margin-bottom: 12px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
}

h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 500;
}

.card p, .privacy p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

form { margin-top: 28px; }

input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.picker {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 102px;
  padding: 20px;
  border: 1.5px dashed #aca99f;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}

.picker:hover, .picker:focus-within {
  border-color: var(--accent);
  background: #fff8ef;
  transform: translateY(-1px);
}

.picker-icon {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 1.7rem;
  font-weight: 300;
}

.picker strong, .picker small { display: block; }
.picker strong { font-size: 1rem; }
.picker small { margin-top: 5px; color: var(--muted); }

.selection { margin-top: 20px; }
.selection-summary { display: flex; justify-content: space-between; gap: 16px; font-size: .9rem; }
.selection-summary button { border: 0; background: none; color: var(--accent-dark); cursor: pointer; text-decoration: underline; }

#file-list {
  max-height: 310px;
  margin: 12px 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  border-top: 1px solid var(--line);
}

.file-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 14px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
}

.file-name { overflow: hidden; font-size: .9rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.file-size, .file-status { color: var(--muted); font-size: .8rem; }
.file-status { grid-column: 1 / -1; }
.file-row.done .file-status { color: var(--green); }
.file-row.error .file-status { color: #a22323; }

.progress-track {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: #e4e0d6;
}

.progress-bar { width: 0; height: 100%; background: var(--accent); transition: width .15s linear; }

.submit {
  display: flex;
  width: 100%;
  min-height: 58px;
  margin-top: 20px;
  padding: 0 22px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 3px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  transition: background .2s, transform .2s, opacity .2s;
}

.submit:hover:not(:disabled) { background: var(--accent-dark); transform: translateY(-1px); }
.submit:disabled { cursor: not-allowed; opacity: .45; }

.privacy {
  display: grid;
  grid-template-columns: 48px 1fr;
  margin: 38px 0 0;
  padding: 0 10px;
}

.privacy .number { padding-top: 8px; }
.privacy h2 { font-size: 1.35rem; }

.toast {
  position: fixed;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 18px;
  max-width: 680px;
  margin: auto;
  padding: 15px 18px;
  border-radius: 3px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  font-size: .92rem;
  text-align: center;
}

@media (max-width: 520px) {
  main { width: min(100% - 22px, 720px); padding-top: 42px; }
  .card { padding: 23px 18px 25px; }
  .picker { min-height: 92px; padding: 16px; }
  .picker-icon { flex-basis: 46px; width: 46px; height: 46px; }
  .privacy { grid-template-columns: 36px 1fr; padding: 0 4px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

.login-main {
  width: min(100% - 32px, 620px);
}

.login-main h1 {
  font-size: clamp(2.5rem, 8vw, 4.4rem);
}

.login-card {
  padding: clamp(24px, 6vw, 42px);
  border: 1px solid rgba(22, 37, 30, .10);
  border-radius: 4px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.login-form {
  display: grid;
  gap: 9px;
  margin-top: 26px;
}

.login-form label {
  margin-top: 7px;
  color: var(--ink);
  font-size: .86rem;
  font-weight: 750;
}

.login-form input {
  width: 100%;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid #aaa89f;
  border-radius: 3px;
  outline: none;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.login-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(216, 83, 43, .12);
}

.login-form .submit { margin-top: 16px; }

.login-error {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-left: 3px solid #a22323;
  background: #fff1ef;
  color: #841d1d;
  font-size: .9rem;
}

.login-note {
  max-width: 500px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
  text-align: center;
}
