/* ── Hint tooltip above action button ──────────────────── */
.anon-action-btn-wrap {
  position: relative;
  flex-shrink: 0;
}

.anon-hint-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-petrol);
  color: #fff;
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-family: var(--font);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  letter-spacing: 0.01em;
  animation: hintBounce 1.8s ease-in-out infinite;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(45, 106, 94, 0.35);
}

.anon-hint-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--color-petrol);
}

.anon-hint-tooltip.hidden {
  display: none;
}

@keyframes hintBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(-5px); }
}

/* ── Anonymize click-dummy app window ──────────────────── */
.anon-app {
  margin: 0 auto 28px;
  max-width: 920px;
  aspect-ratio: 16 / 9;
  background: var(--editor-bg);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
}

/* App toolbar */
.anon-app-toolbar {
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  position: relative;
}

.anon-toolbar-left,
.anon-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}


.anon-app-title {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.01em;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.anon-step-badge {
  font-size: 0.65rem;
  font-family: var(--font);
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.07);
  padding: 3px 9px;
  border-radius: 3px;
  letter-spacing: 0.03em;
}

.anon-step-num {
  color: rgba(255, 255, 255, 0.7);
  font-weight: var(--fw-semibold);
}

/* Tab bar */
.anon-app-tabs {
  background: var(--editor-bg-alt);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0 8px;
  display: flex;
  flex-shrink: 0;
}

.anon-app-tab {
  font-size: 0.72rem;
  font-family: var(--font);
  color: rgba(255, 255, 255, 0.75);
  padding: 5px 12px;
  letter-spacing: 0.01em;
  background: var(--editor-bg);
  border-top: 1px solid var(--color-petrol);
  border-bottom: 1px solid var(--editor-bg);
  margin-bottom: -1px;
}

.anon-app-filename {
  transition: opacity 0.2s ease;
}

.anon-app-tab-add {
  font-size: 0.8rem;
  font-family: var(--font);
  color: rgba(255, 255, 255, 0.35);
  padding: 5px 10px;
  cursor: default;
  transition: color 0.15s ease;
}

.anon-app-tab-add:hover {
  color: rgba(255, 255, 255, 0.55);
}

/* Options bar */
.anon-options-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.anon-option-label {
  font-size: 0.65rem;
  font-family: var(--font);
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 2px;
  flex-shrink: 0;
}

.anon-options-sep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 4px;
}

/* ── Mode buttons ───────────────────────────────────────── */
.anon-mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-family: var(--font);
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 13px;
  border-radius: 5px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.2s ease;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.anon-mode-btn svg {
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.anon-mode-btn:hover:not(.active):not(:disabled) {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
}

.anon-mode-btn.active {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(45, 106, 94, 0.18);
  border-color: rgba(45, 106, 94, 0.4);
}

.anon-mode-btn.active svg {
  opacity: 1;
}

/* Mode buttons only visible + interactive on screen 3 (exported) */
.anon-app:not([data-state="exported"]) .anon-options-bar {
  display: none;
}

/* ── Auto lang badge ────────────────────────────────────── */
.anon-lang-auto {
  font-size: 0.65rem;
  font-family: var(--font);
  color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 9px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Document area */
.anon-app-document {
  flex: 1;
  min-height: 0;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Loading overlay */
.anon-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 2;
}

.anon-app[data-state="loading"] .anon-loading-overlay {
  opacity: 1;
  pointer-events: auto;
}

.anon-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.anon-loading-text {
  font-size: 0.88rem;
  font-family: var(--font);
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.02em;
  animation: loadTextPulse 1.1s ease-in-out infinite;
}

@keyframes loadTextPulse {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 1; }
}

.anon-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--color-petrol);
  border-radius: 50%;
  animation: anonSpin 0.7s linear infinite;
}

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

/* Visual shift: detected state gets subtle dark tint on page */
.anon-app[data-state="detected"] .anon-pdf-page,
.anon-app[data-state="exporting"] .anon-pdf-page,
.anon-app[data-state="exported"] .anon-pdf-page {
  background: #fafaf8;
}

