.extractor-page {
  --bg: #f4f7ff;
  --surface: #ffffff;
  --surface-subtle: #f7faff;
  --ink: #172033;
  --muted: #53647b;
  --line: #d7e0ec;
  --line-strong: #bdcada;
  --brand: #ef3f34;
  --brand-dark: #c92b24;
  --brand-soft: #fff0ee;
  --source: #1473e6;
  --source-soft: #eaf3ff;
  --ready: #087f4b;
  --ready-soft: #e9f9f1;
  --review: #d99a00;
  --review-soft: #fff4d6;
  --shadow: 0 18px 44px rgba(30, 42, 60, 0.1);
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --display: "Manrope", "Inter", sans-serif;
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: 0;
  overflow-x: hidden;
}

/* Final exact-match overrides for the restored PDF workspace. Keep this block last. */
body.workspace-mode {
  --workspace-header-height: 62px !important;
}

body.workspace-mode .workspace-header {
  grid-template-columns: minmax(0, 1fr) auto !important;
  height: var(--workspace-header-height) !important;
  min-height: var(--workspace-header-height) !important;
  column-gap: 12px !important;
  padding: 14px 12px !important;
}

body.workspace-mode .workspace-header > #scorecard-grid {
  display: none !important;
}

body.workspace-mode .workspace-document {
  gap: 10px !important;
}

body.workspace-mode .exit-workspace-button {
  width: 118px !important;
  min-width: 118px !important;
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 11px !important;
  padding: 0 10px !important;
}

body.workspace-mode .workspace-document-copy {
  grid-template-columns: auto minmax(0, auto) minmax(0, 1fr) !important;
  align-items: baseline !important;
  gap: 2px 10px !important;
}

body.workspace-mode .workspace-document-copy > span {
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 11px !important;
}

body.workspace-mode .workspace-document #workspace-file-name {
  max-width: clamp(220px, 34vw, 560px) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 14px !important;
}

body.workspace-mode #workspace-inline-progress {
  grid-column: 2 / 4 !important;
  max-width: min(500px, 34vw) !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: 14px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.workspace-mode #workspace-inline-progress[hidden] {
  display: none !important;
}

body.workspace-mode .workspace-actions {
  gap: 10px !important;
  margin-left: auto !important;
}

body.workspace-mode .workspace-summary-button,
body.workspace-mode .workspace-actions .button {
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: 11px !important;
  padding: 0 12px !important;
}

body.workspace-mode .workspace-summary-button {
  width: 152px !important;
  min-width: 152px !important;
  max-width: 152px !important;
}

body.workspace-mode .workspace-summary-button strong {
  display: none !important;
}

body.workspace-mode .workspace-actions #workspace-enrich-button {
  width: 89px !important;
  min-width: 89px !important;
  max-width: 89px !important;
}

body.workspace-mode .workspace-actions #workspace-match-button {
  width: 78px !important;
  min-width: 78px !important;
  max-width: 78px !important;
}

body.workspace-mode .workspace-actions #workspace-quality-button {
  width: 77px !important;
  min-width: 77px !important;
  max-width: 77px !important;
}

body.workspace-mode .workspace-actions #workspace-export-button {
  width: 76px !important;
  min-width: 76px !important;
  max-width: 76px !important;
}

body.workspace-mode .workspace-grid {
  top: auto !important;
  gap: 9px !important;
  padding: 11px !important;
}

body.workspace-mode .workspace-pane {
  border-radius: 6px !important;
}

body.workspace-mode .pane-header {
  min-height: 66px !important;
  height: 66px !important;
  padding: 15px 14px 13px !important;
}

body.workspace-mode .pane-kicker,
body.workspace-mode .detail-kicker {
  margin: 0 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 13px !important;
  text-transform: uppercase !important;
}

body.workspace-mode .pane-header h2,
body.workspace-mode .reference-detail h2,
body.workspace-mode .reference-detail h3 {
  margin: 4px 0 0 !important;
  font-size: 20px !important;
  font-weight: 850 !important;
  line-height: 24px !important;
}

body.workspace-mode .pdf-source-panel .pane-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

body.workspace-mode .pdf-source-panel .pane-header-actions {
  position: static !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  width: auto !important;
  height: auto !important;
  gap: 13px !important;
}

body.workspace-mode .pdf-source-panel .pane-header-actions .icon-button,
body.workspace-mode .reference-detail .detail-next-button,
body.workspace-mode .reference-detail .icon-button {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  border-radius: 6px !important;
}

body.workspace-mode #pdf-page-label {
  min-width: 72px !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-align: center !important;
}

body.workspace-mode .pdf-tools {
  min-height: 40px !important;
  height: 40px !important;
  padding: 8px 14px !important;
}

body.workspace-mode .pdf-tools .tool-button {
  height: 30px !important;
  min-height: 30px !important;
  border-radius: 5px !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

body.workspace-mode .pdf-source-status {
  min-height: 31px !important;
  padding: 8px 14px !important;
  font-size: 10px !important;
  line-height: 14px !important;
}

body.workspace-mode .reference-list-actions {
  position: static !important;
  display: flex !important;
  align-self: center !important;
  align-items: center !important;
  justify-content: flex-end !important;
}

body.workspace-mode #bulk-review-menu {
  display: none !important;
}

body.workspace-mode .reference-list-actions .review-menu > summary {
  width: 110px !important;
  min-width: 110px !important;
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  padding: 0 12px !important;
}

body.workspace-mode .reference-detail .detail-kicker {
  color: #d58a00 !important;
}

body.workspace-mode #export-drawer[open] .utility-content {
  top: calc(var(--workspace-header-height) + 12px) !important;
  right: 12px !important;
  bottom: 12px !important;
  left: 344px !important;
  width: auto !important;
  max-width: none !important;
  border-radius: 6px !important;
  background: #f8fbff !important;
}

body.workspace-mode #export-drawer .utility-panel-head {
  min-height: 82px !important;
  padding: 18px 22px 14px !important;
  border-bottom: 1px solid #dbe6f2 !important;
}

body.workspace-mode #export-drawer .utility-panel-head span {
  display: none !important;
}

body.workspace-mode #export-drawer .utility-panel-head h2 {
  margin: 0 !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  line-height: 22px !important;
}

body.workspace-mode #export-drawer .utility-panel-head p {
  margin-top: 4px !important;
  font-size: 13px !important;
  line-height: 18px !important;
}

body.workspace-mode #export-drawer .utility-scroll-body {
  padding: 16px 18px 18px !important;
}

body.workspace-mode #export-drawer .utility-close-button.utility-close {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  border-radius: 6px !important;
  font-size: 18px !important;
}

body.workspace-mode #export-drawer .citation-style-card {
  gap: 12px !important;
  border-radius: 8px !important;
  padding: 14px !important;
}

body.workspace-mode #export-drawer .pdf-style-controls,
body.workspace-mode #export-drawer .pdf-style-search-wrap {
  display: block !important;
}

body.workspace-mode #export-drawer #pdf-citation-style-select {
  display: none !important;
}

body.workspace-mode #export-drawer #pdf-style-search {
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  padding: 0 14px !important;
}

body.workspace-mode #export-drawer .pdf-style-status-row {
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr) !important;
  gap: 10px !important;
  border-top: 1px solid #dbe6f2 !important;
  padding-top: 12px !important;
}

body.workspace-mode #export-drawer .pdf-style-meta-row,
body.workspace-mode #export-drawer .pdf-style-preview {
  min-height: 92px !important;
  border-radius: 6px !important;
  padding: 12px 14px !important;
}

body.workspace-mode #export-drawer .pdf-style-meta-row span {
  font-size: 12px !important;
  line-height: 18px !important;
}

body.workspace-mode #export-drawer .pdf-style-meta-row strong {
  margin-top: 6px !important;
  font-size: 14px !important;
  line-height: 18px !important;
}

body.workspace-mode #export-drawer .pdf-style-preview {
  grid-template-columns: auto minmax(0, 1fr) !important;
  gap: 14px !important;
}

body.workspace-mode #export-drawer .pdf-style-preview p {
  font-size: 13px !important;
  line-height: 18px !important;
}

body.workspace-mode #export-drawer .citation-style-note {
  border-top: 1px solid #dbe6f2 !important;
  margin: 0 !important;
  padding-top: 12px !important;
  color: #64748b !important;
  font-size: 12px !important;
  line-height: 17px !important;
}

body.workspace-mode #export-drawer .export-actions {
  display: flex !important;
  gap: 8px !important;
  margin: 12px 0 !important;
}

body.workspace-mode #export-drawer .export-action-button {
  width: 160px !important;
  height: 36px !important;
  border: 1px solid #bfcee2 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #172033 !important;
  cursor: pointer !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  padding: 0 14px !important;
  text-align: left !important;
}

body.workspace-mode #export-drawer .export-preview {
  border-radius: 8px !important;
}

body.workspace-mode #export-drawer .export-preview > summary {
  min-height: 38px !important;
  font-size: 13px !important;
  padding: 10px 14px !important;
}

@media (max-width: 1180px) {
  body.workspace-mode #export-drawer[open] .utility-content {
    left: 12px !important;
  }
}

/* Workspace reference screenshot alignment v2. */
body.workspace-mode {
  --workspace-header-height: 62px !important;
}

body.workspace-mode .workspace-header {
  grid-template-columns: minmax(0, 1fr) auto !important;
  column-gap: 12px !important;
  height: var(--workspace-header-height) !important;
  min-height: var(--workspace-header-height) !important;
  padding: 14px 12px !important;
}

body.workspace-mode .workspace-document {
  gap: 10px !important;
}

body.workspace-mode .exit-workspace-button {
  width: 118px !important;
  min-width: 118px !important;
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  padding: 0 10px !important;
}

body.workspace-mode .workspace-document-copy {
  grid-template-columns: auto minmax(0, auto) minmax(0, 1fr) !important;
  gap: 2px 10px !important;
  align-items: baseline !important;
}

body.workspace-mode .workspace-document-copy > span {
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 11px !important;
}

body.workspace-mode .workspace-document #workspace-file-name {
  max-width: clamp(220px, 34vw, 560px) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 14px !important;
}

body.workspace-mode #workspace-inline-progress {
  grid-column: 2 / 4 !important;
  min-width: 0 !important;
  max-width: min(500px, 34vw) !important;
  overflow: hidden !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: 14px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.workspace-mode #workspace-inline-progress[hidden] {
  display: none !important;
}

body.workspace-mode .workspace-actions {
  gap: 10px !important;
}

body.workspace-mode .workspace-summary-button,
body.workspace-mode .workspace-actions .button {
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: 11px !important;
  padding: 0 12px !important;
}

body.workspace-mode .workspace-summary-button {
  width: 152px !important;
  min-width: 152px !important;
  max-width: 152px !important;
}

body.workspace-mode .workspace-summary-button strong {
  display: none !important;
}

