/* ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ
   PsychForce Design System ׳’ג‚¬ג€ Hebrew RTL Psychometric Aesthetic
   ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ׳’ג€¢ֲ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=Rubik:wght@300;400;500;600;700&display=swap');

:root {
  /* ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ Colors ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ */
  --bg-primary: #F5F0E8;
  --bg-secondary: #EDE7DB;
  --bg-card: #FEFCF9;
  --bg-sidebar: #F0EBE1;
  --bg-hover: rgba(184, 149, 106, 0.08);
  --bg-active: rgba(184, 149, 106, 0.15);

  --text-primary: #3D3929;
  --text-secondary: #6B6352;
  --text-muted: #9A9080;
  --text-inverse: #FEFCF9;

  --accent-gold: #B8956A;
  --accent-gold-light: #D4B896;
  --accent-gold-dark: #8A6D45;
  --accent-green: #5D8C61;
  --accent-green-light: rgba(93, 140, 97, 0.12);
  --accent-red: #C75B5B;
  --accent-red-light: rgba(199, 91, 91, 0.12);
  --accent-blue: #5B7EC7;
  --accent-blue-light: rgba(91, 126, 199, 0.12);
  --accent-purple: #8B5DC7;
  --accent-purple-light: rgba(139, 93, 199, 0.12);

  --accent-claude: #C47B37;
  --accent-claude-dark: #A56328;
  --accent-claude-light: rgba(196, 123, 55, 0.12);

  --border-light: rgba(61, 57, 41, 0.1);
  --border-medium: rgba(61, 57, 41, 0.18);

  --shadow-sm: 0 1px 2px rgba(61, 57, 41, 0.06);
  --shadow-md: 0 4px 12px rgba(61, 57, 41, 0.08);
  --shadow-lg: 0 8px 32px rgba(61, 57, 41, 0.1);
  --shadow-glow: 0 0 20px rgba(184, 149, 106, 0.15);

  /* ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ Typography ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ Sizing ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ */
  --sidebar-width: 260px;
  --sidebar-logo-height: 34px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 100px;
}

/* ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ Reset ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-gold-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-gold);
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.3;
  font-weight: 600;
}

/* ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ Layout ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ */

.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Logo: align with menu icons — nav (12px) + link padding (12px) = 24px from outer edge; match that inset */
.sidebar-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 24px 6px 12px;
  border-bottom: 1px solid var(--border-light);
  direction: ltr;
  background: transparent;
}

.sidebar-logo {
  display: block;
  width: auto;
  max-width: 100%;
  text-decoration: none;
  line-height: 0;
}

.sidebar-logo img {
  display: block;
  width: auto;
  max-width: min(128px, calc(var(--sidebar-width) - 84px));
  height: var(--sidebar-logo-height);
  object-fit: contain;
  object-position: right center;
  background: transparent;
  /* Opaque white in Untitled.png blends into cream sidebar */
  mix-blend-mode: multiply;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 6px 12px 14px;
}

.sidebar-section {
  margin-bottom: 8px;
}

.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 16px 12px 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: var(--bg-active);
  color: var(--text-primary);
  font-weight: 600;
}

.sidebar-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-link.active svg {
  opacity: 1;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-light);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-hover);
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-xp {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.xp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--accent-gold-light);
  color: var(--accent-gold-dark);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
}

.main-content {
  flex: 1;
  margin-right: var(--sidebar-width);
  min-height: 100vh;
}

.content-area {
  max-width: 1220px;
  margin: 0 auto;
  padding: 40px 32px;
}

/* ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ Cards ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
}

.card-grid {
  display: grid;
  gap: 20px;
}

.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ Buttons ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background: var(--text-secondary);
  color: var(--text-inverse);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-glass {
  background: rgba(184, 149, 106, 0.12);
  color: var(--text-primary);
  border: 1px solid rgba(184, 149, 106, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-glass:hover {
  background: rgba(184, 149, 106, 0.22);
  border-color: rgba(184, 149, 106, 0.4);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
  color: var(--text-primary);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-outline:hover {
  background: var(--bg-hover);
  border-color: var(--accent-gold);
  color: var(--text-primary);
}

.btn-accent {
  background: var(--accent-claude);
  color: white;
  font-weight: 600;
  border-radius: var(--radius-md);
  letter-spacing: 0.01em;
}

.btn-accent:hover {
  background: var(--accent-claude-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(196, 123, 55, 0.35);
  color: white;
}

.btn-skip {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-medium);
  font-weight: 500;
  border-radius: var(--radius-md);
}

.btn-skip:hover {
  background: var(--bg-hover);
  border-color: var(--accent-gold);
  color: var(--text-primary);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ Auth Pages ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ */

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-primary);
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo img {
  height: 48px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
}

.auth-logo h1 {
  font-size: 1.8rem;
  margin-top: 8px;
  letter-spacing: -0.02em;
}

.auth-logo p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.92rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(184, 149, 106, 0.15);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.auth-submit {
  width: 100%;
  margin-top: 8px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-footer a {
  font-weight: 600;
}

.flash-message {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.flash-error {
  background: var(--accent-red-light);
  color: var(--accent-red);
  border: 1px solid rgba(199, 91, 91, 0.2);
}

.flash-info {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  border: 1px solid rgba(91, 126, 199, 0.2);
}

/* ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ Home / Dashboard ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ */

.dashboard-greeting {
  margin-bottom: 36px;
}

.dashboard-greeting h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.dashboard-greeting p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.stat-card {
  text-align: center;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.xp-bar-container {
  margin-top: 12px;
}

.xp-bar {
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-dark));
  border-radius: 3px;
  transition: width 0.5s ease;
}

.xp-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.jump-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  color: var(--text-primary);
}

.jump-link:hover {
  border-color: var(--accent-gold);
  background: var(--bg-hover);
  transform: translateX(4px);
  color: var(--text-primary);
}

.jump-link-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.jump-link-icon.gold { background: rgba(184, 149, 106, 0.15); color: var(--accent-gold-dark); }
.jump-link-icon.green { background: var(--accent-green-light); color: var(--accent-green); }
.jump-link-icon.blue { background: var(--accent-blue-light); color: var(--accent-blue); }

.jump-link-content {
  flex: 1;
}

.jump-link-title {
  font-weight: 600;
  font-size: 0.92rem;
}

.jump-link-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.jump-link-arrow {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.jump-link:hover .jump-link-arrow {
  transform: translateX(3px);
}
/* ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ Filter Bar ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ */

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 24px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-medium);
}

.filter-btn.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

.filter-btn svg {
  width: 16px;
  height: 16px;
}

.question-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.question-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}

.question-list-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.qli-content {
  flex: 1;
  padding-right: 24px;
}

.qli-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.qli-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qli-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  min-width: 120px;
}

.badge-bookmark {
  background: rgba(232, 174, 61, 0.15);
  color: var(--accent-gold-dark);
}

.badge-status {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-solved {
  background: var(--accent-green-light);
  color: var(--accent-green);
}

.status-incorrect {
  background: var(--accent-red-light);
  color: var(--accent-red);
}

.status-active {
  background: var(--bg-hover);
  color: var(--text-secondary);
}


.qb-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.qb-header-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.qb-header-icon svg {
  width: 28px;
  height: 28px;
}

.qb-header h1 {
  font-size: 1.75rem;
}

.module-section {
  margin-bottom: 32px;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(320px, 1fr));
  gap: 28px;
  align-items: start;
}

@media (max-width: 1024px) {
  .modules-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
  overflow: hidden;
}

.module-header.english {
  background: var(--bg-card);
  border-bottom: 3px solid var(--accent-purple);
  color: var(--accent-purple);
}

