/* css/style.css - Professional Academic Design System (Zero Hover Effects • Deep Purple #7E0E93 Accents) */

:root {
  /* Clean White Canvas */
  --bg-app: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f8fafc;
  --bg-surface-hover: #f1f5f9;
  --bg-surface-active: #e2e8f0;
  --bg-input: #ffffff;

  --border-subtle: #f1f5f9;
  --border-default: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #7E0E93;

  /* Deep Purple Accent System (#7E0E93) */
  --accent-primary: #7E0E93;
  --accent-primary-light: #e9bcf2;
  --accent-primary-dark: #630a75;
  --accent-white: #ffffff;
  --accent-subtle: rgba(126, 14, 147, 0.10);
  --accent-border: rgba(126, 14, 147, 0.35);

  /* Semantic Palette */
  --status-success: #7E0E93;
  --status-success-bg: rgba(126, 14, 147, 0.10);
  --status-success-border: rgba(126, 14, 147, 0.30);

  --status-warning: #ea580c;
  --status-warning-bg: #fff7ed;
  --status-warning-border: #fed7aa;

  --status-danger: #e11d48;
  --status-danger-bg: #fff1f2;
  --status-danger-border: #fecdd3;

  --status-muted: #64748b;
  --status-muted-bg: #f8fafc;

  /* Typography Colors - High Contrast Dark on White */
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-tertiary: #64748b;
  --text-dim: #94a3b8;

  /* Typography Scale - Exclusively Source Sans 3 */
  --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Source Sans 3', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Radii */
  --radius-xs: 3px;
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 14px 0 rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px 0 rgba(0, 0, 0, 0.12);
}

/* NO ANIMATIONS / NO TRANSITIONS GLOBALLY */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: none !important;
  animation: none !important;
}

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

strong,
b {
  font-weight: 700;
  color: inherit;
}

em,
i {
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  background-color: var(--bg-surface-elevated);
  padding: 0.12rem 0.35rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-default);
  font-size: 0.9em;
}

.currency-symbol {
  font-weight: inherit;
  color: inherit;
}

/* ==========================================================================
   NAVIGATION BAR (EXPANDED ACADEMIC - PASTEL PINK)
   ========================================================================== */

.navbar {
  background: linear-gradient(90deg, #7E0E93 0%, #9c1eb6 50%, #7E0E93 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 1.5rem;
  height: 68px;
  display: flex;
  align-items: center;
  color: #ffffff;
}

.nav-container {
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* PORTAL DRAWER TOGGLE & BRAND BLOCK */
.nav-left-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-drawer-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.nav-drawer-toggle svg {
  width: 20px;
  height: 20px;
}

.portal-brand-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
}

.portal-logo-box {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.portal-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.portal-brand-titles {
  display: flex;
  flex-direction: column;
}

.portal-brand-main {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.portal-brand-prefix {
  font-weight: 400;
  color: #7E0E93;
  font-style: italic;
  font-family: serif;
}

.portal-brand-suffix {
  font-weight: 800;
  color: #ffffff;
}

.portal-brand-domain {
  font-size: 0.78rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 0.1rem;
}

.portal-math-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  background-color: rgba(126, 14, 147, 0.2);
  color: #ffffff;
  border: 1px solid #630a75;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-xs);
  margin-left: 0.5rem;
  letter-spacing: 0.04em;
}

.portal-brand-dept {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 0.15rem;
  white-space: nowrap;
}

/* HEADER TOOL ICON BUTTONS (BLACK ICONS ON WHITE/PASTEL) */
.nav-icon-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: #000000;
  padding: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.header-tool-icon-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.nav-icon-tool-btn svg {
  width: 18px;
  height: 18px;
  stroke: #000000 !important;
  color: #000000 !important;
}

.btn-calculator-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #000000;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
}

.btn-calculator-cta svg {
  width: 18px;
  height: 18px;
  stroke: #000000 !important;
  color: #000000 !important;
}

.btn-grapher-cta {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #000000;
}

.btn-grapher-cta svg {
  stroke: #000000 !important;
  color: #000000 !important;
}

/* STATUS & MASTERY METRICS */
.nav-gamification {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.level-indicator {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.level-indicator span {
  color: #ffffff;
  opacity: 0.85;
}

.xp-meter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 130px;
}

.xp-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #ffffff;
  opacity: 0.95;
  font-weight: 600;
}

.xp-track {
  width: 100%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #7E0E93, #d946ef);
  border-radius: var(--radius-full);
}

.streak-indicator {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.streak-dot {
  width: 6px;
  height: 6px;
  background-color: #7E0E93;
  border-radius: 50%;
  display: inline-block;
}

/* STUDENT PROFILE CHIP / SIGN IN BUTTON */
.btn-profile-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 2px;
  border-radius: var(--radius-full);
  cursor: pointer;
  line-height: 1;
  width: 36px;
  height: 36px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-profile-badge .profile-avatar-circle {
  width: 30px;
  height: 30px;
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  background-color: #f8fafc;
  color: #0f172a;
}

.profile-avatar-circle {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-elevated);
  border: 1px solid #630a75;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar-circle.large {
  width: 56px;
  height: 56px;
  font-size: 1.35rem;
  border-width: 2px;
}

.profile-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-top: 0.4rem;
}

