/* ==========================================================================
   HumanizeAI - Production Design System & Global Stylesheet
   Mobile-First, Accessible (WCAG AAA), High Performance CSS
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Light Theme Colors (Clean, Modern Slate & Vibrant Indigo/Emerald) */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: #4f46e5;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --accent-primary: #4f46e5;
  --accent-primary-hover: #4338ca;
  --accent-primary-light: #eef2ff;
  --accent-secondary: #059669;
  --accent-secondary-hover: #047857;
  --accent-secondary-light: #ecfdf5;
  --accent-warning: #d97706;
  --accent-warning-light: #fffbeb;
  --accent-danger: #dc2626;
  --accent-danger-light: #fef2f2;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --container-max: 1240px;
  --header-height: 70px;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-primary: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-elevated: #1f2937;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --border-subtle: #1e293b;
  --border-medium: #334155;
  --border-focus: #818cf8;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;
  
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-primary-light: rgba(99, 102, 241, 0.15);
  --accent-secondary: #10b981;
  --accent-secondary-hover: #059669;
  --accent-secondary-light: rgba(16, 185, 129, 0.15);
  --accent-warning: #f59e0b;
  --accent-warning-light: rgba(245, 158, 11, 0.15);
  --accent-danger: #ef4444;
  --accent-danger-light: rgba(239, 68, 68, 0.15);
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6);
}

/* CSS Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--bg-primary);
}

img, svg {
  display: block;
  max-width: 100%;
}

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

a:hover {
  text-decoration: underline;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

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

/* Navigation Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-normal);
}

[data-theme="dark"] .site-header {
  background-color: rgba(11, 15, 25, 0.92);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.025em;
  flex-shrink: 0;
}

.logo-brand:hover {
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35);
}

.brand-highlight {
  color: var(--accent-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link:hover {
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  text-decoration: none;
}

.nav-link.active {
  color: var(--accent-primary);
  font-weight: 600;
  background-color: var(--accent-primary-light);
  text-decoration: none;
}

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

.nav-cta-btn {
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  background: var(--accent-primary);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
  transition: all var(--transition-fast);
}

.nav-cta-btn:hover {
  background: var(--accent-primary-hover);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.4);
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: 8px;
  flex-shrink: 0;
}

.mobile-menu-btn span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* Mobile Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-surface);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-bottom: 1px solid var(--border-medium);
  box-shadow: var(--shadow-xl);
  transform: translateY(-120%);
  transition: transform var(--transition-normal);
  z-index: 99;
}

.mobile-nav-drawer.open {
  transform: translateY(0);
}

.mobile-nav-link {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  color: var(--accent-primary);
  text-decoration: none;
}

/* Hero Section */
.hero-section {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  background-color: var(--accent-primary-light);
  color: var(--accent-primary);
  border: 1px solid rgba(79, 70, 229, 0.2);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.15rem;
  line-height: 1.2;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
}

/* Primary Tool Workbench */
.tool-workbench {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  margin-bottom: 3rem;
}

