body {
  background: #edf3fb;
  color: #172033;
}

.site-header {
  min-height: 64px;
  border-bottom: 1px solid #d6e0ec;
  background: #ffffff;
  box-shadow: none;
}

.brand-mark {
  border-radius: 8px;
}

.main-nav a,
.login-link,
.header-actions > a {
  color: #4e5561;
}

.signup-button,
.header-actions > a:last-child {
  border: 1px solid #bdc8d5;
  border-radius: 6px;
  background: #ffffff;
  color: #172033;
  box-shadow: none;
}

.back-link {
  display: none;
}

.text-hero {
  max-width: 1180px;
  padding: 72px 24px 34px;
}

.text-citation-page .text-hero-minimal {
  display: grid;
  place-items: center;
  width: min(1420px, 100%);
  max-width: 1420px;
  min-height: 124px;
  margin: 0 auto;
  padding: 18px 24px 6px;
}

.text-citation-page .text-hero-minimal .text-hero-card {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.text-citation-page .text-hero-minimal .text-hero-copy {
  text-align: center;
}

.text-citation-page .text-hero-minimal .text-hero-copy h1 {
  max-width: none;
  margin: 0 auto;
  color: #172033;
  font-size: clamp(38px, 4.2vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.text-hero-card {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.text-hero-copy h1 {
  max-width: 780px;
  color: #172033;
  font-size: 54px;
  font-weight: 700;
  line-height: 1.06;
}

.text-hero-copy p:not(.eyebrow) {
  max-width: 700px;
  color: #4e6174;
  font-size: 17px;
  line-height: 1.62;
}

.eyebrow {
  color: #c8312b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.primary-action,
.secondary-action,
.export-toolbar button,
.bulk-review-toolbar button,
.list-filters button,
.reference-row button,
.match-card button {
  border-radius: 6px;
  font-weight: 800;
}

.primary-action {
  border: 1px solid #ef3f34;
  background: #ef3f34;
  color: #ffffff;
  box-shadow: none;
}

.secondary-action {
  border: 1px solid #bdc8d5;
  background: #ffffff;
  color: #172033;
}

.hero-keyword-row span,
.upload-format-row span,
.citation-query-strip span,
.tag-list span,
.status-pill {
  border-radius: 6px;
}

.hero-keyword-row span {
  border-color: #bdc8d5;
  color: #354457;
}

.text-hero-visual {
  grid-template-columns: 1fr;
  min-height: auto;
  border: 1px solid #b9c9dc;
  border-top: 4px solid #ef3f34;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
  padding: 18px;
}

.workspace-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #526274;
  font-size: 12px;
  font-weight: 800;
}

.workspace-topline span {
  width: 46px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef3f34 0 24%, #f0b356 24% 48%, #0f8f5f 48% 72%, #1473e6 72%);
}

.workspace-topline em {
  color: #0f8f5f;
  font-style: normal;
}

.scan-stack,
.output-stack {
  min-height: auto;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #f8fbff;
  color: #172033;
  box-shadow: none;
  transform: none;
}

.scan-stack span,
.output-stack span {
  border-radius: 6px;
  background: #fff0ee;
  color: #c8312b;
}

.scan-stack i,
.output-stack i {
  background: #dce6f1;
}

.scan-core {
  width: auto;
  height: 42px;
  border-radius: 8px;
  background: #172033;
  box-shadow: none;
}

.text-tool-shell {
  max-width: 1132px;
  padding: 10px 24px 42px;
}

.paste-panel,
.results-panel,
.text-seo-card,
.text-faq-section {
  border: 1px solid #b9c9dc;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.paste-panel {
  border-top: 4px solid #ef3f34;
  padding: 26px;
}

.text-citation-page .paste-panel {
  gap: 16px;
}

.tool-panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.tool-panel-heading h2 {
  margin: 0;
  color: #172033;
  font-size: 26px;
  line-height: 1.15;
}

.tool-panel-heading > p {
  max-width: 560px;
  margin: 0;
  color: #5f6e83;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
  text-align: right;
}

.upload-zone {
  border: 1px dashed #bdc8d5;
  border-radius: 8px;
  background: #f8fbff;
}

.text-citation-page .upload-zone {
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 0;
  border: 1px solid #cbd8e6;
  background: #f8fbff;
  padding: 14px 16px;
}

.text-citation-page .upload-icon {
  width: 48px;
  height: 48px;
  font-size: 10px;
}

.upload-zone-copy h3 {
  margin: 0;
  color: #172033;
  font-size: 16px;
  line-height: 1.2;
}

.upload-zone-copy p {
  margin: 4px 0 0;
  color: #5f6e83;
  font-size: 12px;
  line-height: 1.4;
}

.text-citation-page .upload-format-row {
  gap: 5px;
  margin-top: 8px;
}

.text-citation-page .upload-format-row span {
  min-height: 22px;
  border-radius: 5px;
  background: #ffffff;
  font-size: 10px;
  padding: 4px 7px;
}

.text-citation-page .upload-zone .secondary-action {
  min-height: 38px;
  padding: 0 14px;
}

.text-citation-page .upload-status {
  margin: -6px 0 0;
  color: #66758a;
  font-size: 12px;
  font-weight: 700;
}

.text-citation-page .paste-grid {
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
}

.text-citation-page .paste-input-label {
  gap: 4px;
  color: #172033;
  font-size: 13px;
}

.text-citation-page .paste-input-label > span {
  font-weight: 850;
}

.text-citation-page .paste-input-label > small {
  color: #6b788b;
  font-size: 11px;
  font-weight: 650;
}

.text-citation-page .paste-input-label textarea {
  min-height: 300px;
  margin-top: 6px;
  padding: 16px;
  color: #172033;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}

.text-citation-page .paste-input-label textarea::placeholder {
  color: #8a95a5;
  font-weight: 500;
}

.text-citation-page .input-brief {
  align-content: start;
  gap: 12px;
  border-top: 4px solid #1473e6;
  padding: 18px;
}

.text-citation-page .input-brief h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.text-citation-page .input-brief > p:not(.eyebrow) {
  margin: 0;
  color: #5f6e83;
  font-size: 13px;
  line-height: 1.5;
}

.text-citation-page .input-meter {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.text-citation-page .input-meter span {
  min-height: 66px;
  padding: 10px;
}

.text-citation-page .input-meter strong {
  font-size: 22px;
}

.extraction-options {
  border: 1px solid #cbd8e6;
  border-radius: 8px;
  background: #ffffff;
}

.extraction-options > summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  list-style: none;
  cursor: pointer;
  color: #172033;
  font-size: 13px;
  font-weight: 850;
  padding: 0 48px 0 16px;
}

.extraction-options > summary::-webkit-details-marker {
  display: none;
}

.extraction-options > summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  color: #1473e6;
  font-size: 20px;
}

.extraction-options[open] > summary::after {
  content: "−";
}

.extraction-options > summary small {
  color: #6b788b;
  font-size: 11px;
  font-weight: 650;
}

.text-citation-page .extraction-options .option-row {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid #e2e9f2;
  padding: 14px 16px 16px;
}

.text-citation-page .extraction-options .inline-check {
  min-height: 42px;
  border: 1px solid #d7e1ed;
  border-radius: 6px;
  background: #f8fbff;
  padding: 0 12px;
  white-space: nowrap;
}

.tool-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.text-citation-page .tool-action-bar .action-row {
  flex: 0 0 auto;
}

.text-citation-page .tool-action-bar .status-line {
  margin: 0;
  color: #66758a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: right;
}

.text-citation-page .pipeline {
  gap: 6px;
}

.text-citation-page .pipeline-step {
  min-height: 34px;
  border-radius: 6px;
  font-size: 10px;
  padding: 8px 6px;
}

.upload-zone h2,
.input-brief h2,
.panel-heading h2,
.text-seo-card h2,
.text-faq-section h2 {
  color: #172033;
}

.upload-icon {
  border-radius: 8px;
  background: #ef3f34;
  box-shadow: none;
}

.paste-input-label textarea,
.reference-detail textarea,
.reference-detail input,
.reference-detail select,
.output-grid textarea,
.option-row select {
  border: 1px solid #bdc8d5;
  border-radius: 6px;
  background: #ffffff;
}

.paste-input-label textarea:focus,
.reference-detail textarea:focus,
.reference-detail input:focus,
.reference-detail select:focus,
.output-grid textarea:focus,
.option-row select:focus {
  border-color: #1473e6;
  box-shadow: 0 0 0 4px rgba(20, 115, 230, 0.12);
  outline: none;
}

.input-brief,
.input-meter span,
.pipeline-step,
.report-details,
.export-preview,
.report-grid article,
.reference-list-wrap,
.reference-detail,
.seo-deep-grid article,
.seo-feature-grid article,
.seo-workflow-band > div,
.faq-list details {
  border-radius: 8px;
}

.input-brief,
.input-meter span,
.pipeline-step,
.report-grid article,
.reference-list-wrap,
.reference-detail,
.seo-deep-grid article,
.seo-feature-grid article,
.seo-workflow-band > div,
.faq-list details {
  border-color: #cbd8e6;
  background: #ffffff;
}

.pipeline {
  gap: 10px;
}

.pipeline-step.is-active {
  border-color: #ef3f34;
  background: #fff0ee;
  color: #c8312b;
}

.results-panel {
  border-top: 4px solid #172033;
}

.text-citation-page .results-panel {
  gap: 18px;
  padding: 26px;
}

.text-citation-page .panel-heading h2 {
  margin-top: 3px;
  font-size: 26px;
}

.text-citation-page .panel-actions {
  display: flex;
  gap: 8px;
}

.text-citation-page .panel-actions .secondary-action {
  min-height: 40px;
  padding: 0 14px;
}

.score-card {
  border-radius: 8px;
  border-color: #cbd8e6;
  background: #f8fbff;
}

.quality-block {
  border-radius: 8px;
}

.text-citation-page .quality-block {
  min-height: 138px;
  padding: 20px;
}

.text-citation-page .quality-block h3 {
  margin: 3px 0 0;
  font-size: 22px;
}

.text-citation-page .quality-block p:not(.eyebrow) {
  margin: 6px 0 0;
  font-size: 13px;
}

.text-citation-page .quality-gauge {
  width: 92px;
  height: 92px;
}

.text-citation-page .report-details > summary,
.text-citation-page .export-preview > summary {
  min-height: 48px;
  padding: 14px 16px;
  font-size: 14px;
}

.results-command-bar {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e2e9f2;
  border-bottom: 1px solid #e2e9f2;
  padding: 12px 0;
}

.text-citation-page .export-toolbar {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.output-menu,
.bulk-review-menu {
  position: relative;
}

.output-menu > summary,
.bulk-review-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid #bdc8d5;
  border-radius: 6px;
  background: #ffffff;
  color: #172033;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  list-style: none;
  padding: 0 34px 0 14px;
}

.output-menu > summary::after,
.bulk-review-menu > summary::after {
  content: "⌄";
  position: absolute;
  right: 13px;
  top: 8px;
  color: #1473e6;
  font-size: 15px;
}

.output-menu > summary::-webkit-details-marker,
.bulk-review-menu > summary::-webkit-details-marker {
  display: none;
}

.output-menu:first-child > summary {
  border-color: #232733;
  background: #232733;
  color: #ffffff;
}

.output-menu-list,
.bulk-review-toolbar {
  position: absolute;
  top: calc(100% + 7px);
  z-index: 20;
  display: grid;
  min-width: 210px;
  overflow: hidden;
  border: 1px solid #cbd8e6;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(23, 32, 51, 0.16);
  padding: 6px;
}

.output-menu-list {
  left: 0;
}

.bulk-review-toolbar {
  right: 0;
  width: 230px;
  margin: 0;
}

.text-citation-page .output-menu-list button,
.text-citation-page .bulk-review-toolbar button,
.text-citation-page .export-toolbar button:first-child {
  display: block;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #172033;
  font-size: 12px;
  font-weight: 750;
  text-align: left;
  padding: 8px 10px;
}

.text-citation-page .output-menu-list button:hover,
.text-citation-page .bulk-review-toolbar button:hover {
  background: #eef5ff;
  color: #1267ce;
}

.text-citation-page .reference-workbench {
  gap: 14px;
}

.text-citation-page .reference-list-wrap,
.text-citation-page .reference-detail {
  padding: 18px;
}

.text-citation-page .reference-list-header {
  gap: 12px;
}

.text-citation-page .list-filters {
  gap: 6px;
}

.text-citation-page .list-filters button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 11px;
}

.quality-gauge {
  border-width: 8px;
}

.export-toolbar button,
.bulk-review-toolbar button,
.list-filters button {
  border-color: #bdc8d5;
}

.text-seo-section {
  padding-top: 54px;
}

.text-seo-card {
  max-width: 1132px;
  padding: 26px;
}

.text-citation-page .text-workflow-section {
  position: relative;
  width: min(1420px, calc(100% - 32px));
  max-width: 1420px;
  margin: 58px auto 0;
  padding: 0;
  scroll-margin-top: 86px;
}

.text-citation-page .section-anchor {
  position: absolute;
  top: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
  scroll-margin-top: 86px;
}

.text-citation-page .text-workflow-section .text-seo-card {
  width: 100%;
  max-width: none;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.text-citation-page .text-workflow-section .section-heading {
  margin-bottom: 26px;
}

.text-workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.text-workflow-grid article {
  --workflow-color: #ef3f34;
  --workflow-soft: #fff0ee;
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 184px;
  border: 1px solid #cbd9ea;
  border-top: 4px solid var(--workflow-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  padding: 22px;
}

.text-workflow-grid .workflow-gold {
  --workflow-color: #eea600;
  --workflow-soft: #fff5d8;
}

.text-workflow-grid .workflow-blue {
  --workflow-color: #1473e6;
  --workflow-soft: #eaf3ff;
}

.text-workflow-grid .workflow-green {
  --workflow-color: #0f9f6e;
  --workflow-soft: #e5f7f0;
}

.text-workflow-grid .workflow-purple {
  --workflow-color: #7a4ce0;
  --workflow-soft: #f0eaff;
}

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

.text-workflow-grid h3 {
  margin: 0;
  color: #172033;
  font-size: 19.5px;
  font-weight: 700;
  line-height: 1.25;
}

.text-workflow-grid p {
  margin: 0;
  color: #5f6e83;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.58;
}

.seo-visual-panel {
  border-radius: 8px;
  border-color: #cbd8e6;
  background: #f8fbff;
  box-shadow: none;
}

.seo-text-sheet,
.seo-data-card {
  border-radius: 8px;
  box-shadow: none;
  transform: none;
}

.seo-data-card {
  background: #172033;
}

.seo-feature-grid,
.seo-deep-grid {
  gap: 14px;
}

.seo-workflow-band {
  gap: 14px;
}

.text-faq-section {
  max-width: 1132px;
  margin-top: 18px;
}

.text-citation-page .text-faq-section {
  display: block;
  margin: 58px auto 0;
  padding: 0 24px 76px;
  border: 0;
  background: transparent;
}

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

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

.text-citation-page .faq-list {
  display: grid;
  gap: 0;
  width: min(760px, 100%);
  margin: 0 auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.text-citation-page .faq-group {
  position: relative;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid #d5e1ef;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

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

.text-citation-page .faq-group > summary,
.text-citation-page .faq-group-content > details > summary {
  position: relative;
  display: block;
  min-height: 62px;
  list-style: none;
  cursor: pointer;
  outline: none;
}

.text-citation-page .faq-group > summary {
  overflow: hidden;
  border: 0;
  border-right: 1px solid #d5e1ef;
  border-left: 1px solid #d5e1ef;
  border-radius: 0;
  background: #ffffff;
  color: #c8312b;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.035em;
  line-height: 1.2;
  padding: 22px 72px 20px 22px;
  text-transform: uppercase;
}

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

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

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

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

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

.text-citation-page .faq-group > summary::after,
.text-citation-page .faq-group-content > details > summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 34px;
  display: block;
  width: 20px;
  height: 20px;
  background-color: currentColor;
  color: #c8312b;
  -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;
  transform: translateY(-50%);
  transition: transform 180ms ease;
}

.text-citation-page .faq-group[open] > summary {
  border-bottom: 1px solid #c9d9eb;
}

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

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

.text-citation-page .faq-group-content > details {
  position: relative;
  overflow: hidden;
  border: 1px solid #cbd9ea;
  border-bottom: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  padding: 0;
}

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

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

.text-citation-page .faq-group-content > details > summary {
  color: #172033;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
  padding: 21px 72px 20px 22px;
}

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

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

.text-citation-page .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: 100%;
  height: auto;
  min-height: 63px;
  gap: 24px;
  border-bottom: 1px solid #dfe5ed;
  background: #ffffff;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0 24px;
}

.text-citation-page .brand {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #171c26;
  font-size: 22.5px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}

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

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

.text-citation-page .main-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  color: #171c26;
  font-size: 14px;
  font-style: normal;
  font-weight: 850;
}

.text-citation-page .main-nav a,
.text-citation-page .main-nav a:hover {
  color: #171c26;
}

.text-citation-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: #ffffff;
  font-size: 14px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
  padding: 9px 16px;
  white-space: nowrap;
}

.text-citation-page .header-tool-link:hover {
  border-color: #232733;
  background: #232733;
  color: #ffffff;
}

.text-citation-page .site-footer {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  margin: 0;
  border-top: 4px solid #ef3f34;
  background: #171c26;
  color: #ffffff;
  padding: 0;
}

.text-citation-page .footer-inner {
  display: grid;
  grid-template-columns: minmax(250px, 0.75fr) minmax(0, 1.55fr);
  gap: 64px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 54px 24px 60px;
}

.text-citation-page .footer-brand-block {
  display: grid;
  align-content: start;
  gap: 18px;
}

.text-citation-page .footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-size: 26px;
  font-weight: 850;
}

.text-citation-page .footer-brand-block p {
  max-width: 610px;
  margin: 0;
  color: #c5cedb;
  font-size: 15px;
  line-height: 1.55;
}

.text-citation-page .footer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 42px;
  border-radius: 6px;
  background: #ffffff;
  color: #171c26;
  font-size: 13px;
  font-weight: 850;
  padding: 0 18px;
}

.text-citation-page .footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 42px;
}