.avatar-picker-item {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  height: 68px;
  min-height: 68px;
  max-height: 68px;
  width: 100%;
  padding: 0.45rem 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
}

.avatar-picker-item.selected {
  border-color: #630a75;
  background-color: #e9bcf2;
}

.avatar-picker-icon {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1;
}

.avatar-picker-label {
  font-size: 0.68rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1;
}

.avatar-picker-item.selected .avatar-picker-label {
  color: #7E0E93;
  font-weight: 700;
}

.avatar-upload-dropzone {
  border: 2px dashed rgba(126, 14, 147, 0.45);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-elevated);
  padding: 0.85rem 1rem;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 75px;
  box-sizing: border-box;
}

/* UNIFORM MASTERY STATS GRID BOXES */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.profile-stat-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  height: 84px;
  min-height: 84px;
  max-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.profile-stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}

.profile-stat-value {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.profile-stat-sub {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.profile-name {
  color: var(--text-primary);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-switch-caret {
  font-size: 0.65rem;
  color: #7E0E93;
}

.auth-modal-dialog {
  max-width: 620px;
  width: 95vw;
  padding: 1.75rem 2rem;
}

/* UTILITY BUTTONS */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-icon-btn {
  background-color: transparent;
  border: 1px solid transparent;
  color: var(--text-tertiary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-icon-btn svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.75;
}

/* ==========================================================================
   SECONDARY HORIZONTAL TAB NAVIGATION
   ========================================================================== */

/* ==========================================================================
   SECONDARY HORIZONTAL TAB NAVIGATION (BOTTOM MENU - WHITE TEXT)
   ========================================================================== */

.nav-tabs-bar {
  background-color: #18181b;
  border-bottom: 1px solid #27272a;
  padding: 0 1.5rem;
}

.nav-tabs-container {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow-x: auto;
}

.subnav-tabs-list {
  display: flex;
  gap: 0.2rem;
  align-items: center;
}

.nav-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #ffffff;
  opacity: 0.82;
  padding: 0.7rem 1rem;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.nav-tab-btn.active {
  color: #ffffff;
  opacity: 1;
  border-bottom-color: #7E0E93;
  font-weight: 700;
}

.subnav-action-link {
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0.5rem 0.75rem;
  opacity: 0.9;
}

.subnav-action-link svg {
  width: 13px;
  height: 13px;
  color: #7E0E93;
}

.nav-badge-count {
  display: none !important;
}

.nav-bell-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  background-color: #630a75;
  border-radius: 50%;
}

/* ==========================================================================
   PORTAL SLIDE-OUT DRAWER
   ========================================================================== */

.portal-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: none;
}

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

.portal-drawer-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-default);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  overflow-y: auto;
}

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

.portal-drawer-menu-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.portal-drawer-item {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-primary);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-xs);
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}

.portal-drawer-item.active {
  background-color: var(--bg-surface-elevated);
  border-color: #630a75;
  color: #ffffff;
}

/* ==========================================================================
   MAIN CONTENT WRAPPER
   ========================================================================== */

.app-main {
  max-width: 1400px;
  width: 100%;
  margin: 1.75rem auto 3rem;
  padding: 0 1.5rem;
  flex: 1;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
}

/* ==========================================================================
   DASHBOARD HERO & METRICS
   ========================================================================== */

.editorial-header {
  border-bottom: 1px solid var(--border-default);
  padding-bottom: 1.75rem;
  margin-bottom: 2rem;
}

.editorial-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.course-classification {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7E0E93;
  margin-bottom: 0.35rem;
}

.editorial-header h2 {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.editorial-header p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  max-width: 680px;
  line-height: 1.55;
}

.metrics-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.metric-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  min-width: 140px;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.metric-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-top: 0.2rem;
  font-weight: 500;
}

/* SECTION HEADER */
.section-headline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.25rem;
}

