/* ==========================================================================
   InfoTech — Vanguard UI Architecture & Tactile Design System
   High-end Obsidian Terminal & Double-Bezel Hardware Aesthetic
   ========================================================================== */

/* Typography: Custom League Spartan for spacecaret Branding */
@font-face {
  font-family: 'LeagueSpartanExtraBold';
  src: url('LeagueSpartan-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'League Spartan';
  src: url('LeagueSpartan-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  --font-brand: 'LeagueSpartanExtraBold', 'League Spartan', sans-serif;

  /* Color System (Precision Calibrated, Non-AI-Slop) */
  --bg-deep: #07080B;
  --bg-canvas: #0A0C11;
  --bg-surface: #10131A;
  --bg-surface-elevated: #161B26;
  --bg-surface-subtle: rgba(255, 255, 255, 0.03);

  /* Machined Borders & Top Highlights */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-prominent: rgba(255, 255, 255, 0.14);
  --border-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --border-focus: rgba(99, 102, 241, 0.55);

  /* Singular High-Contrast Accents */
  --accent: #4F46E5;
  --accent-light: #6366F1;
  --accent-cyan: #0EA5E9;
  --accent-emerald: #10B981;
  --accent-emerald-bg: rgba(16, 185, 129, 0.08);
  --accent-emerald-border: rgba(16, 185, 129, 0.28);
  --accent-rose: #F43F5E;
  --accent-rose-bg: rgba(244, 63, 94, 0.08);
  --accent-rose-border: rgba(244, 63, 94, 0.28);
  --accent-amber: #F59E0B;

  /* Typography Colors */
  --text-pure: #FFFFFF;
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --text-faint: #475569;
  --text-disabled: #334155;

  /* Shadows & Depth */
  --shadow-bezel: 0 12px 32px -4px rgba(0, 0, 0, 0.65), 0 4px 12px -2px rgba(0, 0, 0, 0.4);
  --shadow-ambient: 0 24px 60px -12px rgba(0, 0, 0, 0.7);

  /* Radii Scale (Concentric Curves) */
  --radius-outer: 20px;
  --radius-inner: 14px;
  --radius-pill: 9999px;
  --radius-sm: 8px;

  /* Physics Transitions (Emil Kowalski Spec) */
  --ease-snappy: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --duration-snap: 180ms;
  --duration-smooth: 260ms;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  /* Precision tactile dot matrix background (NOT blurry purple mesh) */
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10, 12, 17, 0.4) 0%, rgba(7, 8, 11, 0.95) 100%);
  background-size: 28px 28px, 100% 100%;
  background-position: center top;
  background-attachment: fixed;
}

/* Viewport Shell */
.app-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px 96px;
}

/* ==========================================================================
   Header: Minimalist Devtool Bar
   ========================================================================== */

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 16px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  cursor: pointer;
}

.brand-logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  height: 42px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-prominent);
  border-radius: var(--radius-sm);
  box-shadow: var(--border-highlight);
  transition: all var(--duration-snap) var(--ease-snappy);
}

.brand-wrapper:hover .brand-logo-frame {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.brand-logo-img {
  height: 24px;
  width: auto;
  max-width: 48px;
  object-fit: contain;
  display: block;
  filter: brightness(1.22) contrast(1.1);
}

.brand-titles h1 {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--text-pure);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.spacecaret-brand {
  font-family: var(--font-brand);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-pure);
}

.brand-org {
  font-size: 1.15rem;
  color: var(--text-pure);
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-title-divider {
  color: var(--text-faint);
  font-weight: 400;
  font-size: 1rem;
  margin: 0 1px;
}

.brand-badge-version {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.brand-titles p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-pill-group {
  display: inline-flex;
  background: #0D1017;
  border: 1px solid var(--border-subtle);
  padding: 3px;
  border-radius: var(--radius-pill);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.pill-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--duration-snap) var(--ease-snappy);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.pill-btn.active {
  background: #1E2333;
  color: var(--text-pure);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--border-highlight), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.pill-btn:hover:not(.active) {
  color: var(--text-main);
}

.pill-btn:active {
  transform: scale(0.97);
}

/* ==========================================================================
   Hero Section: Editorial Minimalist Frame
   ========================================================================== */

.hero-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-outer);
  padding: 36px 36px 32px;
  margin-bottom: 44px;
  box-shadow: var(--shadow-bezel);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #38BDF8;
  margin-bottom: 12px;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38BDF8;
  box-shadow: 0 0 8px #38BDF8;
}

.hero-banner h2 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-pure);
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.hero-banner p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 680px;
}

.hero-meta-bar {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hero-meta-item strong {
  color: var(--text-main);
  font-weight: 600;
}

.kbd-shortcut {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
}

/* ==========================================================================
   Parts & Chapters: Double-Bezel Tactile Grid
   ========================================================================== */

.part-section {
  margin-bottom: 48px;
}

.part-title-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 0 4px;
}

