:root {
  --text-ink: #121a2d;
  --text-muted: #5f7188;
  --text-line: #bfd0e4;
  --text-red: #fb3b35;
  --text-blue: #1473e6;
  --text-green: #079a68;
}

.text-citation-page {
  background:
    linear-gradient(rgba(82, 117, 154, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 117, 154, .07) 1px, transparent 1px),
    radial-gradient(circle at 8% 4%, rgba(197, 222, 255, .72), transparent 32%),
    radial-gradient(circle at 88% 82%, rgba(255, 208, 211, .66), transparent 36%),
    #f7faff;
  background-size: 44px 44px, 44px 44px, auto, auto, auto;
  color: var(--text-ink);
}

.text-citation-page .text-extractor-hero {
  min-height: 132px;
  padding: 34px 24px 18px;
}

.text-citation-page .text-extractor-hero .extractor-hero-copy {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
}

.text-citation-page .text-extractor-hero h1 {
  margin: 0;
  color: var(--text-ink);
  font-family: Manrope, Inter, sans-serif;
  font-size: clamp(40px, 4.4vw, 58px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.04;
}

.text-citation-page .text-tool-shell {
  width: min(1120px, calc(100% - 48px));
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 0 78px;
  background: transparent;
}

.text-citation-page .text-upload-panel {
  width: 100%;
  margin: 0;
}

.text-citation-page .text-dropzone {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 190px;
  grid-template-rows: minmax(190px, auto) auto;
  align-items: center;
  gap: 18px 24px;
  min-height: 338px;
  padding: 36px 44px 28px;
  overflow: hidden;
  border: 4px solid var(--text-red);
  border-radius: 14px;
  background: var(--text-red);
  box-shadow: 0 24px 48px rgba(116, 38, 38, .18);
}

.text-citation-page .text-dropzone::before {
  position: absolute;
  inset: 14px;
  border: 2px dashed rgba(255, 255, 255, .9);
  border-radius: 9px;
  content: "";
  pointer-events: none;
}

.text-citation-page .text-dropzone.is-dragging {
  background: #e92f2a;
  transform: translateY(-2px);
}

.text-citation-page .text-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.text-citation-page .text-file-mark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 78px;
  height: 94px;
  margin-left: 8px;
  border: 4px solid #fff;
  border-radius: 7px;
  color: #fff;
}

.text-citation-page .text-file-mark::after {
  position: absolute;
  right: -4px;
  top: -4px;
  width: 24px;
  height: 24px;
  border-left: 4px solid #fff;
  border-bottom: 4px solid #fff;
  background: var(--text-red);
  content: "";
}

.text-citation-page .text-file-mark span {
  font-size: 18px;
  font-weight: 900;
}

.text-citation-page .text-paste-field {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  gap: 9px;
  color: #fff;
  font-size: 15px;
  font-weight: 850;
}

.text-citation-page .text-paste-field textarea {
  width: 100%;
  min-height: 182px;
  resize: vertical;
  border: 0;
  border-radius: 8px;
  outline: 0;
  background: #fff;
  padding: 18px 20px;
  color: var(--text-ink);
  box-shadow: 0 12px 26px rgba(69, 20, 20, .18);
  font: 500 14px/1.55 Inter, sans-serif;
}

.text-citation-page .text-paste-field textarea:focus {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .38), 0 12px 26px rgba(69, 20, 20, .18);
}

.text-citation-page .text-dropzone-actions {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.text-citation-page .text-dropzone .upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin: 0;
  border: 2px solid #fff;
  border-radius: 7px;
  background: #fff;
  color: var(--text-ink);
  font-size: 14px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .015em;
}

.text-citation-page .text-dropzone .text-extract-button {
  border-color: #172033;
  background: #172033;
  color: #fff;
}

.text-citation-page .text-dropzone .upload-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(34, 25, 25, .17);
}

.text-citation-page .text-drop-hint {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  margin: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 750;
  text-align: center;
}

.text-citation-page .text-upload-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: min(760px, 86%);
  margin: 24px auto 20px;
}

.text-citation-page .text-upload-highlights span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--text-ink);
  font-size: 14px;
  font-weight: 850;
}

.text-citation-page .text-upload-highlights b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #09bd72;
  color: #fff;
}

.text-citation-page .text-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 15px 18px;
  border: 1px solid #c9d8e9;
  border-radius: 8px;
  background: #f5f9ff;
  box-shadow: 0 12px 26px rgba(58, 78, 105, .08);
}

.text-citation-page .text-status-row .upload-status-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.text-citation-page .text-status-row .upload-status-copy strong {
  color: var(--text-ink);
  font-size: 13px;
  font-weight: 850;
}

.text-citation-page .text-status-row .upload-status-copy p,
.text-citation-page .text-status-row .upload-status-copy span {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
}

.text-citation-page .text-input-metrics {
  display: flex;
  gap: 6px;
}

.text-citation-page .text-input-metrics span {
  display: grid;
  min-width: 54px;
  padding: 7px 9px;
  border: 1px solid #d5e0ed;
  border-radius: 6px;
  background: #fff;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.text-citation-page .text-input-metrics strong {
  color: var(--text-ink);
  font-size: 16px;
}

