/* GovtTypingTest · Modern Exam Typing Platform */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Plus Jakarta Sans", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", "DejaVu Sans Mono", monospace;
  --font-punjabi: "Raavi", "Gautami", "Noto Sans Gurmukhi", var(--font-sans);
  --font-hindi: "Mangal", "Aparajita", "Noto Sans Devanagari", var(--font-sans);

  /* Light Theme (Default) */
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-elevated: #ffffff;
  --border-light: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #4b5563;
  --text-light: #5b6674;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-border: #c7d2fe;
  --success: #10b981;
  --success-text: #047857;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --danger: #ef4444;
  --danger-text: #b91c1c;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --warning: #f59e0b;
  --warning-text: #92400e;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --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.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-app: #090d16;
  --bg-surface: #111827;
  --bg-subtle: #1f2937;
  --bg-elevated: #1e293b;
  --border-light: #2d3748;
  --border-strong: #475569;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #94a3b8;
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-light: #1e1b4b;
  --primary-border: #3730a3;
  --success: #34d399;
  --success-text: #34d399;
  --success-bg: #064e3b;
  --success-border: #047857;
  --danger: #f87171;
  --danger-text: #f87171;
  --danger-bg: #7f1d1d;
  --danger-border: #991b1b;
  --warning: #fbbf24;
  --warning-text: #fbbf24;
  --warning-bg: #78350f;
  --warning-border: #92400e;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

/* Reset & Basics */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
[hidden] {
  display: none !important;
}
html {
  font-family: var(--font-sans);
  color-scheme: light dark;
  scroll-behavior: smooth;
}
body {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}
button {
  cursor: pointer;
}
main {
  flex: 1;
}
.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.inner {
  padding-block: 2rem 4rem;
}

/* Accessibility */
.skip {
  position: absolute;
  top: -999px;
  left: 1rem;
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
}
.skip:focus {
  top: 1rem;
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Header & Navigation (Ultra-Modern Glassmorphic Navbar) */
.top-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background-color: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.04);
}
[data-theme="dark"] .top-header {
  background-color: rgba(11, 17, 32, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.4);
}
.top-header .wrap.navbar {
  max-width: 1380px;
  padding: 0 1.15rem;
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 0.75rem;
}
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.14rem;
  letter-spacing: -0.03em;
  color: var(--text-main);
  text-decoration: none;
  white-space: nowrap;
}
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  color: white;
  border-radius: 9px;
  font-weight: 900;
  font-size: 1.05rem;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
  transition: transform 0.2s ease;
}
.brand:hover .brand-logo {
  transform: scale(1.05);
}
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.18rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar {
  display: none;
}
.nav-item {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.38rem 0.62rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-item:hover, .nav-item.active {
  color: var(--primary);
  background: var(--primary-light);
}
.nav-tools {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.45rem;
}
.theme-toggle, .offline-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.36rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--text-muted);
  white-space: nowrap;
}
@media (max-width: 1360px) {
  #theme-text { display: none; }
  .theme-toggle { padding: 0.36rem 0.55rem; }
}
.offline-pill {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--success-text, var(--success));
}
.offline-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  box-shadow: 0 0 8px var(--success);
  animation: gttPulse 1.5s infinite;
}

/* Hero Section (Futuristic Cyber-Mesh Glow) */
.hero-section {
  position: relative;
  background: radial-gradient(circle at 50% 10%, rgba(99, 102, 241, 0.12) 0%, transparent 65%),
              linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-app) 100%);
  border-bottom: 1px solid var(--border-light);
  padding: 3.5rem 0 3rem;
  text-align: center;
  overflow: hidden;
}
[data-theme="dark"] .hero-section {
  background: radial-gradient(circle at 50% 15%, rgba(99, 102, 241, 0.18) 0%, transparent 70%),
              linear-gradient(180deg, #0b1120 0%, #060a12 100%);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.12);
  margin-bottom: 1.25rem;
}
.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text-main);
  line-height: 1.15;
  margin-bottom: 1rem;
}
.hero-title .gradient-text {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

/* Quick Search & Filters (Modern Floating HUD) */
.search-container {
  max-width: 740px;
  margin: 0 auto 2rem;
  position: relative;
}
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 2px solid rgba(99, 102, 241, 0.18);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.search-input-wrap:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 14px 28px -5px rgba(99, 102, 241, 0.2);
}
.search-icon {
  padding-left: 1.2rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
}
.search-input {
  width: 100%;
  padding: 1rem 1.1rem;
  font-size: 1.05rem;
  color: var(--text-main);
  background: transparent;
  border: none;
  outline: none;
}
.search-input::placeholder {
  color: var(--text-light);
}
.search-kbd {
  margin-right: 1rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text-muted);
}

/* Modern KPI Statistics Strip */
.hero-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  max-width: 960px;
  margin: 2.25rem auto 0;
  padding: 0 0.5rem;
}
.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1rem 0.85rem;
  text-align: center;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .kpi-card {
  background: rgba(17, 24, 39, 0.7);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.3);
}
.kpi-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.18);
}
.kpi-icon {
  font-size: 1.4rem;
  margin-bottom: 0.35rem;
}
.kpi-num {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}
.kpi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* Filter Chips (Modern Pills with Hover Glow) */
.filter-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 2rem;
}
.filter-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}
.filter-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}
.filter-chip.active {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.filter-chip {
  padding: 0.5rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.filter-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.filter-chip[aria-pressed="true"], .filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}
.filter-chip .count {
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.08);
}
.filter-chip[aria-pressed="true"] .count {
  background: rgba(255, 255, 255, 0.25);
}