.part-title-bar h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-pure);
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.part-number-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

/* Double-Bezel Card Outer Shell */
.chapter-card-shell {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-outer);
  padding: 5px;
  cursor: pointer;
  transition: border-color var(--duration-snap) var(--ease-snappy),
              transform var(--duration-snap) var(--ease-snappy),
              box-shadow var(--duration-snap) var(--ease-snappy);
  display: flex;
  outline: none;
}

.chapter-card-shell:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.6);
}

.chapter-card-shell:focus-visible {
  border-color: var(--border-focus);
}

.chapter-card-shell:active {
  transform: scale(0.985);
}

/* Double-Bezel Card Inner Core */
.chapter-card-core {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--border-highlight);
  border-radius: var(--radius-inner);
  padding: 20px 20px 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.chapter-card-top {
  margin-bottom: 16px;
}

.chapter-id-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chapter-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.chapter-card-shell.completed .chapter-status-dot {
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

.chapter-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-pure);
  letter-spacing: -0.015em;
  line-height: 1.35;
  margin-bottom: 8px;
}

.chapter-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.chapter-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.question-count-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
}

.score-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--accent-emerald-bg);
  border: 1px solid var(--accent-emerald-border);
  color: var(--accent-emerald);
}

.start-link-arrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: transform var(--duration-snap) var(--ease-snappy), color var(--duration-snap) var(--ease-snappy);
}

.chapter-card-shell:hover .start-link-arrow {
  transform: translateX(4px);
  color: #38BDF8;
}

/* ==========================================================================
   Quiz Interface: Focused Studio View
   ========================================================================== */

.quiz-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.back-to-hub-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--border-highlight);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--duration-snap) var(--ease-snappy);
}

.back-to-hub-btn:hover {
  color: var(--text-pure);
  border-color: var(--border-prominent);
}

.back-to-hub-btn:active {
  transform: scale(0.97);
}

.quiz-meta-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.current-chap-pill {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.quiz-progress-text {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Progress Rail */
.progress-rail {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  margin-bottom: 32px;
  overflow: hidden;
}

.progress-track {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4F46E5, #0EA5E9);
  border-radius: var(--radius-pill);
  transition: width 240ms var(--ease-snappy);
}

/* Question Double-Bezel Card */
.question-shell {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-outer);
  padding: 6px;
  box-shadow: var(--shadow-bezel);
  margin-bottom: 28px;
}

.question-core {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--border-highlight);
  border-radius: var(--radius-inner);
  padding: 32px;
}

.question-tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.question-type-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #A5B4FC;
}

.question-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-pure);
  letter-spacing: -0.015em;
  margin-bottom: 24px;
}

/* Monospace Code Studio Box */
.terminal-code-box {
  background: #050608;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  margin-bottom: 28px;
  overflow: hidden;
}

.terminal-header {
  background: #0B0E14;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.terminal-code-box pre {
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.55;
  color: #38BDF8;
  overflow-x: auto;
}

/* Option Buttons as Tactile Physical Tiles */
.options-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.option-tile {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  padding: 16px 20px;
  border-radius: var(--radius-inner);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all var(--duration-snap) var(--ease-snappy);
  outline: none;
  position: relative;
  user-select: none;
}

.option-tile:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateX(3px);
}

.option-tile:focus-visible {
  border-color: var(--border-focus);
}

.option-tile:active {
  transform: scale(0.985);
}

.option-key-badge {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-right: 16px;
  flex-shrink: 0;
  transition: all var(--duration-snap) var(--ease-snappy);
}

/* Selected state (Test mode) */
.option-tile.selected {
  background: rgba(79, 70, 229, 0.12);
  border-color: var(--accent-light);
  color: var(--text-pure);
}

.option-tile.selected .option-key-badge {
  background: var(--accent);
  border-color: var(--accent-light);
  color: #FFFFFF;
}

/* Practice mode Feedback */
.option-tile.correct-state {
  background: var(--accent-emerald-bg) !important;
  border-color: var(--accent-emerald-border) !important;
  color: #A7F3D0 !important;
}

.option-tile.correct-state .option-key-badge {
  background: var(--accent-emerald) !important;
  border-color: var(--accent-emerald) !important;
  color: #064E3B !important;
  font-weight: 800;
}

.option-tile.incorrect-state {
  background: var(--accent-rose-bg) !important;
  border-color: var(--accent-rose-border) !important;
  color: #FECDD3 !important;
}

.option-tile.incorrect-state .option-key-badge {
  background: var(--accent-rose) !important;
  border-color: var(--accent-rose) !important;
  color: #4C0519 !important;
  font-weight: 800;
}

.option-tile:disabled {
  cursor: default;
}