.text-citation-page .text-status-actions {
  display: flex;
  gap: 6px;
}

.text-citation-page .text-status-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #b8c8da;
  border-radius: 6px;
  background: #fff;
  color: var(--text-ink);
  font-size: 11px;
  font-weight: 800;
}

.text-citation-page .text-extraction-options {
  width: min(760px, 100%);
  margin: 12px auto 0;
  border: 1px solid #d3dfed;
  border-radius: 7px;
  background: rgba(255,255,255,.88);
}

.text-citation-page .text-extraction-options summary {
  min-height: 44px;
  padding: 0 14px;
}

.text-citation-page .text-pipeline,
.text-citation-page .engine-status-mirror {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
}

#results-panel[hidden] {
  display: none !important;
}

body.workspace-mode {
  overflow: hidden !important;
  background: #eef3f9 !important;
}

body.workspace-mode > .site-header,
body.workspace-mode > main > :not(.text-tool-shell),
body.workspace-mode .text-tool-shell > :not(#results-panel),
body.workspace-mode > .site-footer {
  display: none !important;
}

body.workspace-mode main,
body.workspace-mode .text-tool-shell {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.workspace-mode #results-panel {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000 !important;
  display: grid !important;
  grid-template-rows: 70px minmax(0, 1fr) !important;
  width: 100vw !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #edf3f9 !important;
}

body.workspace-mode .workspace-header {
  grid-row: 1;
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 360px) auto !important;
  align-items: center !important;
  gap: 14px !important;
  min-height: 70px !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid #263247 !important;
  background: #172033 !important;
  color: #fff !important;
}

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

body.workspace-mode .exit-workspace-button {
  min-height: 34px !important;
  padding: 0 11px !important;
  border: 1px solid #526078 !important;
  border-radius: 6px !important;
  background: #242e42 !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

body.workspace-mode .workspace-document-copy {
  display: grid !important;
  min-width: 0 !important;
  gap: 1px !important;
}

body.workspace-mode .workspace-document-copy span,
body.workspace-mode .workspace-document-copy small {
  overflow: hidden;
  color: #aebbd0 !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.workspace-mode .workspace-document-copy strong {
  overflow: hidden;
  color: #fff !important;
  font-size: 13px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.workspace-mode .workspace-document #workspace-file-name {
  color: #fff !important;
}

body.workspace-mode .workspace-header > .scorecard-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(54px, 1fr)) !important;
  gap: 5px !important;
  margin: 0 !important;
}

body.workspace-mode .workspace-header .score-card {
  display: grid !important;
  min-width: 0 !important;
  min-height: 42px !important;
  place-content: center !important;
  padding: 4px !important;
  border: 1px solid #3e4b62 !important;
  border-radius: 6px !important;
  background: #232d40 !important;
  text-align: center !important;
}

body.workspace-mode .workspace-header .score-card strong {
  color: #fff !important;
  font-size: 13px !important;
}

body.workspace-mode .workspace-header .score-card span {
  color: #aebbd0 !important;
  font-size: 8px !important;
  text-transform: uppercase;
}

body.workspace-mode .workspace-summary-button {
  display: grid !important;
  min-width: 128px !important;
  height: 42px !important;
  padding: 5px 10px !important;
  border: 1px solid #3e4b62 !important;
  border-radius: 6px !important;
  background: #232d40 !important;
  color: #fff !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
  text-align: left !important;
}

body.workspace-mode .workspace-summary-button strong {
  color: #fff !important;
  font-size: 10px !important;
}

body.workspace-mode .workspace-actions .button {
  min-height: 34px !important;
  height: 34px !important;
  border-color: #56647b !important;
  background: #242e42 !important;
  color: #fff !important;
}

body.workspace-mode .workspace-actions .button.primary {
  border-color: var(--text-red) !important;
  background: var(--text-red) !important;
}

body.workspace-mode .mobile-workspace-tabs {
  display: none !important;
}

body.workspace-mode .workspace-grid {
  grid-row: 2;
  display: grid !important;
  grid-template-columns: minmax(300px, 31%) minmax(330px, 34%) minmax(390px, 1fr) !important;
  min-height: 0 !important;
  height: 100% !important;
  gap: 0 !important;
  padding: 10px !important;
  overflow: hidden !important;
}

body.workspace-mode .workspace-pane {
  display: flex !important;
  min-width: 0 !important;
  min-height: 0 !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border: 1px solid var(--text-line) !important;
  border-radius: 0 !important;
  background: #fff !important;
}

body.workspace-mode .workspace-pane + .workspace-pane {
  border-left: 0 !important;
}

body.workspace-mode .workspace-pane:first-child {
  border-radius: 7px 0 0 7px !important;
}

body.workspace-mode .workspace-pane:last-child {
  border-radius: 0 7px 7px 0 !important;
}

body.workspace-mode .pane-header {
  display: flex !important;
  min-height: 64px !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 10px 13px !important;
  border-bottom: 1px solid #d7e1ed !important;
  background: #fff !important;
}

body.workspace-mode .pane-kicker,
body.workspace-mode .detail-kicker {
  margin: 0 0 2px !important;
  color: #64748b !important;
  font-size: 9px !important;
  font-weight: 850 !important;
  letter-spacing: .045em !important;
  text-transform: uppercase !important;
}

