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

/* ─────────────────────────────────────────────────────────────────
   1. DESIGN TOKEN SYSTEM
───────────────────────────────────────────────────────────────── */
:root {
  /* Surfaces */
  --bg-base:           #050608;
  --bg-sidebar:        rgba(8, 10, 15, 0.45);
  --bg-card:           rgba(12, 15, 22, 0.45);
  --bg-card-hover:     rgba(18, 23, 34, 0.55);
  --bg-input:          rgba(0, 0, 0, 0.45);

  /* Borders */
  --border-base:       rgba(255, 255, 255, 0.08);
  --border-bright:     rgba(255, 255, 255, 0.18);
  --border-accent:     rgba(168, 85, 247, 0.35);

  /* Text */
  --text-primary:      #fcfdfe;
  --text-secondary:    #a3a8b4;
  --text-muted:        #5a6375;
  --text-mono:         #3bf3c3;

  /* Core Palette & Neon (from mockup style) */
  --violet:            #bd5eff;
  --violet-rgb:        189, 94, 255;
  --blue:              #3b82f6;
  --blue-rgb:          59, 130, 246;
  --cyan:              #00f5ff;
  --cyan-rgb:          0, 245, 255;
  --teal:              #2ae8b2; /* Mint green from the progress bar in the mockup */
  --teal-rgb:          42, 232, 178;
  --indigo:            #7c3aed;
  --indigo-rgb:        124, 58, 237;

  /* Severity Colors (Neon accents) */
  --rose:              #ff3860;
  --rose-rgb:          255, 56, 96;
  --amber:             #ff9f1c;
  --amber-rgb:         255, 159, 28;
  --yellow:            #ffd166;
  --yellow-rgb:        255, 209, 102;
  --orange:            #ff7a00;
  --orange-rgb:        255, 122, 0;

  /* Aliases */
  --accent-primary:    var(--violet);
  --accent-primary-rgb: var(--violet-rgb);
  --accent-secondary:  var(--blue);
  --accent-teal:       var(--teal);
  --severity-high:     var(--rose);
  --severity-high-rgb: var(--rose-rgb);
  --severity-medium:   var(--orange);
  --severity-medium-rgb: var(--orange-rgb);
  --severity-low:      var(--yellow);
  --severity-low-rgb:  var(--yellow-rgb);
  --score-high:        var(--teal);
  --score-medium:      var(--amber);
  --score-low:         var(--rose);

  /* Layout */
  --sidebar-w:         310px;
  --header-h:          60px;

  /* Animation */
  --ease-out-expo:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-fast:         0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-normal:       0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring:       0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* Glow & Glass reflections */
  --glow-base:         0 20px 50px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255,255,255,0.08);
  --glow-violet:       0 0 25px rgba(189, 94, 255, 0.25);
  --glow-cyan:         0 0 25px rgba(0, 245, 255, 0.25);
  --glow-teal:         0 0 25px rgba(42, 232, 178, 0.35);
}

/* ─────────────────────────────────────────────────────────────────
   2. BASE RESET
───────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background-color: #06070a;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(189, 94, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(42, 232, 178, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
  background-size: 200% 200%;
  animation: meshAnimation 25s ease infinite;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  position: relative;
}

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

/* ─────────────────────────────────────────────────────────────────
   3. AMBIENT NEON BACKGROUND & GLASS SHAPES
───────────────────────────────────────────────────────────────── */
.bg-decorations {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background-color: #050608;
}

/* Glowing Neon Orbs */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px);
  opacity: 0.38;
  mix-blend-mode: screen;
  pointer-events: none;
}

.orb-teal {
  width: 32vw;
  height: 32vw;
  background: radial-gradient(circle, #2ae8b2 0%, rgba(42, 232, 178, 0.4) 50%, transparent 80%);
  top: -8%;
  left: 8%;
  animation: orbFloat1 32s ease-in-out infinite alternate;
}

.orb-violet {
  width: 35vw;
  height: 35vw;
  background: radial-gradient(circle, #bd5eff 0%, rgba(189, 94, 255, 0.3) 50%, transparent 80%);
  bottom: -10%;
  left: 25%;
  animation: orbFloat2 38s ease-in-out infinite alternate;
}

.orb-blue {
  width: 28vw;
  height: 28vw;
  background: radial-gradient(circle, #3b82f6 0%, rgba(59, 130, 246, 0.25) 50%, transparent 80%);
  top: 30%;
  right: 10%;
  animation: orbFloat3 28s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6%, 8%) scale(1.15); }
  100% { transform: translate(-4%, -5%) scale(0.9); }
}

@keyframes orbFloat2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-8%, 5%) scale(0.85); }
  100% { transform: translate(5%, -7%) scale(1.1); }
}