.text-citation-page .footer-nav div {
  display: grid;
  align-content: start;
  gap: 14px;
}

.text-citation-page .footer-heading {
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.text-citation-page .footer-nav a {
  color: #c5cedb;
  font-size: 13px;
  font-weight: 750;
}

.text-citation-page .footer-nav a:hover {
  color: #ffffff;
}

.text-citation-page .footer-bottom-nav {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 30px;
  border-top: 1px solid rgba(197, 206, 219, 0.18);
  padding-top: 28px;
}

.text-citation-page .footer-bottom-nav a {
  color: #c5cedb;
  font-size: 13px;
  font-weight: 750;
}

.text-citation-page .footer-bottom-nav a:hover {
  color: #ffffff;
}

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

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

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

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

  .text-citation-page .extraction-options .option-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .text-citation-page .extraction-options .inline-check {
    white-space: normal;
  }

  .text-hero-card,
  .paste-grid,
  .option-row {
    grid-template-columns: 1fr;
  }

  .text-hero-copy h1 {
    font-size: 44px;
  }

  .text-citation-page .footer-inner {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .text-citation-page .footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .text-citation-page .footer-bottom-nav {
    justify-content: start;
  }
}

@media (max-width: 700px) {
  .text-citation-page .site-header {
    gap: 12px;
    padding: 0 14px;
  }

  .text-citation-page .brand {
    min-width: 0;
    font-size: 20px;
  }

  .text-citation-page .brand span {
    transform: translate(-1px, 4px);
  }

  .text-citation-page .brand-image-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .text-citation-page .header-tool-link {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 13px;
  }

  .tool-panel-heading {
    display: grid;
    gap: 8px;
  }

  .tool-panel-heading > p {
    text-align: left;
  }

  .text-citation-page .upload-zone {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 14px;
  }

  .text-citation-page .upload-zone .secondary-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .text-citation-page .paste-input-label textarea {
    min-height: 260px;
  }

  .text-citation-page .extraction-options .option-row {
    grid-template-columns: 1fr;
  }

  .tool-action-bar {
    display: grid;
  }

  .text-citation-page .tool-action-bar .action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .text-citation-page .tool-action-bar .primary-action {
    grid-column: 1 / -1;
  }

  .text-citation-page .tool-action-bar .status-line {
    text-align: left;
  }

  .text-citation-page .pipeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .text-citation-page .panel-heading,
  .text-citation-page .panel-actions,
  .results-command-bar {
    display: grid;
  }

  .text-citation-page .panel-actions {
    grid-template-columns: 1fr;
  }

  .text-citation-page .quality-block {
    grid-template-columns: 1fr auto;
    min-height: 0;
  }

  .text-citation-page .export-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .output-menu > summary,
  .bulk-review-menu > summary {
    width: 100%;
  }

  .output-menu-list,
  .bulk-review-toolbar {
    right: 0;
    left: 0;
    width: auto;
    min-width: 0;
  }

  .text-citation-page .text-faq-section {
    padding: 0 14px 58px;
  }

  .text-citation-page .text-workflow-section {
    width: calc(100% - 28px);
    margin-top: 44px;
  }

  .text-workflow-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .text-workflow-grid article {
    min-height: 0;
    padding: 18px;
  }

  .text-citation-page .faq-list {
    width: 100%;
  }

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

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

  .text-citation-page .faq-group-content {
    padding: 14px;
  }

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

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

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

  .text-hero,
  .text-tool-shell,
  .text-seo-section,
  .text-faq-section {
    padding-inline: 14px;
  }

  .text-hero {
    padding-top: 44px;
  }

  .text-citation-page .text-hero-minimal {
    min-height: 98px;
    padding: 16px 14px 2px;
  }

  .text-citation-page .text-hero-minimal .text-hero-copy h1 {
    font-size: 34px;
  }

  .text-hero-copy h1 {
    font-size: 34px;
  }

  .hero-actions,
  .hero-keyword-row,
  .upload-zone,
  .panel-heading,
  .reference-list-header {
    display: grid;
  }

  .paste-panel,
  .results-panel,
  .text-seo-card {
    padding: 18px;
  }

  .pipeline,
  .scorecard-grid,
  .report-grid,
  .seo-feature-grid,
  .seo-deep-grid {
    grid-template-columns: 1fr;
  }

  .text-citation-page .footer-inner {
    justify-items: center;
    padding: 40px 20px 46px;
    text-align: center;
  }

  .text-citation-page .footer-brand-block {
    justify-items: center;
  }

  .text-citation-page .footer-brand-block p {
    max-width: 100%;
  }

  .text-citation-page .footer-button {
    justify-self: center;
  }

  .text-citation-page .footer-nav {
    grid-template-columns: 1fr;
    gap: 24px;
    justify-items: center;
  }

  .text-citation-page .footer-nav div {
    justify-items: center;
  }

  .text-citation-page .footer-bottom-nav {
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px 24px;
    width: 100%;
  }
}

/* Two-stage text extraction workspace, modeled on the PDF review workspace. */
body.text-legacy-mode .text-review-workspace {
  display: block;
  margin-top: 34px;
}

body.text-legacy-mode .text-review-workspace[hidden] {
  display: none !important;
}

body.text-legacy-mode .text-workspace-header {
  position: static;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 62px;
  margin-bottom: 14px;
  border-radius: 6px;
}

body.text-legacy-mode .workspace-exit-button {
  display: none;
}

body.text-legacy-mode .text-workspace-grid {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr);
  overflow: visible;
  padding: 0;
}