body.workspace-mode .pane-header h2 {
  margin: 0 !important;
  color: var(--text-ink) !important;
  font-family: Manrope, Inter, sans-serif !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

body.workspace-mode .source-text-pane {
  box-shadow: inset 0 4px var(--text-blue) !important;
}

body.workspace-mode .reference-list-pane {
  box-shadow: inset 0 4px var(--text-green) !important;
}

body.workspace-mode .reference-detail {
  box-shadow: inset 0 4px #d28a08 !important;
}

body.workspace-mode .source-text-tools {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid #dce5ef;
  background: #f7faff;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 750;
}

body.workspace-mode .tool-button,
body.workspace-mode .icon-button {
  border: 1px solid #bdcada !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #334155 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

body.workspace-mode .source-text-viewer {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #eef3f8;
  padding: 16px;
}

body.workspace-mode #workspace-source-text {
  min-height: 100%;
  margin: 0;
  border: 1px solid #c9d5e3;
  border-radius: 4px;
  background: #fff;
  padding: 20px;
  color: #2b3749;
  box-shadow: 0 8px 22px rgba(44, 62, 86, .1);
  font: 500 12px/1.7 Inter, sans-serif;
  white-space: pre-wrap;
}

body.workspace-mode #workspace-source-text mark {
  border-radius: 3px;
  background: #fff0a8;
  box-shadow: 0 0 0 2px #ffd84e;
  color: #172033;
}

body.workspace-mode .workspace-source-note {
  min-height: 38px;
  margin: 0 !important;
  padding: 10px 12px !important;
  border-top: 1px solid #dce5ef;
  background: #f8fbff;
  color: var(--text-muted) !important;
  font-size: 10px !important;
}

body.workspace-mode .reference-list-actions {
  display: flex !important;
  gap: 6px !important;
}

body.workspace-mode .review-menu {
  position: relative;
}

body.workspace-mode .review-menu summary {
  min-height: 32px !important;
  border: 1px solid #bdcada !important;
  border-radius: 6px !important;
  background: #fff !important;
  padding: 0 9px !important;
  color: #334155 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

body.workspace-mode .review-menu-list {
  position: absolute !important;
  right: 0 !important;
  top: calc(100% + 6px) !important;
  z-index: 30 !important;
  display: grid !important;
  min-width: 210px !important;
  padding: 6px !important;
  border: 1px solid #bdcada !important;
  border-radius: 7px !important;
  background: #fff !important;
  box-shadow: 0 16px 34px rgba(31, 46, 68, .18) !important;
}

body.workspace-mode .review-menu:not([open]) .review-menu-list {
  display: none !important;
}

body.workspace-mode .review-menu-list button {
  display: flex !important;
  width: 100% !important;
  min-height: 34px !important;
  align-items: center !important;
  justify-content: space-between !important;
  border: 0 !important;
  border-radius: 5px !important;
  background: transparent !important;
  padding: 0 9px !important;
  color: #334155 !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  text-align: left !important;
}

body.workspace-mode .review-menu-list button:hover,
body.workspace-mode .review-menu-list button.is-active {
  background: #eef6ff !important;
  color: #0f5fbf !important;
}

body.workspace-mode .reference-list {
  flex: 1 !important;
  min-height: 0 !important;
  overflow: auto !important;
  padding: 10px !important;
  background: #f5f8fc !important;
}

body.workspace-mode .reference-row {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr) auto !important;
  gap: 9px !important;
  margin: 0 0 8px !important;
  padding: 12px !important;
  border: 1px solid #cbd7e5 !important;
  border-left: 4px solid #8a9bb0 !important;
  border-radius: 7px !important;
  background: #fff !important;
  box-shadow: 0 3px 9px rgba(59, 76, 99, .06) !important;
}

body.workspace-mode .reference-row.is-selected {
  border-color: #75aeea !important;
  border-left-color: var(--text-blue) !important;
  background: #f2f8ff !important;
  box-shadow: 0 0 0 2px rgba(20, 115, 230, .12) !important;
}