.section-headline h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.section-headline .section-subtext {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

/* ==========================================================================
   CURRICULUM MODULE CARDS
   ========================================================================== */

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.module-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.module-card.locked {
  opacity: 0.55;
}

.module-card.completed {
  border-color: rgba(126, 14, 147, 0.4);
}

.module-card-top {
  margin-bottom: 1rem;
}

.module-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.module-code {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: #7E0E93;
  background: transparent;
  border: none;
  padding: 0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.module-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.module-subtitle {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.module-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.module-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.module-footer .btn,
.btn-begin-module {
  border-radius: 8px !important;
  padding: 0.55rem 1.15rem;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.module-footer .btn.btn-primary,
.btn-begin-module.btn-primary {
  background-color: #7E0E93;
  border: 1px solid #630a75;
  color: #ffffff;
  border-radius: 8px !important;
}

.module-footer .btn.btn-subtle,
.btn-begin-module.btn-subtle {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  border-radius: 8px !important;
}

/* ==========================================================================
   BUTTONS & ACTION CONTROLS
   ========================================================================== */

.btn {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background-color: #7E0E93;
  color: #ffffff;
  border-color: #630a75;
  font-weight: 600;
}

.btn-subtle {
  background-color: transparent;
  border-color: var(--border-default);
  color: var(--text-secondary);
}

.btn-success {
  background-color: rgba(126, 14, 147, 0.12);
  border-color: rgba(126, 14, 147, 0.4);
  color: #7E0E93;
}

.btn-danger {
  background-color: var(--status-danger-bg);
  border-color: var(--status-danger-border);
  color: var(--status-danger);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* STATUS TAGS */
.status-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-pill.passed {
  background-color: var(--status-success-bg);
  border: 1px solid var(--status-success-border);
  color: var(--status-success);
}

.status-pill.progress {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
}

.status-pill.locked {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-dim);
}

/* ==========================================================================
   LESSON STUDY ROOM
   ========================================================================== */

.study-room-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.study-sidebar {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  position: sticky;
  top: 85px;
}

.sidebar-header {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  padding: 0.4rem 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.4rem;
}

.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.lesson-nav-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 0.5rem 0.65rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lesson-nav-btn.active {
  background-color: var(--bg-surface-active);
  color: var(--text-primary);
  border-color: #630a75;
  font-weight: 600;
}

.lesson-nav-btn.completed .check-glyph {
  color: #630a75;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.study-content-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 2rem;
}

.study-lesson-header {
  border-bottom: 1px solid var(--border-default);
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
}

.study-lesson-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.study-lesson-header h2 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* PEDAGOGICAL CARDS & CALLOUTS */
.pedagogy-block {
  margin-bottom: 2rem;
}

.pedagogy-headline {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pedagogy-headline .sec-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #7E0E93;
  background-color: var(--bg-surface-elevated);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-default);
}

.concept-box {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 0.75rem 0;
  color: var(--text-primary);
}

.concept-box ul,
.concept-box ol {
  padding-left: 1.25rem;
}

.concept-box li {
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.55;
}

.prereq-callout {
  background-color: var(--bg-surface-elevated);
  border-left: 4px solid #7E0E93;
  border-top: 1px solid var(--border-default);
  border-right: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.worked-example-box {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.worked-example-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.worked-example-steps {
  border-left: 2px solid var(--border-strong);
  padding-left: 0.85rem;
  margin: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.86rem;
  color: var(--text-primary);
}

.worked-example-result {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  background-color: rgba(121, 40, 202, 0.05);
  border: 1px solid #e9bcf2;
  color: #7E0E93;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-xs);
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 700;
}

/* HIGH-CONTRAST COMMON PITFALLS & TRAPS CALLOUT */
.trap-callout {
  background-color: #fff1f2;
  border-left: 4px solid #7E0E93;
  border-top: 1px solid #fecdd3;
  border-right: 1px solid #fecdd3;
  border-bottom: 1px solid #fecdd3;
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.25rem 0;
}

.trap-callout h5 {
  font-size: 0.84rem;
  font-weight: 700;
  color: #7E0E93;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.trap-callout ul {
  padding-left: 1.25rem;
  font-size: 0.88rem;
  color: #0f172a;
  line-height: 1.6;
}

.trap-callout li {
  color: #0f172a;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
}

/* HIGH-CONTRAST STEP HINTS CALLOUT */
.hint-callout {
  background-color: #fffbeb;
  border-left: 4px solid #f59e0b;
  border-top: 1px solid #fde68a;
  border-right: 1px solid #fde68a;
  border-bottom: 1px solid #fde68a;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.85rem 1.15rem;
  margin-top: 0.85rem;
}

.hint-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.45rem;
}

.hint-steps {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hint-step {
  font-size: 0.88rem;
  color: #0f172a;
  line-height: 1.5;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.hint-num {
  font-weight: 700;
  color: #b45309;
}

/* STRATEGY GUIDE & METHOD RECOGNITION */
.strategy-box {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.35rem;
  margin: 1rem 0;
}

.strategy-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.65rem;
  font-size: 0.86rem;
}

.strategy-table th {
  text-align: left;
  padding: 0.6rem 0.85rem;
  background-color: var(--bg-surface);
  border-bottom: 2px solid var(--border-strong);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.strategy-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  line-height: 1.5;
}

/* RECAP & KEY IDEAS CHECKLIST */
.recap-box {
  background-color: #f8fafc;
  border-left: 4px solid #3b82f6;
  border-top: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 1.15rem 1.35rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.25rem 0;
}

.recap-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.key-ideas-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-left: 1.25rem;
  margin-top: 0.5rem;
  color: #0f172a;
  font-size: 0.88rem;
}

/* INTERACTIVE LESSON PRACTICE ARENA */
.practice-arena {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1.25rem;
}

.practice-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
}

.practice-stepper {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.stepper-pill {
  min-width: 32px;
  height: 32px;
  padding: 0 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  background-color: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.stepper-pill.active {
  background-color: #7E0E93;
  border-color: #630a75;
  color: #ffffff;
  font-weight: 700;
}

.stepper-pill.correct {
  background-color: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.stepper-pill.incorrect {
  background-color: #fff1f2;
  border-color: #f43f5e;
  color: #9f1239;
}

.difficulty-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.badge-foundation {
  background-color: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.badge-application {
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.badge-intermediate {
  background-color: #fefce8;
  color: #854d0e;
  border: 1px solid #fef08a;
}

.badge-challenging {
  background-color: #faf5ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

.badge-conceptual {
  background-color: #fff1f2;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.practice-question-text {
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.hint-tier-container {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}

.tier-clue-box {
  background-color: #f8fafc;
  border-left: 3px solid #64748b;
  border-top: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.86rem;
  color: #0f172a;
}

.tier-step-box {
  background-color: #fffbeb;
  border-left: 3px solid #f59e0b;
  border-top: 1px solid #fde68a;
  border-right: 1px solid #fde68a;
  border-bottom: 1px solid #fde68a;
  padding: 0.75rem 1rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.86rem;
  color: #0f172a;
}

.tier-solution-box {
  background-color: rgba(126, 14, 147, 0.05);
  border-left: 3px solid #7E0E93;
  border-top: 1px solid rgba(126, 14, 147, 0.2);
  border-right: 1px solid rgba(126, 14, 147, 0.2);
  border-bottom: 1px solid rgba(126, 14, 147, 0.2);
  padding: 0.85rem 1.15rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.88rem;
  color: #0f172a;
}

.assessment-wrapper {
  max-width: 820px;
  margin: 0 auto;
}

.assessment-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 2rem;
}

.assessment-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.question-prompt {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.options-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.option-row {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.option-row.selected {
  background-color: var(--bg-surface-active);
  border-color: #630a75;
  color: var(--text-primary);
}

.option-glyph {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  width: 20px;
}

.option-row.selected .option-glyph {
  color: #7E0E93;
}

.text-input-field {
  width: 100%;
  max-width: 320px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  outline: none;
  margin-bottom: 1.5rem;
}

.text-input-field:focus {
  border-color: #630a75;
}

.feedback-callout {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.5;
  display: none;
}

.feedback-callout.correct {
  background-color: rgba(121, 40, 202, 0.05);
  border-color: #e9bcf2;
  color: #831843;
  font-weight: 600;
}

.feedback-callout.incorrect {
  background-color: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
  font-weight: 600;
}

/* ==========================================================================
   RESULTS & MASTERY DIAGNOSTIC SCREEN
   ========================================================================== */

.diagnostic-results {
  text-align: center;
  padding: 1.5rem 0;
}

.score-display-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1.25rem 2.5rem;
  margin-bottom: 1.5rem;
}

.score-display-card.passed {
  border-color: rgba(126, 14, 147, 0.4);
}

.score-display-card.failed {
  border-color: var(--status-danger-border);
}

.score-num {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.score-num.passed {
  color: #7E0E93;
}

.score-num.failed {
  color: var(--status-danger);
}

.score-meta {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.35rem;
}

.results-headline {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.results-subtext {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 1.75rem;
  line-height: 1.55;
}

.weakness-list-box {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--status-danger-border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: left;
  margin: 1.5rem 0;
}

.weakness-list-box h5 {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--status-danger);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.weakness-list-box ul {
  padding-left: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   REVIEW CENTER (DIAGNOSTIC MATRIX)
   ========================================================================== */

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}

.review-tile {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.review-tile.urgent {
  border-color: var(--status-danger-border);
}

.review-tile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.review-tile h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.review-tile p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* ==========================================================================
   INTERACTIVE GRAPHER WORKSTATION (CAD DUAL COLUMN)
   ========================================================================== */

.grapher-workspace {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 340px;
  gap: 1.5rem;
  align-items: start;
}

.grapher-canvas-wrapper {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

canvas#math-canvas,
canvas#modal-math-canvas {
  background-color: #09090b;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: crosshair;
}

.grapher-sidebar-controls {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.control-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 0.45rem;
}

.math-readout {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
}

.custom-range {
  width: 100%;
  accent-color: #630a75;
}

/* ==========================================================================
   ACHIEVEMENTS / MILESTONE VAULT
   ========================================================================== */

.credential-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  opacity: 0.45;
}

.credential-card.unlocked {
  opacity: 1;
  border-color: rgba(126, 14, 147, 0.4);
}

.credential-glyph {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-primary);
}

.credential-card.unlocked .credential-glyph {
  color: #7E0E93;
  border-color: rgba(126, 14, 147, 0.4);
}

.credential-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.credential-card p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   MODAL WINDOWS & POPUPS
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}

/* Widescreen & Expansive Modals */
.modal-dialog.grapher-modal-dialog,
#modal-grapher .modal-dialog {
  max-width: 1240px;
  width: 95vw;
  max-height: 92vh;
  padding: 1.75rem 2rem;
}

.modal-dialog.calc-modal-dialog,
#modal-calc .modal-dialog {
  max-width: 860px;
  width: 95vw;
  max-height: 90vh;
  padding: 1.75rem 2rem;
}

/* FAR-LEFT DOCKED FLOATING CALCULATOR (NO TEST INTERFERENCE) */
body.test-fullpage-mode #modal-calc.modal-backdrop,
#modal-calc.modal-backdrop.docked-left {
  background-color: transparent !important;
  pointer-events: none !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  padding: 4.5rem 0 1.5rem 1.5rem !important;
  z-index: 250 !important;
}

body.test-fullpage-mode #modal-calc .modal-dialog,
#modal-calc.docked-left .modal-dialog {
  pointer-events: auto !important;
  max-width: 440px !important;
  width: 440px !important;
  max-height: calc(100vh - 6rem) !important;
  background-color: #161b22 !important;
  border: 1px solid #30363d !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75) !important;
  margin: 0 !important;
  padding: 1.25rem !important;
  animation: slideInLeft 0.2s ease-out;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

body.test-fullpage-mode #modal-calc .calc-screen,
#modal-calc.docked-left .calc-screen {
  padding: 0.75rem 1rem !important;
  margin-bottom: 0.85rem !important;
  background: #0d1117 !important;
  border-color: #30363d !important;
}

body.test-fullpage-mode #modal-calc .calc-screen-input,
#modal-calc.docked-left .calc-screen-input {
  font-size: 1.1rem !important;
  color: #f0f6fc !important;
  margin-bottom: 0.4rem !important;
}

body.test-fullpage-mode #modal-calc .calc-screen-results,
#modal-calc.docked-left .calc-screen-results {
  border-top-color: #21262d !important;
  padding-top: 0.4rem !important;
}

body.test-fullpage-mode #modal-calc .calc-res-val-dec,
#modal-calc.docked-left .calc-res-val-dec {
  color: #c9d1d9 !important;
}

body.test-fullpage-mode #modal-calc .calc-header-tabs,
#modal-calc.docked-left .calc-header-tabs {
  margin-bottom: 0.75rem !important;
  gap: 0.35rem !important;
}

body.test-fullpage-mode #modal-calc .calc-tab-btn,
#modal-calc.docked-left .calc-tab-btn {
  font-size: 0.76rem !important;
  padding: 0.3rem 0.55rem !important;
}

body.test-fullpage-mode #modal-calc .calc-body-grid,
#modal-calc.docked-left .calc-body-grid {
  grid-template-columns: 1fr !important;
  gap: 0 !important;
}

