/* Upload Center v3 — layout on Foundation tokens. Shell owns the topbar. */
body.uc-page {
  margin: 0;
  overflow-x: hidden;
  background: var(--ds-canvas);
  color: var(--ds-ink);
  color-scheme: dark;
  font-family: var(--ds-font);
  font-size: 14px;
  line-height: 1.65;
}

.uc-main {
  box-sizing: border-box;
  width: min(760px, calc(100% - 48px));
  max-width: 100%;
  margin: 0 auto;
  padding: 48px 0 96px;
}

.uc-kicker {
  margin: 0 0 12px;
  color: var(--ds-muted);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.uc-main h1 {
  margin: 0 0 16px;
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1.2;
  color: var(--ds-ink);
}

.uc-lead,
.uc-privacy,
.uc-hint,
.uc-help,
.uc-status,
.uc-error,
.uc-ocr-warn {
  margin: 0 0 16px;
  color: var(--ds-body);
  font-size: 14px;
  line-height: 1.7;
}

.uc-privacy {
  color: var(--ds-muted);
  font-size: 12px;
}

.uc-error {
  color: var(--ds-danger);
}

.uc-review-summary {
  white-space: pre-line;
}
.uc-lab-group {
  margin: 0 0 16px;
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-card);
  background: var(--ds-elevated);
  padding: 0 14px 8px;
}
.uc-lab-group > summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  color: var(--ds-ink);
  font-weight: 600;
}
.uc-lab-group > summary::-webkit-details-marker { display: none; }
.uc-lab-group > summary span {
  color: var(--ds-muted);
  font-weight: 500;
}
.uc-item-extra {
  color: var(--ds-muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 6px;
}

.uc-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 32px 0;
}

.uc-card {
  text-decoration: none;
  text-align: left;
  padding: 18px 16px;
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-card);
  background: var(--ds-elevated);
  color: var(--ds-ink);
  font: inherit;
  cursor: pointer;
  min-height: 88px;
}

.uc-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 600;
}

.uc-card span {
  color: var(--ds-muted);
  font-size: 12px;
  line-height: 1.5;
}

.uc-card.is-active {
  border-color: var(--ds-accent);
  color: var(--ds-ink);
}

.uc-drop {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  padding: 28px 18px;
  border: 1px dashed var(--ds-line-strong);
  border-radius: var(--ds-radius-emphasis);
  margin: 0 0 12px;
  background: var(--ds-soft);
  color: var(--ds-body);
  cursor: pointer;
}

.uc-drop.dragover {
  border-color: var(--ds-accent);
  color: var(--ds-ink);
}

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

.uc-submit {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ds-line-strong);
  border-radius: var(--ds-radius-pill);
  background: var(--ds-ink);
  color: #111;
  font: inherit;
  cursor: pointer;
}

.uc-submit:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.uc-secondary {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ds-line-strong);
  border-radius: var(--ds-radius-pill);
  background: transparent;
  color: var(--ds-ink);
  font: inherit;
  cursor: pointer;
}

.uc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.uc-review {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--ds-line);
}

.uc-review h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 600;
  color: var(--ds-ink);
}

.uc-item {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ds-line);
  font-size: 12px;
}

.uc-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.uc-item-head b {
  font-weight: 500;
  overflow-wrap: anywhere;
}

.uc-item-meta {
  color: var(--ds-muted);
  overflow-wrap: anywhere;
}

.uc-item-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.uc-item-fields label {
  display: grid;
  gap: 4px;
  color: var(--ds-muted);
  min-width: 0;
}

.uc-item-fields input {
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--ds-line);
  border-radius: 8px;
  background: var(--ds-soft);
  color: var(--ds-ink);
  font: inherit;
}

.uc-item-fields input:focus {
  outline: 1px solid var(--ds-accent);
}

.uc-remove-item {
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--ds-body);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.uc-consent a,
.uc-status a {
  color: var(--ds-accent);
}

.ppm-upload-entry {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--ds-muted);
}

.ppm-upload-entry a {
  color: inherit;
}

.chat-attach {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-height: 40px;
  border-radius: var(--ds-radius-pill);
  border: 1px solid var(--ds-line-strong);
  color: inherit;
  cursor: pointer;
  flex: 0 0 40px;
}

.chat-attach input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.uc-q6 {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 0;
}

.uc-selected-files {
  margin: 16px 0 10px;
  display: grid;
  gap: 8px;
}

.uc-selected-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-card);
  background: var(--ds-elevated);
}

.uc-selected-file span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.uc-remove-file {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--ds-body);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.uc-select-actions {
  margin-top: 4px;
}
.uc-compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--ds-line);
  font-size: 13px;
}
.uc-compact-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.uc-compact-row b {
  font-weight: 500;
}
.uc-compact-muted {
  color: var(--ds-muted);
}
.uc-compact-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}
.uc-compact-actions button {
  min-height: 36px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--ds-body);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
.uc-zero-files,
.uc-failed-files {
  margin: 18px 0;
}
.uc-zero-files h3,
.uc-failed-files h3,
.uc-file-status summary {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ds-ink);
}
.uc-file-status {
  margin: 18px 0;
  color: var(--ds-body);
  font-size: 13px;
}
.uc-file-status summary {
  cursor: pointer;
  list-style: none;
}
.uc-file-status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  color: var(--ds-muted);
}
.uc-baseline {
  margin: 20px 0 0;
  padding: 14px 0 0;
}
.uc-baseline h2 {
  font-size: 15px;
}

.uc-baseline,
.uc-confirmed {
  margin: 28px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--ds-line);
}

.uc-baseline h2,
.uc-confirmed-title,
.uc-confirmed summary {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ds-ink);
}

.uc-baseline p {
  margin: 0 0 8px;
  color: var(--ds-body);
  font-size: 14px;
}

.uc-confirmed details {
  color: var(--ds-body);
}

.uc-confirmed summary {
  cursor: pointer;
  list-style: none;
}

.uc-item-readonly {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 620px) {
  .uc-main {
    width: min(100% - 32px, 760px);
    padding: 28px 0 72px;
  }
  .uc-cards {
    grid-template-columns: 1fr;
  }
  .uc-main h1 {
    font-size: 24px;
  }
  .uc-item-fields {
    grid-template-columns: 1fr;
  }
}

/* Upload Center uc-v11 cleanup */
.uc-zero-summary {
  padding-top: 4px;
}

.uc-zero-summary > p {
  margin: 0 0 18px;
}

.uc-file-details {
  border-top: 1px solid var(--ds-line);
  border-bottom: 1px solid var(--ds-line);
  padding: 16px 0;
}

.uc-file-details summary {
  cursor: pointer;
  font-weight: 600;
}

.uc-file-detail-list {
  margin-top: 14px;
}

.uc-file-detail-list .uc-compact-row {
  padding: 12px 0;
}

.uc-batch-file-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.uc-batch-file-actions button {
  min-height: 44px;
}