body.workspace-mode .reference-row > div > strong {
  display: block !important;
  color: var(--text-ink) !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.workspace-mode .reference-row p {
  margin: 5px 0 0 !important;
  color: var(--text-muted) !important;
  font-size: 10px !important;
  line-height: 1.4 !important;
}

body.workspace-mode .reference-row > button {
  align-self: center !important;
  min-height: 30px !important;
  border: 1px solid #b8c7d8 !important;
  border-radius: 6px !important;
  background: #fff !important;
  padding: 0 9px !important;
  color: #263449 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

body.workspace-mode .reference-row-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  margin-top: 8px !important;
}

body.workspace-mode .reference-row-meta span {
  border-radius: 999px !important;
  background: #edf2f7 !important;
  padding: 3px 6px !important;
  color: #556478 !important;
  font-size: 8px !important;
  font-weight: 750 !important;
}

body.workspace-mode .status-pill[data-status="ready"] {
  background: #dff7ec !important;
  color: #06744d !important;
}

body.workspace-mode .reference-detail {
  overflow: auto !important;
  padding: 14px !important;
}

body.workspace-mode .reference-detail h3 {
  margin: 3px 0 12px !important;
  color: var(--text-ink) !important;
  font-family: Manrope, Inter, sans-serif !important;
  font-size: 18px !important;
}

body.workspace-mode .reference-detail label {
  display: grid !important;
  gap: 4px !important;
  color: #526176 !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
}

body.workspace-mode .reference-detail input,
body.workspace-mode .reference-detail textarea {
  width: 100% !important;
  min-height: 34px !important;
  border: 1px solid #bdcada !important;
  border-radius: 6px !important;
  background: #fff !important;
  padding: 7px 9px !important;
  color: var(--text-ink) !important;
  font: 500 11px/1.35 Inter, sans-serif !important;
  text-transform: none !important;
}

body.workspace-mode .reference-detail textarea {
  min-height: 80px !important;
}

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

body.workspace-mode .detail-actions {
  position: sticky !important;
  bottom: -14px !important;
  z-index: 4 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 14px -14px -14px !important;
  padding: 10px 14px !important;
  border-top: 1px solid #d7e1ed !important;
  background: rgba(255,255,255,.96) !important;
}

body.workspace-mode .detail-actions button {
  min-height: 34px !important;
  border: 1px solid #b8c7d8 !important;
  border-radius: 6px !important;
  background: #fff !important;
  padding: 0 10px !important;
  color: #263449 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

body.workspace-mode .detail-actions button:first-child {
  border-color: var(--text-red) !important;
  background: var(--text-red) !important;
  color: #fff !important;
}

body.workspace-mode .workspace-utilities {
  position: fixed !important;
  inset: 70px 0 0 !important;
  z-index: 1100 !important;
  pointer-events: none !important;
}

body.workspace-mode .utility-drawer {
  position: absolute !important;
  inset: 0 0 0 auto !important;
  width: min(560px, 92vw) !important;
  border: 0 !important;
  background: transparent !important;
  pointer-events: none !important;
}

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

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

body.workspace-mode .utility-content {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  height: 100% !important;
  border-left: 1px solid #b8c7d8 !important;
  background: #fff !important;
  box-shadow: -22px 0 54px rgba(32, 46, 65, .22) !important;
  transform: translateX(100%) !important;
  transition: transform 180ms ease !important;
}

body.workspace-mode .utility-drawer[open] .utility-content {
  transform: translateX(0) !important;
}

body.workspace-mode .utility-panel-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 18px !important;
  padding: 20px !important;
  border-bottom: 1px solid #d7e1ed !important;
  background: #f8fbff !important;
}

body.workspace-mode .utility-panel-head span {
  color: #cf322d !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  text-transform: uppercase !important;
}

body.workspace-mode .utility-panel-head h2 {
  margin: 3px 0 !important;
  color: var(--text-ink) !important;
  font-family: Manrope, Inter, sans-serif !important;
  font-size: 22px !important;
}

body.workspace-mode .utility-panel-head p {
  margin: 0 !important;
  color: var(--text-muted) !important;
  font-size: 11px !important;
}

body.workspace-mode .utility-scroll-body {
  min-height: 0 !important;
  overflow: auto !important;
  padding: 18px !important;
}

body.workspace-mode .quality-score {
  display: grid !important;
  width: 96px !important;
  height: 96px !important;
  margin: 0 auto 18px !important;
  place-items: center !important;
  border: 10px solid #bfeeda !important;
  border-radius: 50% !important;
  color: #078457 !important;
  font-size: 30px !important;
  font-weight: 900 !important;
}

body.workspace-mode .report-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

body.workspace-mode .report-grid article,
body.workspace-mode .export-preview {
  border: 1px solid #cad7e5 !important;
  border-radius: 7px !important;
  background: #fff !important;
  padding: 13px !important;
}

body.workspace-mode .output-menu {
  border: 1px solid #cad7e5 !important;
  border-radius: 7px !important;
  background: #f8fbff !important;
  padding: 8px !important;
}

body.workspace-mode .output-menu-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px !important;
  margin-top: 8px !important;
}

body.workspace-mode .output-menu-list button {
  min-height: 38px !important;
  border: 1px solid #b8c7d8 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #263449 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

body.workspace-mode .workspace-grid.is-source-collapsed {
  grid-template-columns: 58px minmax(360px, 38%) minmax(0, 1fr) !important;
}

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

body.workspace-mode .workspace-grid.is-source-collapsed [data-pane="source"],
body.workspace-mode .workspace-grid.is-detail-collapsed [data-pane="detail"] {
  overflow: hidden !important;
  cursor: pointer !important;
}

body.workspace-mode .workspace-grid.is-source-collapsed [data-pane="source"] > *,
body.workspace-mode .workspace-grid.is-detail-collapsed [data-pane="detail"] > * {
  opacity: 0 !important;
  pointer-events: none !important;
}

body.workspace-mode .workspace-restore-button {
  position: fixed !important;
  top: 50% !important;
  z-index: 1050 !important;
  min-height: 88px !important;
  border: 1px solid #9db5d1 !important;
  background: #fff !important;
  color: #24425f !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  writing-mode: vertical-rl !important;
}

body.workspace-mode .source-restore { left: 12px !important; }
body.workspace-mode .detail-restore { right: 12px !important; }

body.text-legacy-mode.workspace-mode,
body.text-legacy-mode.text-workspace-mode {
  overflow: auto !important;
}

body.text-legacy-mode #results-panel {
  position: static !important;
}