body.test-fullpage-mode #modal-calc .calc-history-panel,
#modal-calc.docked-left .calc-history-panel {
  display: none !important;
}

body.test-fullpage-mode #modal-calc .calc-keypad,
#modal-calc.docked-left .calc-keypad {
  gap: 0.3rem !important;
}

body.test-fullpage-mode #modal-calc .calc-btn,
#modal-calc.docked-left .calc-btn {
  padding: 0.5rem 0.15rem !important;
  font-size: 0.85rem !important;
  border-radius: 6px !important;
}

/* STUDENT PROFILE MODAL */
.modal-dialog.auth-modal-dialog,
#modal-profile .modal-dialog {
  max-width: 680px;
  width: 95vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow-y: auto;
  padding: 1.75rem 2rem;
}

.auth-tab-panel {
  flex: 1 1 auto;
  box-sizing: border-box;
  padding-right: 0.2rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}

/* TOAST NOTIFICATION */
.toast-notice {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  display: none;
  z-index: 300;
}

.toast-notice.show {
  display: block;
}

/* ==========================================================================
   MATHEMATICAL EXPRESSION EVALUATOR & SCIENTIFIC CALCULATOR MODAL
   ========================================================================== */

.calc-modal-dialog {
  max-width: 860px;
  width: 95vw;
  padding: 1.75rem 2rem;
}