/* Quick Action Cards */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.quick-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.quick-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}
.quick-card strong {
  font-size: 1.02rem;
  color: var(--text-main);
}
.quick-card span {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.quick-card .card-cta {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Section Headings */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.section-title {
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text-main);
}
.section-badge {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 550;
}

/* Exam Directory Cards & Grid */
.exam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  list-style: none;
}
.exam-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.exam-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}
.exam-card-top {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.exam-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.exam-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-muted);
}
.tag-central { background: #e0e7ff; color: #3730a3; }
.tag-state { background: #dcfce7; color: #166534; }
.tag-judicial { background: #fef3c7; color: #92400e; }
.tag-hindi { background: #fce7f3; color: #9d174d; }
.tag-punjabi { background: #ffedd5; color: #9a3412; }

.exam-card-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}
.exam-card-dept {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.exam-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}
.exam-spec-item {
  display: flex;
  flex-direction: column;
}
.exam-spec-item small {
  font-size: 0.72rem;
  color: var(--text-light);
  text-transform: uppercase;
  font-weight: 600;
}
.exam-spec-item strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}
.exam-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}
.exam-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary);
  color: white;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.exam-card-btn:hover {
  background: var(--primary-hover);
}

/* Setup Page / Test Configurator */
.exam-setup-wrap {
  max-width: 880px;
  margin: 0 auto;
}
.setup-header {
  margin-bottom: 2rem;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.breadcrumbs a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.setup-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.setup-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
}

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.panel h2 {
  font-size: 1.3rem;
  font-weight: 750;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}
.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}
.field-group label {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--text-main);
}
.field-group select, .field-group input, .field-group textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  color: var(--text-main);
  transition: var(--transition);
}
.field-group select:focus, .field-group input:focus, .field-group textarea:focus {
  background: var(--bg-surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Exam Mode Toggle Buttons */
.format-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.format-card {
  padding: 1rem 1.25rem;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  text-align: left;
  transition: var(--transition);
}
.format-card strong {
  display: block;
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}
.format-card span {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.format-card[aria-pressed="true"] {
  border-color: var(--primary);
  background: var(--primary-light);
}
.format-card[aria-pressed="true"] strong {
  color: var(--primary);
}

/* Live Exam Hall Screen */
.exam-hall-container {
  min-height: calc(100vh - 64px);
  background: var(--bg-app);
  display: flex;
  flex-direction: column;
}
.hall-topbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 40;
}
.candidate-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.candidate-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 1px solid var(--primary-border);
}
.candidate-meta strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text-main);
}
.candidate-meta small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Exam Timer Pill */
.timer-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 2px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  transition: var(--transition);
}
.timer-pill.timer-safe {
  color: var(--success-text, var(--success));
  border-color: var(--success);
  background: var(--success-bg);
}
.timer-pill.timer-warning {
  color: var(--warning-text, var(--warning));
  border-color: var(--warning);
  background: var(--warning-bg);
}
.timer-pill.timer-danger {
  color: var(--danger-text, var(--danger));
  border-color: var(--danger);
  background: var(--danger-bg);
  animation: pulse-danger 1s infinite alternate;
}
@keyframes pulse-danger {
  from { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  to { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* Live KPI ribbon */
.hall-kpi-ribbon {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.kpi-stat {
  display: flex;
  flex-direction: column;
}
.kpi-stat small {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}
.kpi-stat strong {
  font-size: 1.15rem;
  font-weight: 750;
  font-family: var(--font-mono);
  color: var(--text-main);
}

/* Hall Controls Toolbar */
.hall-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tool-btn {
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  font-weight: 600;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-main);
  transition: var(--transition);
}
.tool-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.status-pill {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 650;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
}

/* Split Pane Layout */
.hall-workspace {
  flex: 1;
  padding: 1.5rem;
  display: grid;
  grid-template-rows: minmax(180px, 36vh) minmax(200px, 1fr);
  gap: 1.25rem;
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
}
.passage-pane, .typing-pane {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.pane-header {
  padding: 0.6rem 1rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.passage-body {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  line-height: 1.85;
  white-space: pre-wrap;
  user-select: none;
  background: var(--bg-surface);
}
.passage-body[lang="pa"] {
  font-family: var(--font-punjabi);
  font-size: 1.25rem;
  line-height: 2;
}
.passage-body[lang="hi"] {
  font-family: var(--font-hindi);
  font-size: 1.25rem;
  line-height: 2;
}

/* Typing text highlighting */
.passage-body .hit,
.mock-target-body .hit {
  background: rgba(16, 185, 129, 0.22);
  color: inherit;
  border-radius: 2px;
}
.passage-body .miss,
.mock-target-body .miss {
  background: rgba(239, 68, 68, 0.25);
  color: var(--danger-text, var(--danger));
  border-bottom: 2px solid var(--danger);
  border-radius: 2px;
}
.passage-body .cursor,
.mock-target-body .cursor {
  background: var(--primary);
  color: white;
  border-radius: 2px;
  animation: blink-cursor 1s infinite;
}
@keyframes blink-cursor {
  50% { opacity: 0.5; }
}

.typing-area {
  flex: 1;
  width: 100%;
  padding: 1.25rem;
  border: none;
  resize: none;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  line-height: 1.85;
  background: var(--bg-surface);
  color: var(--text-main);
  outline: none;
}
.typing-area[lang="pa"] {
  font-family: var(--font-punjabi);
  font-size: 1.25rem;
  line-height: 2;
}
.typing-area[lang="hi"] {
  font-family: var(--font-hindi);
  font-size: 1.25rem;
  line-height: 2;
}

/* Hall Footer Actions */
.hall-footer {
  padding: 1rem 1.5rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.action-btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
  transition: var(--transition);
}
.action-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.45);
}
.action-btn-secondary {
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.action-btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Result / Scorecard Screen */
.scorecard-header {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.scorecard-header.pass-banner {
  background: linear-gradient(135deg, #065f46 0%, #047857 100%);
  color: white;
}
.scorecard-header.fail-banner {
  background: linear-gradient(135deg, #991b1b 0%, #b91c1c 100%);
  color: white;
}
.scorecard-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  margin-bottom: 0.85rem;
}
.scorecard-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 850;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.scorecard-desc {
  font-size: 1.05rem;
  opacity: 0.96;
  max-width: 760px;
  margin: 0 auto;
}
.scorecard-cutoff-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.95rem;
}
.scorecard-cutoff-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.72rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
}
.scorecard-cutoff-pill.ok {
  background: rgba(16, 185, 129, 0.28);
  border-color: rgba(167, 243, 208, 0.6);
}
.scorecard-cutoff-pill.fail {
  background: rgba(254, 202, 202, 0.22);
  border-color: rgba(254, 202, 202, 0.7);
}
.scorecard-fail-reasons {
  max-width: 720px;
  margin: 0.95rem auto 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(254, 202, 202, 0.55);
  font-size: 0.86rem;
  text-align: left;
  color: #ffffff;
}
.scorecard-fail-reasons ul {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.5;
}

/* Big KPI Grid */
.scorecard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.kpi-card small {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.kpi-card strong {
  font-size: 2rem;
  font-weight: 850;
  font-family: var(--font-mono);
  color: var(--text-main);
  letter-spacing: -0.03em;
}
.kpi-card .kpi-sub {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* Mistake Review Table */
.error-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-top: 1rem;
}
.error-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}
.error-table th {
  background: var(--bg-subtle);
  padding: 0.85rem 1rem;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
}
.error-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
}
.error-table tr:last-child td {
  border-bottom: none;
}
.error-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
}
.error-ok { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.error-substitution { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }
.error-omission { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }
.error-half { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-border); }

/* Scrollable Word-by-Word Mistake Diff Review */
.gtt-diff-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.gtt-diff-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
}
.gtt-legend-chip.ok { color: var(--success-text); }
.gtt-legend-chip.wrong { color: var(--danger-text); }
.gtt-legend-chip.skipped { color: var(--warning-text); }
.gtt-legend-chip.extra { color: #be123c; }
[data-theme="dark"] .gtt-legend-chip.extra { color: #fda4af; }

.gtt-diff-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.gtt-diff-filter-btn {
  padding: 0.34rem 0.72rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 0.76rem;
  font-weight: 700;
  transition: var(--transition);
}
.gtt-diff-filter-btn:hover {
  border-color: var(--primary);
}
.gtt-diff-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.gtt-diff-stream {
  max-height: 360px;
  overflow-y: auto;
  padding: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-app);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.45rem;
  align-items: center;
  line-height: 1.5;
  font-size: 0.96rem;
}
.gtt-diff-stream[lang="pa"] {
  font-family: var(--font-punjabi);
  font-size: 1.06rem;
}
.gtt-diff-stream[lang="hi"] {
  font-family: var(--font-hindi);
  font-size: 1.06rem;
}
.diff-tok {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid transparent;
}
.diff-tok.diff-ok {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}
.diff-tok.diff-wrong {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}
.diff-tok.diff-half {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--danger-text);
}
.diff-tok.diff-wrong .diff-bad,
.diff-tok.diff-half .diff-bad {
  text-decoration: underline wavy;
  font-weight: 700;
}
.diff-tok.diff-wrong .diff-sep,
.diff-tok.diff-half .diff-sep {
  opacity: 0.72;
  font-size: 0.8em;
}
.diff-tok.diff-wrong .diff-good,
.diff-tok.diff-half .diff-good {
  color: var(--success-text);
  font-weight: 800;
}
.diff-tok.diff-skipped {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning-text);
}
.diff-tok.diff-extra {
  background: var(--danger-bg);
  border: 1px dashed var(--danger-border);
  color: var(--danger-text);
}
.diff-tag-mini {
  font-size: 0.72em;
  font-weight: 800;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Font size utility classes (16px..36px responsive scaling) */
.font-14 { font-size: 14px !important; }
.font-16 { font-size: 16px !important; }
.font-18 { font-size: 18px !important; }
.font-20 { font-size: 20px !important; }
.font-22 { font-size: 22px !important; }
.font-24 { font-size: 24px !important; }
.font-26 { font-size: 26px !important; }
.font-28 { font-size: 28px !important; }
.font-30 { font-size: 30px !important; }
.font-32 { font-size: 32px !important; }
.font-34 { font-size: 34px !important; }
.font-36 { font-size: 36px !important; }

/* Footer */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  padding: 3rem 0 2rem;
  margin-top: auto;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Print Sheet Elements (Screen Defaults) */
#print-area,
.print-sheet-header,
.print-sheet-divider,
.print-sheet-footer {
  display: none;
}

.passage-pane,
#target {
  user-select: none;
  -webkit-user-select: none;
}