/* Instant Feedback Box */
.practice-feedback-panel {
  margin-top: 24px;
  padding: 20px 22px;
  border-radius: var(--radius-inner);
  background: #080A0F;
  border: 1px solid var(--border-subtle);
  animation: feedbackSlideIn var(--duration-smooth) var(--ease-snappy);
}

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

.feedback-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feedback-status-row.correct {
  color: var(--accent-emerald);
}

.feedback-status-row.incorrect {
  color: var(--accent-rose);
}

.feedback-body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Quiz Action Footer */
.quiz-action-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.keyboard-hint {
  font-size: 0.78rem;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Primary CTA Button (Button-in-Button Pattern from High-End Skill) */
.primary-action-btn {
  background: #181C28;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--border-highlight), 0 4px 14px rgba(0, 0, 0, 0.4);
  color: var(--text-pure);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 10px 8px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all var(--duration-snap) var(--ease-snappy);
}

.primary-action-btn:hover:not(:disabled) {
  background: #202638;
  border-color: rgba(255, 255, 255, 0.22);
}

.primary-action-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.primary-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* Button-in-button trailing icon disk */
.btn-trailing-disk {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: transform var(--duration-snap) var(--ease-snappy);
}

.primary-action-btn:hover:not(:disabled) .btn-trailing-disk {
  transform: translateX(2px);
  background: #38BDF8;
  color: #080A0F;
}

/* ==========================================================================
   Results View: Precision Metric Dashboard
   ========================================================================== */

.results-summary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-bezel);
  border-radius: var(--radius-outer);
  padding: 44px 36px 36px;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

/* Score Dial Gauge */
.score-radial-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.score-radial-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 8;
}

.score-radial-fill {
  fill: none;
  stroke: var(--accent-emerald);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  transition: stroke-dashoffset 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.score-radial-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-big-percentage {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-pure);
  letter-spacing: -0.03em;
  line-height: 1;
}

.score-count-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.results-verdict-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-pure);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.results-verdict-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

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

.secondary-action-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--duration-snap) var(--ease-snappy);
}

.secondary-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-pure);
}

.secondary-action-btn:active {
  transform: scale(0.97);
}

/* ==========================================================================
   Detailed Review Cards (Why & How Engine)
   ========================================================================== */

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

.review-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-pure);
  letter-spacing: -0.015em;
}

.filter-pills-bar {
  display: flex;
  gap: 8px;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--duration-snap) var(--ease-snappy);
}

.filter-pill.active {
  background: #1E2333;
  color: var(--text-pure);
  border-color: rgba(255, 255, 255, 0.18);
}

.filter-pill:active {
  transform: scale(0.97);
}

/* Double-Bezel Review Card */
.review-item-shell {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-outer);
  padding: 5px;
  margin-bottom: 20px;
}

.review-item-core {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--border-highlight);
  border-radius: var(--radius-inner);
  padding: 24px 26px;
}

.review-item-core.pass-border {
  border-left: 3px solid var(--accent-emerald);
}

.review-item-core.fail-border {
  border-left: 3px solid var(--accent-rose);
}

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

.review-q-number {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
}

.review-status-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.review-status-tag.correct {
  background: var(--accent-emerald-bg);
  border: 1px solid var(--accent-emerald-border);
  color: var(--accent-emerald);
}

.review-status-tag.incorrect {
  background: var(--accent-rose-bg);
  border: 1px solid var(--accent-rose-border);
  color: var(--accent-rose);
}

.review-question-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-pure);
  margin-bottom: 16px;
  line-height: 1.45;
}

.review-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.review-option-row {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.review-option-row.user-wrong {
  background: var(--accent-rose-bg);
  border-color: var(--accent-rose-border);
  color: #FECDD3;
}

.review-option-row.correct-ans {
  background: var(--accent-emerald-bg);
  border-color: var(--accent-emerald-border);
  color: #A7F3D0;
  font-weight: 600;
}

.review-explanation-card {
  background: #05060A;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 18px;
}

.review-explanation-title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #38BDF8;
  margin-bottom: 6px;
}

.review-explanation-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   Panel View Transitions
   ========================================================================== */

.view-panel {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--duration-smooth) var(--ease-snappy),
              transform var(--duration-smooth) var(--ease-snappy);
}

.view-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .app-container {
    padding: 18px 16px 60px;
  }
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-banner {
    padding: 24px 20px;
  }
  .hero-banner h2 {
    font-size: 1.45rem;
  }
  .chapter-grid {
    grid-template-columns: 1fr;
  }
  .question-core {
    padding: 22px 18px;
  }
  .question-text {
    font-size: 1.1rem;
  }
}

/* ==========================================================================
   Footer: Minimalist spacecaret Signature & Copyright
   ========================================================================== */

.app-footer {
  margin-top: 72px;
  padding-top: 36px;
  border-top: 1px solid var(--border-subtle);
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.footer-copy .spacecaret-brand {
  color: var(--text-pure);
  font-size: 0.95rem;
  letter-spacing: -0.04em;
}