.module-header.math {
  background: var(--bg-card);
  border-bottom: 3px solid var(--accent-claude);
  color: var(--accent-claude-dark);
}

.module-header.hebrew {
  background: var(--bg-card);
  border-bottom: 3px solid #2196F3;
  color: #1565C0;
}

.module-header h2 {
  font-family: 'Rubik', 'DM Sans', var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.module-header.english h2 {
  color: var(--accent-purple);
}

.module-header.math h2 {
  color: var(--accent-claude-dark);
}

.module-header.hebrew h2 {
  color: #1565C0;
}

.module-header .module-count {
  font-size: 0.85rem;
  opacity: 0.85;
}

.module-body {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 8px;
}

.class-section {
  margin-bottom: 4px;
}

.class-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 1.05rem;
  font-family: var(--font-heading);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
}

.class-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 400;
}

.skill-list {
  list-style: none;
}

.skill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px 24px 14px 18px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s ease;
}

.skill-item:last-child {
  border-bottom: none;
}

.skill-item:hover {
  background: var(--bg-hover);
}

.skill-item-label {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.skill-item a,
.skill-item-link {
  flex: 1;
  color: var(--text-primary);
  font-size: 0.92rem;
  min-width: 0;
}

.skill-item a:hover,
.skill-item-link:hover {
  color: var(--accent-claude);
}

.skill-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: 12px;
}

.skill-item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  justify-content: flex-end;
}

.skill-stats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-stat-bookmark-row {
  gap: 10px;
  align-items: center;
  min-width: 30px;
}

.skill-stat-counts-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.skill-stat-bookmark-core {
  align-items: center;
  justify-content: center;
}

.skill-stat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.skill-stat-bookmark {
  gap: 4px;
  color: #f39c12;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: monospace;
  min-width: 30px;
}

.skill-stat-bookmark svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.skill-stat-count {
  font-size: 0.92rem;
  font-weight: 700;
  font-family: monospace;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.skill-stat-count-top {
  color: var(--accent-green);
}

.skill-stat-count-bottom {
  color: var(--accent-red);
}

.btn-practice {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  background: rgba(196, 123, 55, 0.1);
  color: var(--accent-claude-dark);
  text-decoration: none;
  border: 1px solid rgba(196, 123, 55, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.btn-practice:hover {
  background: rgba(196, 123, 55, 0.2);
  border-color: rgba(196, 123, 55, 0.4);
  color: var(--accent-claude-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(196, 123, 55, 0.12);
}

.skill-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}

.progress-mini {
  width: 40px;
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  overflow: hidden;
}

.progress-mini-fill {
  height: 100%;
  background: var(--accent-green);
  border-radius: 2px;
}

@media (max-width: 640px) {
  .skill-item {
    align-items: flex-start;
    gap: 10px;
  }

  .skill-item-label {
    width: 100%;
  }

  .skill-item-meta {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

.practice-container {
  max-width: 760px;
  margin: 0 auto;
}

.practice-container--passage {
  max-width: 1400px;
  margin: 0 auto;
}

.practice-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.practice-breadcrumb a {
  color: var(--text-muted);
}

.practice-breadcrumb a:hover {
  color: var(--accent-gold);
}

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-md);
}

.question-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.question-badge {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.question-badge.difficulty-easy {
  background: var(--accent-green-light);
  color: var(--accent-green);
}

.question-badge.difficulty-medium {
  background: rgba(184, 149, 106, 0.15);
  color: var(--accent-gold-dark);
}

.question-badge.difficulty-hard {
  background: var(--accent-red-light);
  color: var(--accent-red);
}

.question-text {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 28px;
  white-space: pre-line;
}

/* ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ Hebrew Rendering Classes ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ */

.seg-chip {
  display: inline-block;
  background: rgba(184, 149, 106, 0.12);
  border: 1px solid rgba(184, 149, 106, 0.25);
  border-radius: 6px;
  padding: 2px 10px;
  margin: 2px 3px;
  font-size: 0.9em;
  line-height: 1.6;
  white-space: nowrap;
  direction: rtl;
}

.blank-line {
  display: inline-block;
  min-width: 80px;
  border-bottom: 2px solid var(--text-muted);
  margin: 0 4px;
  text-align: center;
  color: transparent;
  user-select: none;
}

.line-num {
  font-size: 0.72em;
  font-weight: 700;
  color: #1a1a1a;
  opacity: 0.55;
  position: absolute;
  /* For LTR passages, place in the left margin */
  left: -10px;
  transform: translateX(-100%);
  white-space: nowrap;
  line-height: 1.9;
  pointer-events: none;
  user-select: none;
}

/* For RTL passages (Hebrew), place in the right margin */
[dir="rtl"] .line-num,
.passage-body:not(.passage-ltr) .line-num {
  left: auto;
  right: -10px;
  transform: translateX(100%);
}

.passage-body {
  line-height: 1.9;
  font-size: 0.95rem;
  color: var(--text-primary);
  padding-right: 48px; /* Space for RTL line numbers in the margin */
  position: relative;
}

.passage-body.passage-ltr {
  padding-right: 0;
  padding-left: 48px; /* Space for LTR line numbers in the margin */
}

.passage-body.passage-ltr .line-num {
  left: -10px;
  right: auto;
  transform: translateX(-100%);
}

.passage-body p {
  margin-bottom: 16px;
  position: relative;
}

.passage-body p:last-child {
  margin-bottom: 0;
}

/* Sleek dark paragraph corner badges */
.passage-paragraph {
  position: relative;
  margin-top: 16px !important;
}

/* For the first paragraph, skip extra margin if it's already spaced */
.passage-intro + .passage-paragraph {
  margin-top: 12px !important;
}

.passage-paragraph::before {
  content: attr(data-pnum);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: -72px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted, rgba(0,0,0,0.4));
  pointer-events: none;
  user-select: none;
  font-family: 'Inter', 'DM Sans', var(--font-body);
  z-index: 1;
}

/* LTR passages: badge in left margin */
[dir="ltr"] .passage-paragraph::before,
.passage-body.passage-ltr .passage-paragraph::before {
  right: auto;
  left: -72px;
}

/* Vertical separator line between line numbers and paragraph badges */
.passage-paragraph::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: -44px;
  width: 3px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 1.5px;
  pointer-events: none;
}

[dir="ltr"] .passage-paragraph::after,
.passage-body.passage-ltr .passage-paragraph::after {
  right: auto;
  left: -44px;
}


.question-text strong,
.passage-body strong,
.option-btn strong {
  font-weight: 700;
  color: var(--text-primary);
}

.options-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.option-btn {
  display: flex;
  align-items: flex-start;
  direction: ltr;
  gap: 14px;
  padding: 16px 20px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
  font-size: 0.95rem;
  text-align: right;
  width: 100%;
  color: var(--text-primary);
}

.option-btn > span:last-child {
  direction: rtl;
  flex: 1;
  text-align: right;
}

.option-btn:hover:not(.disabled) {
  border-color: var(--accent-gold);
  background: var(--bg-hover);
}

.option-btn.selected {
  border-color: var(--accent-gold);
  background: rgba(184, 149, 106, 0.1);
}

.option-btn.correct {
  border-color: var(--accent-green);
  background: var(--accent-green-light);
}

.option-btn.incorrect {
  border-color: var(--accent-red);
  background: var(--accent-red-light);
}

.option-btn.disabled {
  cursor: default;
  opacity: 0.7;
}

.option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.option-btn.selected .option-letter {
  background: var(--accent-gold);
  color: white;
}

.option-btn.correct .option-letter {
  background: var(--accent-green);
  color: white;
}

.option-btn.incorrect .option-letter {
  background: var(--accent-red);
  color: white;
}

.result-panel {
  padding: 20px 24px;
  border-radius: var(--radius-md);
  margin-top: 20px;
  display: none;
  animation: slideUp 0.35s ease;
}

.result-panel.show {
  display: block;
}

.result-panel.correct-result {
  background: var(--accent-green-light);
  border: 1px solid rgba(93, 140, 97, 0.25);
}

.result-panel.incorrect-result {
  background: var(--accent-red-light);
  border: 1px solid rgba(199, 91, 91, 0.25);
}

.result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 1rem;
}

.result-xp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.result-explanation {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.practice-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

/* ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ Practice Tests Page ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ */

.test-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
}

.test-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.5rem;
}

