/* ============================================================
   index.css — Home / Hero Page
   ============================================================ */

.index {
  width: 100%;
  max-width: var(--max-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--page-pad-x) 64px;
  flex: 1;
}

/* ---- Hero ---- */
.hero {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 48px 0 32px;
}

/* ---- Left Col ---- */
.hero-left {
  flex: 1 1 50%;
  position: relative;
  padding: 0 8px;
}

/* Subtle decorative gradient blob behind left column */
.hero-left::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -80px;
  width: 440px;
  height: 440px;
  background: radial-gradient(ellipse at center, rgba(37,99,235,0.08) 0%, rgba(245,158,11,0.04) 50%, transparent 75%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hero-left > * { position: relative; z-index: 1; }


.hero-title {
  font-size: clamp(2.1rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--clr-text);
  margin-bottom: 18px;
  animation: fadeIn 0.6s 0.1s ease-out both;
}

.hero-title .highlight {
  color: var(--clr-primary);
  position: relative;
  display: inline-block;
}

.hero-title .highlight::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 7px;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-primary));
  border-radius: var(--radius-full);
  opacity: 0.7;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--clr-text-muted);
  font-weight: 500;
  max-width: 460px;
  margin-bottom: 36px;
  line-height: 1.75;
  animation: fadeIn 0.7s 0.2s ease-out both;
}

/* ---- Divider ---- */
.hero-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--clr-border), transparent);
  margin: 8px 0 32px;
  border: none;
}

/* ---- Stats ---- */
.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 24px;
  animation: fadeIn 0.8s 0.3s ease-out both;
}

.stat {
  padding-left: 12px;
  border-left: 2px solid var(--clr-primary-light);
  transition: border-color var(--transition);
}

.stat:hover { border-left-color: var(--clr-primary); }

.stat-divider {
  width: 1px;
  background: var(--clr-border);
  align-self: stretch;
}

.stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--clr-primary);
  line-height: 1;
  margin-bottom: 3px;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--clr-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- Right Col ---- */
.hero-right {
  flex: 1 1 44%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-image-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(37,99,235,0.12) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 5s ease-in-out infinite;
}

#skewingImage {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 24px 40px rgba(37,99,235,0.18));
  transition: transform 0.5s ease-out;
  animation: fadeInScale 0.8s 0.3s ease-out both;
}

/* ---- Floating Hexagons ---- */
.hexagon {
  position: absolute;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  pointer-events: none;
}

.hero-left .hexagon:nth-child(1) {
  width: 50px; height: 57px;
  top: 5%; left: 0%;
  background: linear-gradient(135deg, var(--clr-accent-light), var(--clr-accent));
  opacity: 0.6;
  animation: floatHex1 7s ease-in-out infinite;
}

.hero-left .hexagon:nth-child(2) {
  width: 34px; height: 39px;
  bottom: 14%; left: 58%;
  background: linear-gradient(135deg, var(--clr-primary-light), var(--clr-primary));
  opacity: 0.5;
  animation: floatHex2 11s ease-in-out infinite;
}

.hero-right .hexagon:nth-child(1) {
  width: 58px; height: 67px;
  bottom: 4%; right: 4%;
  background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-dark));
  opacity: 0.55;
  animation: floatHex3 9s ease-in-out infinite;
}

@keyframes floatHex1 {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-14px) scale(1.12); }
}
@keyframes floatHex2 {
  0%, 100% { transform: translate(0,0) rotate(0deg); }
  50%       { transform: translate(16px,-10px) rotate(25deg); }
}
@keyframes floatHex3 {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  50%       { transform: translateX(18px) rotate(-18deg); }
}

/* ---- Activities Hub ---- */
.activities-section {
  width: 100%;
  margin-top: 8px;
}

.activities-intro {
  text-align: center;
  margin-bottom: 28px;
  animation: fadeIn 1s 0.5s ease-out both;
}

.activities-heading {
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  font-weight: 800;
  color: var(--clr-text);
  margin-bottom: 6px;
}

.activities-subheading {
  font-size: 0.88rem;
  color: var(--clr-text-muted);
  font-weight: 500;
  max-width: 460px;
  margin: 0 auto;
}

/* ---- Activity Group ---- */
.activity-group {
  margin-bottom: 28px;
}

.group-label {
  margin-bottom: 14px;
}

.group-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--clr-primary);
  background: var(--clr-primary-light);
  padding: 5px 14px;
  border-radius: var(--radius-full);
}

/* ---- Activity Grids ---- */
.activity-grid {
  display: grid;
  gap: 16px;
  animation: fadeIn 1s 0.6s ease-out both;
}

