:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-subtle: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --primary: #1e3a8a;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --success: #059669;
  --success-soft: #ecfdf5;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #1e3a8a, #4f46e5);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.brand-subtitle {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  display: block;
}

.foundry-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid #c7d2fe;
}

.foundry-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4f46e5;
}

.top-banner-wrap {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 0;
}

.top-banner-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.35rem 1.5rem 3.5rem;
}

.alerts {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid var(--border);
}

.alert-success {
  background: var(--success-soft);
  color: #065f46;
  border-color: #a7f3d0;
}

.alert-error {
  background: var(--danger-soft);
  color: #991b1b;
  border-color: #fecaca;
}

.alert-info {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: #bfdbfe;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

.card-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.card-subtitle {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.upload-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  background: #fcfdff;
  transition: all 0.18s ease;
  cursor: pointer;
  display: block;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--accent);
  background: var(--primary-soft);
}

.upload-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.upload-options {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.1rem;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1.15rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-subtle);
}

.btn-sm {
  padding: 0.42rem 0.8rem;
  font-size: 0.82rem;
}

.sample-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sample-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fafbfc;
}

.sample-item-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.sample-item-file {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.26rem 0.68rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
  max-width: 100%;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  flex-shrink: 0;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  max-width: 100%;
}

.detail-header-main {
  flex: 1 1 0%;
  min-width: 0;
  max-width: 100%;
}

.detail-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .detail-header {
    flex-direction: column;
  }
}

.doc-type-callout {
  display: inline-block;
  max-width: 100%;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid #bfdbfe;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
  margin-bottom: 0.5rem;
}

.badge-success {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid #a7f3d0;
}

.badge-warning {
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid #fde68a;
}

.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #fecaca;
}

.badge-info {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid #bfdbfe;
}

.badge-purple {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid #c7d2fe;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.kpi-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.kpi-value-sm {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.kpi-meta {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.section-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.section-nav-grid.three-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1120px) {
  .section-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .section-nav-grid,
  .section-nav-grid.three-cards {
    grid-template-columns: 1fr;
  }
}

.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
  width: 100%;
  padding: 0.95rem 1.1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  cursor: pointer;
  transition: all 0.16s ease;
  font-family: inherit;
}

.tab-btn:hover {
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.tab-btn.active {
  border-color: var(--primary);
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.08), var(--shadow-sm);
}

.tab-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.tab-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
}

.tab-btn.active .tab-step {
  background: var(--primary);
  color: #ffffff;
}

.tab-card-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.22rem;
}

.tab-btn.active .tab-card-title {
  color: var(--primary);
}

.tab-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.35;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 920px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.clause-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin-bottom: 0.75rem;
  background: #ffffff;
}

.clause-card.critical {
  border-left: 4px solid var(--danger);
}

.clause-card.important {
  border-left: 4px solid var(--warning);
}

.clause-card.recommended {
  border-left: 4px solid var(--primary);
}

.clause-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.clause-title {
  font-weight: 700;
  font-size: 0.96rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--surface-subtle);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.4rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1e3a8a, #4f46e5);
  border-radius: 999px;
}

.doc-viewer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: start;
}

.doc-viewer-grid > .outline-nav {
  grid-column: span 1;
  min-width: 0;
}

.doc-viewer-grid > .reader-column {
  grid-column: span 2;
  min-width: 0;
}

@media (max-width: 960px) {
  .doc-viewer-grid {
    grid-template-columns: 1fr;
  }

  .doc-viewer-grid > .outline-nav,
  .doc-viewer-grid > .reader-column {
    grid-column: 1 / -1;
  }
}

.outline-nav {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 1.15rem;
}

.search-input {
  width: 100%;
  padding: 0.52rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-family: inherit;
  margin-bottom: 0.7rem;
  outline: none;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.12);
}

.outline-list {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.outline-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.48rem 0.65rem;
  border-radius: 6px;
  font-size: 0.83rem;
  color: var(--text-secondary);
  border-left: 3px solid transparent;
  transition: background 0.12s ease;
}

.outline-item:hover,
.outline-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-left-color: var(--primary);
}

.outline-item-title {
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.outline-item-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.section-reader-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  scroll-margin-top: 84px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.section-reader-card.section-highlight {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.14);
}

.section-reader-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  border-radius: var(--radius) var(--radius) 0 0;
}