.test-info {
  flex: 1;
}

.test-info h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.test-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.test-details {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.test-detail {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ Stats Page ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ */

.stat-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.stat-bar:last-child {
  border-bottom: none;
}

.stat-bar-label {
  font-size: 0.88rem;
  font-weight: 500;
  width: 200px;
  flex-shrink: 0;
}

.stat-bar-track {
  flex: 1;
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent-gold);
  transition: width 0.5s ease;
}

.stat-bar-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 50px;
  text-align: right;
}

/* ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ Animations ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ */

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.4s ease;
}

/* ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ Mobile Toggle ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ */

.mobile-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.mobile-toggle svg {
  width: 22px;
  height: 22px;
  color: var(--text-primary);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 90;
}

/* ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ Responsive ׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬׳’ג€ג‚¬ */

/* ׳’ג€ג‚¬׳’ג€ג‚¬ Tablet (׳’ג€°ג‚×1024px) ׳’ג€ג‚¬׳’ג€ג‚¬ */
@media (max-width: 1024px) {
  .content-area {
    padding: 36px 24px;
  }

  .card-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .practice-container--passage {
    max-width: 100%;
  }
}

/* ׳’ג€ג‚¬׳’ג€ג‚¬ Mobile (׳’ג€°ג‚×768px) ׳’ג€ג‚¬׳’ג€ג‚¬ */
@media (max-width: 768px) {
  /* --- Sidebar RTL fix --- */
  .sidebar {
    transform: translateX(100%); /* RTL: slide off to the right */
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .mobile-toggle {
    display: flex;
  }

  .main-content {
    margin-right: 0; /* RTL: was margin-left */
    overflow-x: clip; /* Prevent any child element from forcing horizontal scroll under the sidebar area */
    max-width: 100vw;
  }

  .content-area {
    padding: 64px 14px 24px;
    max-width: 100%;
  }

  /* --- Grids stack --- */
  .card-grid-2,
  .card-grid-3 {
    grid-template-columns: 1fr;
  }

  .modules-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* --- Home / Dashboard --- */
  .dashboard-greeting h1 {
    font-size: 1.4rem;
  }

  .dashboard-greeting p {
    font-size: 0.85rem;
  }

  .stat-value {
    font-size: 1.6rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  /* --- Card adjustments --- */
  .card {
    padding: 18px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* --- Filter bar --- */
  .filter-bar {
    margin-bottom: 20px;
    padding-bottom: 16px;
  }

  .filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .filter-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    font-size: 0.88rem;
  }

  /* --- Question Bank --- */
  .qb-header {
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }

  .qb-header-icon {
    width: 42px;
    height: 42px;
  }

  .qb-header-icon svg {
    width: 22px;
    height: 22px;
  }

  .qb-header h1 {
    font-size: 1.2rem;
  }

  .module-header {
    padding: 12px 16px;
  }

  .module-header h2 {
    font-size: 0.95rem;
  }

  .class-header {
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  .skill-item {
    padding: 12px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .skill-item a {
    font-size: 0.85rem;
    flex-basis: 100%;
  }

  .skill-count {
    margin-left: 0;
  }

  .skill-progress {
    margin-left: 0;
  }

  .btn-practice {
    font-size: 0.72rem;
  }

  /* --- Question / Practice View --- */
  .question-card {
    padding: 20px 14px;
    border-radius: var(--radius-lg);
  }

  .question-text {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 20px;
  }

  .question-meta {
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
  }

  .option-btn {
    padding: 12px 14px;
    font-size: 0.88rem;
    gap: 10px;
  }

  .option-letter {
    width: 26px;
    height: 26px;
    font-size: 0.72rem;
  }

  .practice-actions {
    flex-direction: column;
    gap: 8px;
  }

  .practice-actions .btn {
    width: 100%;
  }

  .practice-breadcrumb {
    font-size: 0.75rem;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }

  .result-panel {
    padding: 16px;
  }

  .result-header {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9rem;
  }

  .result-xp {
    margin-left: 0;
  }

  .result-explanation {
    font-size: 0.82rem;
  }

  /* --- Passage layout --- */
  .passage-body {
    font-size: 0.88rem;
    line-height: 1.8;
  }

  .seg-chip {
    font-size: 0.82em;
    padding: 2px 8px;
  }

  .blank-line {
    min-width: 60px;
  }

  /* --- Test cards --- */
  .test-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
  }

  .test-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .test-info h3 {
    font-size: 1rem;
  }

  .test-details {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* --- Stats page --- */
  .stat-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 0;
  }

  .stat-bar-label {
    width: 100%;
    font-size: 0.85rem;
  }

  .stat-bar-track {
    width: 100%;
  }

  .stat-bar-value {
    width: auto;
    text-align: right;
    align-self: flex-end;
  }

  /* --- Auth pages --- */
  .auth-card {
    padding: 28px 20px;
    border-radius: var(--radius-lg);
  }

  .auth-logo h1 {
    font-size: 1.5rem;
  }

  /* --- Jump links --- */
  .jump-link {
    padding: 12px;
    gap: 10px;
  }

  .jump-link-icon {
    width: 38px;
    height: 38px;
  }

  .jump-link-title {
    font-size: 0.85rem;
  }

  .jump-link-sub {
    font-size: 0.72rem;
  }

  /* --- Question list items (if used) --- */
  .question-list-item {
    flex-direction: column;
    padding: 16px;
    gap: 12px;
  }

  .qli-content {
    padding-right: 0;
  }

  .qli-actions {
    flex-direction: row;
    align-items: center;
    min-width: unset;
    width: 100%;
    justify-content: flex-start;
  }
}

/* ׳’ג€ג‚¬׳’ג€ג‚¬ Small mobile (׳’ג€°ג‚×480px) ׳’ג€ג‚¬׳’ג€ג‚¬ */
@media (max-width: 480px) {
  .content-area {
    padding: 60px 10px 20px;
  }

  .card {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  .stat-value {
    font-size: 1.3rem;
  }

  .question-card {
    padding: 16px 12px;
  }

  .question-text {
    font-size: 0.88rem;
  }

  .option-btn {
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  .module-header h2 {
    font-size: 0.88rem;
  }

  .class-header {
    font-size: 0.88rem;
    padding: 10px 12px;
  }

  .skill-item {
    padding: 10px 12px;
  }

  .qb-header h1 {
    font-size: 1.05rem;
  }

  .dashboard-greeting h1 {
    font-size: 1.2rem;
  }

  .sidebar-logo img {
    height: 30px;
    max-width: min(112px, calc(100vw - 96px));
  }

  .auth-card {
    padding: 24px 16px;
  }

  .passage-body {
    font-size: 0.82rem;
    line-height: 1.7;
  }

  .filter-btn {
    font-size: 0.82rem;
    padding: 8px 12px;
  }
}

/* ׳’ג€ג‚¬׳’ג€ג‚¬ Touch-friendly enhancements ׳’ג€ג‚¬׳’ג€ג‚¬ */
@media (hover: none) and (pointer: coarse) {
  .option-btn {
    min-height: 48px;
  }

  .filter-btn {
    min-height: 44px;
  }

  .btn {
    min-height: 44px;
  }

  .sidebar-link {
    padding: 12px;
    min-height: 44px;
  }

  .skill-item {
    min-height: 48px;
  }

  .jump-link {
    min-height: 48px;
  }

  /* Disable hover transforms on touch */
  .card:hover {
    transform: none;
  }

  .jump-link:hover {
    transform: none;
  }

  .question-list-item:hover {
    transform: none;
  }
}



/* ═══════════════════════════════════════════════════════════════════
   Learning Hub — Redesigned to match code.html reference
   ═══════════════════════════════════════════════════════════════════ */

/* Override parent constraints */
.content-area:has(.ka-wrapper) {
  max-width: none;
  padding: 0;
}
.ka-wrapper {
  display: flex;
  min-height: calc(100vh - 70px);
  background: #fdfaf8;
  direction: rtl;
  font-family: 'Assistant', sans-serif;
}

/* ─── Sidebar ─── */
.ka-sidebar {
  width: 320px;
  flex-shrink: 0;
  border-left: 1px solid #f1ede8;
  background: #fcf8f3;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.ka-sidebar::-webkit-scrollbar { width: 5px; }
.ka-sidebar::-webkit-scrollbar-track { background: transparent; }
.ka-sidebar::-webkit-scrollbar-thumb { background: #e5e1da; border-radius: 10px; }

.ka-sb-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 2rem 2rem 1rem;
}
.ka-sb-icon-wrap {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, #fef3c7, #fde68a50);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(245,158,11,0.1);
}
.ka-sb-icon-wrap .material-symbols-outlined {
  font-size: 24px; color: #b45309;
}
.ka-sb-title {
  font-weight: 800;
  font-size: 1.25rem;
  color: #292524;
  line-height: 1;
  margin-bottom: 4px;
}
.ka-sb-subtitle {
  font-size: 0.6rem;
  color: #a8a29e;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Sidebar Progress */
.ka-sb-progress {
  margin: 0 2rem 2rem;
  background: #fff;
  border-radius: 16px;
  padding: 1rem 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  border: 1px solid rgba(245,158,11,0.15);
}
.ka-sb-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #78716c;
}
.ka-sb-progress-pct { color: #d97706; }
.ka-sb-progress-bar {
  width: 100%;
  height: 8px;
  background: #f5f5f4;
  border-radius: 4px;
  overflow: hidden;
}
.ka-sb-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  border-radius: 4px;
}

/* Sidebar Section Cards */
.ka-sb-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 1.5rem 2rem;
}
.ka-sb-section-card {
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(232,226,217,0.5);
  border-radius: 24px;
  padding: 12px;
  margin-bottom: 24px;
}
.ka-sb-section-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 12px;
  margin-bottom: 12px;
  color: #a8a29e;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.ka-sb-section-label .material-symbols-outlined {
  font-size: 18px;
}
.ka-sb-section-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ka-sb-nav-item {
  display: block;
  padding: 1rem;
  border-radius: 18px;
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.ka-sb-nav-item:hover {
  background: #fff;
  transform: translateX(-4px);
  box-shadow: 0 4px 12px rgba(124,114,103,0.05);
}
.ka-sb-nav-item.active {
  background: #fff;
  border-color: #fef3c7;
  box-shadow: 0 8px 20px -6px rgba(245,158,11,0.15);
}
.ka-sb-nav-top {
  margin-bottom: 4px;
}
.ka-sb-unit-num {
  font-size: 0.62rem;
  font-weight: 700;
  color: #a8a29e;
}
.ka-sb-nav-item.active .ka-sb-unit-num {
  color: rgba(217,119,6,0.7);
}
.ka-sb-unit-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #57534e;
}
.ka-sb-nav-item:hover .ka-sb-unit-title {
  color: #1c1917;
}
.ka-sb-nav-item.active .ka-sb-unit-title {
  font-weight: 700;
  color: #292524;
}

/* ─── Main Content ─── */
.ka-main {
  flex: 1;
  padding: 2rem;
  min-width: 0;
  overflow-y: auto;
}
.ka-main-inner {
  max-width: 900px;
  margin: 0 auto;
}

/* Header */
.ka-header {
  text-align: center;
  margin-bottom: 3rem;
}
.ka-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid #f5f5f4;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #d97706;
  margin-bottom: 1.5rem;
}
.ka-pulse {
  position: relative;
  display: inline-block;
  width: 8px; height: 8px;
}
.ka-pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #f59e0b;
  animation: ka-ping 1.5s cubic-bezier(0,0,0.2,1) infinite;
  opacity: 0.75;
}
.ka-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #f59e0b;
}
@keyframes ka-ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}
.ka-unit-title {
  font-size: 3rem;
  font-weight: 900;
  color: #292524;
  margin: 0 0 1rem;
  letter-spacing: -1px;
  line-height: 1.1;
}
.ka-mastery-points {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.ka-points-badge {
  font-size: 0.85rem;
  font-weight: 500;
  color: #78716c;
  background: #f5f5f4;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
}
.ka-info-icon {
  font-size: 16px;
  color: #a8a29e;
  cursor: help;
  opacity: 0.4;
}

/* Mastery Legend */
.ka-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
  padding: 2rem 0;
  border-top: 1px solid #f5f5f4;
  border-bottom: 1px solid #f5f5f4;
}
.ka-lg {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ka-lg span {
  font-size: 0.82rem;
  font-weight: 700;
  color: #57534e;
}
.ka-dot {
  width: 20px; height: 20px;
  border-radius: 8px;
  display: inline-block;
}
.ka-c-mastered   { background: rgba(16,185,129,0.9); box-shadow: 0 2px 4px rgba(16,185,129,0.15); }
.ka-c-proficient { background: rgba(96,165,250,0.9); box-shadow: 0 2px 4px rgba(96,165,250,0.15); }
.ka-c-familiar   { background: rgba(251,191,36,0.9); box-shadow: 0 2px 4px rgba(251,191,36,0.15); }
.ka-c-attempted  { background: rgba(192,132,252,0.9); box-shadow: 0 2px 4px rgba(192,132,252,0.15); }
.ka-c-notstarted { background: #fff; border: 2px solid #d6d3d1; }

/* Unit Mastery Squares Row */
.ka-unit-squares-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 1.5rem 0;
  justify-content: center;
}
.ka-sq {
  display: inline-block;
  width: 22px; height: 22px;
  border-radius: 5px;
  transition: transform 0.15s;
}
.ka-sq:hover { transform: scale(1.3); }
.ka-sq.ka-c-notstarted { border: 2px solid #d6d3d1; background: #fff; }
.ka-sq.ka-c-mastered   { background: rgba(16,185,129,0.9); }
.ka-sq.ka-c-proficient { background: rgba(96,165,250,0.9); }
.ka-sq.ka-c-familiar   { background: rgba(251,191,36,0.9); }
.ka-sq.ka-c-attempted  { background: rgba(192,132,252,0.9); }
.ka-sq-gap {
  font-size: 0.65rem;
  color: #c4bfb5;
  margin: 0 2px;
  user-select: none;
}
.ka-sq-special {
  font-size: 0.75rem;
  color: #a8a29e;
}

/* Cards Container */
.ka-cards-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* Subject Dividers */
.ka-subject-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 3rem 0 0.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(229,231,235,0.6);
}
.ka-sd-icon {
  width: 48px; height: 48px;
  background: #fdfdfc;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  border: 1px solid #f3f4f6;
}
.ka-sd-icon .material-symbols-outlined {
  font-size: 24px;
  color: #10b981;
}
.ka-sd-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: #111827;
  margin: 0;
  letter-spacing: -0.5px;
}