body.text-legacy-mode .source-text-pane {
  display: none;
}

body.text-legacy-mode .reference-list-pane,
body.text-legacy-mode .reference-detail {
  min-height: 520px;
}

body.text-legacy-mode .reference-list-pane > .reference-list {
  padding: 10px;
}

body.text-workspace-mode {
  overflow: hidden;
  background: #e9eff6;
}

body.text-workspace-mode > .site-header,
body.text-workspace-mode > .site-footer {
  display: none !important;
}

body.text-workspace-mode > main {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: block;
  width: 100%;
  max-width: none;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  background: #e9eff6;
  padding: 0;
}

body.text-workspace-mode > main > .text-hero,
body.text-workspace-mode > main > .text-workflow-section,
body.text-workspace-mode > main > .text-faq-section,
body.text-workspace-mode .text-tool-shell > .paste-panel {
  display: none !important;
}

body.text-workspace-mode .text-tool-shell {
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  padding: 0;
}

body.text-workspace-mode .text-review-workspace {
  position: fixed;
  inset: 0;
  z-index: 1010;
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #e9eff6;
  box-shadow: none;
  padding: 0;
}

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

.text-workspace-header {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  border-bottom: 1px solid #bcc8d6;
  background: #172033;
  color: #ffffff;
  padding: 10px 12px;
}

