:root {
  color-scheme: light;
  --bg: #f3efe8;
  --panel: rgba(255, 255, 255, 0.82);
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --error: #b91c1c;
  --border: rgba(15, 23, 42, 0.12);
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.16), transparent 30%),
    radial-gradient(circle at right 20%, rgba(17, 94, 89, 0.10), transparent 24%),
    linear-gradient(180deg, #fbf8f3 0%, var(--bg) 100%);
}

.shell {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.shell-narrow {
  width: min(560px, calc(100% - 2rem));
}

.hero {
  margin-bottom: 1.5rem;
}

.hero-bar {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font: 700 0.78rem/1.2 system-ui, sans-serif;
  color: var(--accent-strong);
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
}

.lede {
  max-width: 60ch;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.upload-form {
  display: grid;
  gap: 1rem;
}

.file-input {
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px dashed rgba(15, 23, 42, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.file-input span {
  font: 600 0.95rem/1.2 system-ui, sans-serif;
}

input[type="file"] {
  width: 100%;
  font: inherit;
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.95rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  font: 700 0.95rem/1 system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.24);
}

button:hover,
.button-link:hover {
  filter: brightness(1.04);
}

.notes {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.messages {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.message {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  font-family: system-ui, sans-serif;
}

.message-error {
  color: #7f1d1d;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.message-info {
  color: #0f172a;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 0;
}

.status-grid div {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

dt {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font: 600 0.82rem/1.2 system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

dd {
  margin: 0;
  font: 700 1rem/1.5 system-ui, sans-serif;
  word-break: break-word;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.back-link {
  margin-top: 1rem;
}

.back-link a {
  color: var(--accent-strong);
  text-decoration: none;
  font: 600 0.95rem/1 system-ui, sans-serif;
}

.back-link a:hover {
  text-decoration: underline;
}

.logout-link {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
  text-decoration: none;
  font: 600 0.92rem/1 system-ui, sans-serif;
}

.logout-link:hover {
  background: white;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.progress-wrap {
  margin: 1.25rem 0;
  display: grid;
  gap: 0.55rem;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font: 600 0.9rem/1.2 system-ui, sans-serif;
}

.progress-track {
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.10);
  border: 1px solid rgba(15, 23, 42, 0.10);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  transition: width 0.35s ease;
}