/* 2-column grid (Speaking & Listening, Interleaved Review)
   Uses 3-column template so each card is the same width as other groups.
   The 3rd column stays empty but cards match the 1/3-container size. */
.activity-grid--2 {
  grid-template-columns: repeat(3, 1fr);
}

/* 3-column grid */
.activity-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

/* 5-item grid — 3 + 2 centred on second row */
.activity-grid--5 {
  grid-template-columns: repeat(3, 1fr);
}

/* Center the 2 orphan cards in the 5-item grid */
.activity-grid--5 .feature-card-link:nth-child(4) {
  grid-column-start: 1;
}

/* ---- Activities Footer ---- */
.activities-footer {
  text-align: center;
  margin-top: 8px;
  margin-bottom: 8px;
}

/* Feature card link wrapper */
.feature-card-link {
  display: contents;
  text-decoration: none;
  color: inherit;
}

/* Global Review highlight variant */
.feature-card-link--highlight .feature-card {
  border-top-color: #7c3aed;
  background: linear-gradient(160deg, var(--clr-surface) 80%, rgba(124,58,237,0.04) 100%);
}

.feature-card-link--highlight .feature-card:hover {
  border-top-color: #7c3aed;
  border-color: rgba(124,58,237,0.35);
  box-shadow: var(--shadow-lg), 0 0 0 3px rgba(124,58,237,0.08);
}

.feature-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition),
    border-top-color var(--transition);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(37,99,235,0.06);
  border-color: var(--clr-primary-light);
}

/* Feature card icon container */
.feature-icon {
  font-size: 2.4rem;
  line-height: 1;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--clr-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition-bounce);
}

.feature-card:hover .feature-icon {
  background: linear-gradient(135deg, var(--clr-primary-light), rgba(37,99,235,0.18));
  transform: scale(1.08);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-text);
}

.feature-card p {
  font-size: 0.82rem;
  color: var(--clr-text-muted);
  font-weight: 500;
  line-height: 1.6;
}

.card-benefit {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--clr-primary);
  letter-spacing: 0.01em;
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════
   Learning Path Section
   ═══════════════════════════════════════════════════════════ */

.cefr-bar { display: none; }

.path-section {
  width: 100%;
  margin-top: 0;
  margin-bottom: 16px;
  animation: fadeIn 0.8s 0.4s ease-out both;
}

.path-intro {
  text-align: center;
  margin-bottom: 20px;
}

.path-heading {
  font-size: clamp(1.2rem, 2.8vw, 1.6rem);
  font-weight: 800;
  color: var(--clr-text);
  margin-bottom: 5px;
}

.path-subheading {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  font-weight: 500;
}

/* ── CEFR badges ── */
.cefr-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

.cefr-badge--a1 { background: #dcfce7; color: #16a34a; }
.cefr-badge--a2 { background: #dbeafe; color: #2563eb; }
.cefr-badge--b1 { background: #fef3c7; color: #d97706; }
.cefr-badge--b2 { background: #ede9fe; color: #7c3aed; }
.cefr-badge--c1 { background: #cffafe; color: #0891b2; }
.cefr-badge--c2 { background: #ffe4e6; color: #be123c; }

/* ── Unified path card ── */
.path-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

/* ── Session CTA — compact HUD header ── */
.path-session-cta {
  border-bottom: 1px solid var(--clr-border);
  overflow: hidden;
}

/* Progress bar strip (active sessions only) */
.path-cta__bar {
  height: 4px;
  background: var(--clr-border);
}
.path-cta__bar-fill {
  height: 100%;
  background: var(--clr-path);
  border-radius: 0 2px 2px 0;
  transition: width 0.6s ease;
  /* Always show at least a small sliver so the bar looks intentional at card 1 */
  min-width: 12px;
}

/* Content row */
.path-cta__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  min-height: 48px;
}

.path-cta__stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Friendly title + subtitle body */
.path-cta__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.path-cta__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--clr-text);
  line-height: 1.2;
}

.path-cta__sub {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  line-height: 1.3;
}

/* Big card count — "3/13" */
.path-cta__count {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--clr-text);
  line-height: 1;
}
.path-cta__total {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  margin-left: 1px;
}

/* Time estimate */
.path-cta__time {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  white-space: nowrap;
}

/* Review / New chips */
.path-cta__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.path-cta__chip--review {
  background: #fef3c7;
  color: #b45309;
}
.path-cta__chip--new {
  background: var(--clr-path-light);
  color: var(--clr-path-dark);
}

.path-cta__btn {
  display: inline-block;
  padding: 8px 20px;
  background: var(--clr-path);
  color: #fff;
  font-family: 'Raleway', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition-bounce);
}
.path-cta__btn:hover {
  background: var(--clr-path-dark);
  transform: translateY(-1px);
}

.path-cta__done {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--clr-success);
}