@media (max-width: 1080px) {
  .text-citation-page .text-dropzone {
    grid-template-columns: 72px minmax(0, 1fr) 160px;
    padding-inline: 30px;
  }

  body.workspace-mode .workspace-header {
    grid-template-columns: minmax(220px, 1fr) auto !important;
  }

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

@media (max-width: 900px) {
  .text-citation-page .text-dropzone {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: 34px 30px;
  }

  .text-citation-page .text-file-mark {
    display: none;
  }

  .text-citation-page .text-dropzone-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .text-citation-page .text-drop-hint {
    grid-column: 1;
  }

  body.workspace-mode #results-panel {
    grid-template-rows: 94px 42px minmax(0, 1fr) !important;
  }

  body.workspace-mode .workspace-header {
    grid-row: 1 !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 36px 36px !important;
    gap: 6px !important;
    width: 100% !important;
    min-height: 94px !important;
    height: 94px !important;
    padding: 8px 10px !important;
  }

  body.workspace-mode .workspace-document {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    gap: 9px !important;
    min-height: 36px !important;
    height: 36px !important;
  }

  body.workspace-mode .workspace-document-copy {
    display: grid !important;
    align-content: center !important;
  }

  body.workspace-mode .exit-workspace-button {
    width: 38px !important;
    min-width: 38px !important;
    overflow: hidden !important;
    padding: 0 !important;
    font-size: 0 !important;
  }

  body.workspace-mode .exit-workspace-button::after {
    content: "←";
    font-size: 18px;
  }

  body.workspace-mode .workspace-document-copy span,
  body.workspace-mode .workspace-document-copy small {
    display: none !important;
  }

  body.workspace-mode .workspace-document-copy strong {
    max-width: 100% !important;
    font-size: 12px !important;
  }

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

  body.workspace-mode .workspace-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    gap: 6px !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  body.workspace-mode .workspace-actions .button,
  body.workspace-mode .workspace-actions #enrich-button,
  body.workspace-mode .workspace-actions #workspace-quality-button,
  body.workspace-mode .workspace-actions #workspace-export-button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 6px !important;
  }

  body.workspace-mode .mobile-workspace-tabs {
    grid-row: 2 !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    border-bottom: 1px solid #bdcada !important;
    background: #fff !important;
  }

  body.workspace-mode .mobile-workspace-tabs button {
    border: 0 !important;
    border-right: 1px solid #d7e1ed !important;
    background: #fff !important;
    color: #526176 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
  }

  body.workspace-mode .mobile-workspace-tabs button.is-active {
    box-shadow: inset 0 -3px var(--text-blue) !important;
    color: #0f5fbf !important;
  }

  body.workspace-mode .workspace-grid {
    grid-row: 3 !important;
    display: block !important;
    padding: 7px !important;
  }

  body.workspace-mode .workspace-pane {
    display: none !important;
    height: 100% !important;
    border: 1px solid var(--text-line) !important;
    border-radius: 7px !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"] {
    display: flex !important;
  }

  body.workspace-mode .pane-collapse-button,
  body.workspace-mode .workspace-restore-button {
    display: none !important;
  }
}

@media (max-width: 680px) {
  .text-citation-page .site-header {
    padding-inline: 14px;
  }

  .text-citation-page .main-nav {
    display: none;
  }

  .text-citation-page .text-extractor-hero {
    min-height: 106px;
    padding: 28px 16px 14px;
  }

  .text-citation-page .text-extractor-hero h1 {
    font-size: 36px;
  }

  .text-citation-page .text-tool-shell {
    width: calc(100% - 24px);
  }

  .text-citation-page .text-dropzone {
    min-height: 430px;
    padding: 28px 22px;
  }

  .text-citation-page .text-paste-field textarea {
    min-height: 230px;
  }

  .text-citation-page .text-upload-highlights {
    width: 100%;
    gap: 6px;
  }

  .text-citation-page .text-status-row {
    grid-template-columns: 1fr;
  }

  .text-citation-page .text-input-metrics,
  .text-citation-page .text-status-actions {
    width: 100%;
  }

  .text-citation-page .text-input-metrics span,
  .text-citation-page .text-status-actions button {
    flex: 1;
  }

  body.workspace-mode .workspace-actions {
    overflow-x: auto !important;
  }

  body.workspace-mode .detail-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Post-processing workspace: compact visual parity with the PDF reviewer. */
body.workspace-mode #results-panel {
  grid-template-rows: 64px minmax(0, 1fr) !important;
  background: #f4f7fb !important;
}

body.workspace-mode .workspace-header {
  grid-template-columns: minmax(300px, 1fr) auto !important;
  min-height: 64px !important;
  padding: 8px 12px !important;
  border-top: 3px solid transparent !important;
  border-image: linear-gradient(90deg, #1473e6 0 35%, #16a36d 35% 58%, #e2a000 58% 78%, #f53d36 78%) 1 !important;
  border-bottom: 1px solid #c7d4e3 !important;
  background: #fff !important;
  color: #172033 !important;
  box-shadow: 0 2px 8px rgba(31, 48, 70, .06) !important;
}

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

body.workspace-mode .exit-workspace-button {
  border-color: #b8c7d8 !important;
  background: #fff !important;
  color: #263449 !important;
}

body.workspace-mode .workspace-document-copy span,
body.workspace-mode .workspace-document-copy small {
  color: #64748b !important;
}

body.workspace-mode .workspace-document-copy strong,
body.workspace-mode .workspace-document #workspace-file-name {
  color: #172033 !important;
}