@keyframes orbFloat3 {
  0% { transform: translate(0, 0) scale(1.05); }
  50% { transform: translate(7%, -10%) scale(0.9); }
  100% { transform: translate(-5%, 6%) scale(1.2); }
}

/* Glass Floating Shapes */
.glass-shape {
  position: absolute;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.008);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12),
              0 15px 35px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  animation: glassDrift 24s ease-in-out infinite alternate;
}

/* Glass Concentric Rings */
.ring-1, .ring-2 {
  border-radius: 50%;
  border: 30px solid rgba(255, 255, 255, 0.015);
  background: transparent;
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.005),
              0 20px 45px rgba(0, 0, 0, 0.55);
  filter: blur(0.5px);
}

.ring-1 {
  width: 340px;
  height: 340px;
  top: -100px;
  right: -60px;
  border-width: 40px;
  animation-duration: 35s;
}

.ring-2 {
  width: 200px;
  height: 200px;
  bottom: -40px;
  left: -60px;
  border-width: 20px;
  animation-duration: 25s;
  animation-delay: -7s;
}

/* Glass Interactive Symbols */
.glass-circle-plus, .glass-circle-cross {
  border-radius: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.35);
  font-size: 20px;
  box-shadow: inset 0 1.5px 3px rgba(255, 255, 255, 0.15),
              0 10px 25px rgba(0, 0, 0, 0.45);
}

.glass-circle-plus {
  top: 18%;
  left: 52%;
  animation-duration: 18s;
  animation-delay: -4s;
}

.glass-circle-plus span {
  transform: translateY(-1px);
}

.glass-circle-cross {
  bottom: 22%;
  left: 32%;
  width: 44px;
  height: 44px;
  font-size: 14px;
  animation-duration: 20s;
  animation-delay: -10s;
}

/* Hollow Circles & Spheres */
.circle-hollow-1, .circle-hollow-2 {
  border-radius: 50%;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 3.5px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.03),
              0 8px 18px rgba(0, 0, 0, 0.4);
}

.circle-hollow-1 {
  bottom: 28%;
  right: 28%;
  animation-duration: 22s;
}

.circle-hollow-2 {
  bottom: 15%;
  right: 48%;
  width: 22px;
  height: 22px;
  border-width: 2.5px;
  animation-duration: 16s;
  animation-delay: -3s;
}

.sphere-1 {
  border-radius: 50%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.005) 50%, rgba(0,0,0,0.7) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  top: 14%;
  left: 9%;
  animation-duration: 28s;
  animation-delay: -8s;
}

.sphere-2 {
  border-radius: 50%;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.002) 60%, rgba(0,0,0,0.7) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  bottom: 12%;
  right: 12%;
  animation-duration: 22s;
  animation-delay: -14s;
}

@keyframes glassDrift {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-20px) rotate(10deg); }
}

/* ─────────────────────────────────────────────────────────────────
   4. SCROLLBARS
───────────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  border: 1px solid transparent;
  background-clip: padding-box;
  transition: background-color 0.3s;
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* ─────────────────────────────────────────────────────────────────
   5. APP ROOT LAYOUT — THREE-COLUMN BENTO GRID
───────────────────────────────────────────────────────────────── */
#app-container {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr 340px;
  grid-template-rows: var(--header-h) 1fr;
  grid-template-areas:
    "sidebar header  header"
    "sidebar center  right";
  width: 100vw;
  height: 100vh;
  position: relative;
  z-index: 1;
}

/* ─────────────────────────────────────────────────────────────────
   6. SIDEBAR
───────────────────────────────────────────────────────────────── */
aside.sidebar {
  grid-area: sidebar;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-base);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
  z-index: 10;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
}