.calc-header-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
}

.calc-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.calc-tab-btn.active {
  color: var(--text-primary);
  background: var(--bg-surface-active);
  border-color: #630a75;
}

.calc-screen {
  background: #f8fafc;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.calc-screen-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 600;
  outline: none;
  margin-bottom: 0.75rem;
}

.calc-screen-input::placeholder {
  color: var(--text-dim);
  font-size: 1.05rem;
  font-weight: 400;
}

.calc-screen-results {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-top: 1px solid var(--border-default);
  padding-top: 0.65rem;
}

.calc-res-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.88rem;
}

.calc-res-label {
  color: var(--text-tertiary);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calc-res-val {
  color: #7E0E93;
  font-size: 1.1rem;
  font-weight: 700;
}

.calc-res-val-dec {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
}

.calc-body-grid {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 1.25rem;
}

.calc-keypad {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.4rem;
}

/* CALCULATOR KEYS - BLUE BOX WITH WHITE TEXT */
.calc-btn {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.65rem 0.25rem;
  border-radius: var(--radius-sm);
  background-color: #2563eb;
  border: 1px solid #1d4ed8;
  color: #ffffff !important;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.calc-btn.btn-num {
  background-color: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff !important;
}

.calc-btn.btn-func {
  background-color: #1d4ed8;
  border-color: #1e40af;
  color: #ffffff !important;
  font-size: 0.84rem;
}

.calc-btn.btn-op {
  background-color: #1e3a8a;
  border-color: #1e40af;
  color: #ffffff !important;
  font-size: 1.05rem;
}

.calc-btn.btn-action {
  background-color: #0284c7;
  border-color: #0369a1;
  color: #ffffff !important;
  font-size: 0.82rem;
}

.calc-btn.btn-eval {
  background-color: #1e40af;
  border-color: #1d4ed8;
  color: #ffffff !important;
  font-size: 0.95rem;
  font-weight: 800;
}

.calc-history-panel {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  max-height: 290px;
}

.calc-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.calc-history-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-clear-calc-history {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-xs);
  line-height: 1.2;
}

.calc-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-y: auto;
}