body.workspace-mode .workspace-header .score-card {
  min-height: 40px !important;
  border-color: #c7d4e3 !important;
  background: #f8fafc !important;
}

body.workspace-mode .workspace-header .score-card strong {
  color: #172033 !important;
}

body.workspace-mode .workspace-header .score-card span {
  color: #64748b !important;
}

body.workspace-mode .workspace-quality-summary {
  display: grid !important;
  min-width: 92px !important;
  height: 40px !important;
  place-content: center !important;
  border: 1px solid #c7d4e3 !important;
  border-radius: 6px !important;
  background: #f8fafc !important;
  color: #172033 !important;
  text-align: center !important;
}

body.workspace-mode .workspace-quality-summary strong {
  font-size: 12px !important;
  line-height: 1.05 !important;
}

body.workspace-mode .workspace-quality-summary span {
  color: #64748b !important;
  font-size: 8px !important;
  font-weight: 800 !important;
  letter-spacing: .025em !important;
  text-transform: uppercase !important;
}

body.workspace-mode .workspace-actions .button {
  min-height: 34px !important;
  height: 34px !important;
  border-color: #b8c7d8 !important;
  background: #fff !important;
  color: #263449 !important;
}

body.workspace-mode .workspace-actions .button.primary {
  border-color: var(--text-red) !important;
  background: var(--text-red) !important;
  color: #fff !important;
}

body.workspace-mode .workspace-grid {
  grid-template-columns: minmax(320px, 34%) minmax(320px, 31%) minmax(390px, 1fr) !important;
  height: calc(100dvh - 64px) !important;
  max-height: calc(100dvh - 64px) !important;
  padding: 8px !important;
  background: #eef3f9 !important;
}

body.workspace-mode .pane-header {
  flex: 0 0 64px !important;
  width: 100% !important;
  height: 64px !important;
  min-height: 64px !important;
  overflow: visible !important;
  padding: 12px 14px 10px !important;
}

body.workspace-mode .pane-header > div:first-child {
  min-width: 0 !important;
  align-self: center !important;
}

body.workspace-mode .pane-kicker,
body.workspace-mode .detail-kicker {
  line-height: 1.1 !important;
}

body.workspace-mode .reference-list {
  padding: 0 !important;
  background: #f8fafc !important;
}

body.workspace-mode .reference-row {
  min-height: 82px !important;
  max-height: 124px !important;
  align-items: start !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 10px 11px !important;
  overflow: hidden !important;
  border-width: 0 0 1px 4px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.workspace-mode .reference-row > div {
  min-width: 0 !important;
  overflow: hidden !important;
}

body.workspace-mode .reference-row > div > strong {
  display: -webkit-box !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  white-space: normal !important;
}

body.workspace-mode .reference-row p {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.workspace-mode .reference-row-meta {
  max-height: 24px !important;
  overflow: hidden !important;
  margin-top: 6px !important;
}

body.workspace-mode .reference-row > button {
  display: none !important;
}

body.workspace-mode .detail-sticky-header {
  position: sticky !important;
  top: -14px !important;
  z-index: 5 !important;
  display: flex !important;
  min-height: 70px !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: -14px -14px 12px !important;
  padding: 13px 14px 10px !important;
  border-bottom: 1px solid #d7e1ed !important;
  background: rgba(255,255,255,.98) !important;
}

body.workspace-mode .detail-actions {
  position: static !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin: 0 0 12px !important;
  padding: 0 0 12px !important;
  border-top: 0 !important;
  border-bottom: 1px solid #d7e1ed !important;
  background: #fff !important;
}

body.workspace-mode .reference-detail h3 {
  margin: 3px 0 0 !important;
}

body.workspace-mode .reference-detail textarea {
  max-height: 120px !important;
  resize: vertical !important;
}

@media (max-width: 1180px) and (min-width: 901px) {
  body.workspace-mode .workspace-header {
    grid-template-columns: minmax(250px, 1fr) auto !important;
    gap: 8px !important;
  }

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

  body.workspace-mode .workspace-grid {
    grid-template-columns: minmax(280px, 32%) minmax(300px, 32%) minmax(340px, 1fr) !important;
  }
}

@media (max-width: 900px) {
  body.workspace-mode #results-panel {
    grid-template-rows: 88px 46px minmax(0, 1fr) !important;
  }

  body.workspace-mode .workspace-header {
    min-height: 88px !important;
  }

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

  body.workspace-mode .workspace-grid {
    height: calc(100dvh - 134px) !important;
    max-height: calc(100dvh - 134px) !important;
  }
}

/* Keep large extraction workspaces locked to the viewport. */
html:has(body.workspace-mode) {
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden !important;
}

body.workspace-mode {
  width: 100% !important;
  height: 100% !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}

body.workspace-mode main,
body.workspace-mode .text-tool-shell,
body.workspace-mode #results-panel {
  min-height: 0 !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}