.sidebar-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-base);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.4);
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35); }
  50%       { box-shadow: 0 4px 22px rgba(168, 85, 247, 0.6);  }
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 30%, var(--violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.4;
  padding-bottom: 4px;
}

.brand-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Sidebar Section */
.sidebar-section { display: flex; flex-direction: column; gap: 10px; }

.sidebar-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-base);
}

/* Preset Grid Buttons */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.btn-preset {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-base);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.73rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--ease-fast);
  text-align: left;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.btn-preset::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(189,94,255,0.08), transparent);
  opacity: 0;
  transition: opacity var(--ease-fast);
}

.btn-preset:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(189, 94, 255, 0.45);
  color: var(--text-primary);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), var(--glow-violet);
}

.btn-preset:hover::before { opacity: 1; }

/* Category Filter Checkboxes */
.filter-list { display: flex; flex-direction: column; gap: 10px; }

.checkbox-wrapper {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: var(--ease-fast);
  gap: 10px;
}

.checkbox-wrapper:hover { color: var(--text-primary); }
.checkbox-wrapper input { display: none; }

.custom-checkbox {
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--border-base);
  border-radius: 5px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ease-fast);
  background: rgba(255,255,255,0.015);
}

.checkbox-wrapper:hover .custom-checkbox {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.05);
}

.checkbox-wrapper input:checked + .custom-checkbox {
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 0 12px rgba(42, 232, 178, 0.45);
}

.checkbox-wrapper input:checked + .custom-checkbox::after {
  content: '✓';
  color: #07090e;
  font-size: 0.75rem;
  font-weight: 800;
}

/* Form Elements */
.rule-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-base);
  padding: 14px;
  border-radius: 14px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.03);
}

.form-group { display: flex; flex-direction: column; gap: 5px; }

.form-group label {
  font-size: 0.67rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border-base);
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.8rem;
  transition: all var(--ease-fast);
  width: 100%;
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: rgba(189, 94, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(189, 94, 255, 0.05), var(--glow-violet);
  background: rgba(0, 0, 0, 0.55);
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3a8b4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--teal), var(--violet));
  color: #07090e;
  border: none;
  border-radius: 10px;
  padding: 8px 18px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--ease-fast);
  text-align: center;
  box-shadow: 0 4px 16px rgba(42, 232, 178, 0.2), var(--glow-violet);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.22), transparent);
  opacity: 0;
  transition: opacity var(--ease-fast);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(42, 232, 178, 0.35), 0 0 25px rgba(189, 94, 255, 0.35);
  color: #000;
}

.btn-primary:hover::after { opacity: 1; }

.btn-primary:active { transform: translateY(0); }

/* Custom Rules / History Lists */
.custom-rules-list,
.history-container,
.glossary-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 3px;
}

.custom-rule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-base);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.73rem;
  transition: all var(--ease-fast);
}

.custom-rule-item:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(189, 94, 255, 0.25);
  box-shadow: var(--glow-violet);
}

.custom-rule-item span {
  font-family: 'JetBrains Mono', monospace;
  color: var(--cyan);
  font-size: 0.7rem;
}

.btn-delete-rule {
  background: transparent;
  border: none;
  color: var(--rose);
  cursor: pointer;
  font-weight: 700;
  padding: 0 4px;
  transition: var(--ease-fast);
  font-size: 1rem;
  line-height: 1;
}

.btn-delete-rule:hover { transform: scale(1.3); color: #ff6b7a; }

/* Glossary */
.glossary-item {
  background: rgba(255, 255, 255, 0.012);
  border: 1px solid var(--border-base);
  border-radius: 10px;
  padding: 10px 12px;
  transition: all var(--ease-fast);
}

.glossary-item:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.glossary-term {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.glossary-badge {
  font-size: 0.62rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.glossary-content {
  font-size: 0.73rem;
  color: var(--text-secondary);
  margin-top: 7px;
  line-height: 1.5;
  display: none;
}

.glossary-content.active { display: block; }

.glossary-content .ref {
  display: block;
  margin-top: 6px;
  font-style: italic;
  color: var(--text-muted);
}

/* History */
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.012);
  border: 1px solid var(--border-base);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--ease-fast);
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(0, 245, 255, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), var(--glow-cyan);
}