/* ══════════════════════════════════════
   Horizontal trail
   ══════════════════════════════════════ */

/* Trail scroll area inside the card */
.path-card__trail {
  position: relative;
  /* top border already provided by .path-session-cta border-bottom */
}

/* Horizontal scroll container */
.path-nodes {
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  padding: 16px 40px;
}
.path-nodes::-webkit-scrollbar { display: none; }

/* Scroll arrow buttons */
.path-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--clr-border);
  background: var(--clr-surface);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--clr-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), box-shadow var(--transition);
  padding: 0;
}
.path-scroll-btn:hover { background: var(--clr-primary-light, #eff6ff); }
.path-scroll-btn--left  { left: 8px; }
.path-scroll-btn--right { right: 8px; }

/* Fade overlays — left and right */
.path-nodes-fade {
  position: absolute;
  top: 0; bottom: 0;
  width: 56px;
  pointer-events: none;
}
.path-nodes-fade--right {
  right: 0;
  background: linear-gradient(to right, transparent, var(--clr-surface));
}
.path-nodes-fade--left {
  left: 0;
  background: linear-gradient(to left, transparent, var(--clr-surface));
}

/* The trail row */
.path-trail {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
  min-width: max-content;
}

/* Horizontal connector — width/margin-top/transform set per-connector by JS for zigzag */
.path-connector {
  height: 3px;
  background: var(--clr-border);
  border-radius: 2px;
  flex-shrink: 0;
  transition: background 0.3s;
  align-self: flex-start;
  transform-origin: left center;
  /* fallback for non-zigzag contexts */
  width: 48px;
  margin-top: 60px;
}

.path-connector--done {
  background: var(--clr-success, #16a34a);
}

/* ── Node wrapper ── */
.path-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  flex-shrink: 0;
  /* 28px pin zone + 4px gap before bubble */
  padding-top: 32px;
  /* Reserve space below label so the absolute NEW badge doesn't overlap sibling nodes */
  padding-bottom: 20px;
  /* Always render above connectors so the bubble is never obscured */
  z-index: 1;
}

/* No horizontal zigzag — the flow reads left → right naturally */
.path-node--left,
.path-node--right { transform: none; }

/* ── Bubble ── */
.path-node__bubble {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  line-height: 1;
  background: var(--clr-surface);
  border: 3px solid var(--clr-border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s;
  flex-shrink: 0;
  cursor: default;
  user-select: none;
}

/* done */
.path-node--done .path-node__bubble {
  background: var(--clr-success, #16a34a);
  border-color: var(--clr-success, #16a34a);
  color: #fff;
}

/* active */
.path-node--active .path-node__bubble {
  background: var(--clr-path);
  border-color: var(--clr-path);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 0 0 5px rgba(201,146,10,0.22), 0 4px 14px rgba(201,146,10,0.30);
  animation: path-pulse 2s ease-in-out infinite;
}

.path-node--active .path-node__bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 0 0 7px rgba(201,146,10,0.28), 0 6px 18px rgba(201,146,10,0.38);
}

/* pending */
.path-node--pending .path-node__bubble {
  opacity: 0.5;
}

@keyframes path-pulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(201,146,10,0.22), 0 4px 14px rgba(201,146,10,0.30); }
  50%       { box-shadow: 0 0 0 9px rgba(201,146,10,0.10), 0 6px 20px rgba(201,146,10,0.18); }
}

/* ── Check mark ── */
.path-node__check {
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
}

/* ── Activity label (below bubble) ── */
.path-node__label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--clr-text-muted);
  text-align: center;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.path-node--done .path-node__label   { color: var(--clr-success, #16a34a); }
.path-node--active .path-node__label { color: var(--clr-path); font-weight: 800; }

/* ── Topic pin — always present; invisible spacer when topic unchanged ── */
.path-node__topic {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--clr-text-muted);
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  padding: 2px 8px;
  white-space: nowrap;
  letter-spacing: 0.03em;
  pointer-events: none;
  line-height: 1.3;
}

/* ── NEW badge — absolutely positioned so it never affects node height ── */
.path-node__new-badge,
.path-node__review-badge {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.52rem;
  font-weight: 800;
  border-radius: var(--radius-full);
  padding: 2px 6px;
  white-space: nowrap;
  opacity: 1 !important;
}

.path-node__new-badge {
  color: #fff;
  background: var(--clr-path);
}

.path-node__review-badge {
  color: #92400e;
  background: #fde68a;
}

/* ── Freestyle link ── */
.path-freestyle {
  text-align: center;
  margin-bottom: 4px;
}

.path-freestyle-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--clr-border);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.path-freestyle-link:hover {
  color: var(--clr-primary);
  border-color: var(--clr-primary-light);
  background: var(--clr-primary-light);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .path-cta__row { flex-wrap: wrap; gap: 8px; }
  .path-nodes { padding: 14px 24px; }
  .path-node__bubble { width: 52px; height: 52px; font-size: 1.4rem; }
  .path-connector { width: 32px; }
}

/* ── Dark mode ── */

/* ---- Progress Link ---- */
.progress-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--clr-primary);
  background: var(--clr-surface);
  border: 2px solid var(--clr-primary-light);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), transform var(--transition-bounce), box-shadow var(--transition);
  animation: fadeIn 1s 0.8s ease-out both;
  box-shadow: var(--shadow-xs);
}