body.workspace-mode .workspace-actions #workspace-enrich-button {
  width: 89px !important;
  min-width: 89px !important;
  max-width: 89px !important;
}

body.workspace-mode .workspace-actions #workspace-match-button {
  width: 78px !important;
  min-width: 78px !important;
  max-width: 78px !important;
}

body.workspace-mode .workspace-actions #workspace-quality-button {
  width: 77px !important;
  min-width: 77px !important;
  max-width: 77px !important;
}

body.workspace-mode .workspace-actions #workspace-export-button {
  width: 76px !important;
  min-width: 76px !important;
  max-width: 76px !important;
}

body.workspace-mode .workspace-grid {
  top: var(--workspace-header-height) !important;
  gap: 9px !important;
  padding: 11px !important;
}

body.workspace-mode .workspace-pane {
  border-radius: 6px !important;
}

body.workspace-mode .pane-header {
  min-height: 66px !important;
  height: 66px !important;
  padding: 15px 14px 13px !important;
}

body.workspace-mode .pane-kicker,
body.workspace-mode .detail-kicker {
  margin: 0 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 13px !important;
  text-transform: uppercase !important;
}

body.workspace-mode .pane-header h2,
body.workspace-mode .reference-detail h2,
body.workspace-mode .reference-detail h3 {
  margin: 4px 0 0 !important;
  font-size: 20px !important;
  font-weight: 850 !important;
  line-height: 24px !important;
}

body.workspace-mode .pdf-source-panel .pane-header {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

body.workspace-mode .pdf-source-panel .pane-header-actions {
  position: static !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  width: auto !important;
  height: auto !important;
  gap: 13px !important;
}

body.workspace-mode .pdf-source-panel .pane-header-actions .icon-button,
body.workspace-mode .reference-detail .detail-next-button,
body.workspace-mode .reference-detail .icon-button {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  border-radius: 6px !important;
}

body.workspace-mode #pdf-page-label {
  min-width: 72px !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

body.workspace-mode .pdf-tools {
  min-height: 40px !important;
  height: 40px !important;
  padding: 8px 14px !important;
}

body.workspace-mode .pdf-tools .tool-button {
  min-height: 30px !important;
  height: 30px !important;
  border-radius: 5px !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

body.workspace-mode .pdf-source-status {
  min-height: 31px !important;
  padding: 8px 14px !important;
  font-size: 10px !important;
  line-height: 14px !important;
}

body.workspace-mode .reference-list-header {
  align-items: center !important;
}

body.workspace-mode .reference-list-actions {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  align-self: center !important;
  gap: 0 !important;
}

body.workspace-mode #bulk-review-menu {
  display: none !important;
}

body.workspace-mode .reference-list-actions .review-menu > summary {
  width: 110px !important;
  min-width: 110px !important;
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  padding: 0 12px !important;
}

body.workspace-mode .reference-detail > .detail-header,
body.workspace-mode .reference-detail > header {
  min-height: 66px !important;
  height: 66px !important;
  padding: 14px !important;
}

body.workspace-mode .reference-detail .detail-kicker {
  color: #d58a00 !important;
}

/* Export drawer reference screenshot alignment v2. */
body.workspace-mode #export-drawer[open] .utility-content {
  top: calc(var(--workspace-header-height) + 12px) !important;
  right: 12px !important;
  bottom: 12px !important;
  left: 548px !important;
  width: auto !important;
  max-width: none !important;
  border-radius: 6px !important;
  background: #f8fbff !important;
}

body.workspace-mode #export-drawer .utility-panel-head {
  min-height: 82px !important;
  padding: 18px 22px 14px !important;
  border-bottom: 1px solid #dbe6f2 !important;
}

body.workspace-mode #export-drawer .utility-panel-head span {
  display: none !important;
}

body.workspace-mode #export-drawer .utility-panel-head h2 {
  margin: 0 !important;
  font-size: 18px !important;
  line-height: 22px !important;
  font-weight: 900 !important;
}

body.workspace-mode #export-drawer .utility-panel-head p {
  margin-top: 4px !important;
  font-size: 13px !important;
  line-height: 18px !important;
}

body.workspace-mode #export-drawer .utility-close-button.utility-close {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  border-radius: 6px !important;
  font-size: 18px !important;
}

body.workspace-mode #export-drawer .utility-scroll-body {
  padding: 16px 18px 18px !important;
}

body.workspace-mode #export-drawer .citation-style-card {
  gap: 12px !important;
  border-radius: 8px !important;
  padding: 14px !important;
}

body.workspace-mode #export-drawer .pdf-style-controls {
  display: block !important;
}

body.workspace-mode #export-drawer #pdf-citation-style-select {
  display: none !important;
}

body.workspace-mode #export-drawer .pdf-style-search-wrap {
  display: block !important;
}

body.workspace-mode #export-drawer #pdf-style-search {
  height: 38px !important;
  min-height: 38px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  padding: 0 14px !important;
}

body.workspace-mode #export-drawer .pdf-style-status-row {
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr) !important;
  gap: 10px !important;
  border-top: 1px solid #dbe6f2 !important;
  padding-top: 12px !important;
}

body.workspace-mode #export-drawer .pdf-style-meta-row,
body.workspace-mode #export-drawer .pdf-style-preview {
  min-height: 92px !important;
  border-radius: 6px !important;
  padding: 12px 14px !important;
}

body.workspace-mode #export-drawer .pdf-style-meta-row span {
  font-size: 12px !important;
  line-height: 18px !important;
}

body.workspace-mode #export-drawer .pdf-style-meta-row strong {
  margin-top: 6px !important;
  font-size: 14px !important;
  line-height: 18px !important;
}

body.workspace-mode #export-drawer .pdf-style-preview {
  grid-template-columns: auto minmax(0, 1fr) !important;
  gap: 14px !important;
}

body.workspace-mode #export-drawer .pdf-style-preview p {
  font-size: 13px !important;
  line-height: 18px !important;
}

body.workspace-mode #export-drawer .citation-style-note {
  border-top: 1px solid #dbe6f2 !important;
  margin: 0 !important;
  padding-top: 12px !important;
  color: #64748b !important;
  font-size: 12px !important;
  line-height: 17px !important;
}

body.workspace-mode #export-drawer .export-actions {
  display: flex !important;
  gap: 8px !important;
  margin: 12px 0 !important;
}

body.workspace-mode #export-drawer .export-action-button {
  width: 160px !important;
  height: 36px !important;
  border: 1px solid #bfcee2 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #172033 !important;
  cursor: pointer !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  padding: 0 14px !important;
  text-align: left !important;
}

body.workspace-mode #export-drawer .export-preview {
  border-radius: 8px !important;
}

body.workspace-mode #export-drawer .export-preview > summary {
  min-height: 38px !important;
  font-size: 13px !important;
  padding: 10px 14px !important;
}

@media (max-width: 1180px) {
  body.workspace-mode #export-drawer[open] .utility-content {
    left: 12px !important;
  }
}

/* Workspace top menu reference match. */
body.workspace-mode {
  --workspace-header-height: 62px !important;
}

body.workspace-mode .workspace-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  column-gap: 18px !important;
  min-height: var(--workspace-header-height) !important;
  height: var(--workspace-header-height) !important;
  border-bottom: 1px solid #cbd8e8 !important;
  background: #fff !important;
  box-shadow: none !important;
  padding: 8px 14px !important;
}

body.workspace-mode .workspace-header > #scorecard-grid {
  display: none !important;
}

body.workspace-mode .workspace-document {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
}

body.workspace-mode .exit-workspace-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  min-width: 148px !important;
  height: 40px !important;
  border: 1px solid #bfcee2 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #526176 !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  padding: 0 13px !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

body.workspace-mode .workspace-document-copy {
  display: grid !important;
  grid-template-columns: auto minmax(0, auto) minmax(0, 1fr) !important;
  align-items: baseline !important;
  gap: 2px 10px !important;
  min-width: 0 !important;
}

body.workspace-mode .workspace-document-copy > span {
  grid-column: 1 / -1 !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
}

body.workspace-mode .workspace-document #workspace-file-name {
  grid-column: 1 / 2 !important;
  max-width: clamp(260px, 34vw, 560px) !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: #172033 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.workspace-mode .workspace-inline-progress {
  grid-column: 2 / 4 !important;
  min-width: 0 !important;
  max-width: min(520px, 34vw) !important;
  overflow: hidden !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.workspace-mode .workspace-inline-progress[hidden] {
  display: none !important;
}

body.workspace-mode .workspace-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  margin-left: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

body.workspace-mode .workspace-summary-button,
body.workspace-mode .workspace-actions .button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  height: 42px !important;
  min-height: 42px !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  padding: 0 22px !important;
  white-space: nowrap !important;
}

body.workspace-mode .workspace-summary-button {
  min-width: 178px !important;
  border: 1px solid #bfcee2 !important;
  background: #fff !important;
  color: #263247 !important;
}

body.workspace-mode .workspace-summary-button span {
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  text-transform: none !important;
}

body.workspace-mode .workspace-summary-button strong {
  display: none !important;
}

body.workspace-mode .workspace-actions #workspace-enrich-button,
body.workspace-mode .workspace-actions #workspace-match-button {
  min-width: 116px !important;
  border-color: #bfcee2 !important;
  background: #fff !important;
  color: #263247 !important;
}

body.workspace-mode .workspace-actions #workspace-quality-button {
  min-width: 108px !important;
  border-color: #b8dec8 !important;
  background: #f0fbf5 !important;
  color: #08764a !important;
}

body.workspace-mode .workspace-actions #workspace-export-button {
  min-width: 104px !important;
  border-color: var(--brand) !important;
  background: var(--brand) !important;
  color: #fff !important;
}

@media (max-width: 1180px) {
  body.workspace-mode .workspace-header {
    column-gap: 12px !important;
  }

  body.workspace-mode .workspace-actions {
    gap: 7px !important;
  }

  body.workspace-mode .workspace-summary-button,
  body.workspace-mode .workspace-actions .button {
    height: 38px !important;
    min-height: 38px !important;
    font-size: 12px !important;
    padding-inline: 14px !important;
  }

  body.workspace-mode .workspace-summary-button {
    min-width: 150px !important;
  }

  body.workspace-mode .workspace-actions #workspace-enrich-button,
  body.workspace-mode .workspace-actions #workspace-match-button {
    min-width: 96px !important;
  }

  body.workspace-mode .workspace-actions #workspace-quality-button,
  body.workspace-mode .workspace-actions #workspace-export-button {
    min-width: 84px !important;
  }
}

@media (max-width: 860px) {
  body.workspace-mode {
    --workspace-header-height: 114px !important;
  }

  body.workspace-mode .workspace-header {
    grid-template-columns: 1fr !important;
    align-items: start !important;
    row-gap: 8px !important;
    height: auto !important;
    min-height: var(--workspace-header-height) !important;
  }

  body.workspace-mode .workspace-actions {
    width: 100% !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    padding-bottom: 2px !important;
  }
}