/* Print Styling (Clean Passage Paper & Official Marksheet) */
@media print {
  @page {
    margin: 1.2cm 1.5cm;
    size: A4 portrait;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='220' viewBox='0 0 340 220'%3E%3Cg transform='rotate(-30 170 110)'%3E%3Ctext x='170' y='110' text-anchor='middle' dominant-baseline='middle' font-family='system-ui,-apple-system,Segoe UI,Roboto,sans-serif' font-size='15' font-weight='700' fill='rgba(15,23,42,0.07)'%3EGovtTypingTest.com %C2%B7 100%25 Free Forever%3C/text%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 340px 220px;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide website navigation, footers, forms, buttons, controls */
  .top-header,
  .site-footer,
  .breadcrumbs,
  .setup-header,
  .panel:has(#setup),
  #setup,
  .hall-topbar,
  .hall-toolbar,
  .hall-footer,
  .buttons,
  .action-btn-primary,
  .action-btn-secondary,
  .tool-btn,
  .theme-toggle,
  .offline-pill,
  .screen-only,
  .no-print,
  .gtt-free-mission-bar,
  .gtt-free-mission-strip,
  .gtt-diff-filters,
  .trend-canvas-wrap,
  #retry,
  #print-marksheet,
  #drill-mistakes,
  #cbt-back-hub,
  #cbt-print-score,
  #cpt-retry,
  #cpt-print-score,
  .skip {
    display: none !important;
  }

  /* When printing from Exam Setup page, hide everything except #print-area */
  .exam-setup-wrap > *:not(#print-area) {
    display: none !important;
  }

  .wrap, .inner, .exam-setup-wrap {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #print-area {
    display: block !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
  }

  /* Professional Printable Passage Sheet */
  .print-sheet-header {
    display: block !important;
    border-bottom: 2pt solid #000000 !important;
    padding-bottom: 8pt !important;
    margin-bottom: 12pt !important;
  }

  .print-sheet-brand {
    font-size: 9pt !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: #333333 !important;
    margin-bottom: 4pt !important;
  }

  .print-sheet-title {
    font-size: 18pt !important;
    font-weight: 900 !important;
    color: #000000 !important;
    margin: 0 0 6pt 0 !important;
    line-height: 1.2 !important;
  }

  .print-sheet-meta {
    display: flex !important;
    gap: 16pt !important;
    font-size: 9.5pt !important;
    color: #222222 !important;
    flex-wrap: wrap !important;
  }

  .print-sheet-divider {
    display: block !important;
    border: none !important;
    border-top: 1pt dashed #888888 !important;
    margin: 10pt 0 14pt 0 !important;
  }

  .print-passage-text {
    font-family: "Courier New", Courier, monospace !important;
    font-size: 13pt !important;
    line-height: 2 !important;
    color: #000000 !important;
    white-space: pre-wrap !important;
    background: transparent !important;
    padding: 0 !important;
    letter-spacing: 0.02em !important;
    text-align: justify !important;
  }

  .print-passage-text[lang="pa"] {
    font-family: "Raavi", "Noto Sans Gurmukhi", sans-serif !important;
    font-size: 15pt !important;
    line-height: 2.2 !important;
  }

  .print-passage-text[lang="hi"] {
    font-family: "Mangal", "Noto Sans Devanagari", sans-serif !important;
    font-size: 15pt !important;
    line-height: 2.2 !important;
  }

  .print-sheet-footer {
    display: flex !important;
    justify-content: space-between !important;
    margin-top: 24pt !important;
    padding-top: 8pt !important;
    border-top: 1pt solid #888888 !important;
    font-size: 8.5pt !important;
    color: #444444 !important;
  }

  /* Scorecard & Marksheet Printing */
  .scorecard-header {
    border: 2pt solid #000000 !important;
    background: #f1f3f5 !important;
    color: #000000 !important;
    box-shadow: none !important;
    padding: 14pt !important;
    margin-bottom: 14pt !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .scorecard-title {
    color: #000000 !important;
    font-size: 18pt !important;
    margin-bottom: 4pt !important;
  }

  .scorecard-desc {
    color: #222222 !important;
    font-size: 10pt !important;
  }

  .scorecard-badge,
  .scorecard-cutoff-pill {
    border: 1pt solid #000000 !important;
    color: #000000 !important;
    background: transparent !important;
    font-size: 8pt !important;
  }

  .scorecard-fail-reasons {
    border: 1pt solid #991b1b !important;
    background: #fef2f2 !important;
    color: #7f1d1d !important;
  }

  .gtt-diff-stream {
    max-height: none !important;
    overflow: visible !important;
    background: #ffffff !important;
  }

  .scorecard-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8pt !important;
    margin-bottom: 14pt !important;
    page-break-inside: avoid;
  }

  .kpi-card {
    border: 1pt solid #000000 !important;
    box-shadow: none !important;
    padding: 8pt !important;
    background: transparent !important;
  }

  .kpi-card strong {
    color: #000000 !important;
    font-size: 16pt !important;
  }

  .kpi-card small {
    color: #444444 !important;
    font-size: 7.5pt !important;
  }

  .error-table-wrap {
    border: 1pt solid #000000 !important;
    page-break-inside: auto;
  }

  .error-table th {
    background: #e9ecef !important;
    color: #000000 !important;
    border-bottom: 1pt solid #000000 !important;
    font-size: 8.5pt !important;
    padding: 5pt 8pt !important;
  }

  .error-table td {
    border-bottom: 1pt solid #dddddd !important;
    padding: 5pt 8pt !important;
    font-size: 9pt !important;
    color: #000000 !important;
  }
}

/* Settings Toggle Switches (SaaS / Mobile-Friendly) */
.setting-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}
.setting-row:hover {
  border-color: var(--primary-border);
}
.setting-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.setting-meta strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}
.setting-meta small {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  transition: var(--transition);
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}
.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Mobile Top Banner */
.mobile-banner {
  background: linear-gradient(90deg, #1e3a8a 0%, #312e81 100%);
  color: #f1f5f9;
  font-size: 0.8rem;
  padding: 0.45rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  position: relative;
}
[data-theme="dark"] .mobile-banner {
  background: #0b1120;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mobile-banner a {
  color: #93c5fd;
  font-weight: 600;
  text-decoration: underline;
}
.mobile-banner button {
  position: absolute;
  right: 0.85rem;
  color: #94a3b8;
  font-size: 1.1rem;
  line-height: 1;
}

/* Hub Cards & Compact Directory */
.hub-card-grid {
  display: grid;
  gap: 1rem;
}
.hub-3col {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.hub-4col {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.15rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.hub-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.hub-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.hub-icon {
  font-size: 1.25rem;
}
.hub-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}
.hub-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  flex: 1;
}
.hub-cta {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 0.25rem;
}

.direct-agency-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}
.direct-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-right: 0.25rem;
}
.agency-pill {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-main);
}
.agency-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.dir-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.dir-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-light);
}
.dir-panel-head h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-main);
}
.dir-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.55rem;
}
.dir-mini-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}
.dir-mini-item:hover {
  border-color: var(--primary);
}
.dir-mini-name {
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dir-mini-bench {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.rule-bullet-list {
  margin-top: 0.75rem;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.6rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.faq-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}
.faq-item {
  padding-left: 1rem;
  border-left: 3px solid var(--primary);
}
.faq-item h3 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.faq-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Rich Multi-Column Footer */
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1.1fr 1.1fr 1.1fr 1.1fr;
  gap: 1.75rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}
.footer-trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.footer-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}
.footer-col h4, .footer-col h2 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}
.footer-col a {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Statutory Disclaimer Box */
.footer-disclaimer-box {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.footer-disclaimer-box strong {
  color: var(--text-main);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-sub-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-sub-links a {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.footer-sub-links a:hover {
  color: var(--primary);
}
.footer-sub-links .sep {
  color: var(--border-strong);
  font-size: 0.75rem;
}

@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.passage-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-height: 230px;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

/* Group Chips Grid & Analytics Canvas */
.group-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.group-chip-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: border-color 0.2s, transform 0.15s;
}
.group-chip-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.group-chip-card strong {
  font-size: 0.92rem;
  color: var(--text-main);
}
.group-chip-card span {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
}

.paper-mask-banner {
  padding: 2rem 1.25rem;
  text-align: center;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.trend-canvas-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 1rem;
}
.trend-canvas-wrap canvas {
  width: 100%;
  max-width: 840px;
  height: auto;
  display: block;
}

.breakdown-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}
.breakdown-pill {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
}

/* Word-Pill Highlighting (Preserves Gurmukhi / Devanagari Matras) */
.passage-body .word-hit,
.mock-target-body .word-hit {
  color: var(--success-text, var(--success));
  background: rgba(16, 185, 129, 0.12);
  border-radius: 4px;
  padding: 1px 3px;
}
.passage-body .word-miss,
.mock-target-body .word-miss {
  color: var(--danger-text, var(--danger));
  background: rgba(239, 68, 68, 0.16);
  border-bottom: 2px solid var(--danger);
  border-radius: 4px;
  padding: 1px 3px;
}
.passage-body .word-current,
.mock-target-body .word-current {
  background: var(--primary);
  color: #ffffff;
  border-radius: 4px;
  padding: 1px 4px;
  box-shadow: 0 1px 4px rgba(79, 70, 229, 0.35);
}

/* Line Height Utilities */
.lh-compact { line-height: 1.5 !important; }
.lh-normal { line-height: 1.85 !important; }
.lh-relaxed { line-height: 2.25 !important; }

/* Responsive */
@media (max-width: 1140px) {
  .navbar {
    height: auto;
    padding: 0.55rem 0;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .nav-links {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.2rem;
    gap: 0.3rem;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-item {
    white-space: nowrap;
    font-size: 0.84rem;
    padding: 0.4rem 0.7rem;
  }
  .hall-topbar {
    padding: 0.75rem 1rem;
    gap: 0.65rem;
  }
  .hall-kpi-ribbon {
    width: 100%;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-light);
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 1rem;
  }
  .inner {
    padding-block: 1.25rem 2.5rem;
  }
  .panel {
    padding: 1.25rem;
    border-radius: var(--radius-md);
  }
  .format-toggle-group,
  .setting-list,
  .panel-grid {
    grid-template-columns: 1fr;
  }
  .exam-grid {
    grid-template-columns: 1fr;
  }
  .hall-workspace {
    grid-template-rows: minmax(150px, 32vh) minmax(170px, 1fr);
    padding: 0.75rem;
    gap: 0.75rem;
  }
  .hall-toolbar {
    padding: 0.5rem 0.85rem;
  }
  .hall-footer {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }
  .action-btn-primary,
  .action-btn-secondary {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
  }
  .timer-pill {
    font-size: 1.1rem;
    padding: 0.35rem 0.9rem;
  }
  .kpi-stat strong {
    font-size: 1rem;
  }
  .scorecard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .kpi-card {
    padding: 1rem 0.75rem;
  }
  .kpi-card strong {
    font-size: 1.5rem;
  }
  .offline-pill span:last-child {
    display: none;
  }
}

/* Exam workspaces: keep the controls and reference information together. */
.exam-layout,.custom-workspace{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:1.2rem;align-items:start}
.exam-rule-rail{display:grid;gap:1rem}
.exam-rule-rail .panel{margin:0}
.example-criteria{display:grid;gap:.62rem;margin:.7rem 0 0}
.example-criteria>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:.6rem;padding:.4rem 0;border-bottom:1px solid var(--border-strong)}
.example-criteria>div:last-child{border:0}
.example-criteria dt{font-size:.86rem;color:var(--text-muted)}
.example-criteria dd{margin:0;font-weight:650}
.medium-links,.entry-actions,.custom-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.55rem}
.medium-links{margin-bottom:1rem;padding:.7rem;border:1px solid var(--border-strong);border-radius:var(--radius-sm)}
.medium-links strong{margin-right:auto}
.medium-links span,.medium-links a{padding:.25rem .65rem;border-radius:var(--radius-sm)}
.medium-links span,.entry-actions [aria-pressed=true]{background:var(--bg-subtle);color:var(--primary)}
.medium-links a{color:var(--primary);text-decoration:underline}
.entry-actions .alternate{background:var(--bg-subtle);color:var(--primary)}
.passage-picker{display:grid;gap:.45rem;max-height:230px;overflow:auto;margin-bottom:1rem}
.passage-picker .tool-btn{white-space:normal;min-width:0}
.passage-picker [aria-pressed=true]{border-color:var(--primary);color:var(--primary);background:var(--bg-subtle);font-weight:700}
#booklet-items{display:grid;gap:.3rem;margin-bottom:.55rem}
.custom-toolbar{justify-content:space-between;margin-bottom:.85rem}
.custom-toolbar h2{margin:0}
.custom-toolbar input{max-width:100%}
.custom-controls .field-group,.custom-controls .entry-actions{margin-bottom:.65rem}
.custom-controls .action-btn-primary{width:100%;margin-top:1rem}
.custom-editor textarea{min-height:18rem;margin-bottom:.5rem}
@media(max-width:800px){.exam-layout,.custom-workspace{grid-template-columns:minmax(0,1fr);gap:.65rem}.custom-editor textarea{min-height:13rem}}
.saved-entry{padding:.65rem 0;border-bottom:1px solid var(--border-strong)}
.saved-entry p{white-space:pre-wrap;overflow-wrap:anywhere;max-height:18rem;overflow:auto}
.toggle-switch input{inset:0;width:100%;height:100%;margin:0;z-index:1;cursor:pointer}
.toggle-switch input:focus-visible+.toggle-slider{outline:2px solid var(--primary);outline-offset:3px}
.toggle-switch input:disabled{cursor:not-allowed}
.accuracy-pass{color:var(--success-text,var(--success))}
.accuracy-fail{color:var(--danger-text,var(--danger))}
@media print{.mobile-banner{display:none!important}}
.exam-setup-wrap{max-width:1075px}
.nav-links .nav-item,.offline-pill{white-space:nowrap}
.rule-answers details{padding:.5rem 0;border-top:1px solid var(--border-strong)}
.rule-answers summary{cursor:pointer;font-weight:650}
.rule-answers p{margin:.35rem 0;color:var(--text-muted)}
main:has(.custom-workspace) .hero-section{padding-block:1.4rem 1.65rem}
main:has(.custom-workspace) .hero-title{font-size:clamp(1.8rem,4vw,2.7rem)}

/* ==========================================================================
   SEO & Navigation Enhancements (GovtTypingTest)
   ========================================================================== */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.related-card {
  display: block;
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.related-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.related-card strong {
  display: block;
  font-size: 0.95rem;
  color: var(--primary);
  margin-bottom: 0.35rem;
}
.related-card span {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.seo-guide-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
}
.seo-guide-box h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-main);
}
.seo-guide-box p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-main);
  margin-bottom: 1rem;
}
.seo-guide-box ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}
.seo-guide-box li {
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}
.quick-pill-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0;
}
.quick-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.2s ease;
}
.quick-pill:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}