.section-reader-title {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.section-reader-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.section-reader-body {
  padding: 1.15rem 1.35rem;
}

.reader-subheading {
  margin: 1rem 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.reader-subheading:first-child {
  margin-top: 0;
}

.reader-paragraph {
  margin: 0 0 0.75rem;
  font-size: 0.93rem;
  line-height: 1.65;
  color: #1e293b;
  overflow-wrap: anywhere;
}

.reader-paragraph:last-child {
  margin-bottom: 0;
}

.reader-empty {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  font-style: italic;
}

.table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0;
}

.simple-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}

.simple-list-item > div:first-child,
.sample-item > div:first-child {
  flex: 1 1 0%;
  min-width: 0;
}

.simple-list-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.party-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.party-card-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.party-name {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.party-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.party-field {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
}

.party-field-full {
  grid-column: 1 / -1;
}

.party-field-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.22rem;
}

.party-field-value {
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.party-doc-notes {
  background: var(--warning-soft);
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
}

.party-ai-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: 0.25rem;
}

.party-ai-dossier-wrap {
  margin-top: 0.55rem;
}

.party-dossier-details {
  border-color: #c7d2fe;
}

.party-dossier-summary {
  background: #eef2ff;
  padding: 0.65rem 0.9rem;
}

.party-dossier-summary:hover {
  background: #e0e7ff;
}

.party-dossier-details[open] > .party-dossier-summary {
  background: #eef2ff;
  border-bottom-color: #c7d2fe;
}

.party-ai-dossier {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  padding: 0.9rem 1rem;
  font-size: 0.86rem;
  line-height: 1.5;
}

.dossier-header {
  margin-bottom: 0.65rem;
}

.dossier-row {
  margin-bottom: 0.5rem;
}

.dossier-label {
  font-weight: 700;
  color: var(--text);
  margin-right: 0.35rem;
}

.dossier-val {
  color: var(--text-secondary);
}

.dossier-discrepancies {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px dashed #c7d2fe;
}

.dossier-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-secondary);
}

/* =========================================================================
   Document Processing Progress Modal & Step-by-Step Pipeline
   ========================================================================= */
.processing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.processing-overlay.active {
  display: flex;
}

