/* ==========================================================================
   pdfaccessready Modern Design System & CSS Stylesheet
   Curated palette, glassmorphism, micro-animations, accessible contrast
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Color Palette - Premium Midnight Obsidian & Cyber Indigo (Matching Screenshot) */
  --bg-primary: #070913;
  --bg-main: #070913;
  --bg-secondary: #0c1022;
  --bg-surface: #0e1328;
  --bg-card: rgba(14, 19, 40, 0.78);
  --bg-card-hover: rgba(22, 30, 60, 0.9);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.28);

  --accent: #8b5cf6;
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.2);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.2);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 15px 35px -5px rgba(0, 0, 0, 0.6), 0 4px 10px -2px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px var(--primary-glow);

  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s ease;
}

/* Base Reset & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: radial-gradient(circle at 50% 12%, rgba(99, 102, 241, 0.16) 0%, transparent 55%),
              radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
              var(--bg-primary);
  background-color: var(--bg-primary);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
}

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

a:hover {
  text-decoration: underline;
}

/* Navigation Header */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background-color: rgba(7, 9, 19, 0.85);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}


.nav-back-arrow-btn:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  transform: translateX(-2px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

.nav-brand .brand-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.nav-link.active {
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Status Pill */
.ai-status-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background-color: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.ai-status-pill:hover {
  background-color: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-dot.warning {
  background-color: var(--warning);
  box-shadow: 0 0 8px var(--warning);
}

.status-dot.danger {
  background-color: var(--danger);
  box-shadow: 0 0 8px var(--danger);
}

/* Layout Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
  flex: 1;
}

/* Page Header */
.page-header {
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-size: 2.2rem;
  margin-bottom: 0.3rem;
  background: linear-gradient(135deg, #ffffff 40%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Cards & Grid */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.6), 0 0 25px rgba(99, 102, 241, 0.08);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--primary-glow);
  text-decoration: none;
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

.btn-success {
  background-color: var(--success);
  color: white;
}

.btn-success:hover {
  background-color: #059669;
  text-decoration: none;
}

.btn-danger {
  background-color: var(--danger);
  color: white;
}

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

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  color: var(--text-main);
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.btn-icon.active {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.15);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

/* Upload Zone */
.upload-dropzone {
  border: 2px dashed rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.03);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: var(--shadow-glow);
}

.upload-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.upload-dropzone h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.upload-dropzone p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Score Visual Gauge */
.score-card {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
}

.score-gauge-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.score-gauge-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.score-gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 10;
}

.score-gauge-bar {
  fill: none;
  stroke: var(--primary);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.score-gauge-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-gauge-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}

.score-gauge-grade {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Tables */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.styled-table th {
  background-color: rgba(255, 255, 255, 0.03);
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.styled-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

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

.styled-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Badges & Status Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success { background: var(--success-glow); color: var(--success); }
.badge-warning { background: var(--warning-glow); color: var(--warning); }
.badge-danger { background: var(--danger-glow); color: var(--danger); }
.badge-info { background: var(--primary-glow); color: var(--primary); }

/* Alt-Text Studio Image Card */
.figure-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.figure-preview {
  height: 200px;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.figure-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.figure-meta {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.figure-textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.65rem;
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  resize: vertical;
}

.figure-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

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

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-input, .form-select {
  width: 100%;
  padding: 0.75rem;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 2000;
}

.toast {
  padding: 0.85rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Remediation Step-by-Step Live Progress Display
   ========================================================================== */
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.65s linear infinite;
  vertical-align: middle;
  flex-shrink: 0;
}

.btn.loading {
  opacity: 0.85;
  pointer-events: none;
  cursor: wait;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 10px rgba(99, 102, 241, 0.2); }
  50% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.45); }
  100% { box-shadow: 0 0 10px rgba(99, 102, 241, 0.2); }
}

.spin-icon {
  display: inline-block;
  animation: spinSlow 2s linear infinite;
}

.remediate-step-active-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  animation: pulseGlow 2.5s infinite ease-in-out;
  transition: all 0.3s ease;
}

.remediate-step-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.remediate-step-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
  transition: all 0.25s ease;
}

.remediate-step-item.pending {
  color: var(--text-subtle);
  opacity: 0.55;
}

.remediate-step-item.running {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.45);
  color: var(--text-main);
  font-weight: 500;
}