.tool-toolbar {
  padding: 0.85rem 1.25rem;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.toolbar-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mode-btn-group {
  display: inline-flex;
  background-color: var(--bg-surface);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.mode-tab {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 4px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.mode-tab:hover {
  color: var(--text-primary);
}

.mode-tab.active {
  background-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tool-select {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition-fast);
}

.tool-select:focus {
  border-color: var(--border-focus);
}

/* Tool Grid Canvas */
.workbench-grid {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 420px;
}

@media (min-width: 900px) {
  .workbench-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.editor-pane {
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: var(--bg-surface);
}

.editor-pane:first-child {
  border-bottom: 1px solid var(--border-subtle);
}

@media (min-width: 900px) {
  .editor-pane:first-child {
    border-bottom: none;
    border-right: 1px solid var(--border-subtle);
  }
}

.pane-header {
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background-color: rgba(248, 250, 252, 0.5);
}

[data-theme="dark"] .pane-header {
  background-color: rgba(17, 24, 39, 0.5);
}

.pane-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.preset-pills {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.preset-btn {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.preset-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.textarea-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 280px;
}

.editor-textarea {
  flex: 1;
  width: 100%;
  min-height: 280px;
  padding: 1.25rem;
  border: none;
  resize: vertical;
  background: transparent;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.7;
  outline: none;
}

.editor-textarea::placeholder {
  color: var(--text-muted);
}

.output-container {
  flex: 1;
  width: 100%;
  min-height: 280px;
  padding: 1.25rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  overflow-y: auto;
  word-break: break-word;
  white-space: pre-wrap;
}

.output-placeholder {
  height: 100%;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  gap: 0.75rem;
}

.placeholder-icon {
  width: 48px;
  height: 48px;
  color: var(--border-medium);
}

/* Diff Styling */
.diff-added {
  background-color: rgba(16, 185, 129, 0.2);
  color: #047857;
  text-decoration: none;
  padding: 0.1rem 0.25rem;
  border-radius: 3px;
  font-weight: 500;
}

[data-theme="dark"] .diff-added {
  color: #34d399;
}

.diff-removed {
  background-color: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
  text-decoration: line-through;
  padding: 0.1rem 0.25rem;
  border-radius: 3px;
  opacity: 0.75;
}

[data-theme="dark"] .diff-removed {
  color: #f87171;
}

/* Pane Footer Stats */
.pane-footer {
  padding: 0.65rem 1.25rem;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  font-size: 0.825rem;
  color: var(--text-secondary);
  gap: 0.75rem;
}

.stats-badges {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.stat-val {
  font-weight: 700;
  color: var(--text-primary);
}

/* Workbench Bottom Action Bar */
.workbench-bottom {
  padding: 1rem 1.25rem;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .workbench-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.action-buttons-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.3rem;
  font-size: 0.925rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  background-color: var(--accent-primary-hover);
  box-shadow: 0 4px 8px rgba(79, 70, 229, 0.35);
  text-decoration: none;
}

.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  background-color: var(--bg-tertiary);
  text-decoration: none;
}

.btn-ghost {
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
}

.btn-ghost:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  text-decoration: none;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.btn-icon:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Scores & Metric Cards */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-name {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-score {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.metric-progress-bar {
  height: 6px;
  width: 100%;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
  background: linear-gradient(90deg, #10b981, #059669);
}

.metric-desc {
  font-size: 0.775rem;
  color: var(--text-secondary);
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--text-secondary);
}

.breadcrumbs a:hover {
  color: var(--accent-primary);
}

.breadcrumb-separator {
  color: var(--border-medium);
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

/* SEO Content & Article Layout */
.content-wrapper {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.5rem;
  margin-bottom: 3.5rem;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .content-wrapper {
    padding: 3.5rem;
  }
}

.prose-article {
  max-width: 800px;
  margin: 0 auto;
}

.prose-article h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

.prose-article h2:first-of-type {
  margin-top: 0;
}

.prose-article h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.prose-article p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.prose-article ul, .prose-article ol {
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.prose-article li {
  font-size: 1.025rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.prose-article strong {
  color: var(--text-primary);
  font-weight: 600;
}

.feature-box {
  background-color: var(--bg-secondary);
  border-left: 4px solid var(--accent-primary);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.75rem 0;
}

.feature-box-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.comparison-table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

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

.comparison-table th {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 700;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-medium);
}

.comparison-table td {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

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

.comparison-table tr:nth-child(even) {
  background-color: rgba(241, 245, 249, 0.4);
}

[data-theme="dark"] .comparison-table tr:nth-child(even) {
  background-color: rgba(30, 41, 59, 0.4);
}

/* Accordion FAQs */
.accordion {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.accordion-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.accordion-item.active {
  border-color: var(--accent-primary);
}

.accordion-header {
  width: 100%;
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  background: none;
}

.accordion-icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-fast);
  color: var(--text-muted);
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

.accordion-content {
  display: none;
  padding: 0 1.25rem 1.25rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.accordion-item.active .accordion-content {
  display: block;
}

/* Tools Directory Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0 3.5rem;
}

.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition-normal);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
  text-decoration: none;
}

.tool-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-primary-light);
  color: var(--accent-primary);
}

.tool-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tool-card-desc {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}

.tool-card-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-muted);
  width: fit-content;
}

/* Search / Filter Inputs */
.search-filter-box {
  position: relative;
  max-width: 480px;
  margin: 0 auto 2rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 20px;
  height: 20px;
}

/* Contact & General Forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .form-grid.two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-error {
  font-size: 0.8rem;
  color: var(--accent-danger);
  display: none;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  background: #1e293b;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: toastSlideIn 0.3s ease forwards;
}

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

/* History Modal / Drawer */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1.25rem;
}

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

.modal-dialog {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.history-item {
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 1px solid var(--border-subtle);
}

.history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.775rem;
  color: var(--text-muted);
}

.history-snippet {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Site Footer */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.trust-badge-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Spinner / Loading */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.7s linear infinite;
}

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

/* Media Queries for Desktop Navigation */
@media (min-width: 840px) {
  .nav-desktop {
    display: flex;
  }
  .nav-cta-btn {
    display: inline-flex;
  }
  .mobile-menu-btn {
    display: none;
  }
  .hero-title {
    font-size: 2.85rem;
  }
}

/* Landing Page Specific Components */
.landing-hero {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.feature-grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 3rem 0;
}

@media (min-width: 640px) {
  .feature-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .feature-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.feature-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-primary);
}

.feature-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-primary-light);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}

.comparison-table-wrapper {
  overflow-x: auto;
  margin: 2.5rem 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.comparison-table th,
.comparison-table td {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.95rem;
}

.comparison-table th {
  background: var(--bg-secondary);
  font-weight: 700;
  color: var(--text-primary);
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 2.5rem 0;
}

@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.step-number {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

.cta-banner {
  background: linear-gradient(135deg, #312e81 0%, #1e1b4b 50%, #0f172a 100%);
  border-radius: var(--radius-xl);
  padding: 3.5rem 2rem;
  color: #ffffff;
  text-align: center;
  margin: 4rem 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.cta-banner h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  color: #ffffff;
}

.cta-banner p {
  color: #cbd5e1;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* ==========================================================================
   EXECUTIVE PRO WORKBENCH STYLING (Studio-Grade NLP Architecture)
   ========================================================================== */

.pro-workbench {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.06), 0 20px 25px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  margin-bottom: 3rem;
  transition: box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
}

[data-theme="dark"] .pro-workbench {
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Workbench Top Command Header */
.pro-command-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-medium);
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

@media (min-width: 992px) {
  .pro-command-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Mode Switcher Segmented Control */
.pro-modes-cluster {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pro-modes-cluster::-webkit-scrollbar {
  display: none;
}

.pro-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.pro-mode-pill:hover {
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}

.pro-mode-pill.active {
  background-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.pro-mode-pill .mode-icon {
  font-size: 0.95rem;
}

/* Tuning Dropdowns Cluster */
.pro-tuning-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.pro-select-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.65rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.pro-select-wrapper:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-primary-light);
}

.pro-select-label {
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.pro-select {
  background: transparent;
  border: none;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  padding-right: 0.25rem;
}

.pro-select option {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

/* Presets & Shortcuts Strip */
.pro-presets-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 1.25rem;
  background-color: rgba(241, 245, 249, 0.4);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.825rem;
}

[data-theme="dark"] .pro-presets-strip {
  background-color: rgba(15, 23, 42, 0.4);
}

.preset-chip-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.preset-chip-title {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.775rem;
}

.pro-chip {
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  font-weight: 600;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.pro-chip:hover {
  background: var(--bg-secondary);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.pro-detector-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-success);
  font-weight: 700;
  font-size: 0.775rem;
  background-color: rgba(16, 185, 129, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Dual Pane Workspace */
.pro-editors-grid {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 460px;
}

@media (min-width: 900px) {
  .pro-editors-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.pro-pane {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-surface);
  position: relative;
}

.pro-pane-input {
  border-bottom: 1px solid var(--border-medium);
}

@media (min-width: 900px) {
  .pro-pane-input {
    border-bottom: none;
    border-right: 1px solid var(--border-medium);
  }
}

.pro-pane-header {
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(248, 250, 252, 0.6);
  border-bottom: 1px solid var(--border-subtle);
  min-height: 48px;
}

[data-theme="dark"] .pro-pane-header {
  background-color: rgba(15, 23, 42, 0.6);
}

.pro-pane-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.pro-pane-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  letter-spacing: -0.01em;
}

.pro-capacity-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background-color: var(--bg-secondary);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.pro-actions-cluster {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pro-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pro-btn-action:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.pro-btn-action.active {
  background-color: var(--accent-primary-light);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* Output Tab Switcher */
.pro-output-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-secondary);
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.pro-view-tab {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pro-view-tab:hover {
  color: var(--text-primary);
}

.pro-view-tab.active {
  background: var(--bg-surface);
  color: var(--accent-primary);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* Editor Input Textarea */
.pro-textarea-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}

.pro-textarea {
  flex: 1;
  width: 100%;
  min-height: 320px;
  padding: 1.25rem;
  font-family: inherit;
  font-size: 0.975rem;
  line-height: 1.75;
  color: var(--text-primary);
  background: transparent;
  border: none;
  resize: vertical;
  outline: none;
}

.pro-textarea::placeholder {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Drag & Drop File Upload Overlay */
.pro-drop-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(79, 70, 229, 0.08);
  border: 2px dashed var(--accent-primary);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.pro-drop-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Output Display Container */
.pro-output-viewport {
  flex: 1;
  width: 100%;
  min-height: 320px;
  padding: 1.25rem;
  font-size: 0.975rem;
  line-height: 1.75;
  color: var(--text-primary);
  overflow-y: auto;
  word-break: break-word;
  white-space: pre-wrap;
  position: relative;
}

/* Rhythm Heatmap View */
.sentence-bubble {
  display: inline;
  padding: 0.1rem 0.25rem;
  border-radius: 4px;
  margin: 0 0.1rem;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.sentence-bubble:hover {
  text-decoration: underline;
  box-shadow: 0 0 0 2px var(--accent-primary);
}

.sentence-short {
  background-color: rgba(16, 185, 129, 0.15);
  border-bottom: 2px solid #10b981;
}

.sentence-medium {
  background-color: rgba(6, 182, 212, 0.15);
  border-bottom: 2px solid #06b6d4;
}

.sentence-long {
  background-color: rgba(168, 85, 247, 0.15);
  border-bottom: 2px solid #a855f7;
}

/* Output Empty State */
.pro-empty-state {
  height: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  gap: 0.85rem;
}

.pro-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

/* Pane Footer Metadata */
.pro-pane-footer {
  padding: 0.65rem 1.25rem;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.pro-stats-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pro-stat-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.pro-stat-tag strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Main Execution Action Area */
.pro-workbench-footer {
  padding: 1rem 1.25rem;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-medium);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .pro-workbench-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.pro-footer-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pro-shortcut-tip {
  font-size: 0.775rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pro-kbd {
  padding: 0.15rem 0.4rem;
  font-family: monospace;
  font-size: 0.725rem;
  font-weight: 700;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  color: var(--text-primary);
}

.btn-super-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
  transition: all var(--transition-fast);
}

.btn-super-primary:hover {
  background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
  color: #ffffff;
}

.btn-super-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Audio Voiceover Control Strip */
.pro-voice-strip {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.25rem;
  background-color: var(--accent-primary-light);
  border-top: 1px solid rgba(79, 70, 229, 0.2);
  font-size: 0.825rem;
  color: var(--accent-primary);
}

.pro-voice-strip.active {
  display: flex;
}

/* Live Analytics Hub & Metrics */
.pro-analytics-hub {
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.pro-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.pro-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pro-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.pro-metric-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.pro-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-medium);
}

.pro-metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pro-metric-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.pro-metric-val {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.pro-metric-bar {
  height: 8px;
  width: 100%;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.pro-metric-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fill-emerald {
  background: linear-gradient(90deg, #10b981, #059669);
}

.fill-indigo {
  background: linear-gradient(90deg, #6366f1, #4f46e5);
}

.fill-cyan {
  background: linear-gradient(90deg, #06b6d4, #0284c7);
}

.fill-amber {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.pro-metric-footnote {
  font-size: 0.775rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Interactive Clichés Panel & AI Audit Cards */
.pro-audit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .pro-audit-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.pro-audit-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}

.pro-audit-box-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cliche-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 48px;
}

.cliche-pill-replaced {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  background-color: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: #b91c1c;
}

[data-theme="dark"] .cliche-pill-replaced {
  color: #f87171;
}

.cliche-pill-arrow {
  color: var(--text-muted);
}

.cliche-pill-new {
  color: #047857;
  font-weight: 700;
}

[data-theme="dark"] .cliche-pill-new {
  color: #34d399;
}

/* Detector Pass Scorecard */
.detector-pass-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.detector-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detector-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.detector-status-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  background-color: rgba(16, 185, 129, 0.15);
  color: #059669;
}

/* Sentence Inspection Popover Modal */
.sentence-inspector-card {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  padding: 1.25rem;
  z-index: 1000;
  animation: slideInUp 0.25s ease-out;
}

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