/* ==========================================================================
   SIMULATED GOVERNMENT EXAM CONSOLE (Theme-Aware Elite CBT Arena)
   ========================================================================== */
html:has(body.in-exam-hall),
body.in-exam-hall,
body.in-exam-hall #main {
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
  background: var(--cbt-arena-bg, #f1f5f9) !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.in-exam-hall {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
}
body.in-exam-hall #mobile-banner,
body.in-exam-hall .mobile-banner,
body.in-exam-hall .top-header,
body.in-exam-hall .offline-banner,
body.in-exam-hall .site-footer,
body.in-exam-hall footer.footer {
  display: none !important;
}

/* CBT Arena Theme Variables: Light Mode (Default High-Contrast CBT Hall) */
:root {
  --cbt-arena-bg: #eef2f6;
  --cbt-header-bg: #1e3a8a;
  --cbt-header-border: #1d4ed8;
  --cbt-header-text: #ffffff;
  --cbt-hud-timer-bg: #0f172a;
  --cbt-hud-timer-border: #38bdf8;
  --cbt-hud-timer-text: #38bdf8;
  --cbt-card-bg: #ffffff;
  --cbt-card-border: #cbd5e1;
  --cbt-card-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.08);
  --cbt-panel-head-bg: #f8fafc;
  --cbt-panel-head-border: #e2e8f0;
  --cbt-panel-head-text: #0f172a;
  --cbt-panel-sub-text: #64748b;
  --cbt-panel-badge-bg: #e0e7ff;
  --cbt-panel-badge-border: #c7d2fe;
  --cbt-panel-badge-text: #3730a3;
  --cbt-source-bg: #ffffff;
  --cbt-source-text: #0f172a;
  --cbt-response-bg: #ffffff;
  --cbt-response-text: #000000;
  --cbt-response-border: #94a3b8;
  --cbt-response-focus: #2563eb;
  --cbt-telemetry-bg: #f8fafc;
  --cbt-telemetry-border: #e2e8f0;
  --cbt-telemetry-text: #475569;
  --cbt-telemetry-val: #1e40af;
  --cbt-footer-bg: #ffffff;
  --cbt-footer-border: #cbd5e1;
  --cbt-footer-text: #475569;
  --cbt-cand-bg: rgba(255, 255, 255, 0.12);
  --cbt-cand-border: rgba(255, 255, 255, 0.22);
  --cbt-cand-text: #ffffff;
  --cbt-cand-sub: #cbd5e1;
  --cbt-tool-btn-bg: rgba(255, 255, 255, 0.15);
  --cbt-tool-btn-border: rgba(255, 255, 255, 0.25);
  --cbt-tool-btn-text: #ffffff;
  --cbt-dropdown-bg: #ffffff;
  --cbt-dropdown-border: #cbd5e1;
  --cbt-dropdown-text: #0f172a;
  --cbt-dropdown-subtext: #475569;
  --cbt-dropdown-shadow: 0 14px 35px -4px rgba(15, 23, 42, 0.18), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* CBT Arena Theme Variables: Dark Mode */
[data-theme="dark"] {
  --cbt-arena-bg: #070b14;
  --cbt-header-bg: #0f172a;
  --cbt-header-border: rgba(255, 255, 255, 0.08);
  --cbt-header-text: #ffffff;
  --cbt-hud-timer-bg: #030712;
  --cbt-hud-timer-border: #0ea5e9;
  --cbt-hud-timer-text: #38bdf8;
  --cbt-card-bg: #111827;
  --cbt-card-border: rgba(255, 255, 255, 0.08);
  --cbt-card-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
  --cbt-panel-head-bg: #0d131f;
  --cbt-panel-head-border: rgba(255, 255, 255, 0.06);
  --cbt-panel-head-text: #e2e8f0;
  --cbt-panel-sub-text: #94a3b8;
  --cbt-panel-badge-bg: rgba(56, 189, 248, 0.12);
  --cbt-panel-badge-border: rgba(56, 189, 248, 0.25);
  --cbt-panel-badge-text: #38bdf8;
  --cbt-source-bg: #0d131f;
  --cbt-source-text: #f1f5f9;
  --cbt-response-bg: #111827;
  --cbt-response-text: #f8fafc;
  --cbt-response-border: rgba(99, 102, 241, 0.3);
  --cbt-response-focus: #6366f1;
  --cbt-telemetry-bg: #0b1120;
  --cbt-telemetry-border: rgba(255, 255, 255, 0.06);
  --cbt-telemetry-text: #94a3b8;
  --cbt-telemetry-val: #38bdf8;
  --cbt-footer-bg: rgba(15, 23, 42, 0.95);
  --cbt-footer-border: rgba(255, 255, 255, 0.08);
  --cbt-footer-text: #94a3b8;
  --cbt-cand-bg: rgba(255, 255, 255, 0.04);
  --cbt-cand-border: rgba(255, 255, 255, 0.1);
  --cbt-cand-text: #f1f5f9;
  --cbt-cand-sub: #94a3b8;
  --cbt-tool-btn-bg: rgba(255, 255, 255, 0.05);
  --cbt-tool-btn-border: rgba(255, 255, 255, 0.12);
  --cbt-tool-btn-text: #cbd5e1;
  --cbt-dropdown-bg: #1e293b;
  --cbt-dropdown-border: #334155;
  --cbt-dropdown-text: #f8fafc;
  --cbt-dropdown-subtext: #94a3b8;
  --cbt-dropdown-shadow: 0 14px 35px -4px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   GovtTypingTest Next-Gen CBT Examination Arena (Custom Elite UI)
   ========================================================================== */
body.in-exam-hall .top-header,
body.in-exam-hall .site-footer,
body.in-exam-hall .mobile-banner {
  display: none !important;
}
.gtt-exam-arena,
.gtt-cockpit-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  width: 100%;
  max-width: 100vw;
  background: var(--cbt-arena-bg);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Plus Jakarta Sans", "Inter", "Segoe UI", Roboto, sans-serif;
  user-select: none;
  overflow: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* 1. TOP COCKPIT HEADER (Single-Line Sleek Executive Bar) */
.gtt-cockpit-header {
  background: var(--cbt-header-bg);
  border-bottom: 1px solid var(--cbt-header-border);
  color: var(--cbt-header-text);
  padding: 0.35rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  height: 48px;
  min-height: 48px;
  box-shadow: 0 2px 10px -2px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 60;
  gap: 0.75rem;
}

/* Left: Brand & Exam Strip in One Line */
.gtt-cockpit-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}
.gtt-cockpit-brand-slim {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}
.gtt-cockpit-emblem-slim {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
}
.gtt-brand-title-slim {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  white-space: nowrap;
}
.gtt-brand-tld {
  color: #38bdf8;
  font-weight: 700;
}
.gtt-bar-sep {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 300;
  font-size: 0.85rem;
}
.gtt-exam-strip-slim {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gtt-exam-name-slim {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}
.gtt-meta-chip-slim {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
}
.gtt-chip-accent {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.5);
  color: #ffffff;
}
.gtt-chip-chunk {
  background: rgba(245, 158, 11, 0.3);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fef08a;
}

/* Center: Slim Precision Digital Timer ("Brik" Timer) */
.gtt-cockpit-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gtt-hud-timer-slim {
  background: var(--cbt-hud-timer-bg);
  border: 1px solid var(--cbt-hud-timer-border);
  border-radius: 9999px;
  padding: 0.18rem 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 32px;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.3);
  transition: all 0.3s ease;
}
.gtt-timer-icon-slim {
  font-size: 0.85rem;
  color: var(--cbt-hud-timer-text);
  line-height: 1;
}
.gtt-timer-digits-slim {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", monospace;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--cbt-hud-timer-text);
  line-height: 1;
}

/* Right: Candidate Badge & Slim Tools in One Line */
.gtt-cockpit-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-shrink: 0;
}
.gtt-cand-slim {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--cbt-cand-bg);
  border: 1px solid var(--cbt-cand-border);
  padding: 0.22rem 0.65rem;
  border-radius: 6px;
  height: 32px;
  font-size: 0.75rem;
  color: var(--cbt-cand-text);
  white-space: nowrap;
}
.gtt-cand-icon-slim {
  font-size: 0.78rem;
  opacity: 0.85;
}
.gtt-cand-roll {
  font-weight: 700;
  color: var(--cbt-cand-text);
}
.gtt-cand-sep {
  opacity: 0.4;
}
.gtt-sys-code-slim {
  color: #fbbf24;
  font-weight: 700;
}

.gtt-tool-cluster-slim {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.gtt-font-ctrl-slim {
  display: flex;
  align-items: center;
  background: var(--cbt-tool-btn-bg);
  border: 1px solid var(--cbt-tool-btn-border);
  border-radius: 6px;
  overflow: hidden;
  height: 32px;
}
.gtt-font-btn-slim {
  background: transparent;
  border: none;
  color: var(--cbt-tool-btn-text);
  font-size: 0.72rem;
  font-weight: 750;
  padding: 0 0.5rem;
  height: 100%;
  cursor: pointer;
  transition: background 0.15s;
}
.gtt-font-btn-slim:hover {
  background: rgba(255, 255, 255, 0.2);
}
.gtt-font-val-slim {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--cbt-hud-timer-text);
  padding: 0 0.25rem;
  font-family: ui-monospace, monospace;
}
.gtt-icon-btn-slim {
  background: var(--cbt-tool-btn-bg);
  border: 1px solid var(--cbt-tool-btn-border);
  color: var(--cbt-tool-btn-text);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}
.gtt-icon-btn-slim:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.gtt-tool-pill-slim {
  display: flex;
  align-items: center;
  background: var(--cbt-tool-btn-bg);
  border: 1px solid var(--cbt-tool-btn-border);
  border-radius: 6px;
  height: 32px;
  overflow: hidden;
}
.gtt-select-slim {
  background: transparent;
  border: none;
  color: var(--cbt-tool-btn-text);
  font-size: 0.74rem;
  font-weight: 650;
  padding: 0 0.45rem;
  outline: none;
  cursor: pointer;
  height: 100%;
}
.gtt-select-slim option {
  background: var(--cbt-dropdown-bg);
  color: var(--cbt-dropdown-text);
}
.gtt-check-slim {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--cbt-tool-btn-bg);
  border: 1px solid var(--cbt-tool-btn-border);
  border-radius: 6px;
  height: 32px;
  padding: 0 0.55rem;
  font-size: 0.74rem;
  font-weight: 650;
  color: var(--cbt-tool-btn-text);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.gtt-check-slim input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--primary);
  width: 13px;
  height: 13px;
  margin: 0;
}