/* Empty State */
.ka-lc-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  background: #fafaf9;
  border-radius: 16px;
  border: 2px dashed #e5e7eb;
  color: #9ca3af;
  text-align: center;
}
.ka-lc-empty-state .material-symbols-outlined {
  font-size: 32px;
  margin-bottom: 1rem;
  color: #d1d5db;
}
.ka-lc-empty-state p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.ka-unit-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* About Card */
.ka-about-card {
  background: #fff;
  border-radius: 32px;
  padding: 3rem;
  text-align: center;
  box-shadow: 0 10px 30px -10px rgba(124,114,103,0.08);
  border: 1px solid #f8f5f2;
  position: relative;
  overflow: hidden;
}
.ka-about-card::before {
  content: '';
  position: absolute;
  top: -48px; right: -48px;
  width: 192px; height: 192px;
  background: #fffbeb;
  border-radius: 50%;
  opacity: 0.5;
  filter: blur(48px);
}
.ka-about-card::after {
  content: '';
  position: absolute;
  bottom: -48px; left: -48px;
  width: 192px; height: 192px;
  background: #fafaf9;
  border-radius: 50%;
  opacity: 0.5;
  filter: blur(48px);
}
.ka-about-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: #292524;
  margin: 0 0 1.25rem;
  position: relative; z-index: 1;
}
.ka-about-text {
  font-size: 1.15rem;
  color: #57534e;
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
  font-weight: 500;
  position: relative; z-index: 1;
}

