/* =====================================================================
   EPA PESTCERT DESIGN SYSTEM - 2026 REFINED SPECIFICATION
   Typography: Outfit (Headings), Inter (Body), JetBrains Mono (Codes)
   Palette: Deep Space Dark (#090d16), Emerald Glow (#10b981), Amber (#f59e0b)
===================================================================== */

:root {
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-card: rgba(17, 24, 39, 0.85);
  --bg-card-hover: rgba(30, 41, 59, 0.9);
  --border-subtle: #1e293b;
  --border-medium: #334155;
  --border-glow: rgba(16, 185, 129, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-emerald: #10b981;
  --accent-emerald-light: #34d399;
  --accent-emerald-bg: rgba(16, 185, 129, 0.12);

  --accent-amber: #f59e0b;
  --accent-amber-bg: rgba(245, 158, 11, 0.12);

  --accent-danger: #ef4444;
  --accent-danger-bg: rgba(239, 68, 68, 0.12);

  --accent-cyan: #06b6d4;
  --accent-cyan-bg: rgba(6, 182, 212, 0.12);

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

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px -4px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.2);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(at 10% 10%, rgba(16, 185, 129, 0.07) 0px, transparent 50%),
    radial-gradient(at 90% 90%, rgba(6, 182, 212, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
}

/* --- Top Bar --- */
.top-bar {
  background: linear-gradient(90deg, #064e3b, #0f172a, #064e3b);
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
  padding: 7px 20px;
  font-size: 0.8rem;
  color: #a7f3d0;
}

.top-bar-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.badge-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.top-bar-text {
  font-weight: 500;
}

.top-bar-link {
  color: #6ee7b7;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.top-bar-link:hover {
  color: #ffffff;
}

/* --- Header --- */
.main-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(9, 13, 22, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 24px;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
}

.brand-logo-icon svg {
  width: 22px;
  height: 22px;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  display: block;
  line-height: 1.1;
}

.accent-text {
  color: var(--accent-emerald);
}

.brand-sub {
  font-size: 0.73rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 4px;
  gap: 4px;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.nav-btn.active {
  background: var(--accent-emerald);
  color: #06241a;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

/* Review Missed Button */
.review-btn {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.review-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
}

.missed-count-pill {
  background: var(--accent-amber);
  color: #451a03;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 9999px;
}

/* --- Main Layout --- */
.main-content {
  flex: 1;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 32px 24px;
}

.app-section {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.app-section.active {
  display: block;
}

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

/* --- Hero Subhead --- */
.hero-subhead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  gap: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 20px;
}

.page-headline {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin-bottom: 6px;
}

.page-lead {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 760px;
}

.filter-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.custom-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.custom-select:hover, .custom-select:focus {
  border-color: var(--accent-emerald);
}

/* --- Quiz Workspace & Cards --- */
.quiz-workspace {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quiz-tracker-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-md);
}

.tracker-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tracker-qnum {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.tracker-meta-tags {
  display: flex;
  gap: 8px;
}

.tag-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.domain-badge {
  background: var(--accent-cyan-bg);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.difficulty-badge {
  background: rgba(255, 255, 255, 0.07);
  color: #e2e8f0;
  border: 1px solid var(--border-subtle);
}

.tracker-score-preview {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.score-val {
  color: var(--accent-emerald);
  font-weight: 700;
  margin-left: 4px;
}

.progress-bar-container {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-cyan));
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* Specimen Label Box */
.specimen-label-callout {
  background: #1e1b18;
  border: 2px dashed #d97706;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  animation: fadeIn 0.3s ease;
}

.specimen-callout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.label-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}

.label-pill-signal {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: #b91c1c;
  color: #ffffff;
  letter-spacing: 0.06em;
}

.label-grid-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.label-meta-item {
  font-size: 0.82rem;
}

.label-meta-item .meta-label {
  color: #a8a29e;
  font-weight: 600;
  display: block;
}

.label-meta-item .meta-val {
  color: #f5f5f4;
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Question Card */
.question-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.question-stem {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.45;
  color: #ffffff;
  margin-bottom: 24px;
}

/* Options Grid */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  position: relative;
}

.option-btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateX(4px);
}

.option-letter {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.option-text {
  flex: 1;
  line-height: 1.5;
}

/* Correct Option State */
.option-btn.state-correct {
  background: var(--accent-emerald-bg);
  border-color: var(--accent-emerald);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}

.option-btn.state-correct .option-letter {
  background: var(--accent-emerald);
  color: #022c22;
  border-color: var(--accent-emerald);
}

/* Wrong Option State */
.option-btn.state-wrong {
  background: var(--accent-danger-bg);
  border-color: var(--accent-danger);
  animation: shake 0.3s ease;
}

.option-btn.state-wrong .option-letter {
  background: var(--accent-danger);
  color: #ffffff;
  border-color: var(--accent-danger);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Explanation Box */
.explanation-box {
  margin-top: 24px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-medium);
  border-left: 4px solid var(--accent-emerald);
  border-radius: var(--radius-md);
  padding: 20px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.explanation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.verdict-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.verdict-banner.correct {
  color: var(--accent-emerald);
}

.verdict-banner.wrong {
  color: var(--accent-danger);
}

.statute-pill {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
}

.manual-chapter {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.explanation-text {
  font-size: 0.92rem;
  color: #e2e8f0;
  line-height: 1.6;
}

.explanation-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.action-btn-primary {
  background: var(--accent-emerald);
  color: #06241a;
  border: none;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn-primary:hover {
  background: var(--accent-emerald-light);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.action-btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

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

/* Quiz Navigation Row */
.quiz-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.nav-control-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.nav-control-btn:hover:not(:disabled) {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.nav-control-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.question-jump-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: thin;
}

.jump-chip {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.jump-chip:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.jump-chip.active {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  font-weight: 700;
}

.jump-chip.correct {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: #10b981;
}

.jump-chip.wrong {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: #ef4444;
}

/* =====================================================================
   TIMED EXAM STYLES
===================================================================== */
.timed-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  gap: 20px;
}

.timed-metrics-panel {
  display: flex;
  gap: 16px;
}

.time-block, .passing-score-block {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  text-align: center;
}

.time-title, .pass-title {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.time-digits {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: #38bdf8;
}

.time-digits.warning {
  color: var(--accent-danger);
  animation: pulseWarning 1s infinite;
}

@keyframes pulseWarning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.pass-digits {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

.timed-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.timed-q-index {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
}

.flag-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.flag-btn.flagged {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #f59e0b;
}

.submit-exam-btn {
  background: #dc2626;
  color: #ffffff;
  border: none;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.submit-exam-btn:hover {
  background: #ef4444;
}

.timed-nav-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.timed-grid-navigator {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 600px;
}

.timed-nav-box {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.timed-nav-box.answered {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #34d399;
}

.timed-nav-box.current {
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 700;
}

.timed-nav-box.flagged {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

/* Exam Results Screen */
.exam-results-screen {
  animation: fadeIn 0.4s ease;
}

.results-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 760px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.results-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 6px 20px;
  border-radius: 9999px;
  margin-bottom: 12px;
}

.results-badge.pass {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid #10b981;
}

.results-badge.fail {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid #ef4444;
}

.results-score-num {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 6px;
}

.results-score-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.results-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-align: left;
  margin-bottom: 16px;
}

.domain-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin-bottom: 28px;
}

.domain-bar-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.domain-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.domain-bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.domain-bar-fill {
  height: 100%;
  border-radius: 9999px;
}

.results-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
}

/* =====================================================================
   SPECIMEN LABEL DECODER STYLES
===================================================================== */
.label-selector-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.label-tab {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.label-tab.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald-light);
}

.specimen-viewer-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.specimen-label-document {
  background: #ffffff;
  color: #111827;
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  border-left: 12px solid #b91c1c;
}

.specimen-label-document h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #111827;
  line-height: 1.1;
  margin-bottom: 6px;
}

.doc-reg-badge {
  background: #000000;
  color: #ffffff;
  display: inline-block;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  margin-bottom: 12px;
}

.doc-signal-banner {
  background: #b91c1c;
  color: #ffffff;
  padding: 10px 16px;
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  text-align: center;
  margin: 16px 0;
  border-radius: 4px;
}

.doc-signal-banner.warning {
  background: #d97706;
}

.doc-signal-banner.caution {
  background: #2563eb;
}

.doc-section-block {
  margin: 16px 0;
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
}

.doc-section-block h4 {
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #374151;
  margin-bottom: 6px;
}

.doc-section-block p, .doc-section-block li {
  font-size: 0.84rem;
  color: #4b5563;
  line-height: 1.5;
}

.doc-section-block ul {
  padding-left: 20px;
}

/* Inspector Sidebar */
.label-inspector-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.inspector-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.inspector-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #ffffff;
  margin-bottom: 14px;
}

.hotspots-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hotspot-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.hotspot-item:hover {
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
}

.hotspot-icon {
  font-size: 1.2rem;
}

.hotspot-item strong {
  font-size: 0.85rem;
  color: #ffffff;
  display: block;
}

.hotspot-item p {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.quiz-spot-card {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.3);
}

/* =====================================================================
   STATE DIRECTORY STYLES
===================================================================== */
.state-pills-row {
  display: flex;
  gap: 8px;
}

.state-pill {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
}

.state-pill.active {
  background: var(--accent-cyan-bg);
  border-color: var(--accent-cyan);
  color: #38bdf8;
}

.state-regulatory-view {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  margin-top: 16px;
}

.state-header-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.state-title-group h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: #ffffff;
}

.agency-name {
  color: var(--accent-emerald-light);
  font-weight: 600;
  font-size: 0.95rem;
}

.statute-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
}

.state-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.state-info-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.state-info-card h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #ffffff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rules-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rule-timeline-item {
  border-left: 2px solid var(--accent-cyan);
  padding-left: 12px;
}

.rule-timeline-item strong {
  font-size: 0.85rem;
  color: #38bdf8;
  display: block;
}

.rule-timeline-item span.citation {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.rule-timeline-item p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* =====================================================================
   REVIEW MISSED DRAWER
===================================================================== */
.review-drawer {
  position: fixed;
  top: 0;
  right: -480px;
  width: 480px;
  max-width: 90vw;
  height: 100vh;
  background: #0f172a;
  border-left: 1px solid var(--border-medium);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.review-drawer.open {
  right: 0;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 90;
  display: none;
}

.drawer-backdrop.open {
  display: block;
}

.drawer-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fbbf24;
}

.drawer-title h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.close-drawer-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  scrollbar-width: thin;
}

.empty-missed-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
}

.empty-missed-state h4 {
  font-size: 1.1rem;
  color: #ffffff;
  margin-bottom: 6px;
}

.empty-missed-state p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.missed-question-card {
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 12px;
}

.missed-q-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.missed-domain {
  font-size: 0.7rem;
  color: #f87171;
  font-weight: 700;
  text-transform: uppercase;
}

.btn-remove-missed {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
}

.btn-remove-missed:hover {
  color: var(--text-primary);
}

.missed-stem {
  font-size: 0.85rem;
  color: #ffffff;
  margin-bottom: 8px;
}

.missed-correct-ans {
  font-size: 0.78rem;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  padding: 6px 10px;
  border-radius: 4px;
}

.drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
}

.btn-clear-missed {
  width: 100%;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* Footer */
.app-footer {
  background: #050810;
  border-top: 1px solid var(--border-subtle);
  padding: 30px 24px;
  margin-top: 60px;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  display: block;
  margin-bottom: 4px;
}

.footer-left p {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 500px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

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

.footer-links a:hover {
  color: var(--accent-emerald-light);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-subhead {
    flex-direction: column;
    align-items: flex-start;
  }
  .specimen-viewer-grid {
    grid-template-columns: 1fr;
  }
  .nav-menu {
    display: none;
  }
}