.remediate-step-item.completed {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.22);
  color: var(--text-main);
}

.remediate-step-item.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--danger);
}

.remediate-step-status-icon {
  width: 22px;
  text-align: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.remediate-step-content {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.remediate-step-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.remediate-step-changes {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  flex-shrink: 0;
}

.remediate-step-item.completed .remediate-step-changes {
  color: var(--success);
  background: rgba(16, 185, 129, 0.12);
}

.remediate-log-console {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  max-height: 110px;
  overflow-y: auto;
  color: var(--text-muted);
}

.remediate-log-console .log-line {
  margin-bottom: 0.2rem;
  word-break: break-all;
}

.remediate-log-console .log-success {
  color: var(--success);
}

.remediate-log-console .log-info {
  color: #93c5fd;
}

.remediate-log-console .log-danger {
  color: var(--danger);
}

/* Full-width container override for Tag Inspector (Step 3 Full Page View) */
.container.container-fluid {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0.35rem 0.85rem !important;
}

body.tag-viewer-page-body {
  overflow: hidden;
  height: 100vh;
}

.container.tags-main-container {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0.35rem 0.85rem !important;
  margin: 0 !important;
  height: calc(100vh - 54px);
  box-sizing: border-box;
  overflow: hidden;
}

.tags-workspace-page-fit {
  height: 100%;
  min-height: 520px;
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   99% Popup Modal for Tag Inspector
   ========================================================================== */

.tags-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  animation: modalFadeIn 0.18s ease-out;
}

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

.tags-modal-window {
  width: 99vw;
  height: 99vh;
  max-width: 99vw;
  max-height: 99vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tags-modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #070913;
}

/* ==========================================================================
   Tag Viewer Top Bar (Replaces Navbar Menu with Message & Close Button)
   ========================================================================== */

.tag-viewer-body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100vh;
  background: radial-gradient(circle at 50% 12%, rgba(99, 102, 241, 0.12) 0%, transparent 55%),
              #070913;
  background-color: #070913;
  font-family: var(--font-sans);
  color: var(--text-main);
}

.tag-viewer-topbar {
  height: 48px;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8, 11, 24, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  z-index: 100;
}

.tags-workspace-modal-fit {
  height: calc(100vh - 48px);
  padding: 0.6rem 0.85rem;
  box-sizing: border-box;
}

/* ==========================================================================
   Structure & Reading Order Inspector - 3-Column Layout
   [Control Options] (Left, Fixed) | [Page Display] (Center, Fluid) | [Tagging] (Right, Fixed)
   ========================================================================== */

.tags-workspace-3col {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 420px;
  gap: 0.85rem;
  height: calc(100vh - 80px);
  min-height: 560px;
  width: 100%;
}

@media (max-width: 1200px) {
  .tags-workspace-3col {
    grid-template-columns: 250px minmax(0, 1fr) 360px;
  }
}

@media (max-width: 900px) {
  .tags-workspace-3col {
    grid-template-columns: 1fr;
    height: auto;
  }
}

/* Section 1 (Left): Fixed-Width Controls Panel */
.tags-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  height: 100%;
  overflow-y: auto;
}

.control-section {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.control-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.control-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  margin-bottom: 0.15rem;
}

details.control-options-collapsible summary::-webkit-details-marker {
  display: none;
}
details.control-options-collapsible summary {
  list-style: none;
}
details.control-options-collapsible[open] .collapse-caret {
  transform: rotate(180deg);
}

.control-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
}

/* Control Options displayed one row from top to down */
.tag-checkbox-label-block {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.4rem 0.6rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.tag-checkbox-label-block:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.tag-checkbox-label-block input[type="checkbox"] {
  accent-color: var(--primary);
  cursor: pointer;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Section 2 (Center): Fluid Page Display Panel */
.tags-stage-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  min-width: 0;
}

.stage-viewport {
  flex: 1;
  overflow: auto;
  position: relative;
  background: #080b12;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem;
  min-height: 0;
}

.stage-canvas-container {
  position: relative;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.75);
  background: #ffffff;
  user-select: none;
  margin: auto;
  flex-shrink: 0;
}