.processing-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
  width: 100%;
  max-width: 620px;
  padding: 1.6rem 1.75rem;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.processing-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.processing-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.processing-spinner-ring {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.spinner-svg {
  width: 22px;
  height: 22px;
  animation: spinRotate 1s linear infinite;
}

@keyframes spinRotate {
  to {
    transform: rotate(360deg);
  }
}

.processing-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.processing-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.processing-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.processing-timer {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-variant-numeric: tabular-nums;
}

.processing-percent {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-variant-numeric: tabular-nums;
}

.processing-bar-track {
  width: 100%;
  height: 10px;
  background: var(--surface-subtle);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 0.55rem;
}

.processing-bar-fill {
  height: 100%;
  width: 8%;
  background: linear-gradient(90deg, #2563eb 0%, #4f46e5 50%, #2563eb 100%);
  background-size: 200% 100%;
  border-radius: 999px;
  transition: width 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  animation: barShimmer 2.2s linear infinite;
}

@keyframes barShimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.processing-current-msg {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
  min-height: 1.3em;
}

.processing-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1.1rem;
}

@media (max-width: 580px) {
  .processing-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.processing-metric-box {
  min-width: 0;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.processing-metric-box.populated {
  background: var(--primary-soft);
  border-color: #bfdbfe;
}

.processing-metric-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.18rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.processing-metric-val {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.processing-steps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.processing-step {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.58rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fcfdff;
  transition: all 0.2s ease;
}

.processing-step.is-active {
  border-color: #93c5fd;
  background: var(--primary-soft);
}

.processing-step.is-done {
  border-color: #a7f3d0;
  background: #f0fdf4;
}

.processing-step.is-skipped {
  opacity: 0.62;
  background: var(--surface-subtle);
}

.step-indicator {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 0.05rem;
  background: var(--surface-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
}

.processing-step.is-active .step-indicator {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.processing-step.is-done .step-indicator {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.processing-step.is-error {
  border-color: #fca5a5;
  background: var(--danger-soft);
}

.processing-step.is-error .step-indicator {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.step-body {
  flex: 1 1 0%;
  min-width: 0;
}

.step-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.step-detail {
  font-size: 0.77rem;
  color: var(--text-secondary);
  margin-top: 0.14rem;
  line-height: 1.35;
}

.processing-error-box {
  display: none;
  margin-top: 0.9rem;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.85rem;
}


.dossier-list li {
  margin-bottom: 0.25rem;
}

.parsed-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.parsed-table td,
.parsed-table th {
  border: 1px solid var(--border-strong);
  padding: 0.5rem 0.65rem;
  vertical-align: top;
}

.parsed-table tr:first-child td {
  background: var(--surface-subtle);
  font-weight: 600;
}

.overview-diag-item {
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--success-soft);
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 0.87rem;
}

.overview-diag-item.warn {
  background: var(--warning-soft);
  border-color: #fde68a;
  color: #92400e;
}

.overview-diag-item.err {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: #991b1b;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

@media (max-width: 960px) {
  .metadata-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .metadata-grid {
    grid-template-columns: 1fr;
  }
}

.metadata-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
}

.metadata-label {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.metadata-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.btn-link:hover {
  background: var(--primary-soft);
}

.tree-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.tree-action-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--primary);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: all 0.14s ease;
}

.tree-action-icon-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

/* Hierarchical Tree Sidebar Styles */
.tree-container {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.tree-section-node {
  border-radius: 6px;
}

.tree-l1-row,
.tree-item-row {
  display: flex;
  align-items: flex-start;
  gap: 0.2rem;
}

.tree-eye-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-top: 0.22rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.tree-eye-btn:hover {
  background: var(--surface-subtle);
  color: var(--primary);
  border-color: var(--border-strong);
}

.tree-eye-btn.is-visible {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.tree-eye-btn.is-partial {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: #93c5fd;
}

.tree-link.is-visible {
  background: var(--primary-soft);
  color: var(--primary);
}

.tree-link.is-visible .tree-l1-title {
  color: var(--primary);
}

.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.85rem 1.2rem;
  margin-bottom: 1rem;
  background: #f8fafc;
}

.reader-empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
}

.empty-eye-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.btn-hide-sec {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  transition: all 0.14s ease;
}

.btn-hide-sec:hover {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #fecaca;
}

.btn-danger-outline {
  background: var(--surface);
  color: var(--danger);
  border: 1px solid #fecaca;
}

.btn-danger-outline:hover {
  background: var(--danger-soft);
  border-color: #f87171;
  color: #b91c1c;
}

.btn-danger-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #fecaca;
  font-weight: 700;
  transition: all 0.15s ease;
}

.btn-danger-soft:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
}

.btn-icon-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon-delete:hover {
  background: var(--danger-soft);
  border-color: #fca5a5;
  color: var(--danger);
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(220, 38, 38, 0.12);
}

.btn-icon-delete:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.doc-select-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  vertical-align: middle;
}

.doc-table-row.is-selected-row td {
  background: #eff6ff;
}

.tree-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.45rem 0.3rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1;
  border-radius: 4px;
  flex-shrink: 0;
}

.tree-toggle-btn:hover {
  background: var(--surface-subtle);
  color: var(--text);
}

.tree-chevron {
  display: inline-block;
  transition: transform 0.15s ease;
}

.tree-section-node.expanded .tree-chevron {
  transform: rotate(90deg);
}

.tree-toggle-spacer {
  display: inline-block;
  width: 20px;
  text-align: center;
  padding-top: 0.42rem;
  color: var(--border-strong);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.tree-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
  padding: 0.42rem 0.55rem;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  transition: background 0.12s ease, color 0.12s ease;
}

.tree-link:hover,
.tree-link.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.tree-l1-title {
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}

.tree-link.active .tree-l1-title {
  color: var(--primary);
}

.tree-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.tree-l2-list {
  display: none;
  margin-left: 0.95rem;
  padding-left: 0.65rem;
  border-left: 1.5px solid var(--border-strong);
  margin-top: 0.12rem;
  margin-bottom: 0.35rem;
}

.tree-section-node.expanded .tree-l2-list {
  display: block;
}

.tree-l2-link {
  justify-content: flex-start;
  font-size: 0.79rem;
  padding: 0.32rem 0.5rem;
  color: var(--text-secondary);
}

.tree-l2-link.is-subheading {
  font-weight: 700;
  color: var(--text);
}

.tree-l2-link.is-table {
  color: var(--accent);
  font-weight: 600;
}

.tree-icon {
  font-size: 0.75rem;
  flex-shrink: 0;
}

.tree-l3-list {
  margin-left: 0.85rem;
  padding-left: 0.55rem;
  border-left: 1px dashed var(--border-strong);
  margin-top: 0.08rem;
  margin-bottom: 0.2rem;
}

.tree-l3-link {
  justify-content: flex-start;
  font-size: 0.75rem;
  padding: 0.25rem 0.45rem;
  color: var(--text-muted);
}

.reader-block-anchor {
  scroll-margin-top: 90px;
  border-radius: 6px;
  transition: background-color 0.35s ease;
}

.reader-block-anchor.section-highlight {
  background-color: #dbeafe;
}

.json-pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  max-height: 680px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 0.75rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.1rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.pagination-info {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.pagination-info strong {
  color: var(--text);
  font-weight: 700;
}

.pagination-sep {
  color: var(--border-strong);
}

.pagination-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.pagination-nav-btn,
.pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 38px;
  height: 38px;
  padding: 0 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all 0.15s ease;
  text-decoration: none;
  cursor: pointer;
}

.pagination-page {
  padding: 0 0.6rem;
}

.pagination-nav-btn:hover:not(.is-disabled),
.pagination-page:hover:not(.is-active) {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(30, 58, 138, 0.1);
}

.pagination-page.is-active {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  border-color: #1e3a8a;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.25);
  cursor: default;
}

.pagination-nav-btn.is-disabled {
  background: var(--surface-subtle);
  border-color: var(--border);
  color: var(--text-muted);
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}

.pagination-ellipsis {
  padding: 0 0.3rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  user-select: none;
}


.data-table th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: #f8fafc;
}

.arch-table td {
  vertical-align: top;
}

/* =========================================================================
   Collapsible Typo / Anomaly Groups on Passport Tab
   ========================================================================= */
.typo-groups-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.typo-group-details {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.typo-group-details[open] {
  border-color: var(--border-strong);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.typo-group-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.05rem;
  cursor: pointer;
  user-select: none;
  background: #f8fafc;
  transition: background 0.15s ease;
}

.typo-group-summary::-webkit-details-marker {
  display: none;
}

.typo-group-summary:hover {
  background: #f1f5f9;
}

.typo-group-details[open] > .typo-group-summary {
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.typo-group-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  flex: 1 1 0%;
}

.typo-group-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
  transition: transform 0.18s ease, background 0.15s ease, border-color 0.15s ease;
}

.typo-group-details[open] .typo-group-chevron {
  transform: rotate(90deg);
  background: var(--primary-soft);
  border-color: #93c5fd;
}

.typo-group-title {
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--text);
  line-height: 1.3;
}