.progress-link:hover {
  background: var(--clr-primary-light);
  border-color: var(--clr-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Animated arrow inside progress link */
.progress-link .link-arrow {
  display: inline-block;
  transition: transform var(--transition);
}

.progress-link:hover .link-arrow { transform: translateX(4px); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 48px 0 40px;
    gap: 40px;
  }
  .hero-left { padding: 0; }
  .hero-left::before { display: none; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-stats { justify-content: center; }
  .hero-right { width: 100%; max-width: 340px; }
  .hero-title .highlight::after { display: none; }
  .stat { border-left: none; padding-left: 0; }
}

/* Tablet: 2-column activity grids */
@media (max-width: 760px) {
  .activity-grid--2,
  .activity-grid--3,
  .activity-grid--5 {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Reset orphan centering on tablet — let natural flow take over */
  .activity-grid--5 .feature-card-link:nth-child(4) {
    grid-column-start: auto;
  }
}

@media (max-width: 480px) {
  .hero { padding: 32px 0; }
  .hero-stats { gap: 20px; }

  /* Single-column activity grids on mobile */
  .activity-grid--2,
  .activity-grid--3,
  .activity-grid--5 {
    grid-template-columns: 1fr;
  }
  .activities-intro { margin-bottom: 20px; }
  .activity-group { margin-bottom: 20px; }
}

/* ======================================================
   Onboarding Modal
   ====================================================== */

.ob-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: obFadeIn 0.25s ease-out both;
}

.ob-overlay.ob-out {
  animation: obFadeOut 0.28s ease-in forwards;
}

@keyframes obFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes obFadeOut { from { opacity: 1; } to { opacity: 0; } }

.ob-modal {
  background: #ffffff;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0,0,0,0.22), 0 4px 12px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 460px;
  /* Cap to the viewport (overlay adds 16px padding each side) and lay the modal
     out as a column so a tall step (e.g. the topic list) scrolls INSIDE it via
     .ob-inner instead of overflowing the screen. */
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  position: relative;
  animation: obSlideUp 0.32s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes obSlideUp {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.ob-close {
  position: absolute;
  top: 12px;
  right: 14px;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(0,0,0,0.06);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  color: var(--clr-text-muted);
  cursor: pointer;
  padding: 0;
  z-index: 2;
  transition: background var(--transition), color var(--transition);
}

.ob-close:hover { background: rgba(0,0,0,0.12); color: var(--clr-text); }

/* ---- Footer stripe ---- */
.ob-footer-stripe {
  height: 6px;
  background: linear-gradient(90deg, var(--clr-primary), #7C3AED);
  width: 100%;
}

/* ---- Inner content wrapper ---- */
.ob-inner {
  padding: 28px 30px 26px;
  /* Scroll the content here (not the modal) when a step is taller than the
     viewport; flex:1 + min-height:0 lets it shrink so any footer stripe stays put. */
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---- Progress dots ---- */
.ob-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 22px;
}

.ob-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clr-border);
  transition: background var(--transition), transform var(--transition);
}

.ob-dot.active {
  background: var(--clr-primary);
  transform: scale(1.3);
}

/* ---- Step shared ---- */
.ob-step { display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; }

.ob-hero-icon {
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 14px;
}

.ob-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--clr-text);
  margin-bottom: 12px;
}

.ob-body {
  font-size: 0.88rem;
  color: var(--clr-text-muted);
  font-weight: 500;
  line-height: 1.7;
  max-width: 360px;
  margin-bottom: 24px;
}

.ob-body--sm { font-size: 0.82rem; margin-bottom: 18px; }

/* ---- Primary button ---- */
.ob-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 26px;
  background: var(--clr-primary);
  color: #fff;
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition-bounce);
}