/* Workspace polish: restore guide-accurate modal, drawer, and pane controls. */
body.workspace-mode .workspace-actions #copy-summary-button[hidden] {
  display: none !important;
}

body.workspace-mode .workspace-summary-button {
  gap: 0 !important;
  min-width: 148px !important;
  border-color: #b9c9dc !important;
  background: #fff !important;
  color: #172033 !important;
}

body.workspace-mode .workspace-summary-button span {
  text-transform: none !important;
}

body.workspace-mode .workspace-summary-button strong {
  display: none !important;
}

body.workspace-mode .workspace-summary-dialog {
  width: min(760px, calc(100vw - 32px)) !important;
  border-radius: 8px !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.workspace-mode .workspace-summary-head {
  margin: 0 !important;
  padding: 18px 20px !important;
}

body.workspace-mode .workspace-summary-note {
  margin: 0 !important;
  padding: 16px 20px 0 !important;
}

body.workspace-mode .workspace-summary-dialog .scorecard-grid {
  padding: 16px 20px 20px !important;
}

body.workspace-mode .workspace-restore-button {
  position: fixed !important;
  z-index: 86 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 36px !important;
  border: 1px solid #b9c9dc !important;
  border-radius: 999px !important;
  background: #fff !important;
  box-shadow: 0 12px 28px rgba(21, 31, 47, 0.14) !important;
  color: #172033 !important;
  cursor: pointer !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  padding: 0 14px !important;
}

body.workspace-mode .workspace-restore-button[hidden] {
  display: none !important;
}

body.workspace-mode .source-restore {
  top: calc(var(--workspace-header-height) + 76px) !important;
  left: 14px !important;
}

body.workspace-mode .detail-restore {
  top: calc(var(--workspace-header-height) + 76px) !important;
  right: 14px !important;
}

body.workspace-mode .workspace-utilities {
  position: fixed !important;
  inset: 0 !important;
  z-index: 90 !important;
  width: auto !important;
  height: auto !important;
  pointer-events: none !important;
}

body.workspace-mode .utility-drawer,
body.workspace-mode .utility-drawer > summary {
  pointer-events: none !important;
}

body.workspace-mode .utility-drawer[open] {
  pointer-events: auto !important;
}

body.workspace-mode .utility-drawer[open]::before {
  content: "" !important;
  position: fixed !important;
  inset: var(--workspace-header-height) 0 0 !important;
  z-index: 0 !important;
  background: rgba(15, 23, 42, 0.2) !important;
}

body.workspace-mode .utility-drawer[open] .utility-content {
  position: fixed !important;
  z-index: 2 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border: 1px solid #c4d3e6 !important;
  border-radius: 8px !important;
  background: #f8fbff !important;
  box-shadow: 0 22px 60px rgba(21, 31, 47, 0.24) !important;
  padding: 0 !important;
}

body.workspace-mode #quality-drawer[open] .utility-content {
  top: calc(var(--workspace-header-height) + 20px) !important;
  right: auto !important;
  bottom: auto !important;
  left: 50% !important;
  width: min(920px, calc(100vw - 36px)) !important;
  max-height: calc(100vh - var(--workspace-header-height) - 48px) !important;
  transform: translateX(-50%) !important;
}

body.workspace-mode #export-drawer[open] .utility-content {
  top: calc(var(--workspace-header-height) + 12px) !important;
  right: 12px !important;
  bottom: 12px !important;
  left: min(500px, 32vw) !important;
  width: auto !important;
  max-width: none !important;
  max-height: calc(100vh - var(--workspace-header-height) - 24px) !important;
}

body.workspace-mode .utility-panel-head {
  position: relative !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 18px !important;
  flex: 0 0 auto !important;
  border-bottom: 1px solid #dce6f1 !important;
  background: #fff !important;
  margin: 0 !important;
  padding: 16px 18px !important;
}

body.workspace-mode .utility-panel-head span {
  display: block !important;
  color: #d98900 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

body.workspace-mode .utility-panel-head h2 {
  margin: 4px 0 0 !important;
  color: #111827 !important;
  font-family: var(--display) !important;
  font-size: 24px !important;
  line-height: 1.1 !important;
}

body.workspace-mode .utility-panel-head p {
  margin: 7px 0 0 !important;
  color: #64748b !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

body.workspace-mode .utility-close-button.utility-close {
  flex: 0 0 auto !important;
  width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  border: 1px solid #c4d3e6 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #172033 !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  padding: 0 !important;
}

body.workspace-mode .utility-scroll-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 16px 18px 18px !important;
}

body.workspace-mode #quality-drawer .quality-score {
  display: inline-flex !important;
  width: fit-content !important;
  min-height: 34px !important;
  align-items: center !important;
  border-radius: 999px !important;
  padding: 0 14px !important;
}

body.workspace-mode #quality-drawer .report-summary-metrics,
body.workspace-mode #quality-drawer .official-metrics {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: 12px 0 16px !important;
}

body.workspace-mode #quality-drawer .report-summary-metrics span,
body.workspace-mode #quality-drawer .official-metrics span {
  display: grid !important;
  gap: 3px !important;
  min-height: 58px !important;
  align-content: center !important;
  border: 1px solid #d7e2ee !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: 1.1 !important;
  padding: 9px 10px !important;
  text-transform: uppercase !important;
}

body.workspace-mode #quality-drawer .report-summary-metrics strong,
body.workspace-mode #quality-drawer .official-metrics strong {
  display: block !important;
  color: #172033 !important;
  font-size: 17px !important;
  line-height: 1 !important;
  text-transform: none !important;
}

body.workspace-mode #quality-drawer .report-summary-metrics [data-tone="good"],
body.workspace-mode #quality-drawer .official-metrics [data-tone="good"] {
  border-color: #b8e5cf !important;
  background: #f0fbf5 !important;
}

body.workspace-mode #quality-drawer .report-summary-metrics [data-tone="warn"],
body.workspace-mode #quality-drawer .official-metrics [data-tone="warn"] {
  border-color: #f0d38a !important;
  background: #fff8df !important;
}

body.workspace-mode #quality-drawer section {
  border-top: 1px solid #dce6f1 !important;
  padding-top: 14px !important;
}

body.workspace-mode #quality-drawer section h3 {
  margin: 0 0 10px !important;
  color: #172033 !important;
  font-size: 18px !important;
}

body.workspace-mode #export-drawer .citation-style-card {
  display: grid !important;
  gap: 12px !important;
  border: 1px solid #d7e2ee !important;
  border-radius: 8px !important;
  background: #fff !important;
  padding: 14px !important;
}

body.workspace-mode #export-drawer .pdf-style-controls {
  display: grid !important;
  grid-template-columns: auto minmax(170px, 240px) minmax(230px, 1fr) !important;
  gap: 10px !important;
  align-items: center !important;
}

body.workspace-mode #export-drawer .pdf-style-controls label {
  color: #334155 !important;
  font-size: 14px !important;
  font-weight: 850 !important;
}

body.workspace-mode #export-drawer select,
body.workspace-mode #export-drawer input[type="search"] {
  width: 100% !important;
  min-height: 40px !important;
  border: 1px solid #bdcce0 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #172033 !important;
  font: inherit !important;
  font-size: 14px !important;
  padding: 0 10px !important;
}

body.workspace-mode #export-drawer .pdf-style-status-row {
  display: grid !important;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 0.64fr) !important;
  gap: 12px !important;
}

body.workspace-mode #export-drawer .pdf-style-meta-row,
body.workspace-mode #export-drawer .pdf-style-preview {
  border: 1px solid #d7e2ee !important;
  border-radius: 8px !important;
  background: #f8fbff !important;
  padding: 12px !important;
}

body.workspace-mode #export-drawer .pdf-style-meta-row span,
body.workspace-mode #export-drawer .pdf-style-meta-row strong {
  display: block !important;
}

body.workspace-mode #export-drawer .pdf-style-meta-row span {
  color: #64748b !important;
  font-size: 12px !important;
}

body.workspace-mode #export-drawer .pdf-style-meta-row strong {
  margin-top: 6px !important;
  color: #172033 !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
}

body.workspace-mode #export-drawer .pdf-style-preview {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: start !important;
}

body.workspace-mode #export-drawer .pdf-style-preview span {
  border-radius: 999px !important;
  background: #eaf3ff !important;
  color: #1473e6 !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  padding: 5px 8px !important;
  text-transform: uppercase !important;
}

body.workspace-mode #export-drawer .pdf-style-preview p {
  margin: 0 !important;
  color: #526176 !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

body.workspace-mode #pdf-style-quick-results.is-open {
  display: grid !important;
  max-height: 210px !important;
  overflow: auto !important;
  border: 1px solid #d7e2ee !important;
  border-radius: 8px !important;
  background: #fff !important;
}

body.workspace-mode #pdf-style-quick-results:not(.is-open) {
  display: none !important;
}

body.workspace-mode #pdf-style-quick-results .pdf-style-result {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  min-height: 38px !important;
  border: 0 !important;
  border-bottom: 1px solid #eef3f8 !important;
  background: #fff !important;
  color: #172033 !important;
  cursor: pointer !important;
  padding: 0 12px !important;
  text-align: left !important;
}

body.workspace-mode #export-drawer .export-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin: 14px 0 !important;
}

body.workspace-mode #export-drawer .export-menu summary {
  min-height: 40px !important;
  border: 1px solid #b9c9dc !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #172033 !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  padding: 0 13px !important;
}

body.workspace-mode #export-drawer .export-menu-list {
  border: 1px solid #d7e2ee !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 16px 36px rgba(21, 31, 47, 0.16) !important;
}

body.workspace-mode #export-drawer .export-preview {
  border: 1px solid #d7e2ee !important;
  border-radius: 8px !important;
  background: #fff !important;
  padding: 0 !important;
}

body.workspace-mode #export-drawer .export-preview > summary {
  min-height: 44px !important;
  cursor: pointer !important;
  color: #172033 !important;
  font-weight: 850 !important;
  padding: 12px 14px !important;
}

body.workspace-mode #export-drawer .output-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  border-top: 1px solid #dce6f1 !important;
  margin: 0 !important;
  padding: 14px !important;
}

body.workspace-mode #export-drawer .output-grid label {
  display: grid !important;
  gap: 7px !important;
  color: #475569 !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  text-transform: uppercase !important;
}

body.workspace-mode #export-drawer .output-grid textarea {
  min-height: 180px !important;
  resize: vertical !important;
  border: 1px solid #cad7e6 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #172033 !important;
  font-family: Consolas, "Liberation Mono", Menlo, monospace !important;
  font-size: 11px !important;
  line-height: 1.45 !important;
  padding: 10px !important;
}