.history-item-title {
  font-weight: 500;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.history-score-badge {
  font-size: 0.7rem;
  font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────────
   7. TOP HEADER BAR
───────────────────────────────────────────────────────────────── */
header.workspace-header {
  grid-area: header;
  height: var(--header-h);
  background: rgba(8, 10, 16, 0.45);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-bottom: 1px solid var(--border-base);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 24px;
  justify-content: space-between;
  z-index: 9;
  position: relative;
}

.tab-nav {
  display: flex;
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--border-base);
  border-radius: 9999px;
  padding: 4px;
  gap: 4px;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all var(--ease-fast);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.tab-btn.active {
  background: rgba(189, 94, 255, 0.12);
  color: var(--text-primary);
  border: 1px solid rgba(189, 94, 255, 0.35);
  box-shadow: 0 4px 18px rgba(189, 94, 255, 0.12), 0 0 15px rgba(189, 94, 255, 0.1);
}

.tab-btn:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.tab-btn svg { color: var(--violet); opacity: 0.8; transition: opacity var(--ease-fast); }
.tab-btn.active svg { opacity: 1; color: var(--violet); }

.header-status {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-item span {
  font-family: 'JetBrains Mono', monospace;
  color: var(--violet);
  font-weight: 600;
  font-size: 0.78rem;
}

/* ─────────────────────────────────────────────────────────────────
   8. CENTER COLUMN (EDITOR WORKSPACE)
───────────────────────────────────────────────────────────────── */
main.workspace {
  grid-area: center;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.workspace-views {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.view-pane {
  position: absolute;
  inset: 0;
  display: none;
  padding: 20px;
  gap: 16px;
  overflow: hidden;
}

.view-pane.active { display: flex; flex-direction: column; min-height: 0; }

/* Synthesis pane needs its grid child to fill */
#pane-synthesis.active { overflow: hidden; }
#pane-synthesis.active .synthesis-pane-grid { flex: 1; min-height: 0; }

/* ─────────────────────────────────────────────────────────────────
   9. GLASS PANEL CARDS
───────────────────────────────────────────────────────────────── */
.glass-panel {
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid transparent;
  background-image:
    linear-gradient(rgba(12, 15, 22, 0.65), rgba(12, 15, 22, 0.65)),
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.08) 0%,
      rgba(255, 255, 255, 0.01) 50%,
      rgba(168, 85, 247, 0.15) 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: var(--glow-base);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo), border-color 0.4s var(--ease-out-expo);
}

.glass-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.65), 0 0 35px rgba(189, 94, 255, 0.18);
  border-color: rgba(189, 94, 255, 0.25);
}

.panel-header {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-base);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.008);
  flex-shrink: 0;
}

.panel-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title svg { color: var(--violet); flex-shrink: 0; }

.panel-actions { display: flex; gap: 6px; }

.btn-icon {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-base);
  border-radius: 7px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--ease-fast);
}

.btn-icon:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--border-bright);
  color: var(--text-primary);
  transform: scale(1.08);
}

.panel-footer {
  padding: 10px 18px;
  border-top: 1px solid var(--border-base);
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(0,0,0,0.08);
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}

/* ─────────────────────────────────────────────────────────────────
   10. EDITOR (CONTENTEDITABLE WORKSPACE)
───────────────────────────────────────────────────────────────── */
.editor-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

.jd-editor-textarea {
  flex: 1;
  padding: 20px 22px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-wrap: break-word;
  box-sizing: border-box;
  letter-spacing: 0.005em;
  background: transparent;
  color: var(--text-primary);
  caret-color: var(--violet);
  overflow-y: auto;
  overflow-x: hidden;
  outline: none;
  border: none;
  scrollbar-width: thin;
}

.jd-editor-textarea[contenteditable="true"]:empty::before {
  content: attr(placeholder);
  color: var(--text-muted);
  font-style: italic;
  display: block;
}

.jd-editor-textarea::placeholder { color: var(--text-muted); font-style: italic; }

/* Editor highlight spans */
.editor-highlight {
  border-radius: 4px;
  padding: 1px 0;
  border-bottom: 2px solid transparent;
  transition: background-color 0.2s var(--ease-out-expo), border-color 0.2s var(--ease-out-expo), box-shadow 0.2s var(--ease-out-expo);
}