.calc-history-item {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xs);
  padding: 0.4rem 0.55rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.calc-history-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   RESPONSIVE LAYOUT
   ========================================================================== */

@media (max-width: 900px) {
  .study-room-layout {
    grid-template-columns: 1fr;
  }

  .grapher-workspace {
    grid-template-columns: 1fr;
  }

  .editorial-header-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .calc-body-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   MANDATORY INITIAL AUTHENTICATION GATE
   ========================================================================== */

.auth-gate-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
}

.auth-gate-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 480px;
  padding: 2.25rem 2.25rem 2rem 2.25rem;
}

.auth-gate-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
}

.auth-gate-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.auth-gate-titles h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.auth-gate-titles p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.auth-gate-divider {
  height: 1px;
  background-color: var(--border-subtle);
  margin: 1.5rem 0;
}

.auth-gate-form {
  display: flex;
  flex-direction: column;
}

.auth-feedback-box {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xs);
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.auth-feedback-box.error {
  border-color: #630a75;
  color: #7E0E93;
}

.auth-feedback-box.success {
  border-color: #630a75;
  color: var(--text-primary);
}

.auth-gate-footer {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ==========================================================================
   CANVAS-STYLE LMS PROGRESSION & BREADCRUMBS
   ========================================================================== */

.canvas-breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.9rem;
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.canvas-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.canvas-breadcrumbs a,
.canvas-breadcrumbs span.crumb-link {
  color: #7E0E93;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.canvas-breadcrumbs span.crumb-sep {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.canvas-breadcrumbs span.crumb-current {
  color: var(--text-primary);
  font-weight: 700;
}

/* LESSON PROGRESS HUD */
.lesson-hud-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-left: 4px solid #7E0E93;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.lesson-hud-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.85rem;
  align-items: center;
}

.hud-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hud-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}

.hud-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hud-progress-track {
  height: 6px;
  background: var(--bg-surface-active);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.25rem;
}

.hud-progress-fill {
  height: 100%;
  background: #7E0E93;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   INTERACTIVE QUICK CHECKS (LEARN -> THINK -> ANSWER -> FEEDBACK)
   ========================================================================== */

.quick-check-card {
  background: #faf8fc;
  border: 1px solid rgba(126, 14, 147, 0.25);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  margin: 1.25rem 0;
  box-shadow: 0 1px 3px rgba(126, 14, 147, 0.05);
}

.quick-check-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.quick-check-pill {
  background: #7E0E93;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.quick-check-xp {
  font-size: 0.74rem;
  font-weight: 700;
  color: #7E0E93;
  background: rgba(126, 14, 147, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.quick-check-question {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 0.85rem;
}

.quick-check-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.qc-opt-btn {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xs);
  padding: 0.55rem 0.8rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-align: left;
  line-height: 1.35;
}

.qc-opt-btn:hover {
  border-color: #7E0E93;
  background: #fdfafd;
}

.qc-opt-btn.selected {
  border-color: #7E0E93;
  background: rgba(126, 14, 147, 0.08);
  font-weight: 600;
}

.qc-opt-btn.correct {
  border-color: #7E0E93;
  background: rgba(126, 14, 147, 0.12);
  color: #630a75;
  font-weight: 700;
}

.qc-opt-btn.incorrect {
  border-color: var(--status-danger);
  background: var(--status-danger-bg);
  color: var(--status-danger);
}

.qc-opt-glyph {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.qc-opt-btn.selected .qc-opt-glyph {
  background: #7E0E93;
  color: #ffffff;
  border-color: #7E0E93;
}

.quick-check-feedback {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xs);
  padding: 0.75rem 0.95rem;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 0.5rem;
}

.quick-check-feedback.correct {
  border-left: 3px solid #7E0E93;
  background: #faf6fc;
}

.quick-check-feedback.incorrect {
  border-left: 3px solid var(--status-danger);
  background: #fff8f8;
}

/* ==========================================================================
   PERSONAL MATH TUTOR: STEP-BY-STEP INTERACTIVE WORKED EXAMPLES
   ========================================================================== */

.worked-example-tutor {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tutor-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.tutor-view-toggle {
  display: inline-flex;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xs);
  padding: 2px;
}

.tutor-toggle-btn {
  background: transparent;
  border: none;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  cursor: pointer;
}

.tutor-toggle-btn.active {
  background: #7E0E93;
  color: #ffffff;
}

.tutor-problem-prompt {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-xs);
  border-left: 3px solid #7E0E93;
}

.tutor-step-node {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xs);
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
  background: #ffffff;
}

.tutor-step-node.active-step {
  border-color: #7E0E93;
  background: #fdfafd;
  box-shadow: 0 0 0 1px rgba(126, 14, 147, 0.15);
}

.tutor-step-node.completed-step {
  border-color: rgba(126, 14, 147, 0.35);
  background: #faf6fc;
}

.tutor-step-headline {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tutor-choices-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.65rem 0;
}

