:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #dbe4f0;
  --blue: #1e40af;
  --blue-soft: #dbeafe;
  --purple: #7c3aed;
  --purple-soft: #efe7ff;
  --green: #10b981;
  --green-soft: #dcfce7;
  --orange: #f59e0b;
  --orange-soft: #fff1d6;
  --danger: #dc2626;
  --danger-soft: #fff1f2;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 26px 60px rgba(30, 64, 175, 0.16);
  --ease: 0.2s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.08), transparent 26%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
  color: var(--text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 16px 28px;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(219, 228, 240, 0.9);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 14px 26px rgba(30, 64, 175, 0.2);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 15px;
  line-height: 1.2;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 28px auto 48px;
}

.shell--dashboard {
  width: min(1240px, calc(100vw - 40px));
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(219, 228, 240, 0.96);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.login-panel {
  max-width: 440px;
  margin: 80px auto 24px;
}

.login-beian {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 20px;
  z-index: 10;
  margin: 0;
  padding: 0 16px;
  text-align: center;
  font-size: 13px;
}

.login-beian a {
  color: var(--muted);
  text-decoration: none;
}

.login-beian a:hover {
  color: var(--blue);
  text-decoration: underline;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 20px;
  font-weight: 760;
}

h3 {
  font-size: 22px;
  font-weight: 760;
}

p {
  margin: 0;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.stack {
  display: grid;
  gap: 16px;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 600;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(219, 228, 240, 0.96);
  border-radius: 12px;
  padding: 10px 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(30, 64, 175, 0.5);
  box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.12);
}

button,
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--blue);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), #3159d5);
  color: #fff;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease), border-color var(--ease);
  box-shadow: 0 10px 24px rgba(30, 64, 175, 0.18);
}

button:hover,
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(30, 64, 175, 0.24);
}

.ghost {
  border-color: rgba(219, 228, 240, 0.96);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  box-shadow: none;
}

.ghost:hover {
  background: #eef4fb;
  box-shadow: none;
}

.section-head,
.panel-head,
.actions,
.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.actions {
  justify-content: flex-end;
}

.workbench-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 24px;
  align-items: end;
  padding: 24px 0 12px;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-subtitle {
  max-width: 720px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 17px;
}

.hero-meta {
  display: grid;
  gap: 16px;
  justify-items: end;
}

.model-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(219, 228, 240, 0.96);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.hero-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.hero-links a,
.history-toggle {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.hero-links a:hover,
.history-toggle:hover {
  color: var(--blue);
}

.hidden {
  display: none !important;
}

.inline-link {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.pdf-tool-shell {
  display: grid;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}

.pdf-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.pdf-breadcrumb strong {
  color: var(--text);
}

.pdf-stage-card,
.helper-card {
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.pdf-tool-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

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

.pdf-tool-kicker {
  margin: 0;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pdf-upload-form {
  display: grid;
  gap: 18px;
}

.upload-dropzone {
  width: 100%;
  min-height: 240px;
  border: 2px dashed #bfdbfe;
  border-radius: 16px;
  background: #f8fbff;
  color: #0f172a;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
  padding: 24px;
  box-shadow: none;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.upload-dropzone:hover {
  box-shadow: none;
  transform: none;
}

.upload-dropzone.is-dragover {
  border-style: solid;
  border-color: #2563eb;
  background: #eff6ff;
  transform: translateY(-1px);
}

.upload-dropzone-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #dbeafe;
  color: #2563eb;
  transition: transform .2s ease;
}

.upload-dropzone.is-dragover .upload-dropzone-icon {
  transform: scale(1.08);
}

.upload-dropzone-icon svg {
  width: 28px;
  height: 28px;
}

.upload-dropzone strong {
  font-size: 18px;
}

.upload-dropzone span {
  color: var(--muted);
}

.file-list-wrap {
  display: grid;
  gap: 12px;
}

.file-list-summary {
  color: var(--muted);
  font-weight: 600;
}

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

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(219, 228, 240, 0.96);
  border-radius: 14px;
  background: #fff;
}

.file-row.is-invalid {
  border-color: #fecaca;
  background: #fff5f5;
}

.file-row-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.file-row-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.file-row-name svg {
  width: 18px;
  height: 18px;
  color: #2563eb;
  flex: none;
}

.file-row-error {
  color: #dc2626;
  font-size: 12px;
  font-weight: 600;
}

.file-row-size {
  color: var(--muted);
  font-size: 13px;
}

.file-row-remove {
  min-height: 36px;
  padding: 8px 12px;
  box-shadow: none;
}

.upload-actions,
.review-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.full-width {
  flex: 1 1 auto;
}

.danger-ghost {
  border-color: #fecaca;
  color: #b91c1c;
}

.danger-ghost:hover {
  background: #fff1f2;
}

.progress-panel {
  display: grid;
  gap: 14px;
}

.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2563eb, #10b981);
  transition: width .2s ease;
}

.progress-panel-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.live-preview-list {
  display: grid;
  gap: 12px;
}

.preview-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(219, 228, 240, 0.96);
  border-radius: 14px;
  background: #fff;
}

.preview-card.is-low-confidence,
.confidence-low {
  border-color: #fcd34d;
  background: #fffbeb;
}

.preview-old {
  color: var(--muted);
  text-decoration: line-through;
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.result-table input[type="text"] {
  min-height: 40px;
}

.result-table input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
  box-shadow: none;
}

.result-table th,
.result-table td {
  vertical-align: top;
}

.confidence-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.confidence-pill.is-low {
  background: #fffbeb;
  color: #b45309;
}

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

.helper-card {
  display: grid;
  gap: 10px;
}

.history-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(219, 228, 240, 0.8);
}