.editor-highlight.bias-high {
  background-color: rgba(255, 56, 96, 0.1);
  border-bottom-color: rgba(255, 56, 96, 0.45);
}

.editor-highlight.bias-high:hover {
  background-color: rgba(255, 56, 96, 0.22);
  border-bottom-color: var(--rose);
  box-shadow: 0 0 10px rgba(255, 56, 96, 0.25);
}

.editor-highlight.bias-medium {
  background-color: rgba(255, 122, 0, 0.1);
  border-bottom-color: rgba(255, 122, 0, 0.45);
}

.editor-highlight.bias-medium:hover {
  background-color: rgba(255, 122, 0, 0.22);
  border-bottom-color: var(--orange);
  box-shadow: 0 0 10px rgba(255, 122, 0, 0.25);
}

.editor-highlight.bias-low {
  background-color: rgba(255, 209, 102, 0.07);
  border-bottom-color: rgba(255, 209, 102, 0.35);
}

.editor-highlight.bias-low:hover {
  background-color: rgba(255, 209, 102, 0.18);
  border-bottom-color: var(--yellow);
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.2);
}

/* Quick-Fix Bar */
.editor-quick-fix-bar {
  background: linear-gradient(to right, rgba(42,232,178,0.06), rgba(189,94,255,0.06));
  border-top: 1px solid rgba(42, 232, 178, 0.2);
  padding: 0 18px;
  font-size: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  transition: all var(--ease-normal);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  flex-shrink: 0;
}

.editor-quick-fix-bar.active {
  max-height: 42px;
  opacity: 1;
  padding: 10px 18px;
}

/* ─────────────────────────────────────────────────────────────────
   11. RIGHT COLUMN — ANALYTICS PANEL
───────────────────────────────────────────────────────────────── */
.analytics-column {
  grid-area: right;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
  border-left: 1px solid var(--border-base);
  background: rgba(8, 10, 16, 0.3);
  height: calc(100vh - var(--header-h));
}

/* Score Ring Card */
.score-card {
  background-image:
    linear-gradient(rgba(12, 15, 22, 0.75), rgba(12, 15, 22, 0.75)),
    linear-gradient(135deg,
      rgba(42, 232, 178, 0.15) 0%,
      rgba(255, 255, 255, 0.02) 50%,
      rgba(189, 94, 255, 0.15) 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--glow-base);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  flex-shrink: 0;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo), border-color 0.4s var(--ease-out-expo);
}

.score-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.65), 0 0 35px rgba(42, 232, 178, 0.22);
  border-color: rgba(42, 232, 178, 0.3);
}

.score-container {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}

.score-container svg { transform: rotate(-90deg); }

.ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.025);
  stroke-width: 10;
}

.ring-progress {
  fill: none;
  stroke: var(--teal);
  stroke-width: 10;
  stroke-dasharray: 314.16;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              stroke 0.6s ease,
              filter 0.6s ease;
  filter: drop-shadow(0 0 10px var(--teal));
}

.score-display {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  line-height: 1;
}

.score-display .score-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.score-display .score-pct {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.score-meta { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }

.metric-rating-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1.2;
}

.metric-rating-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.severity-counters {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.counter-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all var(--ease-normal);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-base);
  color: var(--text-muted);
  opacity: 0.45;
}

/* Active States for Badges */
.counter-badge.active-high {
  background: rgba(255, 56, 96, 0.14);
  border: 1px solid rgba(255, 56, 96, 0.4);
  color: var(--rose);
  opacity: 1;
  animation: pulse-high 2s infinite;
}

.counter-badge.active-medium {
  background: rgba(255, 122, 0, 0.14);
  border: 1px solid rgba(255, 122, 0, 0.4);
  color: var(--orange);
  opacity: 1;
  animation: pulse-medium 2s infinite;
}

.counter-badge.active-low {
  background: rgba(255, 209, 102, 0.1);
  border: 1px solid rgba(255, 209, 102, 0.35);
  color: var(--yellow);
  opacity: 1;
  animation: pulse-low 2s infinite;
}