.stage-page-img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background: #ffffff;
  object-fit: fill;
}

.stage-svg-flow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.reading-order-path-line {
  stroke: rgba(239, 68, 68, 0.85);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  animation: dash 20s linear infinite;
}

@keyframes dash {
  to {
    stroke-dashoffset: -1000;
  }
}

.stage-boxes-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  z-index: 20;
}

/* Individual Tag Bounding Box */
.tag-bbox {
  position: absolute;
  box-sizing: border-box;
  border-width: 2px;
  border-style: solid;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.12s ease-in-out;
  pointer-events: auto;
}

.tag-bbox:hover,
.tag-bbox.hovered {
  z-index: 30;
  filter: brightness(1.2);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.tag-bbox.selected {
  z-index: 50;
  border-width: 3px !important;
  border-color: #ff5722 !important; /* Orange */
  outline: 2px solid #d946ef !important; /* Magenta */
  outline-offset: 1px;
  box-shadow: 0 0 16px rgba(255, 87, 34, 0.85), 0 0 24px rgba(217, 70, 239, 0.65) !important;
  background-color: rgba(255, 87, 34, 0.15) !important;
}

.tag-bbox.selected .tag-pin {
  background-color: #ff5722 !important;
  border-color: #d946ef !important;
  box-shadow: 0 0 10px rgba(255, 87, 34, 0.9) !important;
}

.tag-bbox.selected .tag-badge-pill {
  background-color: #d946ef !important;
  border: 1px solid #ff5722 !important;
  box-shadow: 0 0 10px rgba(217, 70, 239, 0.9) !important;
}

/* Circular Reading Order Pin */
.tag-pin {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  border: 1.5px solid #ffffff;
  pointer-events: none;
  z-index: 2;
}

.stage-boxes-layer.hide-pins .tag-pin {
  display: none !important;
}

/* Tag Badge Pill */
.tag-badge-pill {
  position: absolute;
  top: -9px;
  right: -6px;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  letter-spacing: -0.02em;
  z-index: 2;
}

.stage-boxes-layer.hide-badges .tag-badge-pill {
  display: none !important;
}

/* Right Sidebar Panel */
.tags-sidebar-panel {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  height: 100%;
  min-height: 0;
}

.sidebar-panel-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 0.85rem;
}

.reading-order-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.reading-order-item {
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.reading-order-item:hover,
.reading-order-item.hovered {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(2px);
}

.reading-order-item.selected {
  border-width: 2px !important;
  border-color: #ff5722 !important; /* Orange */
  outline: 2px solid #d946ef !important; /* Magenta */
  outline-offset: -1px;
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.18), rgba(217, 70, 239, 0.18)) !important;
  box-shadow: 0 0 16px rgba(255, 87, 34, 0.5), 0 0 24px rgba(217, 70, 239, 0.35), inset 4px 0 0 #ff5722 !important;
}

.reading-order-item.selected .reading-order-badge {
  background-color: #ff5722 !important;
  box-shadow: 0 0 8px rgba(255, 87, 34, 0.8) !important;
}

.reading-order-item.selected .tag-pill {
  border-color: #d946ef !important;
  color: #d946ef !important;
  background: rgba(217, 70, 239, 0.15) !important;
}

.reading-order-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
}

.tag-pill {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
}

.reading-order-text {
  font-size: 0.82rem;
  color: var(--text-main);
  line-height: 1.4;
  word-break: break-word;
  cursor: pointer;
  border-radius: 4px;
  padding: 0.15rem 0.25rem;
  margin: 0 -0.25rem;
  transition: background 0.15s ease;
}
.reading-order-text:hover {
  background: rgba(255, 255, 255, 0.08);
}
#inspect-text:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
}

/* Structure Tree Styling */
.tree-node-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.tree-node-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.tree-node-row.selected {
  background: rgba(99, 102, 241, 0.2);
}

/* ==========================================================================
   Reading Order Drag & Drop, Right-Click Context Menu & Save Modifications
   ========================================================================== */

.reading-order-item {
  position: relative;
  user-select: none;
}