.workspace-exit-button,
.workspace-actions button,
.workspace-pane-header button {
  min-height: 34px;
  border: 1px solid #aebccc;
  border-radius: 6px;
  background: #ffffff;
  color: #172033;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  padding: 0 12px;
}

.workspace-exit-button {
  min-width: 108px;
  border-color: #ef3f34;
  background: #ef3f34;
  color: #ffffff;
}

.workspace-document {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  min-width: 0;
}

.workspace-document span {
  align-self: baseline;
  color: #aebdd0;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.workspace-document strong {
  align-self: baseline;
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-document small {
  grid-column: 2;
  overflow: hidden;
  color: #aebdd0;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-header-metrics,
.workspace-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.workspace-header-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: #cbd6e4;
  font-size: 10px;
  font-weight: 750;
  padding: 8px 10px;
}

.workspace-header-metrics strong {
  color: #ffffff;
  font-size: 14px;
}

.workspace-actions button {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.workspace-actions button:last-child {
  border-color: #1473e6;
  background: #1473e6;
}

.text-workspace-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(340px, 1.04fr) minmax(360px, 1.14fr);
  gap: 9px;
  min-height: 0;
  overflow: hidden;
  padding: 10px;
}

.text-workspace-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #b9c7d7;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(28, 44, 64, 0.07);
}