.tutor-choice-btn {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.tutor-choice-btn:hover {
  border-color: #7E0E93;
  background: #fdfafd;
}

.tutor-choice-btn.selected-correct {
  background: #7E0E93;
  color: #ffffff;
  border-color: #7E0E93;
}

.tutor-choice-btn.selected-wrong {
  background: var(--status-danger-bg);
  color: var(--status-danger);
  border-color: var(--status-danger);
}

.tutor-step-solution {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  background: rgba(126, 14, 147, 0.05);
  border-radius: var(--radius-xs);
  margin-top: 0.5rem;
}

/* ==========================================================================
   ADAPTIVE CONCEPT MASTERY & MISTAKE REMEDIATION
   ========================================================================== */

.concept-mastery-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.concept-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.concept-chip {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xs);
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.concept-chip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}

.concept-chip-bar {
  height: 4px;
  background: var(--bg-surface-active);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.concept-chip-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: #7E0E93;
}

.concept-chip-fill.warning {
  background: var(--status-warning);
}

.concept-chip-fill.danger {
  background: var(--status-danger);
}

/* MISTAKE REVIEW ACCORDION & TRY SIMILAR */
.mistake-review-box {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-left: 4px solid var(--status-danger);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
}

.mistake-item-card {
  background: #fff8f8;
  border: 1px solid #fed7d7;
  border-radius: var(--radius-xs);
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
}

.misconception-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--status-danger);
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
  display: block;
}

/* ==========================================================================
   COMPLETE LESSON BUTTON & MASTERY REQUIREMENT VERIFICATION
   ========================================================================== */

.complete-lesson-wrapper {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.completion-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.chk-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.chk-item.done {
  color: #7E0E93;
  font-weight: 600;
}

.chk-glyph {
  font-weight: 700;
}

.btn-complete-lesson:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--bg-surface-elevated) !important;
  color: var(--text-tertiary) !important;
  border-color: var(--border-default) !important;
}

/* SIMILAR PROBLEM MODAL */
.similar-problem-card {
  background: #ffffff;
  border: 1px solid #7E0E93;
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  max-width: 650px;
  width: 100%;
}

/* ==========================================================================
   CANVAS-STYLE LMS BREADCRUMB & CONTEXTUAL NAVIGATION
   ========================================================================== */

.canvas-breadcrumb-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}

.canvas-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.crumb-link {
  color: #7E0E93;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease;
}

.crumb-link:hover {
  color: #5c0a6b;
  text-decoration: underline;
}

.crumb-sep {
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.crumb-current {
  color: var(--text-primary);
  font-weight: 700;
}

/* ==========================================================================
   LESSON PROGRESS & REAL-TIME MASTERY HUD
   ========================================================================== */

.lesson-hud-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.lesson-hud-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  align-items: center;
}

.hud-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hud-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}

.hud-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.hud-progress-track {
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.25rem;
}

.hud-progress-fill {
  height: 100%;
  background: #7E0E93;
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* ==========================================================================
   QUICK CHECK INTERACTIVE CARDS
   ========================================================================== */

.quick-check-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-left: 4px solid #7E0E93;
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.35rem;
  margin: 1.25rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.quick-check-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.quick-check-pill {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7E0E93;
  background: rgba(126, 14, 147, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
}

.quick-check-xp {
  font-size: 0.74rem;
  font-weight: 700;
  color: #7E0E93;
  font-family: var(--font-mono);
}

.quick-check-question {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.55;
  margin-bottom: 0.85rem;
}

.quick-check-options {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.drawer-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: 0.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xs);
  cursor: pointer;
  color: var(--text-primary);
}

.drawer-toggle-btn:hover {
  background: var(--bg-surface-active);
  border-color: #7E0E93;
}

/* ==========================================================================
   RESPONSIVE LAYOUTS & MOBILE BREAKPOINTS
   ========================================================================== */

@media (max-width: 992px) {
  .study-room-layout {
    grid-template-columns: 1fr;
  }

  .study-sidebar {
    position: static;
    max-height: 280px;
    margin-bottom: 1.5rem;
  }

  .grapher-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0.6rem 1rem;
  }

  .portal-brand-dept {
    display: none;
  }

  .nav-gamification {
    display: none;
  }

  .subnav-tabs-list {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
  }

  .subnav-tabs-list::-webkit-scrollbar {
    display: none;
  }

  .lesson-hud-grid {
    grid-template-columns: 1fr 1fr;
  }

  .complete-lesson-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-complete-lesson {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .lesson-hud-grid {
    grid-template-columns: 1fr;
  }

  .practice-header-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   FULL-PAGE TEST ARENA & EXAM ENVIRONMENT
   ========================================================================== */

body.test-fullpage-mode {
  background-color: #0d1117 !important;
  color: #f0f6fc;
}

body.test-fullpage-mode #app-navbar,
body.test-fullpage-mode .nav-tabs-bar {
  display: none !important;
}

body.test-fullpage-mode .app-main {
  padding: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  min-height: 100vh;
}

body.test-fullpage-mode #view-test {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100vh;
  display: block;
}

.test-fullpage-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at top right, #1f1435 0%, #0d1117 60%, #090d13 100%);
  color: #f0f6fc;
  box-sizing: border-box;
}

.test-fullpage-header {
  background-color: rgba(13, 17, 23, 0.94);
  border-bottom: 1px solid #30363d;
  padding: 0.85rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(12px);
}

