:root {
  --blue: #445a9c;
  --blue-dark: #34477f;
  --blue-soft: #eef0f8;
  --lime: #dce899;
  --ink: #16191f;
  --muted: #687080;
  --paper: #f3f1e9;
  --white: #fff;
  --line: #d8d9df;
  --danger: #a33c3c;
  --success: #36745c;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Baskerville", Georgia, serif;
  --sans: "Karla", "Avenir Next", Avenir, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  min-height: 100vh;
}

button, input { font: inherit; }
button { color: inherit; }

.site-header {
  height: 82px;
  padding: 0 clamp(24px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .76);
  border-bottom: 1px solid rgba(68, 90, 156, .08);
}

.wordmark {
  color: var(--blue);
  font-weight: 650;
  font-size: 22px;
  letter-spacing: .105em;
  text-decoration: none;
}

.secure-label {
  display: flex;
  gap: 9px;
  align-items: center;
  color: #4e5665;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.secure-label span { color: var(--success); font-size: 9px; }

main {
  padding: clamp(48px, 7vw, 92px) clamp(20px, 5vw, 72px) 88px;
  background:
    radial-gradient(circle at 75% 8%, rgba(220,232,153,.28), transparent 24rem),
    linear-gradient(180deg, #f7f6f1 0%, var(--paper) 100%);
}

.intro, .upload-card { width: min(100%, 920px); margin-inline: auto; }
.intro { text-align: center; margin-bottom: 46px; }

.eyebrow, .step {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: .2em;
}

h1 {
  margin: 0;
  color: var(--blue);
  font-family: var(--serif);
  font-size: clamp(52px, 7vw, 82px);
  font-weight: 300;
  line-height: .93;
  letter-spacing: -.035em;
}

h1 em { color: #879443; font-weight: 300; }

.lede {
  max-width: 650px;
  margin: 28px auto 0;
  color: #535b69;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
}

.upload-card {
  background: var(--white);
  border: 1px solid rgba(46, 58, 94, .12);
  box-shadow: 0 24px 70px rgba(37, 46, 74, .09);
}

#uploader { padding: clamp(24px, 5vw, 54px); }

.invitation-state, .fatal-state {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
}

.fatal-state { padding: 48px; display: block; text-align: center; }
.fatal-state h2 { margin: 8px 0 12px; font: 400 34px/1.1 var(--serif); color: var(--blue); }
.fatal-state p:last-child { color: var(--muted); }

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #d7dae5;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; border-top-color: #d7dae5; } }

.card-heading, .queue-actions {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

h2 { margin: 0; font: 400 clamp(32px, 5vw, 44px)/1 var(--serif); color: var(--blue-dark); }
.allowance { margin: 0; color: var(--muted); font-size: 13px; text-align: right; }

.drop-zone {
  width: 100%;
  margin-top: 28px;
  padding: 42px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  background: #fafafd;
  border: 1.5px dashed #9ea8c7;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}

.drop-zone:hover, .drop-zone.dragging { background: var(--blue-soft); border-color: var(--blue); }
.drop-zone:active { transform: scale(.997); }
.drop-zone:focus-visible, button:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.upload-mark { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 5px; border-radius: 50%; background: var(--blue); color: white; font-size: 26px; font-weight: 300; }
.drop-title { color: var(--blue-dark); font-size: 18px; font-weight: 700; }
.drop-subtitle { color: var(--muted); font-size: 15px; }
.drop-hint { margin-top: 8px; color: #7b8290; font-size: 12px; }

.notice { margin: 18px 0 0; padding: 13px 15px; font-size: 14px; line-height: 1.45; }
.notice.error { color: #7e2929; background: #fff0f0; border-left: 3px solid var(--danger); }

.file-list { list-style: none; padding: 0; margin: 24px 0 0; border-top: 1px solid var(--line); }
.file-row { padding: 18px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; border-bottom: 1px solid var(--line); }
.file-main { min-width: 0; }
.file-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.file-meta, .file-status { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.file-status.error { color: var(--danger); }
.file-status.success { color: var(--success); }
.icon-button, .retry-button { align-self: center; border: 0; background: transparent; color: var(--blue); cursor: pointer; text-decoration: underline; font-size: 13px; }
.icon-button { width: 36px; height: 36px; font-size: 20px; text-decoration: none; }
.icon-button:disabled { opacity: .35; cursor: default; }

.progress-track { grid-column: 1 / -1; height: 5px; overflow: hidden; background: #e8eaf0; }
.progress-bar { width: 0; height: 100%; background: var(--blue); transition: width .15s ease; }
.progress-bar.success { background: var(--success); }

.queue-actions { margin-top: 30px; align-items: center; }
.queue-actions p { margin: 0; color: var(--blue-dark); font-size: 14px; }
.queue-actions p span { color: var(--muted); font-size: 12px; }

.primary-button {
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: white;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.primary-button:hover { background: var(--blue-dark); }
.primary-button:disabled { cursor: wait; opacity: .62; }

.manifest-note { margin-top: 42px; padding: 24px; background: #f7f7f2; border-left: 3px solid var(--lime); }
.bounds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; color: #555d6b; font-size: 13px; }
.bounds span { display: flex; flex-direction: column; gap: 3px; }
.bounds strong { color: var(--blue-dark); font: 500 22px var(--serif); }
.supported-types, .authorization-note { margin: 20px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.authorization-note { padding-top: 18px; border-top: 1px solid #dedfd8; }

footer {
  min-height: 90px;
  padding: 28px clamp(24px, 5vw, 72px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: var(--blue);
  color: rgba(255,255,255,.78);
  font-size: 11px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

[hidden] { display: none !important; }

@media (max-width: 650px) {
  .site-header { height: 68px; }
  .wordmark { font-size: 18px; }
  .secure-label { font-size: 10px; }
  main { padding-top: 44px; }
  .intro { margin-bottom: 32px; }
  .card-heading, .queue-actions { align-items: flex-start; flex-direction: column; }
  .allowance { text-align: left; }
  .queue-actions .primary-button { width: 100%; }
  .bounds { grid-template-columns: 1fr; gap: 12px; }
  .bounds span { flex-direction: row; align-items: baseline; gap: 7px; }
  footer { flex-direction: column; align-items: flex-start; }
}