@media (max-width: 980px) {
  body.workspace-mode #export-drawer[open] .utility-content,
  body.workspace-mode #quality-drawer[open] .utility-content {
    inset: calc(var(--workspace-header-height) + 8px) 8px 8px !important;
    width: auto !important;
    max-height: none !important;
    transform: none !important;
  }

  body.workspace-mode #export-drawer .pdf-style-controls,
  body.workspace-mode #export-drawer .pdf-style-status-row,
  body.workspace-mode #quality-drawer .report-summary-metrics,
  body.workspace-mode #quality-drawer .official-metrics,
  body.workspace-mode #export-drawer .output-grid {
    grid-template-columns: 1fr !important;
  }
}

.extractor-page *,
.extractor-page *::before,
.extractor-page *::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

.extractor-page a {
  color: inherit;
  text-decoration: none;
}

.extractor-page img {
  display: block;
  max-width: 100%;
  height: auto;
}

.extractor-page button {
  font: inherit;
}

.extractor-page .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 63px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-family: var(--font);
  font-style: normal;
  padding: 0 24px;
}

.extractor-page .brand {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--ink);
  font-size: 22.5px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.extractor-page .brand span {
  display: block;
  transform: translate(-1px, 5px);
}

.extractor-page .brand-image-mark {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
}

.extractor-page .main-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  color: var(--ink);
  font-size: 14px;
  font-style: normal;
  font-weight: 850;
}

.extractor-page .main-nav a:hover {
  color: var(--brand-dark);
}

.extractor-page .header-tool-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #232733;
  border-radius: 6px;
  background: #232733;
  color: #fff;
  font-size: 14px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
  padding: 9px 16px;
  white-space: nowrap;
}

.extractor-page .header-tool-link:hover {
  border-color: #232733;
  background: #232733;
  color: #fff;
}

.extractor-page main {
  position: relative;
  z-index: 0;
  width: min(1420px, 100%);
  margin: 0 auto;
  padding: 0 16px 24px;
}

.extractor-page main::before {
  position: fixed;
  inset: 63px 0 auto;
  z-index: -1;
  height: 620px;
  border-bottom: 1px solid #e7e9ed;
  background:
    linear-gradient(rgba(58, 63, 73, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 63, 73, 0.032) 1px, transparent 1px),
    radial-gradient(ellipse at 16% 18%, rgba(20, 115, 230, 0.14), transparent 48%),
    radial-gradient(ellipse at 86% 82%, rgba(239, 63, 52, 0.22), transparent 54%),
    linear-gradient(180deg, #fbfdff 0%, #f7f8fb 58%, #f4f7ff 100%);
  background-size: 44px 44px, 44px 44px, auto, auto, auto;
  content: "";
}

.extractor-hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 104px;
  overflow: hidden;
  padding: 12px 16px 0;
}

.extractor-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
  transform: none;
}

.extractor-hero h1 {
  max-width: 1120px;
  margin: 0 auto;
  color: var(--ink);
  font-family: var(--display);
  font-size: 42px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
  transform: translateY(-10px);
}

.extractor-hero p {
  max-width: 770px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16.2px;
  line-height: 1.45;
}

.extractor-section {
  width: min(1260px, calc(100% - 64px));
  margin: 0 auto;
}

.upload-panel-section {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
}

.upload-panel {
  border: 0;
  border-radius: 11px;
  background: #ef3733;
  box-shadow: 0 18px 42px rgba(27, 36, 52, 0.16);
  padding: 12px;
}

body:not(.workspace-mode) .upload-panel {
  border: 0;
  background: #ef3733;
  box-shadow: 0 18px 42px rgba(27, 36, 52, 0.16);
}

body:not(.workspace-mode) .upload-panel::before {
  content: none;
}

.upload-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 280px;
  border: 2px dashed rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  padding: 36px 24px;
  text-align: center;
}

body:not(.workspace-mode) .upload-dropzone,
body:not(.workspace-mode) .upload-dropzone:hover {
  border-color: rgba(255, 255, 255, 0.86);
  background: transparent;
}

body:not(.workspace-mode) .upload-dropzone.is-dragging {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pdf-file-mark {
  width: 90px;
  height: 90px;
  color: #fff;
  order: 1;
}

.pdf-file-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.upload-copy {
  display: contents;
}

.upload-copy h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  margin: -1px;
  order: 2;
}

.upload-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 600;
  order: 4;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-width: 236px;
  min-height: 52px;
  border: 0;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  order: 3;
  padding: 0 28px;
  text-transform: uppercase;
  box-shadow: none;
}

.upload-button::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 22px;
  height: 26px;
  border: 2px solid currentColor;
  border-radius: 2px;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.upload-button:hover {
  background: #f8fafc;
}

.upload-benefit-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: min(100%, 780px);
  margin: 22px auto 0;
  padding: 0;
  list-style: none;
}

.upload-benefit-row li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}

.benefit-check {
  display: inline-grid;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  place-items: center;
  border-radius: 50%;
  background: #00c767;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.upload-status-row {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "copy meta";
  column-gap: 20px;
  row-gap: 0;
  align-items: center;
  width: min(1120px, calc(100% - 64px));
  margin: 22px auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 250, 255, 0.96);
  color: #68788c;
  box-shadow: 0 10px 22px rgba(40, 67, 95, 0.07);
  padding: 14px 30px 13px;
}

.upload-status-row strong {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.upload-status-row span {
  display: block;
  margin: 0;
  font-size: 14px;
}

.upload-status-copy {
  grid-area: copy;
  min-width: 0;
}

.upload-status-copy p {
  max-width: none;
  margin: 0;
  color: #5d6e84;
  overflow: visible;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
}

#file-status {
  display: none !important;
}

.upload-status-flow {
  display: contents;
}

.upload-steps {
  display: none;
  grid-area: steps;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  justify-self: center;
  width: min(100%, 460px);
  margin: 0;
  padding: 0;
  list-style: none;
  color: #8a94a3;
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.upload-steps.pipeline::before,
.upload-steps.pipeline::after {
  display: none;
  content: none;
}

.upload-steps span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  margin: 0 auto 5px;
  border: 1px solid #cbd9ea;
  border-radius: 50%;
  background: #fff;
  color: #8a94a3;
  font-size: 12px;
}

.upload-steps li.is-done {
  color: #5f6e83;
}

.upload-steps li.is-done span {
  border-color: rgba(0, 199, 103, 0.35);
  background: rgba(0, 199, 103, 0.12);
  color: #00a85a;
}

.upload-steps li.is-active {
  color: var(--ink);
}

.upload-steps li.is-active span {
  border-color: var(--brand);
  background: #fff0ef;
  color: var(--brand);
}

.upload-steps li.is-error span {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.upload-live-meta {
  grid-area: meta;
  display: flex;
  gap: 0;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  width: auto;
  margin-top: 0;
  color: #627289;
}

.upload-live-meta span {
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
}

#progress-stage-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

#progress-estimate {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.upload-clock {
  display: inline-flex;
  min-width: 48px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eaf2fc;
  color: var(--ink);
  font-weight: 900;
  padding: 6px 9px;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.upload-progress-meter {
  display: none;
}

.upload-progress-meter span {
  display: block;
  width: var(--progress-meter, 0%);
  height: 100%;
  margin: 0;
  border-radius: inherit;
  background: #ef3733;
  transition: width 260ms ease;
}

.upload-status-row[data-state="active"] {
  border-color: #bfd4ef;
  background: rgba(248, 251, 255, 0.98);
}

.upload-status-row[data-state="complete"] .upload-progress-meter span {
  background: #00c767;
}

.upload-status-row[data-state="error"] .upload-progress-meter span {
  background: #ef3733;
}

.extractor-section {
  margin-top: 58px;
}

.section-heading {
  max-width: 900px;
  margin: 0 auto 24px;
  text-align: center;
}

.section-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid #ef3f34;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  padding: 0 36px;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 16px auto 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: 0;
}