.reading-order-item[draggable="true"] {
  cursor: grab;
}

.reading-order-item[draggable="true"]:active {
  cursor: grabbing;
}

.reading-order-item.dragging {
  opacity: 0.35;
  border: 2px dashed var(--primary);
  transform: scale(0.98);
  background: rgba(99, 102, 241, 0.08);
}

.reading-order-item.drag-over-top {
  border-top: 3px solid #38bdf8 !important;
  box-shadow: inset 0 3px 6px rgba(56, 189, 248, 0.3);
}

.reading-order-item.drag-over-bottom {
  border-bottom: 3px solid #38bdf8 !important;
  box-shadow: inset 0 -3px 6px rgba(56, 189, 248, 0.3);
}

.drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: var(--text-subtle);
  padding: 0 0.25rem 0 0;
  font-size: 0.85rem;
  letter-spacing: -2px;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.reading-order-item:hover .drag-handle {
  opacity: 1;
  color: var(--primary);
}

/* Context Menu for Switching Tag Types */
.tag-context-menu {
  position: fixed;
  z-index: 10000;
  width: 480px;
  min-width: 460px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 0.65rem;
  box-sizing: border-box;
  animation: contextMenuFade 0.12s ease-out;
}

.tag-context-menu::-webkit-scrollbar {
  width: 6px;
}

.tag-context-menu::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.tag-context-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
}

.tag-context-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

@keyframes contextMenuFade {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.context-menu-header {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  padding: 0.25rem 0.4rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.context-menu-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
  margin: 0.5rem 0.35rem 0.25rem;
}

.context-menu-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.ctx-tag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.38rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  width: 100%;
}

.ctx-tag-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
}

.ctx-tag-btn.active-tag {
  background: var(--primary);
  color: #ffffff;
  border-color: #818cf8;
}

/* Save Changes Dirty / Unsaved Highlight State */
.btn-save-changes.dirty {
  background: #10b981 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.6) !important;
  cursor: pointer !important;
  opacity: 1 !important;
  animation: savePulse 2s infinite ease-in-out;
}

@keyframes savePulse {
  0%, 100% { box-shadow: 0 0 12px rgba(16, 185, 129, 0.5); }
  50% { box-shadow: 0 0 22px rgba(16, 185, 129, 0.9); }
}

.unsaved-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  margin-right: 0.3rem;
  animation: dotBlink 1s infinite alternate;
}

@keyframes dotBlink {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* Auto Saving Checkbox Control */
.auto-save-control {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.auto-save-control:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-light);
}

.auto-save-control input[type="checkbox"] {
  accent-color: #10b981;
  width: 15px;
  height: 15px;
  cursor: pointer;
  margin: 0;
}

#auto-save-indicator {
  font-size: 0.75rem;
  color: #10b981;
  font-weight: 600;
  transition: opacity 0.25s ease;
}

/* Add Tag Active State & Crosshair Drawing */
.btn-add-tag.active {
  background: #f59e0b !important;
  border-color: #d97706 !important;
  color: #0f172a !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.7) !important;
  font-weight: 800 !important;
  animation: addTagPulse 1.8s infinite ease-in-out;
}

@keyframes addTagPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(245, 158, 11, 0.5); }
  50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.95); }
}

.stage-canvas-container.crosshair-mode,
.stage-canvas-container.crosshair-mode * {
  cursor: crosshair !important;
}

.stage-draw-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9990;
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
  background: rgba(0, 0, 0, 0.001);
}

.selection-marquee {
  position: absolute;
  border: 2px dashed #ff5722;
  outline: 1px dashed #d946ef;
  background: rgba(255, 87, 34, 0.22);
  pointer-events: none;
  z-index: 9999;
  border-radius: 4px;
}

.ctx-new-tag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.38rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-mono);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
  box-sizing: border-box;
  width: 100%;
}

.ctx-new-tag-btn:hover {
  background: var(--primary, #6366f1);
  border-color: #818cf8;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Figure Alt Text Modal */
.figure-alt-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.figure-alt-modal-box {
  background: #111827;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
  width: 460px;
  max-width: 95vw;
  animation: contextMenuFade 0.15s ease-out;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.figure-alt-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
}

.btn-alt-modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  line-height: 1;
  transition: color 0.15s;
}

.btn-alt-modal-close:hover {
  color: #ef4444;
}

.figure-alt-modal-body {
  padding: 1.1rem;
}

.figure-alt-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.8rem 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
}