@keyframes pulse-high {
  0% { box-shadow: 0 0 4px rgba(255, 56, 96, 0.4); }
  50% { box-shadow: 0 0 14px rgba(255, 56, 96, 0.85); border-color: rgba(255, 56, 96, 0.6); }
  100% { box-shadow: 0 0 4px rgba(255, 56, 96, 0.4); }
}

@keyframes pulse-medium {
  0% { box-shadow: 0 0 4px rgba(255, 122, 0, 0.3); }
  50% { box-shadow: 0 0 12px rgba(255, 122, 0, 0.75); border-color: rgba(255, 122, 0, 0.5); }
  100% { box-shadow: 0 0 4px rgba(255, 122, 0, 0.3); }
}

@keyframes pulse-low {
  0% { box-shadow: 0 0 4px rgba(255, 209, 102, 0.2); }
  50% { box-shadow: 0 0 10px rgba(255, 209, 102, 0.6); border-color: rgba(255, 209, 102, 0.4); }
  100% { box-shadow: 0 0 4px rgba(255, 209, 102, 0.2); }
}

/* Highlight Preview Panel */
.highlight-panel-body {
  border: 1px solid var(--border-base);
  border-radius: 8px;
  padding: 14px;
  background: rgba(0,0,0,0.2);
  min-height: 80px;
  max-height: 180px;
  overflow-y: auto;
  font-size: 0.82rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.highlight-panel-body:empty::after {
  content: 'Scan output preview will generate here...';
  color: var(--text-muted);
  font-style: italic;
}

/* Structure Warnings */
#structure-warnings-container {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.structure-warning-card {
  background: rgba(245,158,11,0.04);
  border: 1px solid rgba(245,158,11,0.12);
  border-left: 3px solid var(--amber);
  padding: 10px 12px;
  border-radius: 7px;
  display: flex;
  gap: 10px;
  font-size: 0.76rem;
  line-height: 1.45;
}

.structure-warning-card.warning-high-barrier {
  background: rgba(244,63,94,0.04);
  border-color: rgba(244,63,94,0.12);
  border-left-color: var(--rose);
}

.structure-warning-card.warning-benefits {
  background: rgba(20,184,166,0.04);
  border-color: rgba(20,184,166,0.12);
  border-left-color: var(--teal);
}

.warning-icon { font-size: 0.95rem; flex-shrink: 0; }
.warning-text { color: var(--text-secondary); }

/* Issues / Recommendations List */
.issues-section-header {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
  padding: 10px 18px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.issues-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 18px 18px;
  overflow-y: auto;
  flex: 1;
}

.issues-container:empty::after {
  content: '🎉  No bias detected — highly inclusive text!';
  color: var(--cyan);
  font-size: 0.82rem;
  background: rgba(6,182,212,0.04);
  border: 1px dashed rgba(6,182,212,0.18);
  border-radius: 8px;
  padding: 18px;
  text-align: center;
  font-weight: 500;
}

.issue-card {
  background: rgba(12, 16, 26, 0.55);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid var(--border-base);
  border-left: 4px solid var(--border-base);
  border-radius: 14px;
  padding: 16px;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo), border-color 0.4s var(--ease-out-expo);
  scroll-margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}

.issue-card.high-sev {
  border-left-color: var(--rose);
}
.issue-card.medium-sev {
  border-left-color: var(--orange);
}
.issue-card.low-sev {
  border-left-color: var(--yellow);
}

.issue-card:hover {
  transform: translateY(-3px) translateX(2px);
  border-color: var(--border-bright);
}

.issue-card.high-sev:hover {
  box-shadow: 0 12px 30px rgba(255, 56, 96, 0.15), 0 0 20px rgba(255, 56, 96, 0.08);
  border-color: rgba(255, 56, 96, 0.3);
}

.issue-card.medium-sev:hover {
  box-shadow: 0 12px 30px rgba(255, 122, 0, 0.15), 0 0 20px rgba(255, 122, 0, 0.08);
  border-color: rgba(255, 122, 0, 0.3);
}

.issue-card.low-sev:hover {
  box-shadow: 0 12px 30px rgba(255, 209, 102, 0.12), 0 0 20px rgba(255, 209, 102, 0.08);
  border-color: rgba(255, 209, 102, 0.3);
}