.workspace-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 64px;
  border-bottom: 1px solid #d4deea;
  background: #ffffff;
  padding: 12px 14px;
}

.workspace-pane-header span {
  display: block;
  color: #c8312b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.workspace-pane-header h2 {
  margin: 3px 0 0;
  color: #172033;
  font-size: 19px;
  line-height: 1.1;
}

.source-text-pane pre {
  flex: 1;
  min-height: 0;
  margin: 0;
  overflow: auto;
  background:
    linear-gradient(rgba(63, 86, 112, 0.035) 1px, transparent 1px),
    #f8fbff;
  background-size: 100% 28px;
  color: #334155;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.65;
  overflow-wrap: anywhere;
  padding: 18px;
  white-space: pre-wrap;
}

.workspace-source-note {
  border-top: 1px solid #d4deea;
  background: #ffffff;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  padding: 9px 14px;
}

body.text-workspace-mode .reference-list-pane .list-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  overflow-x: auto;
  border-bottom: 1px solid #d4deea;
  background: #f8fbff;
  padding: 8px 10px;
}

body.text-workspace-mode .reference-list-pane .list-filters button {
  flex: 0 0 auto;
  min-height: 30px;
  border-radius: 5px;
  font-size: 10px;
  padding: 6px 9px;
}

body.text-workspace-mode .reference-list-pane > .reference-list {
  flex: 1;
  min-height: 0;
  margin: 0;
  overflow-y: auto;
  padding: 10px;
}