.section-heading p {
  max-width: 760px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.workflow-card-grid,
.feature-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.workflow-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card-grid {
  gap: 12px;
}

.workflow-card-grid article,
.feature-card-grid article {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
}

.workflow-card-grid article::before {
  content: none;
}

.workflow-card-grid article {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 184px;
  border-top: 4px solid var(--step-color, var(--brand));
  padding: 22px;
}

.workflow-card-grid span {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  min-width: 42px;
  min-height: 28px;
  border-radius: 6px;
  background: var(--step-soft, #fff0ee);
  color: var(--step-color, var(--brand));
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  padding: 0 8px;
}

.workflow-card-grid h3,
.feature-card-grid strong {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: 19.5px;
  line-height: 1.25;
  font-weight: 700;
}

.workflow-card-grid p,
.feature-card-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.step-red {
  --step-color: #f43b33;
  --step-soft: #fff0ee;
}

.step-gold {
  --step-color: #eda900;
  --step-soft: #fff6d9;
}

.step-blue {
  --step-color: #1575e6;
  --step-soft: #eaf3ff;
}

.step-green {
  --step-color: #0b9668;
  --step-soft: #e8f8f0;
}

.step-purple {
  --step-color: #7b55e7;
  --step-soft: #f1ebff;
}

.feature-card-grid article {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-height: 0;
  background: #fff;
  padding: 20px;
}

.feature-card-grid strong {
  display: block;
  margin: 0;
  color: var(--brand-dark);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 850;
  line-height: normal;
}

.feature-card-grid p {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
}

.faq-section {
  margin-bottom: 0;
  interpolate-size: allow-keywords;
}

.faq-heading {
  margin-bottom: 26px;
}

.faq-list {
  display: grid;
  gap: 0;
  width: min(760px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #c8d8eb;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.extractor-page .faq-section .faq-list {
  width: min(760px, 100%) !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.faq-group {
  position: relative;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid #d5e1ef;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: none;
  padding: 0 !important;
  transition: none;
}

.extractor-page .faq-section .faq-group {
  border: 0 !important;
  border-bottom: 1px solid #d5e1ef !important;
  background: transparent !important;
  padding: 0 !important;
}

.extractor-page .faq-section .faq-group:last-child {
  border-bottom: 0 !important;
}

.faq-group:last-child {
  border-bottom: 0;
}

.faq-group[open],
.faq-group:hover {
  border-color: transparent;
  box-shadow: none;
}

.faq-group > summary {
  display: block;
  list-style: none;
  list-style-type: none;
  cursor: pointer;
  color: var(--brand-dark);
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-transform: uppercase;
  min-height: 62px;
  padding: 22px 72px 20px 22px;
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  outline: none;
  transition: background-color 180ms ease, color 180ms ease;
}

.extractor-page .faq-section .faq-group > summary {
  border-right: 1px solid #d5e1ef;
  border-left: 1px solid #d5e1ef;
}

.extractor-page .faq-section .faq-group:first-child > summary {
  border-top: 1px solid #d5e1ef;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.extractor-page .faq-section .faq-group:last-child > summary {
  border-bottom: 1px solid #d5e1ef;
  border-bottom-right-radius: 8px;
  border-bottom-left-radius: 8px;
}

.extractor-page .faq-section .faq-group[open]:last-child > summary {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.faq-group[open] > summary,
.faq-group > summary:hover {
  background: #fff;
  box-shadow: none;
}

.faq-group > summary::-webkit-details-marker,
.faq-group-content > details > summary::-webkit-details-marker {
  display: none;
}

.faq-group > summary::marker,
.faq-group-content > details > summary::marker {
  content: "";
}

.faq-group > summary::after,
.faq-group-content > details > summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 34px;
  display: block;
  width: 20px;
  height: 20px;
  border: 0;
  background-color: currentColor;
  box-shadow: none;
  color: var(--brand-dark);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
  text-shadow: none;
  transform: translateY(-50%) rotate(0deg);
  transform-origin: center;
  transition: transform 180ms ease, color 180ms ease;
}

.faq-group[open] > summary {
  border-bottom: 1px solid #c9d9eb;
  color: var(--brand-dark);
}

.faq-group[open] > summary::after,
.faq-group-content > details[open] > summary::after {
  transform: translateY(-50%) rotate(90deg);
}

.faq-group-content {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 20px 22px 24px;
  background: linear-gradient(90deg, rgba(238, 246, 255, 0.98), rgba(246, 250, 255, 0.9));
  border: 0;
  border-top: 1px solid #dce8f6;
  box-shadow: inset 0 12px 24px rgba(40, 67, 95, 0.055);
}

.extractor-page .faq-section .faq-group-content {
  border-right: 1px solid #dce8f6;
  border-left: 1px solid #dce8f6;
}

.faq-group::details-content,
.faq-group-content > details::details-content {
  block-size: 0;
  opacity: 0;
  overflow: hidden;
  transition: block-size 220ms ease, opacity 180ms ease;
}

.faq-group[open]::details-content,
.faq-group-content > details[open]::details-content {
  block-size: auto;
  opacity: 1;
}

.faq-group-content > details {
  position: relative;
  overflow: hidden;
  border: 1px solid #cbd9ea;
  border-bottom: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  padding: 0;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.faq-group-content > details:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.faq-group-content > details:last-child {
  border-bottom: 1px solid #cbd9ea;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.faq-group-content > details[open],
.faq-group-content > details:hover {
  border-color: #b8cbe3;
  box-shadow: none;
  transform: none;
}

.faq-group-content > details > summary {
  display: block;
  list-style: none;
  list-style-type: none;
  cursor: pointer;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
  min-height: 62px;
  padding: 21px 72px 20px 22px;
  position: relative;
  outline: none;
}

.faq-group-content > details > summary::after {
  color: #1575e6;
  right: 38px;
  width: 18px;
  height: 18px;
}

.faq-group-content > details > p {
  margin: 0;
  max-width: 760px;
  padding: 0 72px 20px 22px;
  color: #5f6e83;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.58;
}

.guides-section {
  margin-bottom: 96px;
}

.extractor-page.home-page .site-footer {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0;
  border-top: 4px solid var(--brand);
  background: #171c26;
}

.guides-section .section-heading {
  margin-bottom: 18px;
}

.guides-card {
  display: grid;
  width: min(760px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #cbd9ea;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 26px rgba(40, 67, 95, 0.06);
}

.guide-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 62px;
  border-bottom: 1px solid #d9e3ef;
  color: var(--ink);
  padding: 0 22px;
}

.guide-row:last-child {
  border-bottom: 0;
}

.guide-row strong {
  font-size: 15px;
  font-weight: 850;
}

.guide-row span {
  color: #5d6e84;
  font-size: 14px;
  line-height: 1.4;
}

.guide-row em {
  color: #1473e6;
  font-style: normal;
  font-weight: 850;
}

@media (max-width: 980px) {
  .extractor-page .site-header {
    grid-template-columns: 1fr auto;
  }

  .extractor-page .main-nav {
    display: none;
  }

  .upload-status-row,
  .workflow-card-grid,
  .feature-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .upload-status-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "copy meta";
    width: min(100%, calc(100% - 24px));
  }

  .faq-list {
    width: min(760px, calc(100% - 24px));
  }

  .guide-row {
    grid-template-columns: 1fr auto;
    gap: 10px 18px;
    padding: 18px 20px;
  }

  .guide-row span {
    grid-column: 1;
  }

  .guide-row em {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 640px) {
  .extractor-page .site-header {
    padding: 0 14px;
  }

  .extractor-hero {
    min-height: 96px;
    padding: 16px 0 0;
  }

  .extractor-hero h1 {
    max-width: 340px;
    font-size: 32px;
    line-height: 1.08;
    transform: translateY(-6px);
  }

  .extractor-hero-copy {
    transform: none;
  }

  .extractor-hero p {
    max-width: 350px;
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.45;
  }

  .extractor-section {
    width: min(100% - 24px, 560px);
  }

  .upload-panel-section {
    width: min(100% - 24px, 560px);
  }

  .upload-panel {
    padding: 10px;
  }

  .upload-dropzone {
    gap: 14px;
    min-height: 260px;
    padding: 28px 18px;
  }

  .pdf-file-mark {
    width: 82px;
    height: 82px;
    margin: 0 auto;
  }

  .upload-copy p {
    font-size: 16px;
  }

  .upload-button {
    width: min(100%, 280px);
    min-width: 0;
  }

  .upload-benefit-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: min(100%, 430px) !important;
    max-width: 100% !important;
    justify-items: center !important;
    margin: 18px auto 0 !important;
  }

  .upload-benefit-row li {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
    margin: 0 auto !important;
    gap: 7px !important;
    font-size: 13.5px;
    text-align: center !important;
  }

  .benefit-check {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
    font-size: 14px;
  }

  .upload-status-row,
  .workflow-card-grid,
  .feature-card-grid {
    grid-template-columns: 1fr;
  }

  .upload-status-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "copy meta";
    justify-items: stretch;
    gap: 12px;
    width: min(calc(100% - 28px), 420px);
    padding: 20px 20px 19px;
    text-align: left;
  }

  .upload-status-copy {
    width: 100%;
  }

  .upload-status-copy p {
    max-width: none;
    margin: 0;
    overflow: visible;
    font-size: 14px;
    line-height: 1.35;
    text-align: left;
    text-overflow: clip;
    white-space: normal;
  }

  #file-status {
    margin-top: 6px;
    text-align: left;
    white-space: normal;
  }

  .upload-live-meta {
    width: auto;
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    gap: 0;
  }

  .upload-steps {
    width: 100%;
    max-width: 360px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }

  .upload-steps.pipeline::before,
  .upload-steps.pipeline::after {
    display: none;
    content: none;
  }

  .upload-steps .pipeline-step {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    color: #7b8798;
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
  }

  .upload-steps span {
    width: 28px;
    height: 28px;
    margin: 0;
    font-size: 13px;
    box-shadow: none;
  }

  #progress-stage-label {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    padding: 0;
    white-space: nowrap;
  }

  .upload-live-meta .upload-clock {
    box-sizing: border-box;
    display: inline-flex;
    min-width: 64px;
    height: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    font-size: 14px;
    line-height: 1;
  }

  .upload-progress-meter {
    display: none;
  }

  .extractor-section {
    margin-top: 54px;
  }

  .section-heading {
    margin-bottom: 24px;
  }

  .section-heading h2 {
    font-size: 24px;
  }

  .workflow-card-grid article {
    min-height: 132px;
    gap: 9px;
    padding: 16px;
  }

  .feature-card-grid article {
    min-height: 0;
    gap: 10px;
    padding: 18px;
  }

  .workflow-card-grid span {
    min-width: 36px;
    min-height: 24px;
    font-size: 9px;
    padding: 0 7px;
  }

  .workflow-card-grid h3 {
    font-size: 19.5px;
    line-height: 1.22;
  }

  .workflow-card-grid p {
    font-size: 12px;
    line-height: 1.46;
  }

  .workflow-card-grid article {
    grid-template-columns: 1fr;
  }

  .workflow-card-grid p {
    grid-column: auto;
  }

  .faq-list {
    width: 100%;
    padding: 0;
  }

  .faq-list {
    display: grid;
  }

  .faq-group > summary {
    display: block;
    min-height: 60px;
    font-size: 13px;
    padding: 22px 48px 20px 18px;
  }

  .faq-group > summary::after {
    right: 18px;
    width: 15px;
    height: 15px;
  }

  .faq-group-content {
    gap: 0;
    padding: 14px;
  }

  .faq-group-content > details > summary {
    display: block;
    min-height: 58px;
    font-size: 15px;
    padding: 20px 46px 18px 16px;
  }

  .faq-group-content > details > summary::after {
    right: 18px;
    width: 15px;
    height: 15px;
  }

  .faq-group-content > details > p {
    padding: 0 46px 18px 16px;
    font-size: 13px;
  }

  .guide-row {
    grid-template-columns: 1fr auto;
    min-height: auto;
  }

}

/* Final exact-match overrides for the restored PDF workspace. Keep this block last. */
body.workspace-mode { --workspace-header-height: 62px !important; }
body.workspace-mode .workspace-header { grid-template-columns: minmax(0, 1fr) auto !important; height: var(--workspace-header-height) !important; min-height: var(--workspace-header-height) !important; column-gap: 12px !important; padding: 14px 12px !important; }
body.workspace-mode .workspace-header > #scorecard-grid { display: none !important; }
body.workspace-mode .workspace-document { gap: 10px !important; }
body.workspace-mode .exit-workspace-button { width: 118px !important; min-width: 118px !important; height: 34px !important; min-height: 34px !important; border-radius: 6px !important; font-size: 11px !important; font-weight: 900 !important; line-height: 11px !important; padding: 0 10px !important; }
body.workspace-mode .workspace-document-copy { grid-template-columns: auto minmax(0, auto) minmax(0, 1fr) !important; align-items: baseline !important; gap: 2px 10px !important; }
body.workspace-mode .workspace-document-copy > span { font-size: 11px !important; font-weight: 900 !important; line-height: 11px !important; }
body.workspace-mode .workspace-document #workspace-file-name { max-width: clamp(220px, 34vw, 560px) !important; font-size: 12px !important; font-weight: 900 !important; line-height: 14px !important; }
body.workspace-mode #workspace-inline-progress { grid-column: 2 / 4 !important; max-width: min(500px, 34vw) !important; min-width: 0 !important; overflow: hidden !important; color: #64748b !important; font-size: 11px !important; font-weight: 850 !important; line-height: 14px !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
body.workspace-mode #workspace-inline-progress[hidden] { display: none !important; }
body.workspace-mode .workspace-actions { gap: 10px !important; margin-left: auto !important; }
body.workspace-mode .workspace-summary-button, body.workspace-mode .workspace-actions .button { height: 34px !important; min-height: 34px !important; border-radius: 6px !important; font-size: 11px !important; font-weight: 850 !important; line-height: 11px !important; padding: 0 12px !important; }
body.workspace-mode .workspace-summary-button { width: 152px !important; min-width: 152px !important; max-width: 152px !important; }
body.workspace-mode .workspace-summary-button strong { display: none !important; }
body.workspace-mode .workspace-actions #workspace-enrich-button { width: 89px !important; min-width: 89px !important; max-width: 89px !important; }
body.workspace-mode .workspace-actions #workspace-match-button { width: 78px !important; min-width: 78px !important; max-width: 78px !important; }
body.workspace-mode .workspace-actions #workspace-quality-button { width: 77px !important; min-width: 77px !important; max-width: 77px !important; }
body.workspace-mode .workspace-actions #workspace-export-button { width: 76px !important; min-width: 76px !important; max-width: 76px !important; }
body.workspace-mode .workspace-grid { top: auto !important; gap: 9px !important; padding: 11px !important; }
body.workspace-mode .workspace-pane { border-radius: 6px !important; }
body.workspace-mode .pane-header { min-height: 66px !important; height: 66px !important; padding: 15px 14px 13px !important; }
body.workspace-mode .pane-kicker, body.workspace-mode .detail-kicker { margin: 0 !important; font-size: 11px !important; font-weight: 900 !important; line-height: 13px !important; text-transform: uppercase !important; }
body.workspace-mode .pane-header h2, body.workspace-mode .reference-detail h2, body.workspace-mode .reference-detail h3 { margin: 4px 0 0 !important; font-size: 20px !important; font-weight: 850 !important; line-height: 24px !important; }
body.workspace-mode .pdf-source-panel .pane-header { display: flex !important; align-items: center !important; justify-content: space-between !important; }
body.workspace-mode .pdf-source-panel .pane-header-actions { position: static !important; display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: flex-end !important; width: auto !important; height: auto !important; gap: 13px !important; }
body.workspace-mode .pdf-source-panel .pane-header-actions .icon-button, body.workspace-mode .reference-detail .detail-next-button, body.workspace-mode .reference-detail .icon-button { width: 30px !important; height: 30px !important; min-width: 30px !important; min-height: 30px !important; border-radius: 6px !important; }
body.workspace-mode #pdf-page-label { min-width: 72px !important; color: #64748b !important; font-size: 12px !important; font-weight: 700 !important; text-align: center !important; }
body.workspace-mode .pdf-tools { min-height: 40px !important; height: 40px !important; padding: 8px 14px !important; }
body.workspace-mode .pdf-tools .tool-button { height: 30px !important; min-height: 30px !important; border-radius: 5px !important; font-size: 12px !important; font-weight: 850 !important; }
body.workspace-mode .pdf-source-status { min-height: 31px !important; padding: 8px 14px !important; font-size: 10px !important; line-height: 14px !important; }
body.workspace-mode .reference-list-actions { position: static !important; display: flex !important; align-self: center !important; align-items: center !important; justify-content: flex-end !important; }
body.workspace-mode #bulk-review-menu { display: none !important; }
body.workspace-mode .reference-list-actions .review-menu > summary { width: 110px !important; min-width: 110px !important; height: 34px !important; min-height: 34px !important; border-radius: 6px !important; font-size: 11px !important; font-weight: 850 !important; padding: 0 12px !important; }
body.workspace-mode .reference-detail .detail-kicker { color: #d58a00 !important; }
body.workspace-mode #export-drawer[open] .utility-content { top: calc(var(--workspace-header-height) + 12px) !important; right: 12px !important; bottom: 12px !important; left: 344px !important; width: auto !important; max-width: none !important; border-radius: 6px !important; background: #f8fbff !important; }
body.workspace-mode #export-drawer .utility-panel-head { min-height: 82px !important; padding: 18px 22px 14px !important; border-bottom: 1px solid #dbe6f2 !important; }
body.workspace-mode #export-drawer .utility-panel-head span { display: none !important; }
body.workspace-mode #export-drawer .utility-panel-head h2 { margin: 0 !important; font-size: 18px !important; font-weight: 900 !important; line-height: 22px !important; }
body.workspace-mode #export-drawer .utility-panel-head p { margin-top: 4px !important; font-size: 13px !important; line-height: 18px !important; }
body.workspace-mode #export-drawer .utility-scroll-body { padding: 16px 18px 18px !important; }
body.workspace-mode #export-drawer .utility-close-button.utility-close { width: 36px !important; min-width: 36px !important; height: 36px !important; min-height: 36px !important; border-radius: 6px !important; font-size: 18px !important; }
body.workspace-mode #export-drawer .citation-style-card { gap: 12px !important; border-radius: 8px !important; padding: 14px !important; }
body.workspace-mode #export-drawer .pdf-style-controls, body.workspace-mode #export-drawer .pdf-style-search-wrap { display: block !important; }
body.workspace-mode #export-drawer #pdf-citation-style-select { display: none !important; }
body.workspace-mode #export-drawer #pdf-style-search { width: 100% !important; height: 38px !important; min-height: 38px !important; border-radius: 6px !important; font-size: 14px !important; font-weight: 850 !important; padding: 0 14px !important; }
body.workspace-mode #export-drawer .pdf-style-status-row { grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr) !important; gap: 10px !important; border-top: 1px solid #dbe6f2 !important; padding-top: 12px !important; }
body.workspace-mode #export-drawer .pdf-style-meta-row, body.workspace-mode #export-drawer .pdf-style-preview { min-height: 92px !important; border-radius: 6px !important; padding: 12px 14px !important; }
body.workspace-mode #export-drawer .pdf-style-meta-row span { font-size: 12px !important; line-height: 18px !important; }
body.workspace-mode #export-drawer .pdf-style-meta-row strong { margin-top: 6px !important; font-size: 14px !important; line-height: 18px !important; }
body.workspace-mode #export-drawer .pdf-style-preview { grid-template-columns: auto minmax(0, 1fr) !important; gap: 14px !important; }
body.workspace-mode #export-drawer .pdf-style-preview p { font-size: 13px !important; line-height: 18px !important; }
body.workspace-mode #export-drawer .citation-style-note { border-top: 1px solid #dbe6f2 !important; margin: 0 !important; padding-top: 12px !important; color: #64748b !important; font-size: 12px !important; line-height: 17px !important; }
body.workspace-mode #export-drawer .export-actions { display: flex !important; gap: 8px !important; margin: 12px 0 !important; }
body.workspace-mode #export-drawer .export-action-button { width: 160px !important; height: 36px !important; border: 1px solid #bfcee2 !important; border-radius: 6px !important; background: #fff !important; color: #172033 !important; cursor: pointer !important; font-size: 13px !important; font-weight: 850 !important; padding: 0 14px !important; text-align: left !important; }
body.workspace-mode #export-drawer .export-preview { border-radius: 8px !important; }
body.workspace-mode #export-drawer .export-preview > summary { min-height: 38px !important; font-size: 13px !important; padding: 10px 14px !important; }
@media (max-width: 1180px) { body.workspace-mode #export-drawer[open] .utility-content { left: 12px !important; } }

body.workspace-mode #export-drawer[open] .utility-content {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: min(1160px, calc(100vw - 72px)) !important;
  max-width: 1160px !important;
  height: min(760px, calc(100vh - 96px)) !important;
  max-height: calc(100vh - 96px) !important;
  transform: translate(-50%, -50%) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background: #f8fbff !important;
}

body.workspace-mode #export-drawer .utility-scroll-body {
  max-height: calc(min(760px, calc(100vh - 96px)) - 82px) !important;
  overflow: auto !important;
}

body.workspace-mode #export-drawer .pdf-style-search-wrap {
  position: relative !important;
}

body.workspace-mode #pdf-style-quick-results.is-open {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 45 !important;
  display: grid !important;
  max-height: min(360px, 42vh) !important;
  overflow: auto !important;
  border: 1px solid #bfcee2 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18) !important;
  padding: 6px !important;
}