body.workspace-mode #results-panel {
  contain: layout paint size !important;
}

body.workspace-mode .workspace-grid {
  min-height: 0 !important;
  height: calc(100dvh - 70px) !important;
  max-height: calc(100dvh - 70px) !important;
  overflow: hidden !important;
  contain: layout paint !important;
}

body.workspace-mode .workspace-pane,
body.workspace-mode .source-text-pane,
body.workspace-mode .reference-list-pane,
body.workspace-mode .reference-detail {
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
}

body.workspace-mode .source-text-viewer,
body.workspace-mode .reference-list,
body.workspace-mode .reference-detail {
  min-height: 0 !important;
  max-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body.workspace-mode .reference-list {
  flex: 1 1 0 !important;
  height: 0 !important;
}

@media (max-width: 900px) {
  body.workspace-mode .workspace-grid {
    height: calc(100dvh - 136px) !important;
    max-height: calc(100dvh - 136px) !important;
  }

  body.workspace-mode .workspace-grid[data-mobile-panel="references"] .reference-list-pane,
  body.workspace-mode .workspace-grid[data-mobile-panel="source"] .source-text-pane,
  body.workspace-mode .workspace-grid[data-mobile-panel="detail"] .reference-detail {
    height: 100% !important;
    max-height: 100% !important;
  }

  body.workspace-mode .reference-row {
    min-height: 96px !important;
    align-items: start !important;
    padding: 11px !important;
  }

  body.workspace-mode .reference-row > div {
    min-width: 0 !important;
  }

  body.workspace-mode .reference-row > div > strong {
    display: -webkit-box !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    white-space: normal !important;
  }

  body.workspace-mode .reference-row p {
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.workspace-mode .reference-row-meta {
    display: flex !important;
  }
}

/* Pre-processing page parity with the PDF extractor. */
.text-citation-page:not(.workspace-mode) main {
  position: relative;
  z-index: 0;
  width: min(1420px, 100%);
  max-width: 1420px;
  margin: 0 auto;
  padding: 0 16px 24px;
  background: transparent;
}

.text-citation-page:not(.workspace-mode) main::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-bottom: 1px solid #e7e9ed;
  background:
    linear-gradient(rgba(58, 63, 73, .032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 63, 73, .032) 1px, transparent 1px),
    radial-gradient(ellipse at 16% 18%, rgba(20, 115, 230, .14), transparent 48%),
    radial-gradient(ellipse at 86% 82%, rgba(239, 63, 52, .22), transparent 54%),
    linear-gradient(180deg, #fbfdff 0%, #f7f8fb 58%, #f4f7ff 100%);
  background-size: 44px 44px, 44px 44px, auto, auto, auto;
  content: "";
}

.text-citation-page:not(.workspace-mode) .text-extractor-hero {
  min-height: 104px;
  padding: 12px 16px 0;
}

.text-citation-page:not(.workspace-mode) .text-tool-shell {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  padding-bottom: 0;
}

.text-citation-page:not(.workspace-mode) .text-workflow-section,
.text-citation-page:not(.workspace-mode) .extractor-section {
  width: min(1260px, calc(100% - 64px));
  margin: 58px auto 0;
  scroll-margin-top: 82px;
}

.text-citation-page:not(.workspace-mode) .text-seo-card {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.text-citation-page:not(.workspace-mode) .section-heading {
  max-width: 900px;
  margin: 0 auto 24px;
  text-align: center;
}

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

.text-citation-page:not(.workspace-mode) .workflow-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.text-citation-page:not(.workspace-mode) .workflow-card-grid article {
  display: grid;
  min-height: 184px;
  align-content: start;
  gap: 12px;
  overflow: hidden;
  border: 1px solid #c9d6e5;
  border-top: 4px solid var(--step-color, #ef3f34);
  border-radius: 8px;
  background: rgba(255,255,255,.95);
  padding: 22px;
}

.text-citation-page:not(.workspace-mode) .workflow-card-grid article::before {
  content: none;
}

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

.text-citation-page:not(.workspace-mode) .workflow-card-grid h3 {
  margin: 0;
  color: #121a2d;
  font-size: 19.5px;
  font-weight: 700;
  line-height: 1.25;
}

.text-citation-page:not(.workspace-mode) .workflow-card-grid p {
  margin: 0;
  color: #5f7188;
  font-size: 12px;
  line-height: 1.55;
}

.text-citation-page:not(.workspace-mode) .step-red { --step-color:#f43b33; --step-soft:#fff0ee; }
.text-citation-page:not(.workspace-mode) .step-gold { --step-color:#eda900; --step-soft:#fff6d9; }
.text-citation-page:not(.workspace-mode) .step-blue { --step-color:#1575e6; --step-soft:#eaf3ff; }
.text-citation-page:not(.workspace-mode) .step-green { --step-color:#0b9668; --step-soft:#e8f8f0; }
.text-citation-page:not(.workspace-mode) .step-purple { --step-color:#7b55e7; --step-soft:#f1ebff; }

.text-citation-page:not(.workspace-mode) .feature-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.text-citation-page:not(.workspace-mode) .feature-card-grid article {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid #c9d6e5;
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  padding: 20px;
}

.text-citation-page:not(.workspace-mode) .feature-card-grid strong {
  color: #cc302b;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.text-citation-page:not(.workspace-mode) .feature-card-grid p {
  margin: 0;
  color: #121a2d;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.text-citation-page:not(.workspace-mode) .text-faq-section {
  margin-bottom: 0;
}

.text-citation-page:not(.workspace-mode) .text-faq-section .faq-list {
  width: min(760px, 100%);
  max-width: 760px;
  margin: 0 auto;
}

.text-citation-page:not(.workspace-mode) .text-guides-section {
  margin-bottom: 96px;
}

.text-citation-page:not(.workspace-mode) .text-guides-section .section-heading {
  margin-bottom: 18px;
}

.text-citation-page:not(.workspace-mode) .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,.94);
  box-shadow: 0 10px 26px rgba(40,67,95,.06);
}

.text-citation-page:not(.workspace-mode) .guide-row {
  display: grid;
  grid-template-columns: minmax(180px,.75fr) minmax(0,1fr) auto;
  min-height: 62px;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid #d9e3ef;
  padding: 0 22px;
  color: #121a2d;
}

.text-citation-page:not(.workspace-mode) .guide-row:last-child {
  border-bottom: 0;
}

.text-citation-page:not(.workspace-mode) .guide-row strong {
  font-size: 15px;
  font-weight: 850;
}

.text-citation-page:not(.workspace-mode) .guide-row span {
  color: #5d6e84;
  font-size: 14px;
  line-height: 1.4;
}

.text-citation-page:not(.workspace-mode) .guide-row em {
  color: #1473e6;
  font-style: normal;
  font-weight: 850;
}

.text-citation-page:not(.workspace-mode) .text-extraction-options {
  overflow: hidden;
  border-color: #c8d8eb;
  background: rgba(255,255,255,.96);
}

.text-citation-page:not(.workspace-mode) .text-extraction-options > summary {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto 22px;
  min-height: 48px;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  list-style: none;
  border-bottom: 0;
}

.text-citation-page:not(.workspace-mode) .text-extraction-options[open] > summary {
  border-bottom: 1px solid #d9e3ef;
}

.text-citation-page:not(.workspace-mode) .text-extraction-options > summary::-webkit-details-marker {
  display: none;
}

.text-citation-page:not(.workspace-mode) .text-extraction-options > summary::after {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #d5322c;
  content: "+";
  font-size: 20px;
  font-weight: 700;
}

.text-citation-page:not(.workspace-mode) .text-extraction-options[open] > summary::after {
  content: "-";
}

.text-citation-page:not(.workspace-mode) .text-extraction-options > summary span {
  color: #172033;
  font-size: 13px;
  font-weight: 850;
}

.text-citation-page:not(.workspace-mode) .text-extraction-options > summary small {
  overflow: hidden;
  color: #65758a;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-citation-page:not(.workspace-mode) .text-extraction-options .option-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
  padding: 16px;
}

.text-citation-page:not(.workspace-mode) .text-extraction-options .option-row > label:not(.inline-check) {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #172033;
  font-size: 11px;
  font-weight: 800;
}

.text-citation-page:not(.workspace-mode) .text-extraction-options select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #b9c9dc;
  border-radius: 6px;
  background: #fff;
  padding: 0 12px;
  color: #172033;
  font-size: 13px;
  font-weight: 700;
}

.text-citation-page:not(.workspace-mode) .text-extraction-options .inline-check {
  display: flex;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  border: 1px solid #cbd8e8;
  border-radius: 6px;
  background: #f7faff;
  padding: 0 14px;
  color: #172033;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: none;
}

.text-citation-page:not(.workspace-mode) .text-extraction-options .inline-check input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 0;
}

.text-citation-page.home-page:not(.workspace-mode) .site-footer {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0;
  border-top: 4px solid #ef3f34;
  background: #171c26;
}

@media (max-width: 980px) {
  .text-citation-page:not(.workspace-mode) .workflow-card-grid,
  .text-citation-page:not(.workspace-mode) .feature-card-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .text-citation-page:not(.workspace-mode) .guide-row {
    grid-template-columns: 1fr auto;
  }

  .text-citation-page:not(.workspace-mode) .guide-row span {
    display: none;
  }
}

@media (max-width: 680px) {
  .text-citation-page:not(.workspace-mode) main {
    padding-inline: 8px;
  }

  .text-citation-page:not(.workspace-mode) .text-tool-shell,
  .text-citation-page:not(.workspace-mode) .text-workflow-section,
  .text-citation-page:not(.workspace-mode) .extractor-section {
    width: min(100%, calc(100% - 16px));
  }

  .text-citation-page:not(.workspace-mode) .workflow-card-grid,
  .text-citation-page:not(.workspace-mode) .feature-card-grid,
  .text-citation-page:not(.workspace-mode) .text-extraction-options .option-row {
    grid-template-columns: 1fr;
  }

  .text-citation-page:not(.workspace-mode) .text-extraction-options > summary {
    grid-template-columns: minmax(0,1fr) 22px;
  }

  .text-citation-page:not(.workspace-mode) .text-extraction-options > summary small {
    display: none;
  }
}