.history-line:first-child {
  border-top: none;
  padding-top: 0;
}

.review-back-link {
  display: inline-flex;
  margin-top: 8px;
}

.success-button {
  border-color: #10b981;
  background: linear-gradient(135deg, #10b981, #059669);
}

.extract-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.extract-kpi {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(219, 228, 240, 0.96);
}

.extract-kpi strong {
  display: block;
  font-size: 18px;
  margin-bottom: 2px;
}

.extract-kpi span {
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.is-warning {
  background: #fffbeb;
  color: #b45309;
}

.status-pill.is-complete {
  background: #ecfdf5;
  color: #047857;
}

@media (max-width: 760px) {
  .pdf-tool-topbar,
  .progress-panel-meta,
  .review-toolbar,
  .upload-actions,
  .file-row {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .file-row {
    display: grid;
  }

  .helper-grid {
    grid-template-columns: 1fr;
  }

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

.history-toggle {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.history-menu-wrap {
  position: relative;
}

.history-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(360px, calc(100vw - 40px));
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(219, 228, 240, 0.96);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.history-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.history-menu-head strong {
  font-size: 14px;
}

.history-menu-head span {
  color: var(--muted);
  font-size: 12px;
}

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

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.tool-card {
  position: relative;
  display: grid;
  gap: 18px;
  min-height: 272px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(219, 228, 240, 0.96);
  background: var(--panel-strong);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.tool-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), transparent 45%);
  pointer-events: none;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.tool-card:hover .hover-arrow {
  opacity: 1;
  transform: translateX(0);
}

.tool-card--blue:hover,
.tool-card--blue.is-recommended {
  border-color: rgba(30, 64, 175, 0.34);
}

.tool-card--purple:hover,
.tool-card--purple.is-recommended {
  border-color: rgba(124, 58, 237, 0.36);
}

.tool-card--green:hover,
.tool-card--green.is-recommended {
  border-color: rgba(16, 185, 129, 0.34);
}

.tool-card--orange:hover,
.tool-card--orange.is-recommended {
  border-color: rgba(245, 158, 11, 0.4);
}

.tool-card.is-recommended {
  transform: translateY(-3px);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12), var(--shadow-hover);
}

.corner-flag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(219, 228, 240, 0.96);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.corner-flag::before {
  content: "★";
  color: #f59e0b;
}

.tool-card-top,
.tool-card-footer,
.chip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tool-icon {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  color: #fff;
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.14);
}

.tool-icon svg {
  width: 30px;
  height: 30px;
}

.tool-icon--blue { background: linear-gradient(135deg, var(--blue), #3159d5); }
.tool-icon--purple { background: linear-gradient(135deg, var(--purple), #9b67ff); }
.tool-icon--green { background: linear-gradient(135deg, var(--green), #2dd4bf); }
.tool-icon--orange { background: linear-gradient(135deg, var(--orange), #fb923c); }

.hover-arrow {
  color: var(--muted);
  font-size: 24px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--ease), transform var(--ease);
}

.tool-card-body {
  display: grid;
  gap: 10px;
}

.tool-card-body p {
  color: var(--muted);
  font-size: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.chip--format {
  background: #eef4fb;
  color: var(--muted);
}

.chip--ai {
  background: var(--purple-soft);
  color: var(--purple);
}

.chip--local {
  background: var(--green-soft);
  color: var(--green);
}

.chip--green {
  background: #e8fff5;
  color: #0e9f6e;
}

.chip--batch {
  background: var(--orange-soft);
  color: #c56a03;
}

.workbench-panel {
  margin-top: 22px;
}

.panel-head {
  margin-bottom: 16px;
}

.panel-head p {
  margin-top: 8px;
  color: var(--muted);
}

.recent-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.recent-strip::-webkit-scrollbar {
  height: 8px;
}

.recent-strip::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.4);
}

.recent-card,
.history-item {
  min-width: 240px;
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(219, 228, 240, 0.96);
  background: #fff;
}

.recent-card strong,
.history-item strong {
  font-size: 14px;
}

.recent-meta,
.history-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

.status-dot.processing {
  background: var(--orange);
}

.status-dot.failed {
  background: var(--danger);
}

.history-empty {
  width: 100%;
  min-height: 160px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 20px;
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  text-align: center;
}

.history-empty.compact {
  min-height: 120px;
}

.history-empty-illustration {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.12), rgba(124, 58, 237, 0.12));
  color: var(--blue);
  font-size: 24px;
  font-weight: 700;
}

.dropzone-panel {
  display: grid;
  gap: 18px;
  border-style: dashed;
  transition: border-color var(--ease), background var(--ease), box-shadow var(--ease);
}

.dropzone-panel.is-dragover {
  border-color: rgba(124, 58, 237, 0.45);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(30, 64, 175, 0.08));
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.08), var(--shadow);
}

.dropzone-copy {
  display: grid;
  gap: 10px;
}

.dropzone-copy p:last-child {
  color: var(--muted);
}

.dropzone-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.recommend-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(219, 228, 240, 0.96);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.guide-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(219, 228, 240, 0.96);
  background: rgba(255, 255, 255, 0.82);
}

.guide-card strong {
  font-size: 15px;
}

.guide-card p {
  color: var(--muted);
  font-size: 13px;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.entry-card {
  display: grid;
  gap: 8px;
  min-height: 120px;
  align-content: center;
  border: 1px solid rgba(219, 228, 240, 0.96);
  border-radius: 14px;
  padding: 18px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.entry-card:hover {
  transform: translateY(-2px);
  border-color: rgba(30, 64, 175, 0.22);
  box-shadow: var(--shadow-hover);
}

.entry-card strong {
  font-size: 18px;
}

.entry-card span {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: #eef1f5;
  color: var(--muted);
  font-weight: 650;
}

.badge.completed,
.badge.matched {
  background: #e7f6ee;
  color: var(--green);
}

.badge.needs_resolution,
.badge.failed {
  background: #fff4e5;
  color: #ad5f00;
}

.badge.processing {
  background: #eaf2ff;
  color: var(--blue);
}

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

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid rgba(219, 228, 240, 0.96);
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

th,
td {
  border-bottom: 1px solid rgba(219, 228, 240, 0.96);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f9fafc;
  color: var(--muted);
  font-weight: 650;
}

tr:last-child td {
  border-bottom: 0;
}

tr.row-complete td {
  background: #edf8f1;
}

tr.row-warning td {
  background: #fff8df;
}

tr.row-conflict td {
  background: var(--danger-soft);
}

tr.row-processing td {
  background: #f4f8ff;
}

.filename {
  max-width: 260px;
  overflow-wrap: anywhere;
}

.hidden {
  display: none;
}

.row-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
}

.page-ocr {
  display: grid;
  grid-template-columns: 58px minmax(220px, 1fr);
  gap: 8px;
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}

.page-ocr.processing {
  color: var(--blue);
}

.page-ocr.queued {
  color: var(--muted);
}

.page-ocr.matched {
  color: var(--green);
}

.page-ocr.needs_resolution,
.page-ocr.unmatched {
  color: #ad5f00;
}

.page-ocr.failed {
  color: var(--danger);
}

.page-index {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.file-progress {
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(105, 115, 134, 0.18);
}

.file-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 180ms ease;
}

.row-complete .file-progress-fill {
  background: var(--green);
}

.row-warning .file-progress-fill {
  background: var(--orange);
}

.row-conflict .file-progress-fill {
  background: var(--danger);
}

.file-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.progress-text {
  margin-top: 2px;
  font-size: 12px;
}

@media (max-width: 900px) {
  .workbench-hero,
  .tool-grid,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .hero-meta {
    justify-items: start;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 14px 16px;
  }

  .brand-copy small {
    display: none;
  }

  .shell,
  .shell--dashboard {
    width: calc(100vw - 20px);
    margin: 16px auto 28px;
  }

  .section-head,
  .status-line,
  .panel-head,
  .entry-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .entry-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 30px;
  }

  .tool-card {
    min-height: 240px;
  }
}