/* ─── Learning Card (two-column) ─── */
.ka-learning-card {
  display: flex;
  background: #fff;
  border-radius: 32px;
  box-shadow: 0 10px 30px -10px rgba(124,114,103,0.08);
  overflow: hidden;
  border: 1px solid #f8f5f2;
}

/* Learn Side */
.ka-lc-learn-side {
  flex: 1;
  padding: 2.5rem 3rem;
}
.ka-lc-learn-header {
  margin-bottom: 2rem;
}
.ka-stage-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #fffbeb;
  color: #b45309;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
  border: 1px solid #fef3c7;
  margin-bottom: 0.75rem;
}
.ka-lc-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #292524;
  margin: 0;
  line-height: 1.25;
}

/* Item Cards */
.ka-lc-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.ka-lc-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
  background: #fff;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
}
.ka-lc-item-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 8px rgba(0,0,0,0.04);
  transform: translateY(-2px);
}
.ka-lc-item-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.ka-lc-item-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #f3f4f6;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.ka-lc-item-card:hover .ka-lc-item-icon {
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.ka-lc-item-icon .material-symbols-outlined {
  font-size: 16px;
  color: #6b7280;
  transition: color 0.2s;
}
.ka-lc-item-card:hover .ka-lc-item-icon .material-symbols-outlined {
  color: #f59e0b;
}
.ka-lc-item-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: #374151;
  text-decoration: none;
  line-height: 1.25;
}
a.ka-lc-item-text:hover { color: #111827; }
.ka-lc-item-na { color: #9ca3af; }
.ka-lc-chevron {
  display: none; /* Hide chevron to maintain a simpler button look */
}

/* Divider between learn/practice */
.ka-lc-divider {
  width: 1px;
  background: linear-gradient(to bottom, transparent, #eeebe6 15%, #eeebe6 85%, transparent);
  display: none;
}
@media (min-width: 900px) {
  .ka-lc-divider { display: block; }
}

/* Practice Side */
.ka-lc-practice-side {
  width: 340px;
  flex-shrink: 0;
  padding: 2.5rem 3rem;
  background: #f9f7f4;
  background-image: radial-gradient(#e5e1da 0.5px, transparent 0.5px);
  background-size: 16px 16px;
  display: flex;
  flex-direction: column;
}
.ka-lc-practice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.ka-practice-label {
  font-size: 0.68rem;
  color: #a8a29e;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ka-status-badge {
  font-size: 0.68rem;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(4px);
  color: #78716c;
  font-weight: 700;
  border: 1px solid #eeebe6;
}

/* Practice Task Card */
.ka-lc-practice-task {
  flex: 1;
  background: rgba(255,255,255,0.6);
  padding: 1.5rem;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  backdrop-filter: blur(4px);
}
.ka-lc-task-label {
  font-size: 0.62rem;
  color: #a8a29e;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.5rem;
}
.ka-lc-task-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #292524;
  line-height: 1.3;
  margin: 0 0 0.75rem;
}
.ka-lc-task-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(245,245,244,0.5);
}
.ka-lc-task-meta-icon {
  font-size: 16px;
  color: #10b981;
}
.ka-lc-task-meta p {
  font-size: 0.75rem;
  color: #78716c;
  font-weight: 500;
  margin: 0;
}

/* Buttons */
.ka-btn-practice {
  display: block;
  width: 100%;
  margin-top: 2rem;
  padding: 1rem;
  background: #292524;
  color: #fff;
  border: none;
  border-radius: 16px;
  font-size: 0.88rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 4px 12px rgba(41,37,36,0.1);
}
.ka-btn-practice:hover {
  background: #44403c;
  transform: translateY(-1px);
}
.ka-btn-locked {
  display: block;
  width: 100%;
  margin-top: 2rem;
  padding: 1rem;
  background: #f1ede8;
  color: #a8a29e;
  border: none;
  border-radius: 16px;
  font-size: 0.88rem;
  font-weight: 900;
  cursor: not-allowed;
}

/* Quiz / Unit Test Card */
.ka-quiz-card {
  background: #fff;
  border: 1px solid #f8f5f2;
  border-radius: 32px;
  padding: 2.5rem 3rem;
  box-shadow: 0 10px 30px -10px rgba(124,114,103,0.08);
}
.ka-quiz-info { flex: 1; }
.ka-quiz-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #292524;
  margin: 0 0 0.5rem;
}
.ka-quiz-desc {
  font-size: 0.9rem;
  color: #78716c;
  margin: 0 0 1rem;
  line-height: 1.5;
}
.ka-unit-test-card {
  border-color: #fef3c7;
  background: #fffdf7;
}

/* Footer */
.ka-footer {
  margin-top: 5rem;
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(214,211,209,0.3);
}
.ka-footer-help {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: #fff;
  padding: 1.5rem 2rem;
  border-radius: 32px;
  border: 1px solid #f5f5f4;
  box-shadow: 0 10px 30px rgba(214,211,209,0.15);
  max-width: 600px;
  margin: 0 auto;
}
.ka-footer-help-icon {
  width: 56px; height: 56px;
  background: #fffbeb;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ka-footer-help-icon .material-symbols-outlined {
  font-size: 28px; color: #d97706;
}
.ka-footer-help-text { flex: 1; }
.ka-footer-help-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: #292524;
  margin: 0;
}
.ka-footer-help-desc {
  font-size: 0.85rem;
  color: #78716c;
  margin: 0;
}
.ka-btn-chat {
  padding: 0.75rem 2rem;
  background: #292524;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(41,37,36,0.1);
}
.ka-btn-chat:hover {
  background: #44403c;
}

/* Mobile sidebar toggle */
.ka-sb-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 110;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: #292524;
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  font-size: 1.2rem;
  align-items: center; justify-content: center;
}

/* ═ Responsive ═ */
@media (max-width: 900px) {
  .ka-sidebar {
    position: fixed;
    right: -320px;
    top: 0;
    height: 100vh;
    z-index: 120;
    transition: right 0.3s ease;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  }
  .ka-sidebar.ka-sb-open { right: 0; }
  .ka-sb-toggle { display: flex; }
  .ka-main { padding: 1.5rem 1.25rem 2rem; }
  .ka-learning-card { flex-direction: column; }
  .ka-lc-practice-side { width: 100%; }
  .ka-lc-learn-side { padding: 2rem; }
  .ka-lc-practice-side { padding: 2rem; }
}
@media (max-width: 700px) {
  .ka-unit-title { font-size: 2rem; }
  .ka-about-title { font-size: 1.4rem; }
  .ka-lc-title { font-size: 1.15rem; }
  .ka-sq { width: 16px; height: 16px; }
  .ka-legend { gap: 1.25rem; }
  .ka-footer-help { flex-direction: column; text-align: center; }
}