/* Settings Dropdown */
.mock-settings-wrapper {
  position: relative;
}
.mock-settings-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 310px;
  background: var(--cbt-dropdown-bg);
  color: var(--cbt-dropdown-text);
  border: 1.5px solid var(--cbt-dropdown-border);
  border-radius: 12px;
  box-shadow: var(--cbt-dropdown-shadow);
  padding: 1.15rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  animation: gttDropdownPop 0.16s ease-out;
}
.mock-settings-dropdown[hidden] {
  display: none !important;
}
@keyframes gttDropdownPop {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.settings-dropdown-header {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  border-bottom: 1px solid var(--cbt-card-border);
  padding-bottom: 0.5rem;
}
.settings-dropdown-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.settings-dropdown-row label {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--cbt-dropdown-text);
}
.mock-select-sm {
  background: var(--cbt-arena-bg);
  border: 1px solid var(--cbt-card-border);
  color: var(--cbt-dropdown-text);
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  outline: none;
}
.mock-select-sm:focus {
  border-color: var(--primary);
}
.settings-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cbt-dropdown-text);
}
.btn-toggle-fs {
  width: 100%;
  padding: 0.5rem 0.85rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 650;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-toggle-fs:hover {
  background: var(--primary-hover);
}
.btn-toggle-fs.danger {
  background: var(--danger);
}
.btn-toggle-fs.danger:hover {
  background: #dc2626;
}

/* 2. DUAL-PANE WORKSPACE */
.gtt-dual-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1.75rem;
  gap: 0.85rem;
  overflow: hidden;
  background: var(--cbt-arena-bg);
}
.gtt-card-source,
.gtt-card-response {
  background: var(--cbt-card-bg);
  border: 1.5px solid var(--cbt-card-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  box-shadow: var(--cbt-card-shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gtt-card-source {
  flex: 1.08;
  min-height: 160px;
}
.gtt-card-response {
  flex: 0.92;
  min-height: 150px;
}
.gtt-card-response:focus-within {
  border-color: var(--cbt-response-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15), var(--cbt-card-shadow);
}

.gtt-panel-head {
  background: var(--cbt-panel-head-bg);
  border-bottom: 1px solid var(--cbt-panel-head-border);
  padding: 0.55rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.gtt-head-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.gtt-panel-badge {
  background: var(--cbt-panel-badge-bg);
  border: 1px solid var(--cbt-panel-badge-border);
  color: var(--cbt-panel-badge-text);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
}
.gtt-badge-input {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  color: #6366f1;
}
[data-theme="dark"] .gtt-badge-input {
  color: #a5b4fc;
}
.gtt-panel-title {
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  color: var(--cbt-panel-head-text);
}
.gtt-panel-subtitle {
  font-size: 0.72rem;
  color: var(--cbt-panel-sub-text);
  margin-left: 0.25rem;
}

.gtt-btn-paper {
  background: var(--cbt-panel-badge-bg);
  border: 1px solid var(--cbt-panel-badge-border);
  color: var(--cbt-panel-head-text);
  font-size: 0.72rem;
  font-weight: 650;
  padding: 0.22rem 0.7rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}
.gtt-btn-paper:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.gtt-backspace-indicator {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}
.gtt-bs-allowed {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #059669;
}
[data-theme="dark"] .gtt-bs-allowed {
  color: #34d399;
}
.gtt-bs-locked {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #dc2626;
}
[data-theme="dark"] .gtt-bs-locked {
  color: #f87171;
}

/* Source Passage Body */
.gtt-card-source .mock-target-body {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.15rem 1.6rem;
  background: var(--cbt-source-bg);
  color: var(--cbt-source-text);
  line-height: 1.85;
  letter-spacing: 0.015em;
  font-size: 26px;
  white-space: pre-wrap;
  word-break: break-word;
}
.gtt-card-source .mock-target-body[lang="pa"] {
  font-family: var(--font-punjabi, "Raavi", sans-serif);
  line-height: 2.05;
}
.gtt-card-source .mock-target-body[lang="hi"] {
  font-family: var(--font-hindi, "Mangal", sans-serif);
  line-height: 2.05;
}

/* Response Input Textarea */
.gtt-card-response .mock-response-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.1rem 1.6rem;
  border: none;
  outline: none;
  resize: none;
  background: var(--cbt-response-bg);
  color: var(--cbt-response-text);
  line-height: 1.85;
  letter-spacing: 0.015em;
  font-size: 26px;
  width: 100%;
}
.gtt-card-response .mock-response-area::placeholder {
  color: var(--text-light);
}
.gtt-card-response .mock-response-area[lang="pa"] {
  font-family: var(--font-punjabi, "Raavi", sans-serif);
  line-height: 2.05;
}
.gtt-card-response .mock-response-area[lang="hi"] {
  font-family: var(--font-hindi, "Mangal", sans-serif);
  line-height: 2.05;
}

/* Integrated Telemetry HUD */
.gtt-telemetry-hud {
  background: var(--cbt-telemetry-bg);
  border-top: 1px solid var(--cbt-telemetry-border);
  padding: 0.45rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.gtt-telemetry-left {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}
.gtt-stat-chip {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.gtt-stat-lbl {
  font-size: 0.72rem;
  color: var(--cbt-telemetry-text);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.gtt-stat-num {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--cbt-telemetry-val);
  font-family: ui-monospace, "SF Mono", monospace;
}
.gtt-telemetry-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--cbt-telemetry-text);
}
.gtt-stat-mini strong {
  color: var(--cbt-panel-head-text);
  font-weight: 750;
}
.gtt-stat-dot {
  color: var(--border-strong);
}

/* 3. DOCKED BOTTOM COMMAND BAR */
.gtt-docked-footer {
  background: var(--cbt-footer-bg);
  border-top: 1px solid var(--cbt-footer-border);
  padding: 0.65rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: var(--cbt-footer-shadow);
  color: var(--cbt-footer-text);
}
.gtt-dock-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--cbt-footer-text);
}
.gtt-dock-indicator {
  color: #10b981;
  font-size: 0.85rem;
  animation: gttPulse 1.5s infinite;
}

.gtt-dock-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.gtt-btn-abort {
  background: transparent;
  border: 1px solid var(--cbt-card-border);
  border-radius: 8px;
  padding: 0.48rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--cbt-footer-text);
  cursor: pointer;
  transition: all 0.15s;
}
.gtt-btn-abort:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}
.gtt-btn-chunk {
  background: var(--cbt-arena-bg);
  border: 1px solid var(--cbt-card-border);
  border-radius: 8px;
  padding: 0.48rem 1.15rem;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--cbt-panel-head-text);
  cursor: pointer;
  transition: all 0.15s;
}
.gtt-btn-chunk:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}
.gtt-btn-chunk:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.gtt-btn-chunk.gtt-btn-chunk-ready {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
  animation: pulse-chunk-btn 2s infinite;
}
@keyframes pulse-chunk-btn {
  0%, 100% { box-shadow: 0 0 8px rgba(16, 185, 129, 0.3); }
  50% { box-shadow: 0 0 16px rgba(16, 185, 129, 0.6); }
}

/* Chunk Stepper Ribbon directly above passage */
.gtt-chunk-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  background: var(--cbt-hud-bg);
  border-bottom: 1px solid var(--cbt-hud-timer-border);
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
}
.gtt-chunk-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 0.22rem 0.75rem;
  border-radius: 9999px;
  font-weight: 750;
  font-size: 0.82rem;
}
.gtt-chunk-steps {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.gtt-chunk-step {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--cbt-arena-bg);
  border: 1px solid var(--cbt-card-border);
  color: var(--cbt-panel-head-text);
  cursor: pointer;
  transition: all 0.15s;
}
.gtt-chunk-step.active {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #000000;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
  transform: scale(1.1);
}
.gtt-chunk-step.done {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}
.gtt-chunk-step:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}
.gtt-chunk-quick-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.gtt-btn-submit {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: 8px;
  padding: 0.52rem 1.6rem;
  font-size: 0.88rem;
  font-weight: 750;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.gtt-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}
.gtt-submit-svg {
  width: 15px;
  height: 15px;
}


/* ==========================================================================
   Audit fixes: single-line cockpit header fit (1366px+), 4K scaling,
   and keyboard focus visibility on the dark CBT header.
   ========================================================================== */
@media (max-width: 1500px) {
  .gtt-cockpit-header { padding-inline: 0.75rem; gap: 0.5rem; }
  .gtt-exam-strip-slim .gtt-meta-chip-slim:not(.gtt-chip-accent) { display: none; }
  .gtt-cand-slim .gtt-cand-sep,
  .gtt-cand-slim .gtt-sys-code-slim { display: none; }
  .gtt-exam-name-slim { max-width: min(30vw, 320px); }
}
@media (max-width: 1180px) {
  .gtt-cockpit-header {
    height: auto;
    min-height: 48px;
    flex-wrap: wrap;
    row-gap: 0.3rem;
    padding-block: 0.35rem;
  }
  .gtt-cockpit-left { order: 1; flex: 1 1 100%; }
  .gtt-cockpit-center { order: 0; }
  .gtt-cockpit-right { order: 2; flex: 1 1 100%; justify-content: space-between; }
  .gtt-exam-name-slim { max-width: 100%; }
}
@media (min-width: 1920px) {
  .wrap { max-width: 1400px; }
  .gtt-cockpit-header { padding-inline: 2rem; }
  .gtt-exam-name-slim { max-width: 420px; }
}
body.in-exam-hall :focus-visible { outline-color: #38bdf8; }

/* ---- Cockpit header: one row, never wraps ---- */
.gtt-cockpit-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: .75rem;
  height: 48px;
  min-height: 48px;
  padding: .25rem .75rem;
  white-space: nowrap;
  overflow: hidden;
}
.gtt-cockpit-left, .gtt-cockpit-right {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
}
.gtt-cockpit-right {
  justify-content: flex-end;
}
.gtt-cockpit-center {
  display: flex;
  justify-content: center;
}
.gtt-exam-strip-slim {
  display: flex;
  align-items: center;
  gap: .4rem;
  min-width: 0;
  flex: 1 1 auto;
}
.gtt-exam-name-slim {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  font-size: .82rem;
}
.gtt-meta-chip-slim, .gtt-brand-title-slim {
  flex: 0 0 auto;
}
.gtt-tool-cluster-slim {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex: 0 0 auto;
}
.gtt-hud-timer-slim {
  font-variant-numeric: tabular-nums;
  min-width: 5.5ch;
  text-align: center;
}
.gtt-select-slim {
  max-width: 9.5rem;
  font-size: .78rem;
}