body.workspace-mode #pdf-style-quick-results .pdf-style-result {
  min-height: 42px !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: center !important;
  border: 0 !important;
  border-radius: 6px !important;
  padding: 8px 10px !important;
  text-align: left !important;
}

body.workspace-mode #pdf-style-quick-results .pdf-style-result:hover,
body.workspace-mode #pdf-style-quick-results .pdf-style-result.is-active {
  background: #eaf3ff !important;
}

body.workspace-mode #pdf-style-quick-results .pdf-style-result span {
  color: #172033 !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  line-height: 17px !important;
}

body.workspace-mode #pdf-style-quick-results .pdf-style-result small {
  color: #64748b !important;
  font-size: 11px !important;
  line-height: 15px !important;
}

body.workspace-mode #export-drawer .export-actions {
  align-items: flex-start !important;
}

body.workspace-mode #export-drawer .export-menu {
  position: relative !important;
}

body.workspace-mode #export-drawer .export-menu summary {
  display: flex !important;
  align-items: center !important;
  width: 180px !important;
  height: 38px !important;
  border: 1px solid #bfcee2 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #172033 !important;
  cursor: pointer !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  list-style: none !important;
  padding: 0 14px !important;
}

body.workspace-mode #export-drawer .export-menu summary::-webkit-details-marker {
  display: none !important;
}

body.workspace-mode #export-drawer .export-menu summary::after {
  content: "v" !important;
  margin-left: auto !important;
  color: #64748b !important;
  font-size: 12px !important;
}

body.workspace-mode #export-drawer .export-menu-list {
  position: absolute !important;
  left: 0 !important;
  top: calc(100% + 6px) !important;
  z-index: 40 !important;
  display: grid !important;
  min-width: 240px !important;
  max-height: 320px !important;
  overflow: auto !important;
  border: 1px solid #bfcee2 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18) !important;
  padding: 6px !important;
}

body.workspace-mode #export-drawer .export-menu-list button {
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #172033 !important;
  cursor: pointer !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  min-height: 34px !important;
  padding: 8px 10px !important;
  text-align: left !important;
}

body.workspace-mode #export-drawer .export-menu-list button:hover {
  background: #eaf3ff !important;
}

@media (max-width: 760px) {
  body.workspace-mode #export-drawer[open] .utility-content {
    width: calc(100vw - 20px) !important;
    height: calc(100vh - 32px) !important;
    max-height: calc(100vh - 32px) !important;
  }

  body.workspace-mode #export-drawer .utility-scroll-body {
    max-height: calc(100vh - 114px) !important;
  }

  body.workspace-mode #export-drawer .export-actions {
    flex-direction: column !important;
  }
}

/* Collapsed workspace panes become smooth vertical restore rails. */
body.workspace-mode .workspace-restore-button {
  display: none !important;
}

body.workspace-mode .workspace-grid {
  display: grid !important;
  transition: grid-template-columns 420ms cubic-bezier(0.22, 1, 0.36, 1) !important;
  will-change: grid-template-columns !important;
}

