* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(420px, 1.18fr);
  gap: 42px;
  align-items: start;
}

.intro {
  padding-top: 12px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 8ch;
  margin: 0;
  font-size: clamp(3rem, 8vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.intro p:last-child {
  max-width: 34rem;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.workspace,
.queue-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgb(19 45 35 / 8%);
}

.workspace {
  padding: 24px;
}

.dropzone {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 28px;
  border: 2px dashed #b9c9c2;
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone:active {
  transform: scale(0.995);
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.dropzone-icon {
  display: grid;
  width: 84px;
  height: 104px;
  place-items: end center;
  padding-bottom: 18px;
  border: 2px solid var(--accent);
  border-radius: 6px;
  background: var(--accent-bg);
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 900;
}

.dropzone strong {
  color: var(--text);
  font-size: 1.15rem;
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  background: #b8c2be;
  cursor: not-allowed;
}

.secondary-button {
  border: 1px solid var(--accent);
  background: #ffffff;
  color: var(--accent-strong);
}

.secondary-button:hover,
.item-actions button:hover {
  background: #d6ece5;
}

.secondary-button:disabled {
  border-color: #b8c2be;
  color: #ffffff;
}

.status {
  min-height: 24px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.status.is-error {
  color: var(--danger);
}

.queue-panel {
  margin-top: 28px;
  padding: 18px;
}

.queue-panel[hidden] {
  display: none;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-header h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.section-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.pdf-list {
  display: grid;
  gap: 10px;
}

.pdf-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 86px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-subtle);
}

.pdf-item.is-dragging {
  opacity: 0.55;
}

.pdf-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent-bg);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
}

.pdf-details {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.pdf-details strong {
  overflow-wrap: anywhere;
}

.pdf-details span {
  color: var(--muted);
  font-size: 0.88rem;
}

.item-actions {
  display: flex;
  gap: 8px;
}

.item-actions button {
  min-height: 36px;
  padding: 0 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.item-actions .remove-button {
  background: #f5e7e7;
  color: var(--danger);
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 8ch;
    font-size: clamp(2.7rem, 16vw, 4.8rem);
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 24px, 680px);
    padding: 28px 0;
  }

  .workspace {
    padding: 16px;
  }

  .dropzone {
    min-height: 230px;
  }

  .actions,
  .section-header {
    display: grid;
    align-items: start;
  }

  .pdf-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .pdf-icon {
    width: 100%;
  }

  .item-actions {
    flex-wrap: wrap;
  }
}