/* Left Panel Tabs & Bookmarks (TOC) */
.left-sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.left-tab-pane {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.bookmark-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  font-size: 0.82rem;
}

.bookmark-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(99, 102, 241, 0.4);
}

.bookmark-title-btn {
  background: none;
  border: none;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bookmark-title-btn:hover {
  color: var(--primary);
  text-decoration: underline;
}

.bookmark-level-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.bookmark-page-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}

.bookmark-page-badge:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

.bookmark-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.bookmark-action-btn {
  background: transparent;
  border: none;
  padding: 0.15rem 0.3rem;
  font-size: 0.72rem;
  cursor: pointer;
  border-radius: 3px;
  color: var(--text-subtle);
  transition: all 0.15s;
}

.bookmark-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.bookmark-action-btn.btn-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

/* Collapsible Workspace Samples in Dashboard */
.workspace-samples-collapsible summary::-webkit-details-marker {
  display: none;
}
.workspace-samples-collapsible[open] .samples-caret {
  transform: rotate(180deg);
}
.workspace-samples-summary:hover {
  border-color: rgba(99, 102, 241, 0.4) !important;
  background: rgba(22, 30, 60, 0.9) !important;
}

/* Score Badges in Dashboard */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.2rem 0.5rem;
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.score-badge.score-good {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.score-badge.score-medium {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.score-badge.score-low {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.score-badge.score-none {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-subtle);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.btn-delete-doc:hover {
  background: rgba(239, 68, 68, 0.3) !important;
  border-color: rgba(239, 68, 68, 0.7) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   PAC ScreenReader Preview Styles (Step 4: Screen Reader)
   Replicates PAC ScreenReader UI layout, section cards, and tag rails
   ========================================================================== */

.screen-reader-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.reader-toolbar-card {
  position: sticky;
  top: 72px;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(14, 19, 40, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.pac-screen-reader-container {
  transition: font-size 0.2s ease;
}

.pac-doc-boundary {
  display: flex;
  background: rgba(11, 15, 30, 0.85);
  border: 2px solid rgba(100, 116, 139, 0.4);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.pac-doc-rail-label {
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  background: #334155;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 1.5rem 0.5rem;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 2px solid rgba(100, 116, 139, 0.5);
  user-select: none;
}

.pac-doc-body {
  flex: 1;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pac-page-section {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.pac-page-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 1rem;
  background: rgba(30, 41, 59, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pac-sect-badge {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.15);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.pac-elements-stream {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pac-elem-card {
  display: flex;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.15s ease;
}

.pac-elem-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pac-elem-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.6rem 0.65rem;
  background: rgba(30, 41, 59, 0.5);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 75px;
  gap: 0.4rem;
}

.pac-tag-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  line-height: 1.2;
}

.pac-tag-h1, .pac-tag-h2, .pac-tag-h3, .pac-tag-h4, .pac-tag-h5, .pac-tag-h6 {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.pac-tag-p {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.pac-tag-figure {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.4);
}

.pac-tag-link {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.pac-tag-l, .pac-tag-li {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.pac-tag-artifact {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.35);
}

.pac-order-pill {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-subtle);
}

.pac-elem-content {
  flex: 1;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
}

.pac-heading-h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.pac-heading-h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f1f5f9;
}

.pac-heading-h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #e2e8f0;
}

.pac-para-block, .pac-list-block {
  line-height: 1.6;
  color: var(--text-main);
  white-space: pre-wrap;
}

.pac-bullet {
  color: #f59e0b;
  margin-right: 0.4rem;
  font-weight: 700;
}

.pac-figure-block {
  width: 100%;
}

.pac-alt-announcement {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-top: 0.35rem;
}

.pac-alt-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #34d399;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.15rem;
}

.pac-alt-text {
  font-size: 0.88rem;
  color: #a7f3d0;
  font-style: italic;
}

.pac-alt-warning {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}