.typo-group-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.18rem;
  line-height: 1.35;
}

.typo-group-locs {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid #dbeafe;
  border-radius: 5px;
  padding: 0.12rem 0.5rem;
  margin-top: 0.32rem;
}

.typo-group-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.typo-group-toggle-hint {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.typo-group-details[open] .typo-group-toggle-hint::before {
  content: "Скрыть";
}

.typo-group-details:not([open]) .typo-group-toggle-hint::before {
  content: "Показать";
}

.typo-group-body {
  padding: 0.9rem 1.05rem;
  background: #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.typo-finding-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #d97706;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.typo-finding-card.is-critical {
  border-left-color: #dc2626;
}

.typo-finding-card.is-info {
  border-left-color: #2563eb;
}

.typo-finding-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.typo-finding-header-left {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.typo-finding-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 0.45rem;
  border-radius: 6px;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.typo-finding-loc {
  font-size: 0.76rem;
  font-weight: 700;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.18rem 0.55rem;
}

.typo-finding-excerpt {
  font-size: 0.81rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 0.42rem 0.65rem;
  border-radius: 6px;
  color: #334155;
}

.typo-finding-explanation {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.typo-finding-card.is-critical .typo-finding-explanation {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

/* =========================================================================
   Inline AI Task Progress Indicator (for Party Dossier & Deep AI Audit)
   ========================================================================= */
.ai-inline-progress {
  display: none;
  margin-top: 0.75rem;
  margin-bottom: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #93c5fd;
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.08);
  animation: modalFadeIn 0.18s ease-out;
}

.ai-inline-progress.active {
  display: block;
}

.ai-inline-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.ai-inline-progress-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.ai-inline-spinner {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #dbeafe;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-inline-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
}

.ai-inline-subtitle {
  font-size: 0.77rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.ai-inline-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.ai-inline-timer {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-variant-numeric: tabular-nums;
}

.ai-inline-pct {
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--primary);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-variant-numeric: tabular-nums;
}

.ai-inline-bar-track {
  width: 100%;
  height: 8px;
  background: #dbeafe;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.65rem;
}

.ai-inline-bar-fill {
  height: 100%;
  width: 12%;
  background: linear-gradient(90deg, #2563eb 0%, #4f46e5 50%, #2563eb 100%);
  background-size: 200% 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
  animation: barShimmer 2s linear infinite;
}

.ai-inline-steps {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.ai-inline-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.28rem 0.5rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.ai-inline-step.is-active {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  color: var(--primary);
  font-weight: 700;
}

.ai-inline-step.is-done {
  color: #065f46;
  font-weight: 600;
}

.ai-inline-step-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 800;
  background: #e2e8f0;
  color: #64748b;
  flex-shrink: 0;
}

.ai-inline-step.is-active .ai-inline-step-dot {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.ai-inline-step.is-done .ai-inline-step-dot {
  background: var(--success);
  color: #ffffff;
}

/* =========================================================================
   Page Shell, Footer & Legal/Contact Pages (brsch.com style)
   ========================================================================= */
.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1 0 auto;
  width: 100%;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.83rem;
  margin-top: 2.5rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-meta,
.footer-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-sep {
  color: var(--border-strong);
  user-select: none;
}

.footer-link {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.legal-page {
  max-width: 780px;
  margin: 0 auto;
}

.stats-top-nav {
  margin-bottom: 1rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.back-link:hover {
  color: var(--primary);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid #bfdbfe;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.legal-header {
  margin-bottom: 1.5rem;
}

.legal-header h1 {
  font-size: clamp(1.55rem, 3.2vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 0.45rem;
  line-height: 1.22;
}

.legal-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.legal-card {
  display: flex;
  flex-direction: column;
  gap: 1.45rem;
  padding: 1.75rem 1.9rem;
}

.legal-lead {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

.legal-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.legal-section h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

.legal-section p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
}

.legal-list {
  margin: 0.15rem 0 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.91rem;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.legal-list strong {
  color: var(--text);
}

.legal-contact-box {
  margin-top: 0.25rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.legal-contact-box a,
.brand-link {
  color: var(--primary);
  font-weight: 600;
}

.legal-contact-box a:hover,
.brand-link:hover {
  text-decoration: underline;
}

.hp-trap {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.report-form {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.field-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.field-input,
.field-select {
  width: 100%;
  padding: 0.62rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field-tall {
  height: 42px;
}

.field-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.field-input:focus,
.field-select:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.report-submit-row {
  display: flex;
  justify-content: flex-start;
  padding-top: 0.25rem;
}

@media (max-width: 680px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .legal-card {
    padding: 1.25rem 1.15rem;
  }
}

/* Error Pages (400, 403, 404, 405, 500) */
.error-page-wrap {
  max-width: 760px;
  margin: 0.5rem auto 1.5rem;
}

.error-card {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: 2rem 2.1rem;
}

.error-card-top {
  display: flex;
  align-items: flex-start;
  gap: 1.35rem;
}

.error-code-emblem {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.65rem;
  letter-spacing: -0.04em;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.error-code-emblem.error-tone-info {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: #bfdbfe;
}

.error-code-emblem.error-tone-warning {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: #fde68a;
}

.error-code-emblem.error-tone-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #fecaca;
}

.hero-badge.error-badge-warning {
  background: var(--warning-soft);
  border-color: #fde68a;
  color: #b45309;
}

.hero-badge.error-badge-danger {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: var(--danger);
}

.error-header-meta {
  min-width: 0;
  flex: 1;
}

.error-title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.error-lead {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.error-context-box {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.error-context-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.error-context-label {
  font-weight: 700;
  color: var(--text);
}

.error-context-code {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 0.12rem 0.45rem;
  font-size: 0.82rem;
  color: var(--primary);
  word-break: break-all;
}

.error-hints-section {
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}

.error-hints-title {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.error-hints-list {
  margin-top: 0;
}

.error-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-top: 0.35rem;
}

@media (max-width: 680px) {
  .error-card {
    padding: 1.35rem 1.2rem;
  }
  .error-card-top {
    flex-direction: column;
    gap: 0.9rem;
  }
  .error-code-emblem {
    width: 60px;
    height: 60px;
    font-size: 1.35rem;
  }
}

/* Authentication, Email Verification & AI Access Gating */
.topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.user-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.72rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  max-width: 260px;
}

.user-status-pill.is-verified {
  background: var(--success-soft);
  border-color: #a7f3d0;
  color: #065f46;
}

.user-status-pill.is-unverified {
  background: var(--warning-soft);
  border-color: #fde68a;
  color: #92400e;
}

.user-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #94a3b8;
}

.user-status-pill.is-verified .user-status-dot {
  background: var(--success);
}

.user-status-pill.is-unverified .user-status-dot {
  background: var(--warning);
}

.user-email-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verify-email-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding: 0.9rem 1.15rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
  border: 1px solid #fde68a;
  color: #78350f;
  font-size: 0.88rem;
  line-height: 1.5;
}

.verify-email-banner-text {
  flex: 1;
  min-width: 240px;
}

.ai-locked-option {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.checkbox-label.is-disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.ai-locked-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.ai-locked-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.36rem 0.72rem;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
}

.auth-page-wrap {
  max-width: 580px;
}

.auth-benefits-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.auth-benefits-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
}

.auth-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding-top: 0.35rem;
}

.auth-switch-hint {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.btn-google-oauth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.btn-google-oauth:hover {
  background: var(--surface-subtle);
  border-color: #94a3b8;
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.google-logo-svg {
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: -0.25rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* =========================================================================
   Tab 4: Document Operations Workspace & Live A4 Sheet Preview
   ========================================================================= */
.ops-workspace-grid {
  display: grid;
  grid-template-columns: 440px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 1080px) {
  .ops-workspace-grid {
    grid-template-columns: 1fr;
  }
}

.ops-controls-col {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.ops-intro-card {
  padding: 1.15rem 1.25rem;
}

.doc-op-module {
  padding: 1.15rem 1.25rem;
  border: 1.5px solid var(--border);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.doc-op-module.is-active-module {
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.06);
}

.doc-op-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.8rem;
}

.doc-op-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.25rem;
}

.doc-op-step-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 800;
  flex-shrink: 0;
}

.doc-op-module.is-active-module .doc-op-step-pill {
  background: var(--primary);
  color: #ffffff;
}

.doc-op-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text);
}

.doc-op-desc {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.btn-link-xs {
  background: none;
  border: none;
  padding: 0.15rem 0.25rem;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-link-xs:hover {
  text-decoration: underline;
}

.ops-preset-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ops-preset-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.14s ease;
}

.ops-preset-option:hover {
  border-color: #93c5fd;
  background: var(--surface);
}

.ops-preset-option.is-selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.ops-preset-option input[type="radio"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}

.ops-preset-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.ops-preset-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ops-auth-lock-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.7rem;
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.79rem;
  line-height: 1.4;
}

.ops-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.ops-check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.72rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fcfdff;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.ops-check-item:hover:not(.is-locked) {
  border-color: #93c5fd;
  background: var(--primary-soft);
}

.ops-check-item.is-locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.ops-check-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  margin-top: 0.16rem;
  flex-shrink: 0;
}

.ops-check-body {
  min-width: 0;
  flex: 1;
}

.ops-check-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.ops-check-title {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.ops-check-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
  line-height: 1.38;
}

.ops-empty-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--surface-subtle);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
}

.ops-apply-card {
  padding: 1.1rem 1.25rem;
}

.ops-apply-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

/* Right Preview Column */
.ops-preview-col {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  min-width: 0;
}

.ops-export-toolbar {
  padding: 1rem 1.25rem;
}

.ops-export-toolbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.ops-download-btns {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.ops-changes-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.ops-changes-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.a4-desk-viewport {
  background: #e2e8f0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  max-height: 82vh;
  overflow-y: auto;
}

.a4-sheets-stack {
  display: flex;
  flex-direction: column;
  gap: 1.65rem;
}

.a4-preview-sheet {
  position: relative;
  width: 100%;
  max-width: 790px;
  margin: 0 auto;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
  border-radius: 3px;
  /* Proportional to A4 margins: top 20mm, right 15mm, bottom 20mm, left 25mm */
  padding: 2.8rem 2.2rem 3rem 3.5rem;
  min-height: 540px;
}

.a4-sheet-break-badge {
  position: absolute;
  top: 0.75rem;
  left: 3.5rem;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.14rem 0.55rem;
}

@media (max-width: 720px) {
  .a4-desk-viewport {
    padding: 0.75rem;
  }
  .a4-preview-sheet {
    padding: 2.2rem 1.15rem 1.75rem;
  }
  .a4-sheet-break-badge {
    left: 1.15rem;
  }
}

.a4-preview-sheet.preset-classic_serif {
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 0.96rem;
  line-height: 1.38;
}

.a4-preview-sheet.preset-modern_sans {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Arial, sans-serif;
  font-size: 0.89rem;
  line-height: 1.44;
}

.a4-doc-title {
  text-align: center;
  font-size: 1.2em;
  font-weight: 700;
  margin: 0 0 0.9rem;
  line-height: 1.32;
  color: #0f172a;
}

.a4-appendix-stamp {
  text-align: right;
  font-size: 0.94em;
  font-weight: 700;
  color: #475569;
  margin: 0.25rem 0 0.45rem;
}

.a4-appendix-title {
  text-align: center;
  font-size: 1.12em;
  font-weight: 700;
  margin: 0 0 0.9rem;
  line-height: 1.34;
  color: #0f172a;
}

.a4-sec-heading {
  font-size: 1.05em;
  font-weight: 700;
  margin: 1.05rem 0 0.42rem;
  line-height: 1.32;
  color: #0f172a;
}

.a4-preview-sheet.preset-modern_sans .a4-doc-title,
.a4-preview-sheet.preset-modern_sans .a4-appendix-title,
.a4-preview-sheet.preset-modern_sans .a4-sec-heading,
.a4-preview-sheet.preset-modern_sans .a4-subheading {
  color: #1e3a8a;
}

.a4-subheading {
  font-size: 1em;
  font-weight: 700;
  margin: 0.8rem 0 0.35rem;
  color: #0f172a;
}

.a4-p {
  margin: 0 0 0.42rem;
  text-align: justify;
  overflow-wrap: anywhere;
}

.a4-p.a4-p-tight {
  margin-bottom: 0.16rem;
}

.a4-p.a4-align-left {
  text-align: left;
}

.a4-p.a4-align-center {
  text-align: center;
}

.a4-indent-sub {
  padding-left: 1.55rem;
}

.a4-table-wrap {
  margin: 0.6rem 0 0.8rem;
  overflow-x: auto;
}

.a4-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.87em;
  line-height: 1.32;
}

.a4-table th,
.a4-table td {
  border: 1px solid #94a3b8;
  padding: 0.38rem 0.52rem;
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}

.a4-table.is-sig-table td {
  border-color: #cbd5e1;
}

.a4-table th {
  background: #f1f5f9;
  font-weight: 700;
}

.a4-preview-sheet.preset-modern_sans .a4-table th {
  background: #eff6ff;
  border-color: #cbd5e1;
}

.a4-preview-sheet.preset-modern_sans .a4-table td {
  border-color: #cbd5e1;
}

/* Optional visual highlights in A4 Preview for AI-added sections & AI-fixed blocks */
.a4-op-pill {
  display: none;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  margin: 0.45rem 0 0.25rem;
  width: fit-content;
}

.a4-desk-viewport.show-op-highlights .a4-op-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.a4-op-pill.pill-added {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.a4-op-pill.pill-fixed {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.a4-desk-viewport.show-op-highlights .a4-sec.is-op-added {
  background: #f0fdf4;
  border-left: 3px solid #22c55e;
  padding: 0.55rem 0.85rem;
  margin: 0.75rem -0.85rem;
  border-radius: 0 6px 6px 0;
}

.a4-desk-viewport.show-op-highlights .a4-p.is-op-fixed,
.a4-desk-viewport.show-op-highlights .a4-subheading.is-op-fixed {
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
  padding: 0.3rem 0.65rem;
  margin-left: -0.65rem;
  border-radius: 0 4px 4px 0;
}

.a4-desk-viewport.show-op-highlights tr.is-op-added-row td {
  background: #f0fdf4;
}

.a4-desk-viewport.show-op-highlights td.is-op-fixed-cell,
.a4-desk-viewport.show-op-highlights th.is-op-fixed-cell {
  background: #dbeafe;
}