.issue-card.highlight-flash { animation: cardFlash 1.5s ease-out forwards; }

@keyframes cardFlash {
  0%   { background: rgba(168,85,247,0.25); border-color: var(--violet); box-shadow: 0 0 15px rgba(189,94,255,0.4); }
  100% { background: rgba(12, 16, 26, 0.45); border-color: var(--border-base); box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
}

.issue-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.issue-word {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.issue-category-badge {
  font-size: 0.65rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-base);
  font-weight: 500;
}

.issue-explanation {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.issue-actions-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border-base);
  padding-top: 12px;
}

.issue-buttons-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.issue-alternatives-container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.alternatives-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.alternative-chip {
  background: rgba(42, 232, 178, 0.07);
  border: 1px solid rgba(42, 232, 178, 0.22);
  color: var(--teal);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all var(--ease-fast);
  font-weight: 600;
}

.alternative-chip:hover {
  background: rgba(42, 232, 178, 0.18);
  border-color: var(--teal);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(42, 232, 178, 0.25);
}

.custom-fix-container {
  display: flex;
  gap: 6px;
  width: 100%;
  align-items: center;
}

.custom-fix-input {
  background: var(--bg-input);
  border: 1px solid var(--border-base);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.75rem;
  transition: all var(--ease-fast);
  flex: 1;
  height: 30px;
}

.custom-fix-input:focus {
  outline: none;
  border-color: rgba(189, 94, 255, 0.4);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: var(--glow-violet);
}

.btn-fix-apply {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-base);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 5px 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--ease-fast);
  height: 30px;
}

.btn-fix-apply:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #000;
  box-shadow: 0 4px 12px rgba(42, 232, 178, 0.35);
}

/* Highlight token spans */
.bias-token {
  padding: 2px 6px;
  margin: 0 2px;
  border-radius: 4px;
  border-bottom: 2px solid currentColor;
  cursor: pointer;
  transition: all var(--ease-fast);
  font-weight: 600;
  display: inline-block;
  line-height: 1.2;
}

.bias-token.bias-high   { color: var(--rose);   background: rgba(255, 56, 96, 0.12); box-shadow: 0 2px 8px rgba(255, 56, 96, 0.1); }
.bias-token.bias-medium { color: var(--orange);  background: rgba(255, 122, 0, 0.12); box-shadow: 0 2px 8px rgba(255, 122, 0, 0.1); }
.bias-token.bias-low    { color: var(--yellow);  background: rgba(255, 209, 102, 0.08); box-shadow: 0 2px 8px rgba(255, 209, 102, 0.05); }

.bias-token.bias-high:hover {
  background: rgba(255, 56, 96, 0.22);
  box-shadow: 0 4px 12px rgba(255, 56, 96, 0.35), 0 0 8px rgba(255, 56, 96, 0.2);
  transform: translateY(-1px);
  text-shadow: 0 0 3px rgba(255, 56, 96, 0.4);
}
.bias-token.bias-medium:hover {
  background: rgba(255, 122, 0, 0.22);
  box-shadow: 0 4px 12px rgba(255, 122, 0, 0.35), 0 0 8px rgba(255, 122, 0, 0.2);
  transform: translateY(-1px);
  text-shadow: 0 0 3px rgba(255, 122, 0, 0.4);
}
.bias-token.bias-low:hover {
  background: rgba(255, 209, 102, 0.18);
  box-shadow: 0 4px 12px rgba(255, 209, 102, 0.25), 0 0 8px rgba(255, 209, 102, 0.15);
  transform: translateY(-1px);
  text-shadow: 0 0 3px rgba(255, 209, 102, 0.4);
}

/* ─────────────────────────────────────────────────────────────────
   12. SYNTHESIS TAB
───────────────────────────────────────────────────────────────── */
.synthesis-pane-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  overflow: hidden;
}

.synthesis-pane-grid > .glass-panel {
  min-height: 0;
}

.synthesis-form-container {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-group-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border-base);
  padding-bottom: 5px;
}

.synthesis-presets { display: flex; gap: 7px; flex-wrap: wrap; }