/* ═══════════════════════════════════════════════════════════════════
   Lesson Page — Quiet Typeset Design (Simple, elegant, readable)
   ═══════════════════════════════════════════════════════════════════ */

/* Override parent for lesson page */
.content-area:has(.lp-wrapper) {
  max-width: none;
  padding: 0;
}
.lp-wrapper {
  display: flex;
  min-height: calc(100vh - 70px);
  background: #ffffff;
  direction: rtl;
  font-family: 'Assistant', sans-serif;
  color: #2c2c2c;
}

/* ─── Sidebar ─── */
.lp-sidebar {
  width: 260px;
  flex-shrink: 0;
  border-left: 1px solid #eaeaea;
  padding: 2rem 1.5rem;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
  background: #fafafa;
  display: flex;
  flex-direction: column;
}
.lp-sidebar::-webkit-scrollbar { width: 4px; }
.lp-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

.lp-sb-header {
  margin-bottom: 2rem;
}
.lp-sb-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #7b7b7b;
  font-size: 0.85rem;
  font-weight: 400;
  transition: color 0.2s;
}
.lp-sb-back:hover { color: #111; }
.lp-sb-back .material-symbols-outlined { font-size: 16px; }

.lp-sb-course-info {
  margin-bottom: 2rem;
}
.lp-sb-course-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #888;
  margin-bottom: 0.2rem;
}
.lp-sb-lesson-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  margin: 0;
  line-height: 1.4;
}

.lp-sb-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.lp-nav-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
  padding: 0.6rem 0.8rem;
  margin-bottom: 2px;
  text-decoration: none;
  color: #555;
  font-size: 0.95rem;
  font-weight: 400;
  transition: all 0.2s ease;
  cursor: default;
  border-radius: 6px;
  position: relative;
}
a.lp-nav-item { cursor: pointer; }
a.lp-nav-item:hover { 
  background: #f0f0f0;
  color: #111; 
}
.lp-nav-active {
  background: #e8e8e8;
  color: #111 !important;
  font-weight: 500;
}
.lp-nav-icon {
  font-size: 20px;
  color: #777;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
}
.lp-nav-active .lp-nav-icon {
  color: #111;
}
.lp-nav-locked {
  opacity: 0.5;
}
.lp-nav-status {
  font-size: 0.7rem;
  color: #999;
  font-weight: 400;
  margin-right: auto;
}

.lp-sb-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  align-items: center; justify-content: center;
}

/* ─── Main Article ─── */
.lp-article {
  flex: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
}

.lp-header {
  margin-bottom: 3rem;
}
.lp-header-meta {
  font-size: 0.85rem;
  color: #888;
  margin: 0 0 1rem;
  font-weight: 400;
  letter-spacing: 0.5px;
}
.lp-header h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 1.25rem;
  letter-spacing: -1px;
  line-height: 1.1;
}
.lp-subtitle {
  font-size: 1.25rem;
  color: #555;
  line-height: 1.6;
  font-weight: 400;
}

.lp-divider {
  border: none;
  border-top: 1px solid #111;
  margin: 3rem 0;
}
.lp-divider-light {
  border: none;
  border-top: 1px dashed #dcdcdc;
  margin: 3rem 0;
}

/* Sections */
.lp-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 1.5rem;
  letter-spacing: -0.5px;
}
.lp-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #111;
  margin: 0 0 1rem;
}
.lp-section p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
  margin-bottom: 1.25rem;
}
.lp-section ul, .lp-section ol {
  padding-right: 1.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: #333;
}
.lp-section li {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}
.lp-section strong { color: #111; font-weight: 700; }

.lp-highlight-box {
  background: #fafafa;
  border-right: 4px solid #111;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  border-radius: 4px 0 0 4px;
}
.lp-highlight-box p:last-child { margin-bottom: 0; }

/* Breakdown Rows */
.lp-breakdown {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem 0;
}
.lp-bd-row {
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 1.5rem;
  background: #fff;
}
.lp-bd-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.lp-bd-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111;
}
.lp-bd-meta {
  font-size: 0.9rem;
  color: #777;
}
.lp-bd-body p {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
.lp-bd-body p:last-child { margin-bottom: 0; }
.lp-bd-body ol { margin: 1rem 0 0; padding-right: 1.25rem; }
.lp-bd-body li { font-size: 1rem; margin-bottom: 0.5rem; }

/* Practice Section */
.lp-practice-section {
  margin-top: 2rem;
}
.practice-header h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #111;
}
.practice-header p {
  color: #666;
  font-size: 1rem;
  margin-bottom: 2rem;
}