.ob-primary-btn:hover {
  background: var(--clr-primary-dark, #1d4ed8);
  transform: translateY(-1px);
}

.ob-ghost-btn {
  background: none;
  border: none;
  font-family: 'Raleway', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  cursor: pointer;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: color var(--transition);
}

.ob-ghost-btn:hover { color: var(--clr-text); }

/* ---- Topic preference bubbles (Step 3) ---- */
.ob-topic-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 4px 0 20px;
}
.ob-bubble {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--clr-border);
  background: var(--clr-card);
  color: var(--clr-text);
  font-family: 'Raleway', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.ob-bubble:hover { border-color: var(--activity-clr, #7C3AED); }
.ob-bubble--on {
  background: var(--activity-clr, #7C3AED);
  border-color: var(--activity-clr, #7C3AED);
  color: #fff;
  transform: scale(1.04);
}

/* ---- Quiz step: left-aligned layout ---- */
.ob-step--quiz { align-items: stretch; text-align: left; }

.ob-quiz-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ob-quiz-counter {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--clr-text-muted);
}
.ob-quiz-lvbadge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  background: var(--clr-primary-light);
  color: var(--clr-primary);
}
.ob-quiz-bar {
  width: 100%;
  height: 4px;
  background: var(--clr-border);
  border-radius: 2px;
  margin-bottom: 18px;
  overflow: hidden;
}
.ob-quiz-fill {
  height: 100%;
  background: var(--clr-primary);
  border-radius: 2px;
  width: 0%;
  transition: width 0.35s ease;
}
.ob-quiz-q {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 14px;
  line-height: 1.45;
}
.ob-quiz-opts {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
  width: 100%;
}
.ob-opt-btn {
  width: 100%;
  text-align: left;
  padding: 9px 13px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--clr-surface);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--clr-text);
  transition: border-color 0.15s, background 0.15s;
}
.ob-opt-btn:hover:not(:disabled) {
  border-color: var(--clr-primary);
  background: var(--clr-primary-light);
}
.ob-opt-btn--correct {
  border-color: var(--clr-success) !important;
  background: var(--clr-success-light) !important;
  color: var(--clr-success) !important;
  font-weight: 700 !important;
}
.ob-opt-btn--wrong {
  border-color: var(--clr-danger) !important;
  background: var(--clr-danger-light) !important;
  color: var(--clr-danger) !important;
}
.ob-quiz-skip {
  font-size: 0.75rem;
  color: var(--clr-text-muted);
  align-self: center;
  padding: 4px 0;
  margin-bottom: 0;
}
.ob-quiz-manual { width: 100%; }
.ob-quiz-manual-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  margin-bottom: 10px;
  text-align: center;
}
.ob-manual-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  margin-bottom: 7px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--clr-surface);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--clr-text);
  transition: border-color 0.15s, background 0.15s;
}
.ob-manual-btn:hover {
  border-color: var(--clr-primary);
  background: var(--clr-primary-light);
}

/* ---- Result badge (Step 2) ---- */
.ob-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
  font-size: 0.88rem;
  font-weight: 700;
  align-self: center;
}

/* ---- Route display ---- */
.ob-route {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  margin-bottom: 20px;
}

.ob-route-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--clr-surface);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-lg);
  text-align: left;
}

.ob-route-num {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background: var(--clr-primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ob-route-emoji { font-size: 1.2rem; line-height: 1; }

.ob-route-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ob-route-info strong {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--clr-text);
}

.ob-route-info span {
  font-size: 0.75rem;
  color: var(--clr-text-muted);
  font-weight: 500;
}

.ob-route-arrow {
  text-align: center;
  font-size: 1rem;
  color: var(--clr-border);
  padding: 2px 0;
  line-height: 1.2;
}

.ob-cta { width: 100%; }

/* ---- Mobile ---- */
@media (max-width: 480px) {
  .ob-inner { padding: 24px 20px 22px; }
  .ob-title { font-size: 1.05rem; }
}

/* ======================================================
   Pair Picker (first-visit language selection)
   ====================================================== */

.lp-picker-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 20px;
}

.lp-picker-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-md);
  background: var(--clr-card);
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  color: var(--clr-text);
  transition: border-color 0.15s, box-shadow 0.15s;
  text-align: left;
}

.lp-picker-card:hover,
.lp-picker-card:focus-visible {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

.lp-picker-card--suggested {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.lp-picker-card__arrow {
  font-size: 1.1rem;
  color: var(--clr-border);
  flex-shrink: 0;
}

.lp-picker-card__label {
  flex: 1;
  font-weight: 600;
}