body.text-workspace-mode .reference-detail {
  position: static;
  overflow-y: auto;
  border-color: #b9c7d7;
  border-radius: 7px;
  background: #ffffff;
  padding: 16px;
}

body.text-workspace-mode .reference-detail > .eyebrow {
  margin-bottom: 6px;
}

body.text-workspace-mode .bulk-review-menu > summary {
  min-height: 34px;
  font-size: 11px;
}

.workspace-utility-drawer {
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
}

.workspace-utility-drawer > summary {
  display: none;
}

.workspace-utility-drawer:not([open]) .workspace-utility-panel {
  display: none;
}

.workspace-utility-panel {
  position: absolute;
  top: 72px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  width: min(660px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid #aebccc;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
  pointer-events: auto;
}

.workspace-utility-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 66px;
  border-bottom: 1px solid #d4deea;
  padding: 12px 16px;
}

.workspace-utility-panel > header span {
  color: #c8312b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.workspace-utility-panel > header h2 {
  margin: 3px 0 0;
  color: #172033;
  font-size: 20px;
}

.workspace-utility-panel > header button {
  min-height: 34px;
  border: 1px solid #bdc8d5;
  border-radius: 6px;
  background: #ffffff;
  color: #172033;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  padding: 0 12px;
}

.workspace-utility-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
}