.practice-question {
  margin-bottom: 2.5rem;
}
.practice-q-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.practice-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.practice-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #eaeaea;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}
.practice-option:hover {
  border-color: #ccc;
  background: #fafafa;
}
.practice-option input[type="radio"] { display: none; }
.option-marker {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ccc;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.option-marker::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #111;
  transition: transform 0.2s;
}
.practice-option input[type="radio"]:checked ~ .option-marker { border-color: #111; }
.practice-option input[type="radio"]:checked ~ .option-marker::after { transform: translate(-50%, -50%) scale(1); }

.option-text {
  font-size: 1.05rem;
  color: #333;
}
.practice-option input[type="radio"]:checked ~ .option-text { font-weight: 600; color: #111; }

.answered .practice-option { cursor: default; pointer-events: none; }
.is-correct { border-color: #16a34a; background: #f0fdf4; }
.is-correct .option-marker { border-color: #16a34a; }
.is-correct .option-marker::after { background: #16a34a; }
.is-incorrect { border-color: #ef4444; background: #fef2f2; opacity: 0.7; }

.practice-feedback {
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 600;
}
.fb-text { color: #16a34a; }
.fb-text.err { color: #dc2626; }

/* Bottom Nav */
.lp-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #eaeaea;
}
.lp-btn-primary {
  padding: 0.85rem 2rem;
  background: #111;
  color: #fff;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.lp-btn-primary:hover { opacity: 0.8; color: #fff; }
.lp-btn-secondary {
  padding: 0.85rem 2rem;
  background: transparent;
  color: #555;
  border: 1px solid #ccc;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}
.lp-btn-secondary:hover { border-color: #111; color: #111; }

/* ═ Responsive ═ */
@media (max-width: 900px) {
  .lp-sidebar {
    position: fixed;
    right: -260px;
    top: 0;
    height: 100vh;
    z-index: 100;
    transition: right 0.3s ease;
    box-shadow: -4px 0 24px rgba(0,0,0,0.05);
  }
  .lp-sidebar.open { right: 0; }
  .lp-sb-toggle { display: flex; }
  .lp-article { padding: 3rem 1.5rem 4rem; }
}
@media (max-width: 600px) {
  .lp-header h1 { font-size: 2.2rem; }
  .lp-section h2 { font-size: 1.5rem; }
  .lp-bottom-nav { flex-direction: column-reverse; gap: 1rem; }
  .lp-bottom-nav a { width: 100%; text-align: center; }
}

/* ═══════════════════════════════════════════════════════════════════
   KaTeX Math Rendering — RTL Alignment & Sizing
   ═══════════════════════════════════════════════════════════════════ */

/* Math is always LTR, even inside RTL Hebrew text */
.katex {
  direction: ltr !important;
  unicode-bidi: isolate;
  text-align: left;
}

/* Inline math vertical alignment */
.katex-display {
  direction: ltr !important;
  text-align: center !important;
  margin: 1rem 0;
}

/* Scale KaTeX to match surrounding text size - increased by 30% */
.question-text .katex { font-size: 1.365em; }
.option-btn .katex { font-size: 1.3em; }
.explanation-text .katex { font-size: 1.235em; }
.passage-body .katex { font-size: 1.3em; }

/* Make minus sign more distinct */
.katex .mrel .mbin {
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* Ensure KaTeX fractions and tall expressions don't overflow option buttons */
.option-btn {
  min-height: auto;
  align-items: center;
}
.option-btn .katex-html {
  line-height: 1.4;
}

/* Step explanation math */
.step-content .katex-display {
  margin: 0.75rem 0;
}

/* Free-tier IP quota banner (practice) */
.quota-exhausted-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-medium);
  background: linear-gradient(135deg, var(--accent-claude-light), var(--bg-card));
  color: var(--text-primary);
}
.quota-exhausted-banner .material-symbols-outlined {
  font-size: 28px;
  color: var(--accent-claude);
  flex-shrink: 0;
}
.quota-exhausted-banner p {
  margin: 6px 0 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.quota-exhausted-banner a {
  font-weight: 600;
}


/* Pricing page — Claude-inspired comparison + rock mascots */
.pricing-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 12px 56px;
  position: relative;
}
.pricing-page--rocks {
  overflow: visible;
  --rock-ultra-h: 198px;
  --rock-ultra-w: 210px;
  --rock-ultra-anchor-x: 0.61;
  --rock-pro-peek-h: 148px;
  --rock-pro-peek-w: 92px;
  --rock-table-w: 340px;
}
.pricing-hero {
  text-align: center;
  margin-bottom: 36px;
}
.pricing-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  margin-bottom: 10px;
}
.pricing-hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}
.pricing-grid-section {
  position: relative;
  margin-bottom: 8px;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
  position: relative;
  z-index: 1;
}
@media (max-width: 960px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}
.pricing-rock {
  pointer-events: none;
  user-select: none;
  object-fit: contain;
  flex-shrink: 0;
  vertical-align: middle;
  overflow: visible;
}
.pricing-rock .rock-pupil {
  transition: transform 0.08s ease-out;
}
.pricing-rock .rock-eye {
  transition: transform 0.1s ease-out;
}
.pricing-card--ultra .pricing-rock--ultra {
  position: absolute;
  z-index: 4;
  top: 118px;
  left: -1px;
  width: auto;
  height: var(--rock-ultra-h);
  max-width: var(--rock-ultra-w);
  max-height: var(--rock-ultra-h);
  transform: translate(calc(var(--rock-ultra-anchor-x, 0.843) * -100%), -6%);
  transform-origin: 0 0;
  filter: drop-shadow(0 8px 20px rgba(61, 57, 41, 0.14));
}
@media (max-width: 960px) {
  .pricing-card--ultra .pricing-rock--ultra {
    top: 108px;
    height: min(168px, 44vw);
    max-width: 90px;
    transform: translate(calc(var(--rock-ultra-anchor-x, 0.843) * -100%), -5%);
  }
}
.pricing-card--free {
  z-index: -2;
}
.pricing-card--pro .pricing-rock--pro-peek {
  position: absolute;
  z-index: -1;
  top: 0;
  right: -1px;
  width: auto;
  height: var(--rock-pro-peek-h);
  max-width: var(--rock-pro-peek-w);
  max-height: var(--rock-pro-peek-h);
  transform: translate(calc(100% - 4%), 0);
  transform-origin: 100% 0;
  filter: drop-shadow(0 6px 16px rgba(61, 57, 41, 0.14));
}
@media (max-width: 960px) {
  .pricing-card--pro .pricing-rock--pro-peek {
    top: 0;
    right: -1px;
    height: min(124px, 34vw);
    max-width: 78px;
    transform: translate(calc(100% - 4%), 0);
  }
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: visible;
}
.pricing-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}
.pricing-card--featured {
  border-color: var(--accent-claude);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(196, 123, 55, 0.15);
  /* Leave room at the top for the "מומלץ" badge so the title does not
     collide with it (especially visible on narrow cards / mobile). */
  padding-top: 52px;
}
.pricing-card-badge {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  z-index: 6;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-claude-dark);
  background: var(--accent-claude-light);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.pricing-card h2 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}
.pricing-price {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  margin: 12px 0 4px;
  color: var(--text-primary);
}
.pricing-price small {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-body);
}
.pricing-card .pricing-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.pricing-features {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  flex: 1;
}
.pricing-features li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}
.pricing-features li:last-child {
  border-bottom: none;
}
.pricing-features .material-symbols-outlined {
  font-size: 20px;
  color: var(--accent-green);
  flex-shrink: 0;
  margin-top: 1px;
}
.pricing-features li.is-muted .material-symbols-outlined {
  color: var(--text-muted);
  opacity: 0.5;
}
.pricing-cta {
  display: block;
  text-align: center;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border-medium);
  background: var(--bg-secondary);
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.pricing-cta:hover {
  background: var(--bg-hover);
  border-color: var(--accent-gold);
  color: var(--accent-gold-dark);
}
.pricing-cta--primary {
  background: var(--accent-claude);
  border-color: var(--accent-claude);
  color: var(--text-inverse);
}
.pricing-cta--primary:hover {
  background: var(--accent-claude-dark);
  border-color: var(--accent-claude-dark);
  color: var(--text-inverse);
}
.pricing-cta--ghost {
  opacity: 0.9;
  cursor: default;
  pointer-events: none;
}
.pricing-footnote-block {
  position: relative;
  margin-top: 0;
  margin-bottom: 8px;
  padding-top: 26px;
}
.pricing-footnote-wrap {
  position: relative;
  overflow: hidden;
  padding: 15px 18px 14px 118px;
  border-radius: var(--radius-lg);
  background: linear-gradient(
    90deg,
    #e79a52 0%,
    #d07d38 22%,
    #c56a24 48%,
    #a85a1f 76%,
    #8f4a18 100%
  );
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--shadow-sm);
  isolation: isolate;
}
.pricing-footnote-wrap::before {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  width: min(132%, 440px);
  aspect-ratio: 1;
  border-radius: 50%;
  left: 0;
  bottom: 0;
  transform-origin: left bottom;
  transform: translate(-54%, 44%);
  background: #eca06f;
}
.pricing-footnote-wrap .pricing-footnote {
  position: relative;
  z-index: 1;
  display: block;
  direction: rtl;
  text-align: right;
  box-sizing: border-box;
  width: 100%;
  max-width: calc(100% - clamp(46px, 11vw, 72px));
  margin: 0;
  margin-inline-end: auto;
  padding: 0;
  padding-inline-end: clamp(14px, 3.5vw, 26px);
  border: none;
  background: transparent;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.96);
  line-height: 1.6;
}
.pricing-footnote-wrap .pricing-footnote strong {
  color: #fff;
}
.pricing-footnote-block .pricing-rock--footnote {
  position: absolute;
  z-index: 2;
  left: 4px;
  bottom: 8px;
  width: 106px;
  max-width: min(106px, 33vw);
  height: auto;
  max-height: 137px;
  margin: 0;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 8px 20px rgba(61, 57, 41, 0.22));
}
@media (max-width: 600px) {
  .pricing-footnote-block {
    padding-top: 22px;
  }
  .pricing-footnote-wrap {
    padding: 14px 14px 14px 98px;
  }
  .pricing-footnote-wrap::before {
    width: min(125%, 360px);
    transform: translate(-58%, 46%);
  }
  .pricing-footnote-block .pricing-rock--footnote {
    left: 2px;
    bottom: 6px;
    width: 90px;
    max-width: min(90px, 40vw);
    max-height: 119px;
  }
  .pricing-footnote-wrap .pricing-footnote {
    max-width: calc(100% - clamp(36px, 12vw, 56px));
    padding-inline-end: clamp(12px, 4vw, 22px);
  }
}
.pricing-compare-section {
  position: relative;
  margin-top: 20px;
  margin-bottom: 4px;
  padding-top: clamp(20px, 5vw, 44px);
  overflow: visible;
}
.pricing-compare thead th.pricing-compare-th-capability {
  text-align: right;
  vertical-align: bottom;
  position: relative;
  overflow: visible;
  anchor-name: --pf-cap-th;
}
.pricing-compare-th-capability__inner {
  position: relative;
  display: inline-block;
  max-width: 100%;
  direction: rtl;
}
.pricing-compare-th-capability__label {
  position: relative;
  z-index: 2;
  line-height: 1.25;
  margin: 0;
  padding: 0 0 2px;
  text-align: right;
  display: inline-block;
}
.pricing-compare-wrap {
  overflow: visible;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  position: relative;
  z-index: 1;
}
.pricing-compare-scroll {
  position: relative;
  z-index: 2;
  overflow-x: auto;
  overflow-y: visible;
  border-radius: inherit;
  -webkit-overflow-scrolling: touch;
}
.pricing-compare-rock-slot {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
  top: 0;
  right: 0;
  width: min(38%, 360px);
  height: 0;
  min-height: 0;
}
.pricing-compare-rock-slot .pricing-rock--table-group {
  position: absolute;
  right: 6px;
  bottom: 8px;
  width: min(232px, 38vw);
  max-width: min(232px, 38vw);
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: bottom right;
  display: block;
  filter: drop-shadow(0 5px 14px rgba(61, 57, 41, 0.13));
}
@media (max-width: 700px) {
  .pricing-compare-rock-slot {
    width: min(48%, 320px);
  }
  .pricing-compare-rock-slot .pricing-rock--table-group {
    width: min(200px, 56vw);
    max-width: min(200px, 56vw);
    right: 4px;
  }
}
@supports (anchor-name: --pf-cap-th) {
  .pricing-compare-rock-slot {
    position: absolute;
    position-anchor: --pf-cap-th;
    top: auto;
    left: auto;
    width: max-content;
    height: max-content;
    bottom: anchor(bottom);
    right: anchor(right);
    transform: translateX(calc(-100% - clamp(8px, 1.5vw, 14px) + clamp(48px, 12vw, 120px)));
  }
  .pricing-compare-rock-slot .pricing-rock--table-group {
    position: static;
    right: auto;
    bottom: auto;
    width: min(232px, 36vw);
    max-width: min(232px, 36vw);
  }
}
.pricing-compare thead {
  position: relative;
  z-index: 3;
}
.pricing-compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  font-size: 0.88rem;
}
.pricing-compare th,
.pricing-compare td {
  padding: 12px 14px;
  text-align: right;
  border-bottom: 1px solid var(--border-light);
}
.pricing-compare th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
}
.pricing-compare thead th {
  vertical-align: bottom;
  padding: 8px 14px 3px;
}
.pricing-compare tr:last-child td {
  border-bottom: none;
}
.pricing-compare .pc-yes {
  color: var(--accent-green);
  font-weight: 600;
}
.pricing-compare .pc-no {
  color: var(--text-muted);
}