body.workspace-mode .workspace-grid.is-pane-transitioning {
  pointer-events: none !important;
}

body.workspace-mode .workspace-pane {
  position: relative !important;
  min-width: 0 !important;
  transition: border-color 220ms ease, background-color 220ms ease, box-shadow 220ms ease !important;
}

body.workspace-mode .workspace-pane > :not(.pane-collapse-rail-label) {
  transition: opacity 180ms ease, visibility 180ms ease !important;
}

body.workspace-mode .pane-collapse-rail-label {
  position: absolute !important;
  inset: 0 !important;
  z-index: 5 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  width: max-content !important;
  height: 58px !important;
  margin: auto !important;
  color: #172033 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  white-space: nowrap !important;
  transform-origin: center !important;
  transition: opacity 180ms ease 110ms, visibility 180ms ease 110ms !important;
}

body.workspace-mode .pane-collapse-rail-label em {
  display: inline-grid !important;
  place-items: center !important;
  width: 22px !important;
  height: 22px !important;
  border: 1px solid #bfd0e4 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #64748b !important;
  font-size: 15px !important;
  font-style: normal !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

body.workspace-mode .pane-collapse-rail-label span {
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  line-height: 12px !important;
  text-transform: uppercase !important;
}

body.workspace-mode .pane-collapse-rail-label strong {
  font-size: 15px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  line-height: 18px !important;
}

@media (min-width: 901px) {
  body.workspace-mode .workspace-grid.is-source-collapsed {
    grid-template-columns: 58px minmax(420px, 480px) minmax(0, 1fr) !important;
  }

  body.workspace-mode .workspace-grid.is-detail-collapsed {
    grid-template-columns: minmax(0, 1fr) minmax(420px, 480px) 58px !important;
  }

  body.workspace-mode .workspace-grid.is-source-collapsed [data-pane="source"],
  body.workspace-mode .workspace-grid.is-detail-collapsed [data-pane="detail"] {
    display: block !important;
    min-width: 0 !important;
    overflow: hidden !important;
    border: 1px solid #bfd0e4 !important;
    border-top: 0 !important;
    border-radius: 6px !important;
    background: #fff !important;
    cursor: pointer !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
  }

  body.workspace-mode .workspace-grid.is-source-collapsed [data-pane="source"] {
    box-shadow: inset 4px 0 #1473e6 !important;
  }

  body.workspace-mode .workspace-grid.is-detail-collapsed [data-pane="detail"] {
    box-shadow: inset -4px 0 #d58a00 !important;
  }

  body.workspace-mode .workspace-grid.is-source-collapsed [data-pane="source"]::before,
  body.workspace-mode .workspace-grid.is-detail-collapsed [data-pane="detail"]::before {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    z-index: 7 !important;
    display: block !important;
    width: max-content !important;
    max-width: none !important;
    color: #172033 !important;
    font-family: var(--display, "Manrope", "Inter", sans-serif) !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    line-height: 1 !important;
    pointer-events: none !important;
    text-transform: none !important;
    white-space: nowrap !important;
  }

  body.workspace-mode .workspace-grid.is-source-collapsed [data-pane="source"]::before {
    content: attr(data-collapse-label) !important;
    transform: translate(-50%, -50%) rotate(-90deg) !important;
  }

  body.workspace-mode .workspace-grid.is-detail-collapsed [data-pane="detail"]::before {
    content: attr(data-collapse-label) !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
  }

  body.workspace-mode .workspace-grid.is-source-collapsed [data-pane="source"]::after,
  body.workspace-mode .workspace-grid.is-detail-collapsed [data-pane="detail"]::after {
    position: absolute !important;
    left: 50% !important;
    z-index: 7 !important;
    display: grid !important;
    place-items: center !important;
    width: 28px !important;
    height: 28px !important;
    border: 1px solid #bfd0e4 !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #64748b !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    pointer-events: none !important;
    transform: translateX(-50%) !important;
  }

  body.workspace-mode .workspace-grid.is-source-collapsed [data-pane="source"]::after {
    content: attr(data-collapse-icon) !important;
    top: 18px !important;
    color: #1473e6 !important;
  }

  body.workspace-mode .workspace-grid.is-detail-collapsed [data-pane="detail"]::after {
    content: attr(data-collapse-icon) !important;
    top: 18px !important;
    color: #d58a00 !important;
  }

  body.workspace-mode .workspace-grid.is-source-collapsed [data-pane="source"] > :not(.pane-collapse-rail-label),
  body.workspace-mode .workspace-grid.is-detail-collapsed [data-pane="detail"] > :not(.pane-collapse-rail-label) {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }

  body.workspace-mode .workspace-grid.is-source-collapsed [data-pane="source"] .pane-collapse-rail-label,
  body.workspace-mode .workspace-grid.is-detail-collapsed [data-pane="detail"] .pane-collapse-rail-label {
    opacity: 1 !important;
    visibility: visible !important;
  }

  body.workspace-mode .workspace-grid.is-source-collapsed [data-pane="source"] .pane-collapse-rail-label {
    transform: rotate(-90deg) !important;
  }

  body.workspace-mode .workspace-grid.is-detail-collapsed [data-pane="detail"] .pane-collapse-rail-label {
    transform: rotate(90deg) !important;
  }

  body.workspace-mode .workspace-grid.is-source-collapsed [data-pane="source"] .pane-collapse-rail-label span {
    color: #1473e6 !important;
  }

  body.workspace-mode .workspace-grid.is-detail-collapsed [data-pane="detail"] .pane-collapse-rail-label span {
    color: #d58a00 !important;
  }
}

@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  body.workspace-mode .workspace-grid,
  body.workspace-mode .workspace-pane,
  body.workspace-mode .workspace-pane > :not(.pane-collapse-rail-label),
  body.workspace-mode .pane-collapse-rail-label {
    transition: none !important;
  }
}

/* Workspace responsive repair: one selected pane on phones and tablets. */
@media (max-width: 1100px) {
  body.workspace-mode {
    overflow-x: hidden !important;
  }

  body.workspace-mode .results-panel {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.workspace-mode .mobile-workspace-tabs {
    z-index: 18 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    flex: 0 0 46px !important;
    width: 100% !important;
    min-height: 46px !important;
    border-bottom: 1px solid #cbd8e8 !important;
    background: #fff !important;
    overflow: hidden !important;
  }

  body.workspace-mode .mobile-workspace-tabs button {
    min-width: 0 !important;
    padding: 0 8px !important;
    overflow: hidden !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.workspace-mode .workspace-grid {
    display: block !important;
    grid-template-columns: minmax(0, 1fr) !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    gap: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    transition: none !important;
    will-change: auto !important;
  }

  body.workspace-mode .workspace-pane,
  body.workspace-mode .workspace-grid.is-source-collapsed [data-pane="source"],
  body.workspace-mode .workspace-grid.is-detail-collapsed [data-pane="detail"] {
    display: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: default !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    visibility: visible !important;
  }

  body.workspace-mode .workspace-grid[data-mobile-panel="references"] > [data-pane="references"],
  body.workspace-mode .workspace-grid[data-mobile-panel="source"] > [data-pane="source"],
  body.workspace-mode .workspace-grid[data-mobile-panel="detail"] > [data-pane="detail"],
  body.workspace-mode .workspace-grid[data-mobile-panel="details"] > [data-pane="detail"] {
    display: flex !important;
    flex-direction: column !important;
  }

  body.workspace-mode .workspace-grid.is-source-collapsed [data-pane="source"] > :not(.pane-collapse-rail-label),
  body.workspace-mode .workspace-grid.is-detail-collapsed [data-pane="detail"] > :not(.pane-collapse-rail-label) {
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
  }

  body.workspace-mode .workspace-restore-button,
  body.workspace-mode .pane-collapse-button,
  body.workspace-mode .pane-collapse-rail-label,
  body.workspace-mode .workspace-grid.is-source-collapsed [data-pane="source"]::before,
  body.workspace-mode .workspace-grid.is-source-collapsed [data-pane="source"]::after,
  body.workspace-mode .workspace-grid.is-detail-collapsed [data-pane="detail"]::before,
  body.workspace-mode .workspace-grid.is-detail-collapsed [data-pane="detail"]::after {
    display: none !important;
    content: none !important;
  }

  body.workspace-mode .reference-list,
  body.workspace-mode .pdf-viewer,
  body.workspace-mode .reference-detail,
  body.workspace-mode .detail-page-body {
    min-width: 0 !important;
    max-width: none !important;
  }

  body.workspace-mode .reference-list,
  body.workspace-mode .pdf-viewer,
  body.workspace-mode .detail-page-body {
    flex: 1 1 auto !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.workspace-mode .detail-sticky-header,
  body.workspace-mode .pane-header {
    flex: 0 0 auto !important;
  }

  body.workspace-mode .detail-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body.workspace-mode .detail-actions button {
    width: 100% !important;
    min-width: 0 !important;
    padding-right: 8px !important;
    padding-left: 8px !important;
    text-align: center !important;
  }
}

@media (max-width: 760px) {
  body.workspace-mode .workspace-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;
    row-gap: 8px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 126px !important;
    padding: 10px 12px 8px !important;
    overflow: visible !important;
  }

  body.workspace-mode .workspace-document {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 8px !important;
  }

  body.workspace-mode .exit-workspace-button {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
  }

  body.workspace-mode .workspace-document-copy {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    min-width: 0 !important;
    gap: 2px !important;
  }

  body.workspace-mode .workspace-document-copy > span,
  body.workspace-mode .workspace-document #workspace-file-name,
  body.workspace-mode #workspace-inline-progress {
    grid-column: 1 / -1 !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.workspace-mode .workspace-actions {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    grid-template-areas: none !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    gap: 7px !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  body.workspace-mode .workspace-actions > * {
    grid-area: auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
    order: 0 !important;
  }

  body.workspace-mode .workspace-summary-button,
  body.workspace-mode .workspace-actions .button,
  body.workspace-mode .workspace-actions #workspace-enrich-button,
  body.workspace-mode .workspace-actions #workspace-match-button,
  body.workspace-mode .workspace-actions #workspace-quality-button,
  body.workspace-mode .workspace-actions #workspace-export-button {
    display: inline-flex !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 6px !important;
    overflow: hidden !important;
    font-size: 11px !important;
    line-height: 1 !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 560px) {
  body.workspace-mode .workspace-header {
    min-height: 168px !important;
  }

  body.workspace-mode .workspace-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-areas: none !important;
  }

  body.workspace-mode .workspace-summary-button {
    grid-column: 1 / -1 !important;
    order: 0 !important;
  }

  body.workspace-mode .workspace-actions #workspace-enrich-button {
    order: 1 !important;
  }

  body.workspace-mode .workspace-actions #workspace-match-button {
    order: 2 !important;
  }

  body.workspace-mode .workspace-actions #workspace-quality-button {
    order: 3 !important;
  }

  body.workspace-mode .workspace-actions #workspace-export-button {
    order: 4 !important;
  }

  body.workspace-mode .detail-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Desktop upload status repair: keep every status element inside the card. */