.slider-group { display: flex; flex-direction: column; gap: 8px; }

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.77rem;
  color: var(--text-secondary);
}

.slider-labels-container {
  display: flex;
  justify-content: space-between;
  font-size: 0.63rem;
  color: var(--text-muted);
}

/* Range slider */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; background: transparent; }
input[type=range]:focus { outline: none; }

input[type=range]::-webkit-slider-runnable-track {
  height: 5px;
  cursor: pointer;
  background: linear-gradient(to right, var(--teal), rgba(255,255,255,0.06), var(--rose));
  border-radius: 3px;
}

input[type=range]::-webkit-slider-thumb {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: var(--violet);
  border: 2px solid #fff;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  margin-top: -6.5px;
  box-shadow: 0 0 15px rgba(168,85,247,0.85);
  transition: transform 0.3s var(--ease-out-expo), background-color var(--ease-fast);
}

input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.25); }

.tone-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; }

.btn-archetype {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-base);
  color: var(--text-secondary);
  border-radius: 7px;
  padding: 8px 4px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--ease-fast);
  text-align: center;
}

.btn-archetype:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }

.btn-archetype.active {
  background: rgba(59,130,246,0.1);
  border-color: rgba(59,130,246,0.3);
  color: var(--text-primary);
  box-shadow: 0 0 12px rgba(59,130,246,0.18);
}

.synthesis-preview-content {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  font-size: 0.875rem;
  line-height: 1.65;
}

.synthesis-preview-content:empty::after {
  content: 'Synthesized job description renders here...';
  color: var(--text-muted);
  font-style: italic;
}

/* Markdown rendered body */
.markdown-body h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-base);
  color: var(--text-primary);
}

.markdown-body h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 18px;
  margin-bottom: 8px;
  color: var(--violet);
}

.markdown-body p    { margin-bottom: 12px; color: var(--text-secondary); }
.markdown-body ul   { margin-left: 18px; margin-bottom: 14px; }
.markdown-body li   { margin-bottom: 5px; color: var(--text-secondary); }
.markdown-body hr   { border: none; border-top: 1px solid var(--border-base); margin: 18px 0; }

/* ─────────────────────────────────────────────────────────────────
   13. TOAST NOTIFICATIONS
───────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 22px;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast-notification {
  background-image:
    linear-gradient(rgba(11,14,22,0.95), rgba(11,14,22,0.95)),
    linear-gradient(to right, var(--violet), var(--cyan));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border: 1px solid transparent;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.5), var(--glow-violet);
  color: var(--text-primary);
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 9px;
  transform: translateX(110px);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              opacity 0.3s ease;
}

.toast-notification.active { transform: translateX(0); opacity: 1; }

/* ─────────────────────────────────────────────────────────────────
   14. SEVERITY / SCORE BADGES
───────────────────────────────────────────────────────────────── */
.severity-badge-high   { background: rgba(244,63,94,0.1);  border: 1px solid rgba(244,63,94,0.28);  color: var(--rose);   }
.severity-badge-medium { background: rgba(249,115,22,0.1); border: 1px solid rgba(249,115,22,0.28); color: var(--orange); }
.severity-badge-low    { background: rgba(234,179,8,0.08); border: 1px solid rgba(234,179,8,0.28);  color: var(--yellow); }
.severity-badge-custom { background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.28); color: var(--indigo); }

.score-badge-high   { color: var(--cyan);  }
.score-badge-medium { color: var(--amber); }
.score-badge-low    { color: var(--rose);  }

/* ─────────────────────────────────────────────────────────────────
   15. DASHBOARD SUMMARY CARD (AUDITOR)
───────────────────────────────────────────────────────────────── */
.dashboard-summary-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background: transparent;
  border: none;
}

/* ─────────────────────────────────────────────────────────────────
   16. PULSE / LIVE INDICATOR
───────────────────────────────────────────────────────────────── */
.live-indicator {
  width: 7px;
  height: 7px;
  background: var(--cyan);
  border-radius: 50%;
  display: inline-block;
  animation: livePulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 8px var(--cyan);
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

/* ─────────────────────────────────────────────────────────────────
   17. WARNINGS MATRIX CONTAINER PANEL
───────────────────────────────────────────────────────────────── */
.warning-matrix-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}