.test-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.test-badge-chip {
  background: #7E0E93;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.test-header-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.test-header-subtitle {
  font-size: 0.75rem;
  color: #8b949e;
}

.test-header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 280px;
}

.test-live-progress-meta {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.75rem;
  color: #c9d1d9;
  font-family: var(--font-mono);
  font-weight: 600;
}

.test-live-track {
  width: 100%;
  height: 6px;
  background-color: #21262d;
  border-radius: 3px;
  overflow: hidden;
}

.test-live-fill {
  height: 100%;
  background: linear-gradient(90deg, #7E0E93 0%, #d946ef 100%);
  border-radius: 3px;
  width: 0%;
}

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

.test-calc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  padding: 0.45rem 0.85rem;
  background-color: #21262d;
  color: #f0f6fc;
  border: 1px solid #30363d;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.test-calc-btn:hover {
  background-color: #30363d;
  border-color: #7E0E93;
  color: #ffffff;
}

.test-autosave-icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8b949e;
  cursor: default;
  padding: 0.2rem;
}

.test-autosave-icon {
  width: 15px;
  height: 15px;
  stroke: #8b949e;
  opacity: 0.85;
  flex-shrink: 0;
}

.test-card-top-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #21262d;
}

.test-q-pill {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: #8b949e;
  letter-spacing: 0.05em;
}

.test-type-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #d2a8ff;
  background: rgba(126, 14, 147, 0.2);
  border: 1px solid rgba(126, 14, 147, 0.4);
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.test-fullpage-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  box-sizing: border-box;
}

.test-exam-card {
  background-color: #161b22;
  border: 1px solid #30363d;
  border-radius: 14px;
  max-width: 860px;
  width: 100%;
  padding: 2.25rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
  box-sizing: border-box;
}

.test-exam-card .question-prompt {
  font-size: 1.2rem;
  font-weight: 600;
  color: #f0f6fc;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.test-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.test-option-btn {
  background-color: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 0.95rem 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.96rem;
  color: #c9d1d9;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
  user-select: none;
}

.test-option-btn:hover:not(.locked) {
  background-color: #21262d;
  border-color: #7E0E93;
  color: #ffffff;
}

.test-option-btn .option-glyph {
  background-color: #21262d;
  color: #8b949e;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
  font-family: var(--font-mono);
}

.test-option-btn.locked {
  cursor: not-allowed;
  pointer-events: none;
}

.test-option-btn.correct {
  background-color: rgba(46, 160, 67, 0.18) !important;
  border-color: #2ea043 !important;
  color: #7ee787 !important;
  font-weight: 600;
}

.test-option-btn.correct .option-glyph {
  background-color: #2ea043 !important;
  color: #ffffff !important;
}

.test-option-btn.incorrect {
  background-color: rgba(248, 81, 73, 0.18) !important;
  border-color: #f85149 !important;
  color: #ff7b72 !important;
  font-weight: 600;
}

.test-option-btn.incorrect .option-glyph {
  background-color: #f85149 !important;
  color: #ffffff !important;
}

/* Test Input Answer Styles */
.test-input-wrapper {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
  max-width: 580px;
  flex-wrap: wrap;
}

.test-input-field {
  flex: 1;
  min-width: 260px;
  background-color: #0d1117;
  border: 1.5px solid #30363d;
  border-radius: 8px;
  padding: 0.85rem 1.15rem;
  font-size: 1.05rem;
  font-family: var(--font-mono);
  color: #f0f6fc;
  outline: none;
  box-sizing: border-box;
}

.test-input-field:focus {
  border-color: #7E0E93;
  box-shadow: 0 0 0 3px rgba(126, 14, 147, 0.25);
}

.test-input-field:disabled {
  background-color: #161b22;
  color: #8b949e;
  cursor: not-allowed;
}

.test-input-field.correct {
  border-color: #2ea043 !important;
  background-color: rgba(46, 160, 67, 0.12) !important;
  color: #7ee787 !important;
}

.test-input-field.incorrect {
  border-color: #f85149 !important;
  background-color: rgba(248, 81, 73, 0.12) !important;
  color: #ff7b72 !important;
}

.test-input-submit-btn {
  padding: 0.85rem 1.6rem;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 8px;
  white-space: nowrap;
}

.test-feedback-bar {
  padding: 0.9rem 1.15rem;
  border-radius: 8px;
  margin-top: 1.25rem;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.test-feedback-bar.correct {
  background-color: rgba(46, 160, 67, 0.15);
  border: 1px solid rgba(46, 160, 67, 0.4);
  color: #7ee787;
}

.test-feedback-bar.incorrect {
  background-color: rgba(248, 81, 73, 0.15);
  border: 1px solid rgba(248, 81, 73, 0.4);
  color: #ff7b72;
}

.test-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.75rem;
  border-top: 1px solid #30363d;
  padding-top: 1.25rem;
}

.test-saved-notice {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #8b949e;
}

@media (max-width: 768px) {
  .test-fullpage-header {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }

  .test-header-left,
  .test-header-right {
    width: 100%;
    justify-content: space-between;
  }

  .test-header-center {
    width: 100%;
    min-width: unset;
  }

  .test-fullpage-body {
    padding: 1rem;
  }

  .test-exam-card {
    padding: 1.5rem;
  }
}