/* Progressive shedding keeps one row from 1366px up */
@media (max-width: 1500px) {
  .gtt-cand-slim { display: none !important; }
}
@media (max-width: 1440px) {
  .gtt-chip-accent { display: none !important; }
  .gtt-check-slim span { display: none !important; }
}
@media (max-width: 1366px) {
  .gtt-brand-tld, .gtt-bar-sep { display: none !important; }
  .gtt-select-slim { max-width: 7.5rem; }
}

/* 4K: scale up instead of floating tiny */
@media (min-width: 2560px) {
  html { font-size: 20px; }
  .wrap { max-width: 1800px; }
}
@media (min-width: 3400px) {
  html { font-size: 26px; }
}

/* Reduced motion for scroll/pace animations */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}


/* Touch-friendly 44px minimum controls on coarse pointer devices */
@media (pointer: coarse) {
  .gtt-icon-btn-slim { width: 44px; height: 44px; }
  .gtt-select-slim, .gtt-check-slim, .gtt-font-ctrl-slim { min-height: 44px; }
  .gtt-cockpit-header { height: auto; min-height: 56px; }
}

/* ==========================================================================
   Live Multiplayer Race Arena (/multiplayer)
   ========================================================================== */
.nav-item-live {
  font-weight: 750 !important;
  color: var(--primary) !important;
  background: rgba(79, 70, 229, 0.09);
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: 9999px;
  padding: 0.3rem 0.85rem !important;
}
.nav-item-live.active {
  background: var(--primary) !important;
  color: #ffffff !important;
}

.mp-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: mp-pulse-dot 1.8s infinite;
}
@keyframes mp-pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.65); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.mp-hero-cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0.55rem 1.2rem;
  border-radius: 9999px;
  background: var(--bg-surface);
  border: 1px solid rgba(79, 70, 229, 0.35);
  color: var(--text-main);
  font-size: 0.86rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.12);
  transition: transform 0.15s, border-color 0.15s;
}
.mp-hero-cta-pill:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
}
.mp-hero-cta-pill span:last-child {
  color: var(--primary);
  font-weight: 700;
}

.mp-identity-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.mp-id-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
}
.mp-id-field label {
  font-weight: 700;
  font-size: 0.9rem;
}
.mp-id-field input {
  max-width: 280px;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-weight: 600;
}
.mp-id-badges {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.mp-error-banner {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--danger);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 650;
  margin-bottom: 1.25rem;
}

.mp-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
  align-items: stretch;
}
@media (max-width: 1024px) {
  .mp-cards-grid { grid-template-columns: 1fr; }
}
.mp-mode-card {
  display: flex;
  flex-direction: column;
}
.mp-card-featured {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
}
.mp-card-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: rgba(79, 70, 229, 0.12);
  color: var(--primary);
  margin-bottom: 0.55rem;
}
.mp-card-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0.35rem 0 1rem;
}
.mp-inline-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
}
.mp-full-btn {
  width: 100%;
  margin-top: auto;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  justify-content: center;
}
.mp-code-input {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  text-align: center;
}

.mp-open-lobbies-box {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}
.mp-open-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  margin-bottom: 0.55rem;
}
.mp-open-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 150px;
  overflow-y: auto;
}
.mp-open-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
}
.mp-open-item strong { display: block; font-size: 0.8rem; }
.mp-open-item small { color: var(--text-muted); font-size: 0.72rem; }
.mp-muted-sm { font-size: 0.8rem; color: var(--text-muted); }

/* Waiting Lobby */
.mp-lobby-wrap { max-width: 920px; }
.mp-lobby-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
}
.mp-lobby-title { font-size: 1.65rem; margin: 0.25rem 0 0.65rem; }
.mp-rule-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.mp-room-code-box {
  background: var(--bg-subtle);
  border: 2px dashed var(--primary);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  text-align: center;
  min-width: 240px;
}
.mp-room-code-box small {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.mp-big-code {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--primary);
  margin: 0.2rem 0 0.55rem;
}
.mp-share-btns { display: flex; gap: 0.45rem; justify-content: center; flex-wrap: wrap; }
.mp-lobby-feedback {
  min-height: 1.2rem;
  margin: 0.75rem 0;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--success);
}
.mp-players-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.mp-lobby-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}
.mp-player-pill {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
}
.mp-player-pill.is-me {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.07);
}
.mp-player-pill strong { display: block; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-player-pill small { color: var(--text-muted); font-size: 0.76rem; }
.mp-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.mp-lobby-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
}
.mp-start-race-btn {
  font-size: 1.05rem;
  padding: 0.85rem 1.8rem;
}
.mp-waiting-host-pill {
  padding: 0.65rem 1.1rem;
  border-radius: 9999px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 650;
  font-size: 0.88rem;
}

/* Live Race Track & Countdown */
.mp-workspace {
  gap: 0.75rem !important;
}
.mp-track-card {
  padding: 0.55rem 1rem !important;
  max-height: 135px;
  flex-shrink: 0;
  overflow-y: auto;
}
.mp-lane {
  display: grid;
  grid-template-columns: 200px 1fr 175px;
  align-items: center;
  gap: 0.85rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
}
.mp-lane + .mp-lane { margin-top: 0.25rem; }
.mp-lane-me {
  background: rgba(79, 70, 229, 0.1);
}
.mp-lane-who {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.mp-lane-name-wrap { min-width: 0; }
.mp-lane-name {
  display: block;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-lane-sub { display: block; font-size: 0.7rem; color: var(--text-muted); }
.mp-you-tag, .mp-bot-tag {
  font-size: 0.64rem;
  padding: 0.08rem 0.38rem;
  border-radius: 4px;
  background: var(--primary);
  color: #ffffff;
  vertical-align: middle;
}
.mp-bot-tag { background: #64748b; }

.mp-lane-bar-track {
  position: relative;
  height: 12px;
  border-radius: 9999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  overflow: visible;
}
.mp-lane-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #4f46e5 0%, #10b981 100%);
  transition: width 0.25s linear;
}
.mp-lane-runner {
  position: absolute;
  top: -7px;
  font-size: 0.95rem;
  transition: left 0.25s linear;
  pointer-events: none;
}
.mp-lane-metrics {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  font-size: 0.8rem;
}
.mp-metric-rank { font-weight: 800; min-width: 44px; text-align: right; }

@media (max-width: 768px) {
  .mp-lane { grid-template-columns: 140px 1fr 110px; gap: 0.5rem; }
  .mp-metric-acc { display: none; }
}

.mp-countdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(11, 15, 23, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mp-countdown-overlay[hidden] { display: none !important; }
.mp-countdown-box {
  background: var(--bg-surface);
  border: 2px solid var(--primary);
  border-radius: 20px;
  padding: 2rem 3.2rem;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.mp-countdown-box small {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.mp-countdown-box strong {
  display: block;
  font-size: 4.5rem;
  line-height: 1.1;
  font-weight: 900;
  color: var(--primary);
  margin: 0.35rem 0;
}
.mp-countdown-box span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Championship Podium */
.mp-podium-wrap { max-width: 980px; }
.mp-podium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.15rem;
  margin-top: 1.25rem;
}
.mp-podium-card {
  text-align: center;
  padding: 1.5rem 1.25rem;
}
.mp-podium-rank-1 {
  border-color: #f59e0b;
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.16);
}
.mp-podium-medal {
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.mp-podium-avatar { font-size: 2.2rem; margin-bottom: 0.35rem; }
.mp-podium-name { font-size: 1.1rem; margin-bottom: 0.4rem; }
.mp-podium-wpm {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--primary);
}
.mp-podium-wpm small { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.mp-podium-meta { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ==========================================================================
   Punjab & Haryana High Court Clerk CBT + CPT Simulator (/punjab-hc-clerk-cbt)
   ========================================================================== */
.mock-card {
  background: var(--cbt-card-bg);
  border: 1.5px solid var(--cbt-card-border);
  border-radius: 12px;
  box-shadow: var(--cbt-card-shadow);
}
.cbt-arena {
  --cbt-q-size: 20px;
}
.cbt-paper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}
.cbt-paper-card {
  display: flex;
  flex-direction: column;
}
#cbt-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cbt-desktop-label { display: inline; }
.cbt-mobile-label { display: none; }
.cbt-mobile-palette-btn {
  display: none;
  align-items: center;
  gap: 0.3rem;
  height: 30px;
  padding: 0 0.55rem;
  border-radius: 7px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.16);
  color: #e0f2fe;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.cbt-section-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--cbt-panel-head-bg);
  border-bottom: 1px solid var(--cbt-panel-head-border);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.cbt-section-tabs::-webkit-scrollbar { display: none; }
.cbt-sec-tab {
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  border: 1px solid var(--cbt-card-border);
  background: var(--cbt-card-bg);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.cbt-sec-tab span {
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.74rem;
  background: var(--bg-subtle);
}
.cbt-sec-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.cbt-sec-tab.active span {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.cbt-body-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1.25rem;
}
.cbt-obj-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1rem;
}
.cbt-q-pane, .cbt-palette-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.cbt-q-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.25rem 1.5rem;
}
.cbt-q-text {
  font-size: var(--cbt-q-size);
  font-weight: 700;
  line-height: 1.55;
  margin-bottom: 1.25rem;
  color: var(--cbt-source-text);
}
.cbt-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.cbt-option-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 48px;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 1.5px solid var(--cbt-card-border);
  background: var(--cbt-source-bg);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.cbt-option-card input { display: none; }
.cbt-option-card.selected {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.1);
}
.cbt-opt-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  flex-shrink: 0;
}
.cbt-opt-txt {
  font-size: var(--cbt-q-size);
  line-height: 1.45;
  color: var(--cbt-source-text);
}
.cbt-option-card.selected .cbt-opt-num {
  background: var(--primary);
  color: #ffffff;
}
.cbt-q-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--cbt-panel-head-border);
  background: var(--cbt-card-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex-shrink: 0;
}
.cbt-q-footer-secondary,
.cbt-q-footer-primary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.cbt-footer-submit {
  display: none;
}
.cbt-tool-btn-marked {
  border-color: #8b5cf6 !important;
  color: #7c3aed !important;
  background: rgba(139, 92, 246, 0.1) !important;
}
[data-theme="dark"] .cbt-tool-btn-marked {
  color: #c4b5fd !important;
}
.cbt-marks-pill {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--success);
  white-space: nowrap;
}