.anon-app[data-state="detected"] .anon-pdf-page::before,
.anon-app[data-state="exporting"] .anon-pdf-page::before,
.anon-app[data-state="exported"] .anon-pdf-page::before {
  background: linear-gradient(90deg, var(--color-petrol) 0%, var(--color-petrol) 100%);
}

.anon-app[data-state="detected"] .anon-app-document,
.anon-app[data-state="exporting"] .anon-app-document {
  background: rgba(45, 106, 94, 0.03);
}

.anon-app[data-state="exported"] .anon-app-document {
  background: rgba(45, 106, 94, 0.05);
}

/* Action bar */
.anon-app-actionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.anon-back-btn {
  font-size: 0.78rem;
  font-family: var(--font);
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 14px 6px 10px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.anon-back-btn:hover:not(:disabled) {
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.anon-back-btn:disabled {
  opacity: 0;
  pointer-events: none;
}

.anon-back-btn svg {
  width: 12px;
  height: 12px;
}

.anon-app-status {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.anon-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-family: var(--font);
  font-weight: var(--fw-semibold);
  color: #fff;
  background: linear-gradient(135deg, #2d8a6e 0%, #23735b 100%);
  padding: 8px 18px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(45, 106, 94, 0.4), 0 0 0 0 rgba(45, 106, 94, 0.4);
  animation: anonBtnPulse 2s ease-in-out infinite;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.anon-action-btn-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.anon-action-btn:hover:not(:disabled) {
  transform: scale(1.03);
  box-shadow: 0 4px 14px rgba(45, 106, 94, 0.5);
  animation: none;
}

.anon-action-btn:disabled {
  opacity: 0.35;
  cursor: default;
  animation: none;
  box-shadow: none;
}

@keyframes anonBtnPulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(45, 106, 94, 0.4), 0 0 0 0 rgba(45, 106, 94, 0.5); }
  50%      { box-shadow: 0 2px 8px rgba(45, 106, 94, 0.4), 0 0 0 8px rgba(45, 106, 94, 0); }
}

/* Status bar */
.anon-app-statusbar {
  background: var(--editor-status);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 3px 12px;
  display: flex;
  gap: 5px;
  font-size: 0.6rem;
  font-family: var(--font);
  color: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
  align-items: center;
}

.anon-statusbar-spacer {
  flex: 1;
}

/* ── PDF Page (shared) ─────────────────────────────────── */
.anon-pdf-page {
  background: var(--pdf-page);
  border-radius: 2px;
  padding: 24px 28px;
  width: 100%;
  max-width: 600px;
  max-height: 100%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1), 0 4px 24px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
  font-family: 'Source Serif 4', serif;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #1a1a1a;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease;
}

.anon-pdf-page::after {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  right: -4px;
  width: 4px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.04), transparent);
  border-radius: 0 2px 2px 0;
}

.anon-pdf-page::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--color-petrol) 0%, rgba(45, 106, 94, 0.2) 100%);
  margin: -14px -16px 8px -16px;
}

.anon-pdf-page p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: #1a1a1a;
  margin-bottom: 5px;
}

.anon-pdf-page p strong {
  font-weight: var(--fw-semibold);
}