@media (min-width: 901px) {
  .upload-status-row {
    box-sizing: border-box !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas: "copy meta" !important;
    column-gap: 18px !important;
    width: min(760px, calc(100% - 96px)) !important;
    min-width: min(760px, calc(100% - 96px)) !important;
    max-width: 760px !important;
    padding: 14px 24px 13px !important;
    overflow: visible !important;
  }

  .upload-status-copy,
  .upload-steps,
  .upload-live-meta {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .upload-status-copy p,
  #file-status {
    max-width: 100% !important;
    white-space: nowrap !important;
  }

  .upload-steps {
    display: none !important;
  }

  .upload-live-meta {
    display: flex !important;
    justify-self: end !important;
    justify-content: flex-end !important;
    width: auto !important;
  }

  #progress-stage-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
  }

  .upload-clock {
    flex: 0 0 auto !important;
    justify-self: end !important;
  }

  .upload-progress-meter {
    display: none !important;
  }
}

/* Mobile workspace header repair: keep the paper name visible and actions in one scroll row. */
@media (max-width: 760px) {
  body.workspace-mode .workspace-header {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    grid-template-areas: none !important;
    align-items: stretch !important;
    gap: 8px !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 8px 10px !important;
    overflow: visible !important;
  }

  body.workspace-mode .workspace-document {
    display: grid !important;
    flex: 0 0 auto !important;
    grid-area: auto !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    overflow: visible !important;
  }

  body.workspace-mode .exit-workspace-button {
    align-self: start !important;
    width: auto !important;
    min-width: 112px !important;
    max-width: 118px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 9px !important;
    overflow: hidden !important;
    font-size: 10px !important;
    line-height: 1.05 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.workspace-mode .workspace-document-copy {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start !important;
    min-width: 0 !important;
    gap: 2px !important;
  }

  body.workspace-mode .workspace-document-copy > span {
    display: block !important;
    max-width: 100% !important;
    overflow: visible !important;
    color: #53647b !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 13px !important;
    text-overflow: clip !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
  }

  body.workspace-mode .workspace-document #workspace-file-name {
    display: -webkit-box !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 32px !important;
    overflow: hidden !important;
    color: #172033 !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 16px !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }

  body.workspace-mode #workspace-inline-progress {
    grid-column: 1 / -1 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.workspace-mode .workspace-actions {
    display: flex !important;
    flex: 0 0 auto !important;
    grid-area: auto !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 0 0 4px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain !important;
    scroll-snap-type: x proximity !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.workspace-mode .workspace-actions > * {
    flex: 0 0 auto !important;
    grid-area: auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
    order: 0 !important;
    scroll-snap-align: start !important;
  }

  body.workspace-mode .workspace-summary-button,
  body.workspace-mode .workspace-actions .button,
  body.workspace-mode .workspace-actions #workspace-enrich-button,
  body.workspace-mode .workspace-actions #workspace-match-button,
  body.workspace-mode .workspace-actions #workspace-quality-button,
  body.workspace-mode .workspace-actions #workspace-export-button {
    display: inline-flex !important;
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    height: 38px !important;
    min-height: 38px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 16px !important;
    overflow: visible !important;
    font-size: 12px !important;
    line-height: 1 !important;
    text-align: center !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }

  body.workspace-mode .workspace-summary-button {
    min-width: 168px !important;
  }

  body.workspace-mode .workspace-actions #workspace-enrich-button {
    min-width: 106px !important;
  }

  body.workspace-mode .workspace-actions #workspace-match-button,
  body.workspace-mode .workspace-actions #workspace-quality-button,
  body.workspace-mode .workspace-actions #workspace-export-button {
    min-width: 92px !important;
  }
}

@media (max-width: 560px) {
  body.workspace-mode .workspace-header {
    min-height: 0 !important;
  }

  body.workspace-mode .workspace-actions {
    display: flex !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
  }

  body.workspace-mode .workspace-summary-button,
  body.workspace-mode .workspace-actions #workspace-enrich-button,
  body.workspace-mode .workspace-actions #workspace-match-button,
  body.workspace-mode .workspace-actions #workspace-quality-button,
  body.workspace-mode .workspace-actions #workspace-export-button {
    order: 0 !important;
    grid-column: auto !important;
  }
}

/* Export menu polish: modern chevron and contained dropdown scrolling. */
body.workspace-mode #export-drawer .export-actions {
  overflow: visible !important;
}

body.workspace-mode #export-drawer .export-menu {
  position: relative !important;
  overflow: visible !important;
}

body.workspace-mode #export-drawer .export-menu summary {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  min-width: 180px !important;
  height: 42px !important;
  min-height: 42px !important;
  border: 1px solid #bfcee2 !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  box-shadow: 0 1px 2px rgba(31, 45, 63, 0.04) !important;
  color: #172033 !important;
  cursor: pointer !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  list-style: none !important;
  padding: 0 42px 0 15px !important;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease !important;
}

body.workspace-mode #export-drawer .export-menu summary::-webkit-details-marker {
  display: none !important;
}

body.workspace-mode #export-drawer .export-menu summary::after {
  position: absolute !important;
  top: 50% !important;
  right: 16px !important;
  width: 8px !important;
  height: 8px !important;
  border: 0 !important;
  border-right: 2px solid #64748b !important;
  border-bottom: 2px solid #64748b !important;
  content: "" !important;
  margin: 0 !important;
  transform: translateY(-65%) rotate(45deg) !important;
  transform-origin: 50% 50% !important;
  transition: transform 160ms ease, border-color 160ms ease !important;
}

body.workspace-mode #export-drawer .export-menu summary:hover,
body.workspace-mode #export-drawer .export-menu[open] summary {
  border-color: #2684ff !important;
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%) !important;
  box-shadow: 0 0 0 3px rgba(38, 132, 255, 0.1) !important;
}

body.workspace-mode #export-drawer .export-menu[open] summary::after {
  border-color: #0f5fbf !important;
  transform: translateY(-35%) rotate(225deg) !important;
}

body.workspace-mode #export-drawer .export-menu-list {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  z-index: 80 !important;
  display: grid !important;
  box-sizing: border-box !important;
  width: min(290px, calc(100vw - 40px)) !important;
  min-width: 260px !important;
  max-height: min(320px, calc(100vh - 220px)) !important;
  overflow: hidden !important;
  overscroll-behavior: contain !important;
  border: 1px solid #bfcee2 !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16) !important;
  padding: 10px 8px 10px 10px !important;
}

body.workspace-mode #export-drawer .export-menu.is-open-up .export-menu-list {
  top: auto !important;
  bottom: calc(100% + 8px) !important;
}

body.workspace-mode #export-drawer .export-menu-scroll {
  display: grid !important;
  box-sizing: border-box !important;
  max-height: var(--export-menu-scroll-max, min(298px, calc(100vh - 242px))) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  padding: 0 8px 0 0 !important;
  scrollbar-color: #9aa8ba #f3f7fc !important;
  scrollbar-gutter: stable !important;
  scrollbar-width: thin !important;
}

body.workspace-mode #export-drawer .export-menu-scroll::-webkit-scrollbar {
  width: 10px !important;
}

body.workspace-mode #export-drawer .export-menu-scroll::-webkit-scrollbar-track {
  border-radius: 999px !important;
  background: #f3f7fc !important;
  margin: 10px 0 !important;
}

body.workspace-mode #export-drawer .export-menu-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #f3f7fc !important;
  border-radius: 999px !important;
  background: #9aa8ba !important;
}

body.workspace-mode #export-drawer .export-menu-list button {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 38px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #172033 !important;
  cursor: pointer !important;
  font-size: 13px !important;
  font-weight: 780 !important;
  line-height: 1.25 !important;
  padding: 9px 12px !important;
  text-align: left !important;
  white-space: normal !important;
}

body.workspace-mode #export-drawer .export-menu-list button:hover,
body.workspace-mode #export-drawer .export-menu-list button:focus {
  background: #eef6ff !important;
  color: #0f5fbf !important;
  outline: none !important;
}

/* Main upload status width: desktop only, horizontal reduction to about 2/3. */
@media (min-width: 901px) {
  body:not(.workspace-mode).extractor-page .upload-panel-section > .upload-status-row#extraction-live-status {
    width: min(760px, calc(100% - 96px)) !important;
    min-width: 0 !important;
    max-width: 760px !important;
  }

  body:not(.workspace-mode).extractor-page .upload-panel-section > .upload-status-row#extraction-live-status .upload-status-copy p {
    display: block !important;
    white-space: nowrap !important;
  }

  body:not(.workspace-mode).extractor-page .upload-panel-section > .upload-status-row#extraction-live-status .upload-clock {
    display: inline-flex !important;
  }
}

/* Header balance: leave more room for Auto-fetch / Resolve progress messages. */
@media (min-width: 761px) {
  body.workspace-mode .workspace-document #workspace-file-name {
    max-width: clamp(170px, 23vw, 370px) !important;
  }

  body.workspace-mode #workspace-inline-progress {
    max-width: min(620px, 42vw) !important;
  }
}
/* Robust PDF source fallback: native renderer for PDFs whose fonts break PDF.js canvas output. */
.pdf-canvas-wrap.is-native-render {
  display: grid;
  place-items: start center;
  width: 100% !important;
  height: 100% !important;
  min-height: 620px;
}

.pdf-native-frame {
  display: block;
  width: min(100%, 780px);
  height: min(980px, calc(100vh - 230px));
  min-height: 620px;
  border: 1px solid #abb5c1;
  background: #fff;
  box-shadow: 0 14px 34px rgba(11, 18, 28, 0.28);
}

.pdf-canvas-wrap.is-native-render .pdf-highlight-layer {
  display: none;
}

body.native-pdf-preview-mode #pdf-prev-page,
body.native-pdf-preview-mode #pdf-page-label,
body.native-pdf-preview-mode #pdf-next-page,
body.native-pdf-preview-mode #pdf-fit-button,
body.native-pdf-preview-mode #pdf-zoom-out-button,
body.native-pdf-preview-mode #pdf-zoom-label,
body.native-pdf-preview-mode #pdf-zoom-in-button {
  display: none !important;
}

body.native-pdf-preview-mode .pdf-tools {
  justify-content: flex-end;
}

.pdf-viewer.is-native-rendering {
  display: block;
  overflow: hidden;
  padding: 12px;
}

.pdf-viewer.is-native-rendering .pdf-canvas-wrap.is-native-render {
  width: 100% !important;
  height: 100% !important;
  min-height: 0;
}

.pdf-viewer.is-native-rendering .pdf-native-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
}