.cbt-palette-backdrop {
  display: none;
}
.cbt-palette-close {
  display: none;
  background: transparent;
  border: 1px solid var(--cbt-card-border);
  color: var(--text-main);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.cbt-palette-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.7rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.74rem;
  border-bottom: 1px solid var(--cbt-panel-head-border);
  flex-shrink: 0;
}
.cbt-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  margin-right: 4px;
  vertical-align: -1px;
}
.cbt-dot-ans { background: #10b981; }
.cbt-dot-mark { background: #8b5cf6; }
.cbt-dot-not { background: #ef4444; }
.cbt-dot-ans-mark { background: linear-gradient(135deg, #10b981 50%, #8b5cf6 50%); }
.cbt-dot-unvisited { background: var(--bg-subtle); border: 1px solid var(--cbt-card-border); }

.cbt-palette-grid {
  padding: 0.85rem;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.45rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.cbt-p-btn {
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--cbt-card-border);
  font-weight: 750;
  font-size: 0.82rem;
  cursor: pointer;
}
.cbt-p-unvisited { background: var(--bg-subtle); color: var(--text-main); }
.cbt-p-notans { background: rgba(239, 68, 68, 0.16); border-color: #ef4444; color: #ef4444; }
.cbt-p-ans { background: #10b981; border-color: #10b981; color: #ffffff; }
.cbt-p-mark { background: #8b5cf6; border-color: #8b5cf6; color: #ffffff; }
.cbt-p-ans-mark { background: linear-gradient(135deg, #10b981 50%, #8b5cf6 50%); color: #ffffff; }
.cbt-p-btn.current { box-shadow: 0 0 0 2.5px var(--primary); transform: scale(1.06); }

/* Subjective Mobile Sticky Bar (hidden on desktop) */
.cbt-subj-mobile-footer {
  display: none;
}

/* In-App Submit Summary & Exit Modals */
.cbt-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.cbt-modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--cbt-card-bg);
  border: 1.5px solid var(--cbt-card-border);
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.35);
  padding: 1.25rem;
  color: var(--text-main);
}
.cbt-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--cbt-panel-head-border);
}
.cbt-modal-head h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
}
.cbt-modal-timer-pill {
  padding: 0.22rem 0.65rem;
  border-radius: 9999px;
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(14, 165, 233, 0.35);
  color: var(--primary);
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}
.cbt-modal-sec-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: 0.85rem 0 1.1rem;
}
.cbt-modal-sec-box {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--cbt-card-border);
}
.cbt-modal-sec-title {
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.cbt-modal-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.cbt-modal-counts strong {
  color: var(--text-main);
}
.cbt-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}
@media (max-width: 540px) {
  .cbt-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .cbt-modal-actions button {
    justify-content: center;
  }
}

/* Subjective Workspace */
.cbt-subj-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
}
.cbt-subj-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.cbt-word-meter {
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
}
.cbt-topic-radios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
.cbt-topic-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  font-size: 0.88rem;
  cursor: pointer;
}
.cbt-topic-pill.selected {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.1);
  font-weight: 700;
}
.cbt-format-tip {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}
.cbt-source-box {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  line-height: 1.8;
}
.cbt-subj-textarea {
  width: 100%;
  padding: 0.9rem 1.15rem;
  border-radius: 10px;
  border: 1.5px solid var(--border-strong);
  background: var(--cbt-response-bg);
  color: var(--cbt-response-text);
  line-height: 1.75;
  resize: vertical;
}

/* Scorecard Comparison */
.cbt-compare-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}
.cbt-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.65rem;
}
@media (max-width: 820px) {
  .cbt-compare-grid { grid-template-columns: 1fr; }
}
.cbt-compare-col {
  padding: 0.85rem;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
}
.cbt-model-col {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.06);
}
.cbt-compare-col small {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}
.cbt-pre-text {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

/* Stage-2 Spreadsheet CPT */
.cbt-cpt-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}
.cbt-fx-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cbt-fx-cell {
  min-width: 54px;
  text-align: center;
  font-weight: 800;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
}
.cbt-fx-label {
  font-style: italic;
  font-weight: 800;
  color: var(--primary);
  padding: 0 0.35rem;
}
.cbt-fx-input {
  flex: 1;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  border: 1.5px solid var(--primary);
  font-family: monospace;
  font-size: 1rem;
  font-weight: 700;
  background: var(--cbt-response-bg);
  color: var(--cbt-response-text);
}
.cbt-sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.cbt-sheet-table th, .cbt-sheet-table td {
  border: 1px solid var(--border-strong);
  padding: 0.55rem 0.8rem;
}
.cbt-sheet-table th {
  background: var(--bg-subtle);
  font-weight: 800;
  text-align: left;
}
.cbt-row-num {
  width: 44px;
  text-align: center;
  background: var(--bg-subtle);
  font-weight: 700;
  color: var(--text-muted);
}
.cbt-sheet-cell {
  cursor: pointer;
  min-width: 110px;
}
.cbt-sheet-cell.target-cell {
  background: rgba(245, 158, 11, 0.12);
}
.cbt-sheet-cell.selected {
  outline: 2.5px solid var(--primary);
  outline-offset: -2px;
  background: rgba(79, 70, 229, 0.1);
}

/* ==========================================================================
   Mobile & Tablet Mock Exam Overhaul (Typing Hall + 2-Hr CBT + Spreadsheet CPT)
   ========================================================================== */
@media (max-width: 960px) {
  .cbt-arena {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }
  .cbt-body-wrap {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0.45rem 0.55rem;
  }
  .cbt-obj-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    gap: 0;
  }
  .cbt-q-pane {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .cbt-q-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.9rem 0.85rem;
  }
  .cbt-q-footer {
    position: sticky;
    bottom: 0;
    z-index: 10;
    flex-shrink: 0;
    padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    gap: 0.5rem;
  }
  .cbt-mobile-palette-btn {
    display: inline-flex;
  }
  .cbt-palette-close {
    display: inline-flex;
  }
  .cbt-palette-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }
  .cbt-palette-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
  .cbt-palette-pane {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    max-height: 76dvh;
    border-radius: 18px 18px 0 0;
    transform: translateY(105%);
    transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 -12px 36px rgba(15, 23, 42, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .cbt-palette-pane.open {
    transform: translateY(0);
  }
  .cbt-palette-grid {
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    padding: 0.75rem 0.85rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .cbt-palette-pane .cbt-p-btn {
    height: 40px;
  }
  .cbt-subj-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
    gap: 0.85rem;
  }
  .cbt-cpt-wrap {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.65rem;
  }
}

@media (max-width: 860px) {
  /* Stop desktop 3-col non-wrapping grid from colliding on phones & tablets */
  .gtt-cockpit-header {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center;
    justify-content: space-between;
    height: auto !important;
    min-height: 0 !important;
    padding: 0.38rem 0.6rem !important;
    gap: 0.35rem 0.5rem !important;
    white-space: normal !important;
    overflow: visible !important;
  }
  .gtt-cockpit-left {
    order: 1 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 108px);
    gap: 0.35rem !important;
  }
  .gtt-cockpit-brand-slim { display: none !important; }
  .gtt-exam-strip-slim { min-width: 0; }
  .gtt-exam-name-slim {
    max-width: 100% !important;
    font-size: 0.8rem !important;
  }
  .gtt-meta-chip-slim { display: none !important; }
  .gtt-cockpit-center {
    order: 2 !important;
    flex: 0 0 auto !important;
  }
  .gtt-hud-timer-slim {
    height: 28px !important;
    padding: 0.12rem 0.65rem !important;
  }
  .gtt-timer-digits-slim { font-size: 0.92rem !important; }
  .gtt-cockpit-right {
    order: 3 !important;
    flex: 1 1 100% !important;
    justify-content: space-between !important;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 0.35rem !important;
    padding-top: 0.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .gtt-cockpit-right::-webkit-scrollbar { display: none; }
  .gtt-tool-cluster-slim {
    width: 100%;
    justify-content: space-between;
    gap: 0.3rem !important;
  }
  .gtt-tool-pill-slim,
  .gtt-font-ctrl-slim,
  .gtt-check-slim {
    height: 30px !important;
    min-height: 30px !important;
  }
  .gtt-icon-btn-slim {
    width: 30px !important;
    height: 30px !important;
  }
  .gtt-cockpit-header #arena-layout {
    color: #93c5fd !important;
  }
  .gtt-cockpit-header .gtt-btn-abort {
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
  }
  #fullscreen { display: none !important; }

  /* CBT & CPT Single-Row Compact Mobile Header (~48px) */
  .cbt-cockpit-header {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 0.55rem !important;
    gap: 0.4rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
  .cbt-cockpit-header .gtt-cockpit-left {
    order: 1 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
    gap: 0 !important;
  }
  .cbt-cockpit-header .gtt-exam-name-slim {
    font-size: 0.78rem !important;
    max-width: 100% !important;
  }
  .cbt-cockpit-header .gtt-cockpit-center {
    order: 2 !important;
    flex: 0 0 auto !important;
  }
  .cbt-cockpit-header .gtt-hud-timer-slim {
    height: 28px !important;
    padding: 0.1rem 0.5rem !important;
    gap: 0.25rem !important;
    min-width: 0 !important;
  }
  .cbt-cockpit-header .gtt-timer-digits-slim {
    font-size: 0.84rem !important;
  }
  .cbt-cockpit-header .gtt-cockpit-right {
    order: 3 !important;
    flex: 0 0 auto !important;
    width: auto !important;
    border-top: none !important;
    padding-top: 0 !important;
    overflow: visible !important;
    gap: 0.3rem !important;
  }
  .cbt-cockpit-header .gtt-tool-cluster-slim {
    width: auto !important;
    gap: 0.3rem !important;
  }
  .cbt-cockpit-header .cbt-desktop-only {
    display: none !important;
  }
  .cbt-cockpit-header .gtt-btn-abort {
    height: 30px !important;
    padding: 0.25rem 0.55rem !important;
    font-size: 0.74rem !important;
    display: inline-flex;
    align-items: center;
  }
  .cbt-cockpit-header .gtt-btn-submit {
    height: 30px !important;
    padding: 0.25rem 0.6rem !important;
    font-size: 0.74rem !important;
    margin-left: 0 !important;
  }
  .cbt-desktop-label { display: none !important; }
  .cbt-mobile-label { display: inline !important; }
  .cbt-footer-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .cbt-subj-mobile-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: var(--cbt-card-bg);
    border-top: 1px solid var(--cbt-panel-head-border);
    padding: 0.55rem 0.65rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    margin: 0 -0.55rem -0.45rem;
  }
  .cbt-subj-mobile-footer .gtt-btn-submit {
    flex: 1;
    justify-content: center;
    min-height: 42px;
    margin-left: 0 !important;
  }
  .cbt-subj-mobile-footer .tool-btn {
    min-height: 42px;
    white-space: nowrap;
  }
}