body.text-workspace-mode .workspace-utility-scroll .scorecard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.text-workspace-mode .workspace-utility-scroll .quality-block {
  min-height: 0;
  margin-top: 12px;
}

body.text-workspace-mode .workspace-utility-scroll .report-details,
body.text-workspace-mode .workspace-utility-scroll .export-preview {
  margin-top: 12px;
}

body.text-workspace-mode .workspace-utility-scroll .report-grid,
body.text-workspace-mode .workspace-utility-scroll .output-grid {
  grid-template-columns: 1fr;
}

body.text-workspace-mode .workspace-utility-scroll .results-command-bar {
  border-top: 0;
}

@media (max-width: 980px) {
  .text-workspace-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .workspace-header-metrics {
    display: none;
  }

  .text-workspace-grid {
    grid-template-columns: minmax(240px, 0.8fr) minmax(300px, 1fr) minmax(320px, 1fr);
    overflow-x: auto;
  }
}

@media (max-width: 700px) {
  .text-workspace-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 7px;
    min-height: 58px;
    padding: 8px;
  }

  .workspace-exit-button {
    min-width: 76px;
    padding: 0 8px;
  }

  .workspace-document span,
  .workspace-document small,
  .workspace-actions #enrich-button {
    display: none;
  }

  .workspace-document strong {
    grid-column: 1 / -1;
    font-size: 11px;
  }

  .workspace-actions {
    gap: 5px;
  }

  .workspace-actions button {
    min-height: 34px;
    padding: 0 8px;
    font-size: 10px;
  }

  body.text-workspace-mode .text-review-workspace {
    grid-template-rows: 58px minmax(0, 1fr);
  }

  .text-workspace-grid {
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 8px;
  }

  .text-workspace-pane {
    min-height: 62vh;
    margin-bottom: 8px;
  }

  .source-text-pane {
    min-height: 44vh;
  }

  body.text-workspace-mode .reference-detail {
    min-height: 78vh;
  }

  .workspace-utility-panel {
    top: 66px;
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
  }
}
#results-panel[hidden] {
  display: none !important;
}