/* Mobile Comparison (chips, visible < 768px only) */
.pricing-mobile-compare {
  display: none;
}

/* FAQ Section */
.pricing-faq {
  margin-top: 40px;
  padding-top: 20px;
}
.pricing-faq__title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--text-primary);
}
.pricing-faq__list {
  display: flex;
  flex-direction: column;
}
.pricing-faq__item {
  border-bottom: 1px solid var(--border-light);
}
.pricing-faq__item:first-child {
  border-top: 1px solid var(--border-light);
}
.pricing-faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  min-height: 48px;
  transition: color 0.2s;
}
.pricing-faq__item summary::-webkit-details-marker {
  display: none;
}
.pricing-faq__item summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-inline-start: 12px;
}
.pricing-faq__item[open] summary::after {
  transform: rotate(45deg);
}
.pricing-faq__item summary:hover {
  color: var(--accent-claude);
}
.pricing-faq__item p {
  padding: 0 4px 18px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* Responsive - Mobile (< 768px) */
@media (max-width: 767px) {
  .pricing-page {
    padding-left: clamp(18px, 4vw, 32px);
    padding-right: clamp(18px, 4vw, 32px);
    /* Clip any decorative overflow so mascots never push content under the
       sidebar / viewport edge on phones. */
    overflow-x: clip;
    max-width: 100%;
  }
  .pricing-grid-section,
  .pricing-grid {
    overflow-x: clip;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .pricing-card--pro { order: -1; }
  .pricing-cta {
    min-height: 48px;
    padding: 13px 18px;
  }
  /* Keep the cute rocks on mobile — overflow-x: clip on .main-content /
     .pricing-page already prevents them from causing horizontal scroll,
     so the mascots are safe to show. */
  .pricing-card--ultra .pricing-rock--ultra {
    top: 80px;
    height: min(120px, 30vw);
    max-width: none;
    transform: translate(calc(var(--rock-ultra-anchor-x, 0.843) * -100%), -5%);
  }
  .pricing-card--pro .pricing-rock--pro-peek {
    height: min(100px, 24vw);
    max-width: none;
  }
  .pricing-compare-section {
    display: none;
  }
  .pricing-mobile-compare {
    display: block;
    margin-top: 20px;
    padding: 16px 0;
  }
  .pricing-mobile-compare__title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
  }
  .pricing-mobile-row {
    padding: 12px 4px;
    border-bottom: 1px solid var(--border-light);
  }
  .pricing-mobile-row:first-of-type {
    border-top: 1px solid var(--border-light);
  }
  .pricing-mobile-row__label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
    margin-bottom: 8px;
  }
  .pricing-mobile-row__chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  .pricing-chip {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
  }
  .pricing-chip--free {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
  }
  .pricing-chip--pro {
    background: var(--accent-claude-light);
    color: var(--accent-claude-dark);
    border: 1px solid rgba(196, 123, 55, 0.18);
  }
  .pricing-chip--ultra {
    background: rgba(139, 93, 199, 0.1);
    color: #7a4db8;
    border: 1px solid rgba(139, 93, 199, 0.18);
  }
  .pricing-chip--no {
    background: transparent;
    color: var(--text-muted);
    border: 1px dashed var(--border-light);
    opacity: 0.6;
  }
  .pricing-faq__item summary {
    min-height: 52px;
  }
}

/* Responsive - Small Mobile (< 400px) */
@media (max-width: 400px) {
  .pricing-page {
    padding-left: 8px;
    padding-right: 8px;
  }
  .pricing-card {
    padding: 18px 14px;
  }
  /* Keep the cute rocks visible on small phones too. Scale them down a bit
     so they still fit nicely inside the narrower cards. */
  .pricing-card--ultra .pricing-rock--ultra {
    top: 72px;
    height: min(96px, 26vw);
  }
  .pricing-card--pro .pricing-rock--pro-peek {
    height: min(84px, 22vw);
  }
  /* The featured card gets extra top-padding for the badge; on narrow
     phones shave a little so the layout stays compact. */
  .pricing-card--featured {
    padding-top: 44px;
  }
  .pricing-footnote-wrap {
    padding: 14px 12px 14px 108px;
  }
  .pricing-footnote-block .pricing-rock--footnote {
    width: 96px;
    max-height: 128px;
  }
}