@media (max-width: 768px) {
  .wrap { padding: 0 0.9rem; }
  .format-toggle-group { grid-template-columns: 1fr; gap: 0.65rem; }

  /* Compact Hero & CBT Hub Cards on Mobile */
  .hero-section {
    padding: 1.65rem 0 1.35rem;
  }
  .hero-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
    margin-bottom: 0.75rem;
  }
  .hero-title {
    font-size: 1.55rem;
    margin-bottom: 0.6rem;
  }
  .hero-desc {
    font-size: 0.92rem;
  }
  .cbt-paper-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }
  .cbt-paper-card {
    padding: 1rem;
  }
  #cbt-cat-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding-bottom: 0.15rem;
  }
  #cbt-cat-tabs::-webkit-scrollbar { display: none; }
  #cbt-cat-tabs [data-cbt-cat] {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Compact Typing Hall Dual-Pane so both Passage & Console get generous height */
  .gtt-dual-workspace {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 0.4rem 0.5rem !important;
    gap: 0.4rem !important;
  }
  .gtt-card-source {
    flex: 1.05 1 0 !important;
    min-height: 110px !important;
  }
  .gtt-card-response {
    flex: 0.95 1 0 !important;
    min-height: 105px !important;
  }
  .gtt-panel-head {
    padding: 0.32rem 0.65rem !important;
    gap: 0.4rem;
    flex-wrap: nowrap;
  }
  .gtt-panel-badge,
  .gtt-panel-subtitle {
    display: none !important;
  }
  .cbt-q-pane .gtt-panel-badge {
    display: inline-block !important;
  }
  .gtt-head-left {
    min-width: 0;
    flex: 1 1 auto;
  }
  .gtt-panel-title {
    font-size: 0.72rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .gtt-backspace-indicator {
    font-size: 0.62rem !important;
    padding: 0.14rem 0.42rem !important;
    white-space: nowrap;
  }
  .gtt-btn-paper {
    font-size: 0.68rem !important;
    padding: 0.16rem 0.5rem !important;
    white-space: nowrap;
  }

  /* Compact Chunk Ribbon */
  .gtt-chunk-ribbon {
    padding: 0.28rem 0.6rem !important;
    gap: 0.35rem !important;
    flex-wrap: nowrap !important;
  }
  .gtt-chunk-steps,
  #gtt-chunk-hint {
    display: none !important;
  }
  .gtt-chunk-badge-pill {
    font-size: 0.72rem !important;
    padding: 0.14rem 0.55rem !important;
  }
  #ribbon-next-chunk {
    padding: 0.22rem 0.6rem !important;
    font-size: 0.72rem !important;
  }

  /* Passage & Textarea Paddings */
  .gtt-card-source .mock-target-body,
  .gtt-card-response .mock-response-area {
    padding: 0.6rem 0.75rem !important;
    line-height: 1.65 !important;
  }

  /* Single-line Compact Telemetry Strip */
  .gtt-telemetry-hud {
    padding: 0.28rem 0.65rem !important;
    gap: 0.4rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .gtt-telemetry-hud::-webkit-scrollbar { display: none; }
  .gtt-telemetry-left { gap: 0.65rem !important; }
  .gtt-stat-lbl { font-size: 0.62rem !important; }
  .gtt-stat-num { font-size: 0.82rem !important; }
  .gtt-telemetry-right { display: none !important; }
  .mp-race-arena .gtt-telemetry-right { display: flex !important; }

  /* Always-Visible Docked Submit Bar */
  .gtt-docked-footer {
    position: sticky;
    bottom: 0;
    z-index: 50;
    flex-shrink: 0;
    padding: 0.42rem 0.55rem calc(0.42rem + env(safe-area-inset-bottom, 0px)) !important;
    gap: 0.35rem;
  }
  .gtt-dock-status { display: none !important; }
  .gtt-dock-actions {
    width: 100%;
    justify-content: space-between;
    gap: 0.32rem !important;
  }
  .gtt-btn-abort,
  .gtt-btn-chunk {
    padding: 0.42rem 0.55rem !important;
    font-size: 0.74rem !important;
    white-space: nowrap;
  }
  .gtt-btn-submit {
    padding: 0.44rem 0.8rem !important;
    font-size: 0.78rem !important;
    white-space: nowrap;
    margin-left: auto;
  }

  /* Quiz13 Mobile CBT Typography, A-D Badges & 2-Row Sticky Thumb Footer */
  .cbt-arena {
    --cbt-q-size: 15px;
  }
  .cbt-section-tabs { padding: 0.38rem 0.55rem; gap: 0.35rem; }
  .cbt-sec-tab { padding: 0.36rem 0.65rem; font-size: 0.76rem; }
  .cbt-q-text {
    font-size: var(--cbt-q-size);
    margin-bottom: 0.9rem;
    line-height: 1.5;
  }
  .cbt-options-list { gap: 0.55rem; }
  .cbt-option-card {
    min-height: 48px;
    padding: 0.62rem 0.75rem;
    gap: 0.65rem;
  }
  .cbt-opt-num { width: 28px; height: 28px; font-size: 0.82rem; }
  .cbt-opt-txt { font-size: calc(var(--cbt-q-size) - 1px); }
  .cbt-marks-pill { font-size: 0.72rem; }
  .cbt-q-footer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.55rem 0.65rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
  }
  .cbt-q-footer-secondary,
  .cbt-q-footer-primary {
    display: contents;
  }
  #cbt-prev,
  #cbt-clear,
  #cbt-mark {
    grid-row: 1;
    min-height: 40px;
    padding: 0.38rem 0.35rem;
    font-size: 0.78rem;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #cbt-save-next {
    grid-row: 2;
    grid-column: 1 / span 2;
    min-height: 44px;
    justify-content: center;
    font-size: 0.85rem;
    padding: 0.45rem 0.75rem;
  }
  #cbt-footer-submit {
    grid-row: 2;
    grid-column: 3;
    min-height: 44px;
    width: 100%;
    margin-left: 0 !important;
    justify-content: center;
    padding: 0.45rem 0.5rem;
    font-size: 0.82rem;
  }
  .cbt-subj-card { padding: 0.9rem; }
  .cbt-topic-radios { grid-template-columns: 1fr; }
  .cbt-subj-textarea { font-size: max(16px, var(--cbt-q-size)); }
  .cbt-fx-bar { flex-wrap: wrap; }
  .cbt-fx-input { min-width: 0; font-size: 16px; }
}

/* ==========================================================================
   100% Free Forever · Student Education & Jobs Mission Messaging
   ========================================================================== */
.gtt-free-mission-bar {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, rgba(79, 70, 229, 0.07) 100%);
  border-bottom: 1px solid var(--success-border);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.36rem 1rem;
  text-align: center;
  line-height: 1.4;
}
.gtt-free-mission-bar strong {
  color: var(--success-text);
  font-weight: 800;
}
[data-theme="dark"] .gtt-free-mission-bar {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.14) 0%, rgba(99, 102, 241, 0.12) 100%);
  border-bottom-color: rgba(52, 211, 153, 0.25);
}
body.in-exam-hall .gtt-free-mission-bar {
  display: none !important;
}

.gtt-free-mission-strip {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  padding: 0.85rem 1.05rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.09) 0%, rgba(79, 70, 229, 0.05) 100%);
  border: 1px solid var(--success-border);
  color: var(--text-main);
  font-size: 0.86rem;
  line-height: 1.55;
  text-align: left;
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .gtt-free-mission-strip {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.13) 0%, rgba(99, 102, 241, 0.09) 100%);
  border-color: rgba(52, 211, 153, 0.3);
}
.gtt-free-mission-strip strong {
  color: var(--success-text);
  font-weight: 800;
}
.hero-section .gtt-free-mission-strip {
  max-width: 820px;
  margin: 0 auto 1.35rem;
  text-align: center;
  align-items: center;
}

.gtt-free-mission-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  flex-wrap: wrap;
  max-width: 100%;
  padding: 0.36rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.11);
  border: 1px solid rgba(16, 185, 129, 0.34);
  color: var(--success-text);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
}
[data-theme="dark"] .gtt-free-mission-pill {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(52, 211, 153, 0.38);
  color: #6ee7b7;
}
.hero-section .gtt-free-mission-pill {
  margin-bottom: 1rem;
}

.gtt-free-hall-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.14rem 0.58rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 860px) {
  .gtt-free-hall-pill {
    display: none !important;
  }
}
@media (max-width: 768px) {
  .gtt-free-mission-bar {
    font-size: 0.72rem;
    padding: 0.32rem 0.75rem;
  }
  .gtt-free-mission-strip {
    padding: 0.72rem 0.85rem;
    font-size: 0.82rem;
  }
  .gtt-free-mission-pill {
    font-size: 0.74rem;
    padding: 0.32rem 0.72rem;
    text-align: center;
  }
}

/* ==========================================================================
   Pre-Test AI-Curated Practice Instruction Callout
   ========================================================================== */
.gtt-ai-practice-note {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0.75rem 0 1rem;
  padding: 0.68rem 0.9rem;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-left: 3px solid var(--warning);
  color: var(--text-main);
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: anywhere;
}
.gtt-ai-practice-note strong {
  color: var(--warning-text);
  font-weight: 700;
}
[data-theme="dark"] .gtt-ai-practice-note {
  background: rgba(245, 158, 11, 0.11);
  border-color: rgba(251, 191, 36, 0.3);
  border-left-color: var(--warning);
}
@media (max-width: 768px) {
  .gtt-ai-practice-note {
    font-size: 0.78rem;
    padding: 0.6rem 0.78rem;
    margin: 0.65rem 0 0.85rem;
  }
}