.anon-pdf-meta {
  font-size: 0.58rem;
  color: #888;
  margin-bottom: 4px;
  font-family: var(--font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.anon-pdf-date {
  font-size: 0.7rem;
  color: #444;
  margin-bottom: 2px;
  font-family: var(--font);
}

.anon-pdf-ref {
  font-size: 0.7rem;
  color: #444;
  margin-bottom: 10px;
  font-family: var(--font);
}

.anon-pdf-salutation {
  font-weight: var(--fw-medium);
  margin-bottom: 4px;
}

.anon-pdf-closing {
  margin-top: 8px;
  font-style: italic;
  color: #333;
  font-size: 0.82rem;
}

.anon-pdf-title {
  font-weight: var(--fw-semibold);
  font-size: 1.1rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.anon-pdf-footer {
  margin-top: 6px;
  border-top: 1px solid #e5e5e5;
  padding-top: 4px;
  font-size: 0.58rem;
  color: #999;
  font-family: var(--font);
}

.anon-ghost-lines {
  margin: 4px 0 3px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.anon-ghost-line {
  height: 4px;
  background: #e8e8e6;
  border-radius: 3px;
}

/* ── Entity highlights (click-dummy) ───────────────────── */
.anon-entity {
  display: inline;
  padding: 0;
  border-radius: 2px;
  font-family: var(--font);
  font-size: inherit;
  position: relative;
  transition: background 0.35s ease, outline-color 0.35s ease, padding 0.25s ease;
  outline: 1px solid transparent;
}

.anon-entity.detected,
.anon-entity.exported {
  padding: 1px 4px;
}

.anon-original {
  font-weight: inherit;
  transition: opacity 0.15s ease;
}

.anon-entity.detected .anon-original {
  font-weight: var(--fw-semibold);
}

.anon-replaced {
  display: none;
}

.anon-conf-badge {
  display: none;
  font-size: 0.48rem;
  font-family: var(--font);
  font-weight: 400;
  margin-left: 1px;
  vertical-align: super;
  opacity: 0;
  transition: opacity 0.3s ease 0.1s;
}

.anon-entity.detected .anon-conf-badge {
  display: inline;
}

/* Placeholders */
.anon-placeholder {
  background: rgba(45, 106, 94, 0.15);
  color: var(--color-petrol);
  padding: 1px 4px;
  border-radius: 2px;
  font-weight: var(--fw-medium);
  font-family: var(--font);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

/* ── State: detected ───────────────────────────────────── */
.anon-entity.detected.anon-entity--per,
.anon-entity.detected.anon-entity--org {
  background: rgba(231, 76, 60, 0.12);
  outline-color: rgba(231, 76, 60, 0.3);
}

.anon-entity.detected.anon-entity--loc {
  background: rgba(52, 152, 219, 0.12);
  outline-color: rgba(52, 152, 219, 0.3);
}

.anon-entity.detected.anon-entity--id {
  background: rgba(155, 89, 182, 0.12);
  outline-color: rgba(155, 89, 182, 0.35);
}

.anon-entity.detected .anon-conf-badge { opacity: 1; }

.anon-entity--per .anon-conf-badge,
.anon-entity--org .anon-conf-badge { color: #c0392b; }
.anon-entity--loc .anon-conf-badge  { color: #2980b9; }
.anon-entity--id  .anon-conf-badge  { color: #8e44ad; }

/* ── State: exported ───────────────────────────────────── */
.anon-entity.exported .anon-original {
  display: none;
}

.anon-entity.exported .anon-replaced {
  display: inline;
  animation: swapFadeIn 0.2s ease forwards;
}

.anon-entity.exported .anon-conf-badge {
  display: none;
}

.anon-entity.exported {
  background: rgba(45, 106, 94, 0.08) !important;
  outline-color: rgba(45, 106, 94, 0.2) !important;
}

@keyframes swapFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Entity indicator (button) ─────────────────────────── */
.anon-entity-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-family: var(--font);
  font-weight: var(--fw-medium);
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.11);
  padding: 7px 13px;
  border-radius: 5px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.anon-entity-indicator.revealed {
  opacity: 1;
  transform: translateY(0);
}

.anon-entity-indicator:hover {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

/* Only visible in detected state */
.anon-app:not([data-state="detected"]) .anon-entity-indicator {
  opacity: 0 !important;
  pointer-events: none;
  transform: translateY(4px);
}

/* ── Entity popover ────────────────────────────────────── */
.anon-entity-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #252a30;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 0 4px;
  min-width: 260px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.anon-entity-popover::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #252a30;
}

.anon-entity-popover.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.anon-popover-title {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.3);
  padding: 0 14px 7px;
  font-family: var(--font);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 3px;
}

.anon-popover-list {
  list-style: none;
  margin: 0;
  padding: 2px 0;
}

.anon-popover-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  font-family: var(--font);
  font-size: 0.74rem;
  transition: background 0.1s ease;
}

.anon-popover-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.anon-popover-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.anon-popover-type {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 38px;
  flex-shrink: 0;
}

.anon-popover-orig {
  color: rgba(255, 255, 255, 0.75);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.anon-popover-arrow {
  color: rgba(255, 255, 255, 0.18);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.anon-popover-repl {
  color: var(--color-petrol);
  font-size: 0.7rem;
  font-weight: var(--fw-medium);
  font-family: var(--font);
  flex-shrink: 0;
}

/* ── Export actions group (clipboard + download) ──────────── */
.anon-export-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

.anon-app[data-state="exported"] .anon-export-actions {
  display: flex;
}

.anon-export-actions button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 0.75rem;
  font-family: var(--font);
  font-weight: var(--fw-medium);
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.anon-export-actions button:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

.anon-export-actions button svg {
  flex-shrink: 0;
}

.anon-clipboard-btn.copied,
.anon-export-actions .anon-clipboard-btn.copied {
  color: var(--color-petrol);
  border-color: rgba(45, 106, 94, 0.35);
  background: rgba(45, 106, 94, 0.1);
}

.anon-clipboard-btn.copied span {
  color: var(--color-petrol);
}

/* ── Schwärzung mode: exported entities ────────────────── */
.anon-app[data-mode="schwarz"] .anon-entity.exported .anon-placeholder {
  color: transparent;
  background: #1e1e1e;
  border-radius: 2px;
  user-select: none;
  padding: 1px 5px;
}

.anon-dot-sm {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.anon-dot-sm--per { background: #e74c3c; }
.anon-dot-sm--loc { background: #3498db; }
.anon-dot-sm--id  { background: #9b59b6; }

.anon-entity-count {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font);
  margin-left: 3px;
}

/* ── Modal CTA ─────────────────────────────────────────── */
.modal-cta-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 24px;
}

.anon-modal-cta {
  margin: 0;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
  .anon-app {
    max-width: 100%;
    aspect-ratio: auto;
  }

  .anon-app-document {
    padding: 14px 10px;
  }

  .anon-pdf-page,
  .anon-pdf-page p {
    font-size: 0.5625rem;
  }

  .anon-pdf-title {
    font-size: 0.85rem;
  }

  .anon-options-bar {
    flex-wrap: wrap;
    gap: 4px;
    padding: 5px 10px;
  }


  .anon-back-btn span {
    display: none;
  }
}

/* ══════════════════════════════════════════════════════════
   Below: styles still needed for the preview card on the
   products section (not the modal click-dummy).
   ══════════════════════════════════════════════════════════ */


/* Editor chrome (preview card) */
.anon-editor {
  flex: 1;
  background: var(--editor-bg);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
}

.anon-editor-toolbar {
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.anon-editor-title {
  font-size: 0.8rem;
  color: var(--editor-text);
  font-weight: var(--fw-medium);
  letter-spacing: 0.01em;
}

.anon-editor-controls {
  display: flex;
  gap: 4px;
}

.anon-editor-ctrl-btn {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.anon-editor-tabs {
  background: var(--editor-bg-alt);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0 8px;
  display: flex;
  flex-shrink: 0;
}

.anon-editor-tab {
  font-size: 0.625rem;
  font-family: var(--font);
  color: rgba(255, 255, 255, 0.28);
  padding: 4px 10px;
  letter-spacing: 0.01em;
}

.anon-editor-tab.active {
  color: rgba(255, 255, 255, 0.65);
  background: var(--editor-bg);
  border-top: 1px solid var(--color-petrol);
  border-bottom: 1px solid var(--editor-bg);
  margin-bottom: -1px;
}

.anon-editor-body {
  flex: 1;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

.anon-editor-linenums {
  padding: 14px 8px 14px 10px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.anon-editor-linenums span {
  font-size: 0.56rem;
  font-family: var(--font);
  color: rgba(255, 255, 255, 0.14);
  line-height: 1.7;
  text-align: right;
  display: block;
  min-width: 10px;
}

.anon-editor-text {
  flex: 1;
  padding: 14px 15px;
  font-family: 'Source Serif 4', serif;
  font-size: 0.75rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
}

.anon-editor-text p {
  font-size: 0.75rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 5px;
}

.anon-editor-statusbar {
  background: var(--editor-status);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 2px 10px;
  display: flex;
  gap: 4px;
  font-size: 0.52rem;
  font-family: var(--font);
  color: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
  align-items: center;
}

.anon-editor-doc-title {
  font-weight: var(--fw-medium);
  font-size: 0.78rem;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
}

/* Preview card entity highlights */
.anon-editor-text .anon-entity {
  padding: 1px 4px;
  border-radius: 2px;
  font-family: var(--font);
  font-size: 0.75rem;
}

.anon-editor-text .anon-entity--per {
  background: rgba(231, 76, 60, 0.3);
  color: #ff8a75;
  outline: 1px solid rgba(231, 76, 60, 0.4);
}

.anon-editor-text .anon-entity--org {
  background: rgba(231, 76, 60, 0.3);
  color: #ff8a75;
  outline: 1px solid rgba(231, 76, 60, 0.4);
}

.anon-editor-text .anon-entity--loc {
  background: rgba(52, 152, 219, 0.3);
  color: #75b8ff;
  outline: 1px solid rgba(52, 152, 219, 0.4);
}

.anon-editor-text .anon-entity--id {
  background: rgba(155, 89, 182, 0.3);
  color: #c8a0e0;
  outline: 1px solid rgba(155, 89, 182, 0.45);
}

.anon-editor-text .anon-conf-badge {
  font-size: 0.48rem;
  font-family: var(--font);
  font-weight: 400;
  margin-left: 1px;
  vertical-align: super;
  transition: opacity 0.3s ease 0.15s;
}

.anon-editor-text .anon-entity--per .anon-conf-badge,
.anon-editor-text .anon-entity--org .anon-conf-badge { color: #ff8a75; }
.anon-editor-text .anon-entity--loc .anon-conf-badge  { color: #75b8ff; }
.anon-editor-text .anon-entity--id  .anon-conf-badge  { color: #c8a0e0; }

/* Preview card detect animation */
.anon-detect {
  background: transparent !important;
  outline-color: transparent !important;
  color: rgba(255, 255, 255, 0.5) !important;
  transition: background 0.4s ease, outline-color 0.4s ease, color 0.4s ease;
}

.anon-detect.detected.anon-entity--per,
.anon-detect.detected.anon-entity--org {
  background: rgba(231, 76, 60, 0.3) !important;
  outline-color: rgba(231, 76, 60, 0.4) !important;
  color: #ff8a75 !important;
}

.anon-detect.detected.anon-entity--loc {
  background: rgba(52, 152, 219, 0.3) !important;
  outline-color: rgba(52, 152, 219, 0.4) !important;
  color: #75b8ff !important;
}

.anon-detect.detected.anon-entity--id {
  background: rgba(155, 89, 182, 0.3) !important;
  outline-color: rgba(155, 89, 182, 0.45) !important;
  color: #c8a0e0 !important;
}

.anon-detect .anon-conf-badge { opacity: 0; }
.anon-detect.detected .anon-conf-badge { opacity: 1; }

/* Preview card detect indicator */
.anon-detect-indicator {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.anon-detect-indicator.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Editor footer (preview card) */
.anon-editor-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.anon-export-btn {
  font-size: 0.7rem;
  color: #141414;
  background: #d4c97a;
  padding: 2px 10px;
  border-radius: 3px;
  font-family: var(--font);
  font-weight: var(--fw-medium);
}
