:root {
  color-scheme: light;
  --background: #f6f7f9;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #667085;
  --border: #d9dee7;
  --border-strong: #b8c1cf;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --danger: #b42318;
  --success: #067647;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--background);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--background);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }

.page-shell {
  width: min(100% - 40px, 960px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.site-header,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header {
  min-height: 72px;
  border-bottom: 1px solid var(--border);
}

.site-title {
  font-size: 1rem;
  font-weight: 650;
}

.secure-label {
  color: var(--muted);
  font-size: 0.875rem;
}

main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
  gap: 64px;
  align-items: center;
  padding: 72px 0;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

h1 {
  max-width: 620px;
  margin: 14px 0 18px;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.intro-copy {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.format-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 32px 0 0;
  border-top: 1px solid var(--border);
}

.format-list div { padding: 16px 10px 0 0; }
.format-list dt { color: var(--muted); font-size: 0.75rem; }
.format-list dd { margin: 6px 0 0; font-size: 0.875rem; font-weight: 650; }

.work-card {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.card-heading { margin-bottom: 24px; }
.card-heading h2,
.success-panel h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.card-description {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.login-form { display: grid; gap: 8px; }
.login-form label {
  margin-top: 10px;
  font-size: 0.875rem;
  font-weight: 600;
}

.login-form input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  outline: none;
  color: var(--text);
  background: #ffffff;
}

.login-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  padding: 0 14px;
  border: 1px solid var(--primary);
  border-radius: 7px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 650;
  cursor: pointer;
}

.primary-button:hover { background: var(--primary-hover); }
.primary-button:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.2); outline-offset: 2px; }
.primary-button:disabled { cursor: not-allowed; opacity: 0.55; }

.message {
  min-height: 1.25em;
  margin: 6px 0 -2px;
  color: var(--danger);
  font-size: 0.875rem;
}

.privacy-note {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

footer {
  min-height: 64px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
}

.text-button {
  padding: 7px 0;
  border: 0;
  color: var(--primary);
  background: transparent;
  font-size: 0.875rem;
  cursor: pointer;
}
.text-button:hover, .text-button:focus-visible { text-decoration: underline; }

.upload-main {
  display: block;
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  padding: 56px 0 72px;
}

.upload-intro { margin-bottom: 28px; }
.upload-intro h1 { margin-bottom: 14px; font-size: clamp(2.1rem, 5vw, 3.25rem); }
.upload-card { width: 100%; }
.card-heading.compact { margin-bottom: 20px; }

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

.drop-zone {
  display: grid;
  width: 100%;
  min-height: 200px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  border: 1px dashed var(--border-strong);
  border-radius: 9px;
  color: var(--text);
  background: #fafbfc;
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.is-dragging {
  border-color: var(--primary);
  outline: none;
  background: var(--primary-soft);
}

.drop-zone strong { font-size: 1rem; font-weight: 650; }
.drop-zone > span:last-child { color: var(--muted); font-size: 0.875rem; }
.upload-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 6px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--primary);
  background: #ffffff;
  font-size: 1.2rem;
}

.file-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fafbfc;
}
.file-summary[hidden] { display: none; }
.file-badge {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 7px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 0.7rem;
  font-weight: 750;
}
.file-details { display: grid; gap: 4px; min-width: 0; }
.file-details strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.file-details span { color: var(--muted); font-size: 0.8rem; }
.remove-button { width: 34px; height: 34px; border: 0; color: var(--muted); background: transparent; font-size: 1.4rem; cursor: pointer; }
.remove-button:hover, .remove-button:focus-visible { color: var(--danger); }

.requirements {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 18px;
  padding: 15px 0 5px;
  color: var(--muted);
  font-size: 0.75rem;
}

.upload-message { margin-top: 12px; }
.progress-wrap { margin: 18px 0 4px; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 0.8rem; }
.progress-track { height: 6px; overflow: hidden; border-radius: 10px; background: #e9eef5; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--primary); transition: width 120ms linear; }

.success-panel { text-align: left; }
.success-mark {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 50%;
  color: var(--success);
  background: #ecfdf3;
  font-size: 1.1rem;
}
.success-panel h2 { margin: 8px 0 24px; }
.receipt { margin: 0 0 26px; border-top: 1px solid var(--border); }
.receipt div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.receipt dt { color: var(--muted); font-size: 0.8rem; }
.receipt dd { margin: 0; overflow-wrap: anywhere; color: var(--text); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.78rem; }

@media (max-width: 780px) {
  main { grid-template-columns: 1fr; gap: 36px; padding: 48px 0 64px; }
  .work-card { max-width: 520px; width: 100%; }
  .upload-main { padding-top: 44px; }
}

@media (max-width: 520px) {
  .page-shell { width: min(100% - 28px, 960px); }
  .site-header { min-height: 64px; }
  h1 { font-size: 2.25rem; }
  .format-list { grid-template-columns: 1fr; }
  .format-list div { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .format-list dd { margin: 0; }
  .work-card { padding: 24px 20px; }
  .drop-zone { min-height: 180px; }
  .requirements { display: grid; }
  .receipt div { grid-template-columns: 1fr; gap: 4px; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
