:root {
  --background: oklch(0.12 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.16 0 0);
  --card-foreground: oklch(0.985 0 0);
  --muted: oklch(0.21 0 0);
  /* Bumped 0.6 → 0.7 so text on the dark background clears WCAG AA's
     4.5:1 contrast minimum (~5.0:1 now vs ~4.17:1 before). */
  --muted-foreground: oklch(0.7 0 0);
  --primary: oklch(0.637 0.237 25.331);
  --primary-foreground: oklch(1 0 0);
  --accent: oklch(0.752 0.137 196);
  --accent-foreground: oklch(0.12 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --success: oklch(0.79 0.18 149);
  --warning: oklch(0.81 0.16 78);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.637 0.237 25.331);
  --radius: 0.625rem;
  --max-width: 80rem;
  --font-sans: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", monospace;

  --track-foundations: oklch(0.72 0.17 155);
  --track-knowledge: oklch(0.72 0.14 196);
  --track-multimodal: oklch(0.70 0.16 300);
  --track-agents: oklch(0.70 0.19 25);

  /* Unified card system — every card-class shares this padding/radius/border */
  --card-padding: 1.5rem;
  --card-padding-tight: 1.15rem;
  --card-radius: 0.75rem;
  --card-radius-sm: 0.5rem;
  --card-shadow: 0 0 0 1px oklch(from var(--foreground) l c h / 10%);
}

/* ── Light theme ── */
[data-theme="light"] {
  --background: oklch(0.97 0 0);
  --foreground: oklch(0.15 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.15 0 0);
  --muted: oklch(0.93 0 0);
  /* Bumped 0.45 → 0.40 so text on the light background clears WCAG AA */
  --muted-foreground: oklch(0.40 0 0);
  --primary: oklch(0.55 0.237 25.331);
  --primary-foreground: oklch(1 0 0);
  --accent: oklch(0.55 0.137 196);
  --accent-foreground: oklch(1 0 0);
  --destructive: oklch(0.50 0.245 27.325);
  --success: oklch(0.55 0.18 149);
  --warning: oklch(0.60 0.16 78);
  --border: oklch(0 0 0 / 10%);
  --input: oklch(0 0 0 / 8%);
  --ring: oklch(0.55 0.237 25.331);
  --track-foundations: oklch(0.48 0.17 155);
  --track-knowledge: oklch(0.48 0.14 196);
  --track-multimodal: oklch(0.48 0.16 300);
  --track-agents: oklch(0.50 0.19 25);
  color-scheme: light;
}

[data-theme="light"] body {
  background:
    radial-gradient(circle at top, oklch(0.55 0.237 25.331 / 6%), transparent 30%),
    radial-gradient(circle at 100% 0%, oklch(0.55 0.137 196 / 6%), transparent 26%),
    var(--background);
}

[data-theme="light"] .surface-card {
  box-shadow: 0 1px 3px oklch(0 0 0 / 8%);
  border: 1px solid oklch(0 0 0 / 12%);
}

[data-theme="light"] .curriculum-lab-card,
[data-theme="light"] .curriculum-track {
  background: var(--card);
  border: 1px solid oklch(0 0 0 / 10%);
}

[data-theme="light"] .training-stat-card {
  border: 1px solid oklch(0 0 0 / 10%);
  background: oklch(0.97 0 0);
}

[data-theme="light"] .cur-reader-content {
  color: oklch(0.25 0 0);
}

[data-theme="light"] .stat-prefix {
  color: var(--primary);
}

[data-theme="light"] .page-shell::before {
  display: none;
}

/*
  ── Breakpoint system ──
  Three canonical breakpoints. Prefer these for new rules:
    --bp-tablet : 1024px   // desktop -> tablet
    --bp-mobile :  768px   // tablet  -> mobile (also triggers mobile drawer)
    --bp-small  :  480px   // mobile  -> compact
  Existing 1080/860/640 queries are being migrated to 1024/768/480 over time.
*/

* {
  box-sizing: border-box;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 0.35rem;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--foreground);
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at top, oklch(0.637 0.237 25.331 / 8%), transparent 30%),
    radial-gradient(circle at 100% 0%, oklch(0.752 0.137 196 / 8%), transparent 26%),
    var(--background);
}

@media (prefers-reduced-motion: no-preference) {
  .page-shell::before {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(
      ellipse at 30% 20%,
      oklch(0.637 0.237 25.331 / 4%) 0%,
      transparent 50%
    );
    animation: ambientDrift 20s ease-in-out infinite alternate;
  }

  @keyframes ambientDrift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(5%, 8%); }
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
}

.page-container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4rem;
  margin-bottom: 0;
  padding: 0 1.5rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: oklch(from var(--background) l c h / 80%);
  border-bottom: 1px solid oklch(from var(--border) l c h / 60%);
}

@supports not (color: oklch(from white l c h)) {
  .portal-topbar { background: rgba(17, 18, 20, 0.9); }
}

[data-theme="light"] .portal-topbar {
  background: rgba(255, 255, 255, 0.9);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.5rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 140ms ease, background 140ms ease;
  white-space: nowrap;
}

.topbar-link:hover {
  color: var(--foreground);
  background: var(--muted);
}

.topbar-link-active {
  position: relative;
  color: var(--foreground);
  background: transparent;
}

.topbar-link-active::after {
  content: "";
  position: absolute;
  bottom: -0.45rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1.25rem;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
}

#top-login-link {
  margin-left: 0.25rem;
}

/* Sign Out lives next to the Sign In CTA in the topbar (#top-signout-link).
   Same shape as the outline button, but with danger-tinted border + hover so
   it reads as "sign out" without being shouty. */
#top-signout-link {
  margin-left: 0.25rem;
  font-family: inherit;
}
.button-danger-outline {
  color: var(--muted-foreground);
  border-color: var(--border) !important;
  background: transparent;
}
.button-danger-outline:hover,
.button-danger-outline:focus-visible {
  color: var(--danger, #ef4444);
  border-color: var(--danger, #ef4444) !important;
  background: color-mix(in oklab, var(--danger, #ef4444) 8%, transparent);
}

/* Mobile hamburger menu */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--foreground);
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: auto;
}

.mobile-drawer {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--background);
  padding: 1.5rem;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .mobile-drawer.open {
    display: flex !important;
  }
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.mobile-drawer-close {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--foreground);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-drawer .topbar-link {
  font-size: 1.1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  width: 100%;
}

.mobile-theme-toggle {
  display: none;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.75rem;
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--foreground);
  font: inherit;
  cursor: pointer;
}

.mobile-theme-toggle .theme-toggle-icon {
  font-size: 1.2rem;
}

.mobile-theme-toggle-label {
  font-size: 1rem;
}

@media (max-width: 768px) {
  .mobile-drawer.open .mobile-theme-toggle {
    display: inline-flex;
  }
}

@media (max-width: 768px) {
  .topbar-nav { display: none; }
  .theme-toggle { display: none; }
  #top-login-link { display: none; }
  .mobile-menu-toggle { display: flex; }
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-foreground);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--muted);
  color: var(--foreground);
}

/* Theme toggle SVG icons — show only the relevant one based on theme.
   Sun shows in dark mode (the active state), moon shows in light mode. */
.theme-icon {
  width: 1.05rem;
  height: 1.05rem;
}
.mobile-theme-toggle .theme-icon {
  width: 1.2rem;
  height: 1.2rem;
}
:root[data-theme="dark"] .theme-icon-moon { display: none; }
:root[data-theme="light"] .theme-icon-sun { display: none; }
:root:not([data-theme="light"]) .theme-icon-moon { display: none; } /* default = dark */

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  color: var(--primary);
}

.brand-icon img,
.brand-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-subtle,
.section-label {
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/*
  Section-label cursor blink retired (Tier 2 uplift). Kept the
  ::after empty so existing markup that depends on the selector
  doesn't error, but no glyph is rendered.
*/
.section-label::after { content: none; }

.dashboard-title:hover {
  animation: textGlitch 0.3s ease-in-out;
}

@keyframes textGlitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(2px, -1px); }
  60% { transform: translate(-1px, -1px); }
  80% { transform: translate(1px, 1px); }
}

.page-content {
  padding-top: 1.5rem;
  padding-bottom: 4rem;
}

.hero-section,
.summary-grid,
.content-grid {
  display: grid;
  gap: 1.25rem;
}

.hero-section {
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  align-items: stretch;
}

.hero-section-guest {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.82fr);
}

/* Hero in single-centered-column mode (no right-side card). */
.hero-section-centered {
  grid-template-columns: 1fr;
  padding: 5rem 2rem 4.5rem;
  text-align: center;
}

.hero-copy-centered {
  max-width: 56rem;
  margin: 0 auto;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.hero-copy-centered h1 {
  margin-left: auto;
  margin-right: auto;
}

.hero-copy-centered p {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-copy-centered .hero-actions,
.hero-copy-centered .hero-meta {
  justify-content: center;
}

.hero-copy-centered .hero-scroll-indicator {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  .hero-section-centered {
    padding: 3rem 1rem 3.5rem;
  }
}

.hero-copy,
.surface-card {
  border-radius: var(--card-radius);
  border: none;
  background: var(--card);
  box-shadow: var(--card-shadow);
}

/* Fallback for browsers without oklch relative color syntax */
@supports not (color: oklch(from white l c h)) {
  .surface-card {
    border: 1px solid var(--border);
    box-shadow: none;
  }
}

.hero-copy {
  padding: 2rem;
}

.hero-copy-guest {
  display: grid;
  align-content: start;
  gap: 0.9rem;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, oklch(0.637 0.237 25.331 / 12%), transparent 38%),
    linear-gradient(180deg, oklch(1 0 0 / 2%), transparent 42%),
    var(--card);
}

/* Decorative drifting dot grid behind the hero copy. Pure CSS, GPU-friendly. */
.hero-copy-guest::before {
  content: "";
  position: absolute;
  inset: -2rem;
  pointer-events: none;
  background-image:
    radial-gradient(oklch(0.637 0.237 25.331 / 0.10) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, black 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, black 30%, transparent 80%);
  animation: heroGridDrift 24s linear infinite;
  z-index: 0;
}

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

@keyframes heroGridDrift {
  from { background-position: 0 0; }
  to   { background-position: 22px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy-guest::before { animation: none; }
}

/* ── Hero scroll indicator ── */
.hero-scroll-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  opacity: 0.85;
  transition: opacity 280ms ease, transform 280ms ease;
}

.hero-scroll-indicator.is-faded {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.hero-scroll-line {
  position: relative;
  display: inline-block;
  width: 1px;
  height: 2.4rem;
  background: linear-gradient(180deg, oklch(1 0 0 / 18%), transparent 90%);
  overflow: hidden;
}

.hero-scroll-blob {
  position: absolute;
  top: -30%;
  left: 50%;
  width: 4px;
  height: 30%;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 8px oklch(0.637 0.237 25.331 / 0.7);
  transform: translate(-50%, 0);
  animation: scrollBlobTravel 1.8s cubic-bezier(0.55, 0.06, 0.45, 0.94) infinite;
}

@keyframes scrollBlobTravel {
  0%   { top: -30%; opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-blob { animation: none; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid oklch(0.637 0.237 25.331 / 20%);
  background: oklch(0.637 0.237 25.331 / 10%);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 1rem 0 0.75rem;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-copy-guest h1 {
  max-width: 22ch;
  margin: 0.2rem 0 0.25rem;
  font-size: clamp(2.6rem, 4.4vw, 4.2rem);
}

.hero-copy p {
  max-width: 36rem;
  color: var(--muted-foreground);
  font-size: 1.02rem;
  line-height: 1.7;
}

.steps-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.guest-preview-card {
  display: grid;
  gap: 1.1rem;
}

.guest-preview-list {
  display: grid;
  gap: 0.8rem;
}

.guest-preview-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0.85rem 0.95rem;
  border-radius: 0.95rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2.5%);
}

.guest-preview-index {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.guest-preview-item strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.97rem;
}

.guest-preview-item p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.92rem;
  line-height: 1.55;
}

.guest-preview-foot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.guest-preview-metric {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 0.95rem;
  border-radius: 0.95rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2%);
}

.guest-preview-metric strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.intro-step-list {
  display: grid;
  gap: 0.95rem;
}

.intro-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: var(--muted);
}

.intro-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid oklch(0.637 0.237 25.331 / 22%);
  background: oklch(0.637 0.237 25.331 / 10%);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.intro-step strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.96rem;
}

.intro-step p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.92rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.hero-copy-guest .hero-meta {
  margin-top: 0.5rem;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 0.86rem;
}

.surface-card {
  padding: var(--card-padding);
}

.section-copy-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.surface-title {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  margin-top: 1.25rem;
}

.member-dashboard {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.dashboard-hero-card {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem;
  background:
    radial-gradient(circle at top left, oklch(0.637 0.237 25.331 / 10%), transparent 30%),
    linear-gradient(180deg, oklch(1 0 0 / 2%), transparent 42%),
    var(--card);
}

.dashboard-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.dashboard-copy {
  max-width: 52rem;
  margin-bottom: 0;
}

.dashboard-actions {
  align-items: center;
  justify-content: flex-start;
}

.summary-grid > .surface-card {
  height: auto;
}


.training-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
}

.training-stat-card {
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1.05rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2.5%);
}

.training-stat-card-primary {
  background:
    radial-gradient(circle at top left, oklch(0.637 0.237 25.331 / 14%), transparent 60%),
    oklch(1 0 0 / 2.5%);
  border-color: oklch(0.637 0.237 25.331 / 18%);
}

.training-stat-label {
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.training-stat-card strong {
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.training-stat-card p {
  margin: 0;
  color: var(--muted-foreground);
  line-height: 1.55;
}

.stat-prefix {
  color: var(--primary);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.7em;
  margin-right: 0.1em;
}

.training-stat-card-primary {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.training-stat-card-primary strong {
  font-size: 2.5rem;
}

.training-stat-card-streak {
  border-color: oklch(0.637 0.237 25.331 / 22%);
  background:
    radial-gradient(circle at bottom right, oklch(0.637 0.237 25.331 / 10%), transparent 60%),
    oklch(1 0 0 / 2.5%);
}

.milestone-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  border: 1px solid oklch(0.637 0.237 25.331 / 22%);
  background:
    radial-gradient(circle at left, oklch(0.637 0.237 25.331 / 12%), transparent 60%),
    oklch(1 0 0 / 3%);
}

.milestone-label {
  display: block;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.milestone-copy {
  margin: 0.2rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.9rem;
  line-height: 1.5;
}

.radar-chart-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.6rem;
  justify-items: center;
  padding: 1.25rem;
  border-color: oklch(0.637 0.237 25.331 / 14%);
  background:
    radial-gradient(circle at center, oklch(0.637 0.237 25.331 / 6%), transparent 60%),
    oklch(1 0 0 / 2.5%);
}

#skill-radar-canvas {
  display: block;
  margin: 0 auto;
  max-width: 400px;
  aspect-ratio: 1;
}

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

body[data-routed] .page-view:not(.hidden),
body[data-routed] #member-dashboard:not(.hidden),
body[data-routed] #guest-landing:not(.hidden),
body[data-routed] #labs:not(.hidden),
body[data-routed] #launch-status-panel:not(.hidden) {
  animation: pageFadeIn 200ms ease-out;
}

/* ── Member dashboard stack ── */
.member-dashboard-stack {
  display: grid;
  gap: 1.25rem;
}
.member-section-card {
  scroll-margin-top: 5.5rem;
}

.dashboard-activity-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.dashboard-activity-row:last-child {
  border-bottom: none;
}

.dashboard-activity-lab {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-activity-status {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.activity-flag {
  background: oklch(0.79 0.18 149 / 12%);
  color: oklch(0.79 0.18 149);
}

.activity-played {
  background: oklch(0.75 0.12 250 / 12%);
  color: oklch(0.75 0.12 250);
}

.dashboard-quick-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.dashboard-plan-pill {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.5rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2%);
  margin-right: auto;
}

.dashboard-runtime-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.dashboard-runtime-row:last-child {
  border-bottom: none;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.status-tile {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
}

.status-tile strong {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.launch-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.25rem;
}

.launch-panel[data-state="launching"] {
  border-color: oklch(0.637 0.237 25.331 / 18%);
}

.launch-panel[data-state="ready"] {
  border-color: oklch(0.79 0.18 149 / 22%);
}

.launch-panel[data-state="error"] {
  border-color: oklch(0.577 0.245 27.325 / 24%);
}

.launch-status-copy {
  margin: 0;
}

.launch-progress-track {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 0.75rem;
  border-radius: 999px;
  background: var(--muted);
}

.launch-progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    oklch(0.637 0.237 25.331),
    oklch(0.752 0.137 196)
  );
  transition: width 220ms ease;
}

.launch-panel[data-state="ready"] .launch-progress-bar {
  background: linear-gradient(
    90deg,
    oklch(0.79 0.18 149),
    oklch(0.752 0.137 196)
  );
}

.launch-panel[data-state="error"] .launch-progress-bar {
  background: linear-gradient(
    90deg,
    oklch(0.577 0.245 27.325),
    oklch(0.81 0.16 78)
  );
}

.launch-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted-foreground);
  font-size: 0.92rem;
}

.launch-progress-meta span:last-child {
  font-family: var(--font-mono);
}

.launch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.content-grid {
  grid-template-columns: minmax(320px, 0.88fr) minmax(0, 1.12fr);
  margin-top: 1.25rem;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.section-copy {
  margin: 0.85rem 0 1.25rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.stack {
  display: flex;
  flex-direction: column;
}

.gap-md {
  gap: 0.9rem;
}

.gap-lg {
  gap: 1.25rem;
}

.hidden {
  display: none !important;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 2.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease,
    transform 140ms ease;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.button-small {
  min-height: 2rem;
  padding: 0.375rem 0.625rem;
  font-size: 0.8rem;
  border-radius: 0.375rem;
}

/*
  Button system — three core variants (primary, outline, ghost) plus
  two semantic ones (danger, launch). Flat colors matching the
  shadcn-style buttons on kagex.ai. Old gradient + heavy glow
  treatment removed; subtle hover lift only.
*/

.button-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  box-shadow: 0 1px 2px oklch(0 0 0 / 20%);
}

.button-primary:hover:not(:disabled) {
  background: oklch(from var(--primary) calc(l + 0.04) c h);
  box-shadow: 0 4px 12px oklch(from var(--primary) l c h / 28%);
}

@supports not (color: oklch(from white l c h)) {
  .button-primary:hover:not(:disabled) { filter: brightness(1.08); }
}

.button-outline,
.button-secondary {
  border-color: var(--border);
  background: transparent;
  color: var(--foreground);
}

.button-outline:hover,
.button-secondary:hover {
  background: var(--muted);
  border-color: oklch(from var(--foreground) l c h / 18%);
}

.button-ghost {
  background: transparent;
  color: var(--muted-foreground);
  border-color: transparent;
}

.button-ghost:hover {
  background: var(--muted);
  color: var(--foreground);
}

/* Legacy alias — keep so existing markup doesn't break */
.button-tertiary {
  border-color: var(--border);
  background: transparent;
  color: var(--accent);
}

.button-danger {
  border-color: oklch(0.55 0.16 20 / 25%);
  background: oklch(0.55 0.16 20 / 8%);
  color: oklch(0.78 0.10 20);
}

.button-danger:hover:not(:disabled) {
  background: oklch(0.55 0.16 20 / 14%);
  border-color: oklch(0.55 0.16 20 / 35%);
}

/*
  Launch is the lab-start CTA. It's the strongest button on the
  page (red, with a play-icon) but no longer mono-uppercase or
  glowing — it inherits primary styling and just adds the icon.
*/
.button-launch {
  position: relative;
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  box-shadow: 0 1px 2px oklch(0 0 0 / 20%);
}

.button-launch::before {
  content: "\25B6";
  font-size: 0.75em;
  margin-right: 0.4em;
  opacity: 0.95;
}

.button-launch:hover:not(:disabled) {
  background: oklch(from var(--primary) calc(l + 0.04) c h);
  box-shadow: 0 4px 12px oklch(from var(--primary) l c h / 28%);
}

.button-launch:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.button-launch[data-launching="true"] {
  animation: launchPulse 1.5s ease-in-out infinite;
  pointer-events: none;
}

.button-launch[data-launching="true"]::before {
  content: "\25C9";
  animation: launchDot 1s linear infinite;
}

@keyframes launchPulse {
  0%, 100% { box-shadow: 0 0 0 1px oklch(0.637 0.237 25.331 / 15%), 0 4px 16px oklch(0.637 0.237 25.331 / 20%); }
  50% { box-shadow: 0 0 0 4px oklch(0.637 0.237 25.331 / 10%), 0 8px 32px oklch(0.637 0.237 25.331 / 35%); }
}

@keyframes launchDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.button-launch-open {
  position: relative;
  background: var(--success);
  color: oklch(0.12 0 0);
  border-color: var(--success);
  box-shadow: 0 1px 2px oklch(0 0 0 / 20%);
}

.button-launch-open::before {
  content: "\2197";
  font-size: 0.85em;
  margin-right: 0.35em;
  opacity: 0.95;
}

.button-launch-open:hover:not(:disabled) {
  background: oklch(from var(--success) calc(l + 0.04) c h);
  box-shadow: 0 4px 12px oklch(from var(--success) l c h / 28%);
}

.full-width {
  width: 100%;
}

.inline-link {
  color: var(--accent);
  font-size: 0.92rem;
}

.inline-link:hover {
  text-decoration: underline;
}

.tab-row {
  display: inline-flex;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--muted);
}

.tab-button {
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

.tab-button.active {
  background: var(--card);
  color: var(--foreground);
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  color: var(--muted-foreground);
  font-size: 0.92rem;
}

.field-hint {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.9rem;
  line-height: 1.6;
}

.auth-email-actions {
  display: grid;
  gap: 0.75rem;
}

.field input {
  width: 100%;
  min-height: 2.8rem;
  padding: 0.8rem 0.95rem;
  border-radius: 0.75rem;
  border: 1px solid var(--input);
  background: var(--background);
  color: var(--foreground);
}

.field input:focus {
  outline: 2px solid oklch(0.637 0.237 25.331 / 25%);
  border-color: oklch(0.637 0.237 25.331 / 30%);
}

.field input[readonly] {
  opacity: 0.8;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-option-card,
.auth-note {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--muted);
}

.auth-option-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.auth-note {
  padding: 0.95rem 1rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.google-button-host {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 44px;
}

/* ── Auth page redesign ── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2.5rem 2rem;
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  background: var(--card);
}

.auth-lock-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: oklch(0.637 0.237 25.331 / 10%);
  color: var(--primary);
}

.auth-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: var(--muted-foreground);
  text-align: center;
  margin: -0.5rem 0 0;
}

.auth-guest-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}

.auth-oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  border-radius: 0.7rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.auth-oauth-btn:hover {
  background: oklch(1 0 0 / 5%);
  border-color: oklch(1 0 0 / 20%);
}

.auth-oauth-btn svg {
  flex-shrink: 0;
}

.auth-email-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.auth-email-input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.95rem;
  border-radius: 0.7rem;
  border: 1px solid var(--input);
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.auth-email-input:focus {
  outline: 2px solid oklch(0.637 0.237 25.331 / 25%);
  border-color: oklch(0.637 0.237 25.331 / 30%);
}

.auth-email-input::placeholder {
  color: var(--muted-foreground);
  opacity: 0.6;
}

.auth-email-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

/* Was an underline text-link; promoted to a real outline button so
   "Use a one-time code instead" and "Back" feel like primary actions
   in the auth flow rather than fine-print disclaimers. */
.auth-otp-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  min-height: 2.4rem;
  width: 100%;
}

.auth-otp-link:hover {
  background: oklch(1 0 0 / 4%);
  color: var(--foreground);
  border-color: oklch(1 0 0 / 14%);
}

.auth-otp-link:focus-visible {
  outline: 2px solid oklch(0.637 0.237 25.331 / 35%);
  outline-offset: 2px;
}

.auth-otp-input {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.95rem;
  border-radius: 0.7rem;
  border: 1px solid var(--input);
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 1.6rem;
  letter-spacing: 0.4em;
  text-align: center;
}

.auth-otp-input:focus {
  outline: 2px solid oklch(0.637 0.237 25.331 / 25%);
  border-color: oklch(0.637 0.237 25.331 / 30%);
}

.auth-otp-hint {
  font-size: 0.82rem;
  color: var(--muted-foreground);
  text-align: center;
  margin: 0;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 1.5rem 1.25rem;
  }
}

.account-card,
.subscription-card,
.session-card,
.plan-card,
.lab-card,
.empty-state {
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2.5%);
}

.account-card,
.subscription-card,
.session-card,
.empty-state {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: var(--card-padding-tight);
}

.empty-state {
  align-items: flex-start;
  text-align: left;
}

.empty-state strong {
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.empty-state p,
.empty-state .muted-copy {
  color: var(--muted-foreground);
  font-size: 0.92rem;
  line-height: 1.55;
}

.account-email {
  font-size: 1.1rem;
  font-weight: 700;
}

.account-identity {
  display: grid;
  gap: 0.8rem;
}

.profile-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.95rem;
}

.profile-meta-grid-compact {
  margin-top: 0;
}

.profile-meta-card,
.progress-meta-card {
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem 0.9rem;
  border-radius: 0.95rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2.5%);
}

.profile-meta-card strong,
.progress-meta-card strong {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.progress-card {
  height: 100%;
}

.progress-head,
.training-section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.progress-value {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.progress-value span {
  color: var(--muted-foreground);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.progress-track {
  position: relative;
  overflow: visible;
  height: 0.8rem;
  border-radius: 999px;
  background: var(--muted);
}

.progress-milestone {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  border: 2px solid var(--card);
  z-index: 2;
  background: var(--muted);
}

.progress-milestone[data-reached="true"] {
  background: var(--primary);
  box-shadow: 0 0 8px oklch(0.637 0.237 25.331 / 40%);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    oklch(0.637 0.237 25.331),
    oklch(0.752 0.137 196)
  );
  transition: width 0.4s ease;
}

.progress-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.training-progress-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.training-focus-pill {
  display: grid;
  gap: 0.2rem;
  min-width: 12rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid oklch(0.752 0.137 196 / 18%);
  background: oklch(0.752 0.137 196 / 10%);
}

.training-focus-pill strong {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.training-recent-block {
  display: grid;
  gap: 0.8rem;
}

.training-subsection-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.training-subtitle {
  margin: 0.1rem 0 0;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.training-meta-note {
  color: var(--muted-foreground);
  font-size: 0.88rem;
}

.recent-session-list {
  display: grid;
  gap: 0.75rem;
}

.recent-session-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.9rem;
  border-radius: 0.95rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2%);
}

.recent-session-row strong {
  display: block;
  font-size: 0.96rem;
}

.empty-inline-state {
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2%);
}

.empty-inline-state strong {
  display: block;
  margin-bottom: 0.35rem;
}

.progress-footnote {
  font-size: 0.9rem;
}

.muted-copy,
.lab-description,
.session-meta,
.sub-meta {
  color: var(--muted-foreground);
  line-height: 1.7;
}

.sub-badge,
.lab-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-active,
.sub-active {
  color: var(--success);
  background: oklch(0.79 0.18 149 / 12%);
}

.status-none,
.sub-none,
.status-stopping {
  color: var(--warning);
  background: oklch(0.81 0.16 78 / 12%);
}

.status-error {
  color: oklch(0.78 0.18 24);
  background: oklch(0.577 0.245 27.325 / 12%);
}

.plan-grid,
.lab-grid {
  display: grid;
  gap: 1rem;
}

.plan-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lab-grid {
  grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
}

/* ── Lab catalog header ── */
.labs-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.labs-page-subtitle {
  margin: 0.35rem 0 0;
  max-width: 44rem;
  color: var(--muted-foreground);
}

.labs-page-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2%);
  min-width: 18rem;
}

.labs-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}

.labs-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--primary);
}

.labs-stat-total {
  color: var(--muted-foreground);
  font-size: 0.95rem;
  font-weight: 500;
  margin-left: 0.1rem;
}

.labs-stat-label {
  font-size: 0.74rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.labs-stat-divider {
  width: 1px;
  height: 2rem;
  background: var(--border);
}

.labs-stat-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 7rem;
}

.labs-stat-pct {
  font-size: 0.78rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  align-self: flex-end;
}

@media (max-width: 720px) {
  .labs-page-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .labs-page-stats {
    min-width: 0;
  }
}

/* ── Lab filter bar ── */
.lab-filter-bar {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem;
  border-radius: 0.75rem;
  background: oklch(1 0 0 / 2%);
  border: 1px solid var(--border);
}

.lab-search-input {
  width: 100%;
  min-height: 2.8rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.lab-search-input::placeholder {
  color: var(--muted-foreground);
}

.lab-search-input:focus {
  outline: none;
  border-color: oklch(0.637 0.237 25.331 / 50%);
  box-shadow: 0 0 0 4px oklch(0.637 0.237 25.331 / 18%);
}

.lab-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 140ms ease;
}

.filter-chip:hover {
  background: var(--muted);
  color: var(--foreground);
}

.filter-chip-active {
  background: oklch(0.637 0.237 25.331 / 14%);
  border-color: oklch(0.637 0.237 25.331 / 25%);
  color: var(--primary);
}

.filter-chip-pulse {
  animation: filterChipPulse 360ms ease-out;
}

@keyframes filterChipPulse {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 oklch(0.637 0.237 25.331 / 0.45); }
  40%  { transform: scale(1.06); box-shadow: 0 0 0 4px oklch(0.637 0.237 25.331 / 0.18); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 oklch(0.637 0.237 25.331 / 0); }
}

/* ── Lab completion badge ── */
.lab-completed-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid oklch(0.79 0.18 149 / 22%);
  background: oklch(0.79 0.18 149 / 12%);
  color: oklch(0.79 0.18 149);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.button-complete {
  border-color: oklch(0.79 0.18 149 / 25%);
  background: oklch(0.79 0.18 149 / 10%);
  color: oklch(0.79 0.18 149);
}

.button-complete:hover {
  background: oklch(0.79 0.18 149 / 18%);
}

/* ── Onboarding ── */
.onboarding-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 0;
  display: grid;
  gap: 2rem;
}

.onboarding-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0.3rem 0 0;
}

.onboarding-steps {
  display: grid;
  gap: 1rem;
}

.onboarding-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.15rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
}

.onboarding-step-number {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
}

.onboarding-step strong {
  display: block;
  margin-bottom: 0.25rem;
}

.onboarding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ── Profile page v2 ───────────────────────────────────────────────────── */
.profile-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Hero card: avatar + name + email + plan + joined */
.profile-hero {
  padding: 1.75rem;
  background:
    radial-gradient(circle at 0% 0%, color-mix(in oklab, var(--primary) 14%, transparent) 0%, transparent 55%),
    var(--card);
}
.profile-hero-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.profile-hero-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), color-mix(in oklab, var(--primary) 60%, #f97316));
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.profile-hero-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.profile-hero-name {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--foreground);
}
.profile-hero-email {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted-foreground);
}
.profile-hero-meta {
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.profile-hero-meta-sep {
  color: var(--muted-foreground);
  opacity: 0.5;
}

/* 4-up stat strip */
.profile-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.profile-stat-card {
  padding: 1.1rem 1.2rem;
  border-radius: var(--card-radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 160ms ease, transform 160ms ease;
}
.profile-stat-card:hover {
  border-color: color-mix(in oklab, var(--primary) 35%, var(--border));
  transform: translateY(-1px);
}
.profile-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--muted-foreground);
}
.profile-stat-value {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
}
.profile-stat-value small {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

/* Skill breakdown — bigger bars, clearer hierarchy */
.profile-skill-bars {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.profile-skill-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.profile-skill-info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.9rem;
}
.profile-skill-name { font-weight: 600; }
.profile-skill-track {
  height: 0.5rem !important;
}

/* Account section: edit name | manage plan | sign out */
.profile-account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.profile-account-block {
  padding: 1rem 1.1rem;
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 1.5%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.profile-account-hint {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
}
.profile-account-block .button {
  align-self: flex-start;
  margin-top: 0.25rem;
}
.profile-account-danger {
  border-color: color-mix(in oklab, var(--danger, #ef4444) 28%, var(--border));
}

/* Completions + Certificates side-by-side; collapse on narrow */
.profile-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.25rem;
}
@media (max-width: 980px) {
  .profile-history-row { grid-template-columns: 1fr; }
}

/* Completion timeline */
.profile-completion-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 28rem;
  overflow-y: auto;
}
.profile-completion-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: var(--card);
}
.profile-completion-marker {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: color-mix(in oklab, var(--success, #16a34a) 16%, transparent);
  color: var(--success, #16a34a);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0.9rem;
}
.profile-completion-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.profile-completion-row-1 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.profile-completion-row-1 strong {
  font-size: 0.92rem;
}
.profile-completion-track {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--primary) 12%, transparent);
  color: var(--primary);
  white-space: nowrap;
}
.profile-completion-empty {
  text-align: center;
  padding: 1.75rem 1rem;
}

/* Mobile collapses */
@media (max-width: 720px) {
  .profile-stat-strip { grid-template-columns: repeat(2, 1fr); }
  .profile-hero { padding: 1.25rem; }
  .profile-hero-avatar { width: 3.25rem; height: 3.25rem; font-size: 1.15rem; }
  .profile-hero-name { font-size: 1.25rem; }
}

/* ── Legacy profile layout (kept for any remaining callers) ── */
.profile-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
  gap: 1.25rem;
  max-width: 64rem;
  margin: 0 auto;
}

.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 5rem;
  align-self: start;
}

.profile-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.profile-identity-card {
  padding: 1.5rem;
}

@media (max-width: 880px) {
  .profile-page-layout {
    grid-template-columns: 1fr;
  }
  .profile-sidebar {
    position: static;
  }
}

/* ── Leaderboard table ── */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.leaderboard-table th {
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leaderboard-table td {
  font-size: 0.92rem;
}

.leaderboard-rank {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--primary);
  min-width: 2.5rem;
}

.leaderboard-rank-1 { color: oklch(0.81 0.16 78); }
.leaderboard-rank-2 { color: oklch(0.7 0.05 0); }
.leaderboard-rank-3 { color: oklch(0.65 0.12 55); }

.leaderboard-username {
  font-weight: 600;
}

.leaderboard-self {
  background: oklch(0.637 0.237 25.331 / 6%);
}

.leaderboard-self-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid oklch(0.637 0.237 25.331 / 20%);
  background: oklch(0.637 0.237 25.331 / 6%);
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  color: var(--foreground);
}

.leaderboard-you-badge {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
}

/* ── Leaderboard podium ── */
.leaderboard-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 0 1rem;
}

.podium-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 6rem;
}

.podium-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--muted);
  border: 2px solid var(--border);
  color: var(--foreground);
}

.podium-slot-1 .podium-avatar {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1rem;
}

.podium-name {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-labs {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
}

.podium-bar {
  width: 100%;
  border-radius: 0.5rem 0.5rem 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.5rem;
  min-width: 5rem;
}

.podium-rank {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--background);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 480px) {
  .leaderboard-podium {
    gap: 0.5rem;
  }
  .podium-slot {
    min-width: 4.5rem;
  }
}

/* ── Profile page ── */
.profile-identity-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 0.5rem 0 1rem;
}

.profile-signout-btn {
  width: 100%;
  color: var(--muted-foreground);
  margin-top: 0.5rem;
}

.profile-signout-btn:hover {
  color: oklch(0.75 0.12 20);
  background: oklch(0.75 0.12 20 / 10%);
}

.profile-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  background: oklch(0.637 0.237 25.331 / 12%);
  color: var(--primary);
  border: 2px solid oklch(0.637 0.237 25.331 / 20%);
  flex-shrink: 0;
}

.profile-avatar-lg {
  width: 5rem;
  height: 5rem;
  font-size: 1.6rem;
}

.profile-identity {
  display: grid;
  gap: 0.2rem;
}

.profile-display-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.profile-email {
  font-size: 0.84rem;
  margin: 0;
  word-break: break-all;
}

.profile-meta-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.profile-edit-section {
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.45rem;
}

.profile-edit-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
}

.profile-edit-input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  color: var(--foreground);
  font-size: 0.92rem;
  font-family: inherit;
}

.profile-edit-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px oklch(0.637 0.237 25.331 / 15%);
}

.profile-plan-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  margin: 0.25rem 0;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2%);
}

.profile-plan-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.profile-skill-section {
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

.profile-skill-bars {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 760px) {
  .profile-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.profile-skill-row {
  display: grid;
  gap: 0.3rem;
}

.profile-skill-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
}

@media (max-width: 640px) {
  .profile-stats-grid {
    grid-template-columns: 1fr;
  }
  .profile-edit-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ── Certificate card ── */
.cert-card {
  display: grid;
  gap: 0.85rem;
  padding: 1.15rem;
  border-radius: 1rem;
  border: 1px solid oklch(0.79 0.18 149 / 20%);
  background:
    radial-gradient(circle at top left, oklch(0.79 0.18 149 / 6%), transparent 50%),
    oklch(1 0 0 / 2.5%);
}

.cert-card-title {
  font-size: 1rem;
  font-weight: 700;
}

.cert-card-meta {
  color: var(--muted-foreground);
  font-size: 0.84rem;
}

.cert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.button-cert {
  border-color: oklch(0.79 0.18 149 / 25%);
  background: oklch(0.79 0.18 149 / 10%);
  color: oklch(0.79 0.18 149);
}

.button-cert:hover {
  background: oklch(0.79 0.18 149 / 18%);
}

/* ── Completion timeline ── */
/* ── Master certificate card ── */
.cert-card-master {
  border-color: oklch(0.81 0.16 78 / 25%);
  background:
    radial-gradient(circle at top left, oklch(0.81 0.16 78 / 8%), transparent 50%),
    oklch(1 0 0 / 2.5%);
}

.cert-card-badge {
  font-size: 2.5rem;
  line-height: 1;
}

.cert-card code {
  padding: 0.15rem 0.4rem;
  border-radius: 0.3rem;
  background: oklch(1 0 0 / 6%);
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

.cert-sample-section {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

.cert-sample-wrapper {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.cert-sample-canvas {
  border-radius: 0.5rem;
  overflow: hidden;
}

.cert-sample-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  border-radius: 0.5rem;
}

.cert-sample-lock-overlay span {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.02em;
}

/* Master cert showcase — large, prominent */
.cert-showcase-master {
  display: flex;
  flex-direction: column;
  border-radius: 0.75rem;
  border: 1px solid oklch(1 0 0 / 12%);
  overflow: hidden;
  background: oklch(0.13 0 0);
  margin-top: 1rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.cert-showcase-master:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px oklch(0 0 0 / 35%);
}

.cert-showcase-master.cert-earned {
  border-color: rgba(230, 180, 50, 0.3);
}

.cert-showcase-master .cert-preview-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-showcase-master .cert-preview-canvas canvas {
  display: block;
  width: 100%;
  height: auto;
}

.cert-showcase-master .cert-showcase-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
}

.cert-showcase-master .cert-showcase-name {
  font-size: 1rem;
  font-weight: 700;
}

.cert-showcase-master .cert-showcase-progress {
  font-size: 0.82rem;
  color: var(--muted-foreground);
}

/* Track cert grid — compact 4-column */
.cert-showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.cert-showcase-card {
  display: flex;
  flex-direction: column;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  overflow: hidden;
  background: oklch(0.13 0 0);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.cert-showcase-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px oklch(0 0 0 / 30%);
}

.cert-showcase-card.cert-earned {
  border-color: oklch(1 0 0 / 15%);
}

.cert-showcase-card.cert-locked {
  opacity: 0.85;
}

.cert-preview-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-preview-canvas canvas {
  display: block;
  width: 100%;
  height: auto;
}

.cert-showcase-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0.6rem;
}

.cert-showcase-name {
  font-size: 0.72rem;
  font-weight: 600;
}

.cert-showcase-progress {
  font-size: 0.66rem;
  color: var(--muted-foreground);
}

@media (max-width: 640px) {
  .cert-showcase-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cert-earned-badge {
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Verify page ── */
.verify-result {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
  padding: 2rem 0;
  display: grid;
  gap: 1.25rem;
}

.verify-icon {
  font-size: 3rem;
  line-height: 1;
}

.verify-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.verify-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  text-align: center;
}

.completion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.completion-row:last-child {
  border-bottom: none;
}

/* ── Lab detail page ── */
.lab-detail-card {
  display: grid;
  gap: 1.5rem;
}

.lab-detail-header {
  display: grid;
  gap: 1rem;
}

.lab-detail-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0.3rem 0 0;
}

.lab-detail-meta-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.lab-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Base `.lab-detail-link` stays a plain title link — applied to the
   <h4> heading on lab catalog tiles. No button chrome. The lab card
   already IS a tap target; the title should just be the title. */
.lab-detail-link {
  color: inherit;
  text-decoration: none;
  transition: color 140ms ease;
}

.lab-detail-link:hover {
  color: var(--primary);
}

/* Only the "View Details" anchor on the lab flip-back wears the
   ghost-button chrome — that's the secondary CTA next to the
   solid primary (Launch / Subscribe / Sign up). */
.lab-flip-detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  background: transparent;
  font-size: 0.84rem;
  font-weight: 500;
  min-height: 2.25rem;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.lab-flip-detail-link:hover {
  background: oklch(1 0 0 / 4%);
  color: var(--foreground);
  border-color: oklch(1 0 0 / 14%);
}

.lab-flip-detail-link:focus-visible {
  outline: 2px solid oklch(0.637 0.237 25.331 / 35%);
  outline-offset: 2px;
}

/* ── Hints ── */
.hints-list {
  display: grid;
  gap: 0.65rem;
}

/* Hints gate — shown on lab detail when the user isn't entitled to
   see hints (i.e. not paid, not admin). Matches the curriculum gate
   tonality: brand-red accent, centered, pulse on the primary CTA. */
.lab-hints-gate-card {
  display: grid;
  gap: 0.85rem;
  text-align: center;
  justify-items: center;
  padding: 1.75rem;
  border-radius: 1rem;
  border: 1px solid oklch(0.637 0.237 25.331 / 22%);
  background:
    radial-gradient(circle at top right, oklch(0.637 0.237 25.331 / 8%), transparent 55%),
    var(--card);
}

.lab-hints-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.lab-hints-gate-actions .button-primary {
  animation: curGateCtaPulse 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .lab-hints-gate-actions .button-primary { animation: none; }
}

.hint-card {
  display: flex;
  align-items: start;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2%);
}

.hint-revealed {
  border-color: oklch(0.81 0.16 78 / 18%);
  background: oklch(0.81 0.16 78 / 5%);
}

.hint-number {
  flex-shrink: 0;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 0.15rem;
}

.hint-revealed .hint-number {
  color: oklch(0.81 0.16 78);
}

.hint-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.curriculum-grid {
  display: grid;
  gap: 1.15rem;
}

.curriculum-track {
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
  border-radius: 1.1rem;
  border: 1px solid var(--border);
  background: var(--muted);
}

.curriculum-track[data-track="foundations"] {
  border-color: oklch(0.72 0.17 155 / 18%);
  background:
    radial-gradient(circle at top right, oklch(0.72 0.17 155 / 7%), transparent 24%),
    linear-gradient(180deg, oklch(1 0 0 / 1.8%), transparent 22%),
    var(--muted);
}

.curriculum-track[data-track="knowledge"] {
  border-color: oklch(0.72 0.14 196 / 18%);
  background:
    radial-gradient(circle at top right, oklch(0.72 0.14 196 / 7%), transparent 24%),
    linear-gradient(180deg, oklch(1 0 0 / 1.8%), transparent 22%),
    var(--muted);
}

.curriculum-track[data-track="multimodal"] {
  border-color: oklch(0.70 0.16 300 / 18%);
  background:
    radial-gradient(circle at top right, oklch(0.70 0.16 300 / 7%), transparent 24%),
    linear-gradient(180deg, oklch(1 0 0 / 1.8%), transparent 22%),
    var(--muted);
}

.curriculum-track[data-track="agents"] {
  border-color: oklch(0.70 0.19 25 / 18%);
  background:
    radial-gradient(circle at top right, oklch(0.70 0.19 25 / 7%), transparent 24%),
    linear-gradient(180deg, oklch(1 0 0 / 1.8%), transparent 22%),
    var(--muted);
}

.curriculum-track-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.95rem;
  padding-left: 0.9rem;
  border-bottom: 1px solid var(--border);
}

[data-track="foundations"] .curriculum-track-head { border-left: 3px solid var(--track-foundations); }
[data-track="knowledge"] .curriculum-track-head { border-left: 3px solid var(--track-knowledge); }
[data-track="multimodal"] .curriculum-track-head { border-left: 3px solid var(--track-multimodal); }
[data-track="agents"] .curriculum-track-head { border-left: 3px solid var(--track-agents); }

.curriculum-track-head-info {
  display: grid;
  gap: 0.45rem;
  flex: 1;
  min-width: 0;
}

.curriculum-track-title {
  margin: 0.18rem 0 0;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.curriculum-track-progress {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.4rem;
}

.curriculum-track-pct {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

.curriculum-track-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.curriculum-track-meta span,
.curriculum-track-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.95rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2.5%);
  color: var(--muted-foreground);
  font-size: 0.8rem;
}

.curriculum-lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 0.75rem;
  grid-auto-rows: 1fr;
}

.curriculum-lab-card {
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.curriculum-lab-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px oklch(0 0 0 / 25%);
}

.curriculum-lab-card {
  position: relative;
  gap: 1rem;
  padding: var(--card-padding);
  border-radius: var(--card-radius);
  background:
    linear-gradient(180deg, oklch(1 0 0 / 1.5%), transparent 32%),
    var(--card);
  box-shadow: var(--card-shadow);
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 180ms ease;
}

.curriculum-lab-card[data-status="running"] {
  border-color: oklch(0.79 0.18 149 / 35%);
}

.curriculum-lab-card[data-status="starting"] {
  border-color: oklch(0.81 0.16 78 / 30%);
}

.lab-card-start-here {
  border-color: oklch(0.637 0.237 25.331 / 35%);
}

.start-here-badge {
  position: absolute;
  top: -0.65rem;
  right: 1rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px oklch(0.637 0.237 25.331 / 30%);
}

.curriculum-lab-copy {
  display: grid;
  gap: 0.8rem;
}

.curriculum-lab-copy h4 {
  font-size: 1.12rem;
}

.curriculum-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

[data-track="foundations"] .curriculum-track-chip {
  color: var(--track-foundations);
  border-color: oklch(0.72 0.17 155 / 18%);
  background: oklch(0.72 0.17 155 / 10%);
}
[data-track="knowledge"] .curriculum-track-chip {
  color: var(--track-knowledge);
  border-color: oklch(0.72 0.14 196 / 18%);
  background: oklch(0.72 0.14 196 / 10%);
}
[data-track="multimodal"] .curriculum-track-chip {
  color: var(--track-multimodal);
  border-color: oklch(0.70 0.16 300 / 18%);
  background: oklch(0.70 0.16 300 / 10%);
}
[data-track="agents"] .curriculum-track-chip {
  color: var(--track-agents);
  border-color: oklch(0.70 0.19 25 / 18%);
  background: oklch(0.70 0.19 25 / 10%);
}

.curriculum-objective {
  margin: 0;
  padding: 0.8rem 0.9rem;
  border-radius: 0.95rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2.5%);
  color: var(--foreground);
  font-size: 0.9rem;
  line-height: 1.6;
}

.curriculum-objective::before {
  content: "Objective";
  display: block;
  margin-bottom: 0.32rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.difficulty-pill {
  border: 1px solid transparent;
}

.difficulty-intro {
  color: oklch(0.79 0.18 149);
  border-color: oklch(0.79 0.18 149 / 18%);
  background: oklch(0.79 0.18 149 / 11%);
}

.difficulty-intermediate {
  color: oklch(0.81 0.16 78);
  border-color: oklch(0.81 0.16 78 / 18%);
  background: oklch(0.81 0.16 78 / 11%);
}

.difficulty-advanced {
  color: oklch(0.78 0.18 24);
  border-color: oklch(0.577 0.245 27.325 / 18%);
  background: oklch(0.577 0.245 27.325 / 11%);
}

.session-card-compact {
  padding: 0.95rem 1rem;
}

.session-card-runtime {
  padding: 1rem;
  background: oklch(1 0 0 / 2.5%);
}

.plan-card,
.lab-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: var(--card-padding);
  border-radius: var(--card-radius);
  background: var(--card);
  box-shadow: var(--card-shadow);
}

/* Banner shown above the plans grid when the user landed here from a 402
   on a specific lab — gives them context for *why* they're being asked to
   pick a plan right now, not in the abstract. */
.plans-deferred-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.5rem;
  border-radius: var(--card-radius);
  background: color-mix(in oklab, var(--primary) 12%, var(--card));
  border: 1px solid color-mix(in oklab, var(--primary) 35%, transparent);
  color: var(--foreground);
  font-size: 0.92rem;
  line-height: 1.4;
}
.plans-deferred-banner-text { flex: 1; }
.plans-deferred-banner-text strong { color: var(--primary); }
.plans-deferred-banner-dismiss {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted-foreground);
}
.plans-deferred-banner-dismiss:hover {
  color: var(--foreground);
  border-color: var(--foreground);
}

.plan-card {
  justify-content: flex-start;
}

/* Features take the remaining space so the button anchors to the bottom.
   All .plan-card cells have equal height via the grid's default align: stretch,
   which means every plan's button lands on the same baseline. */
.plan-card .plan-features {
  flex: 1 1 auto;
  margin: 0;
}

.plan-card .button {
  margin-top: auto;
}

.plan-card.featured {
  border-color: oklch(0.55 0.20 25.331 / 30%);
  box-shadow: 0 0 0 1px oklch(0.55 0.20 25.331 / 12%);
}

/* Badge slot always occupies space so the plan name / price / description
   start at the same Y across every card — and bullets start in one row. */
.plan-badge-slot {
  display: flex;
  align-items: center;
  min-height: 1.85rem;
  margin-bottom: 0.25rem;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: oklch(0.55 0.20 25.331 / 12%);
  color: oklch(0.72 0.16 25.331);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  /* Reserve a consistent header height across all plan variants so the
     <ul class="plan-features"> starts at the same Y on every card. */
  min-height: 10.5rem;
}

.plan-desc {
  margin-top: 0.35rem;
  min-height: 2.4rem; /* ~2 lines so short descriptions don't collapse the row */
  font-size: 0.84rem;
  line-height: 1.45;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  min-height: 2.6rem;
}

.plan-price strong {
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.plan-features {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0 0 0 1.1rem;
  list-style: none;
  color: var(--foreground);
  font-size: 0.88rem;
  line-height: 1.5;
}

.plan-features li {
  position: relative;
}

.plan-features li::before {
  content: "";
  position: absolute;
  left: -1.1rem;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.lab-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.lab-key {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lab-card h4,
.session-card h4 {
  margin: 0;
  font-size: 1.05rem;
}

.lab-helper {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.9rem;
  line-height: 1.65;
}

.lab-actions,
.session-actions,
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

#account-panel,
#subscription-panel,
#dashboard-runtime-panel {
  display: grid;
  gap: 0.9rem;
}

.empty-state {
  text-align: center;
}

.toast-root {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: grid;
  gap: 0.75rem;
}

.toast {
  min-width: 240px;
  max-width: 360px;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 12px 40px oklch(0 0 0 / 28%);
}

.toast.success {
  border-color: oklch(0.79 0.18 149 / 28%);
}

.toast.error {
  border-color: oklch(0.577 0.245 27.325 / 28%);
}

.toast.warning {
  border-color: oklch(0.81 0.16 78 / 28%);
}

.portal-footer {
  margin-top: 1.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.portal-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}

.portal-footer-brand {
  display: grid;
  gap: 0.9rem;
}

.portal-footer-copy {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.92rem;
  line-height: 1.6;
}

.portal-footer-column {
  display: grid;
  align-content: start;
  gap: 0.85rem;
}

.portal-footer-column h3 {
  margin: 0;
  font-size: 0.94rem;
}

.portal-footer-list {
  display: grid;
  gap: 0.55rem;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

.portal-footer a {
  color: var(--foreground);
}

.portal-footer a:hover {
  text-decoration: underline;
}

.portal-footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 0.78rem;
  text-align: center;
}

.admin-hero-card {
  margin-bottom: 1.25rem;
  scroll-margin-top: 5.5rem;
}

.admin-state-card {
  margin-bottom: 1.25rem;
  scroll-margin-top: 5.5rem;
}

.admin-nav-card {
  position: sticky;
  top: 1rem;
  z-index: 5;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(14px);
}

.admin-nav-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.admin-topbar-current {
  border-color: var(--primary);
  color: var(--foreground);
}

.admin-nav-button {
  justify-content: center;
}

.admin-diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

/* Health Pulse — three-row composite (system / activity / growth) */
.admin-pulse {
  display: grid;
  gap: 1.4rem;
}

.admin-pulse-label {
  margin: 0 0 0.55rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.admin-pulse .admin-diagnostics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .admin-pulse .admin-diagnostics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-diagnostic-card {
  padding: var(--card-padding-tight);
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--muted);
}

.admin-diagnostic-card code {
  overflow-wrap: anywhere;
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.admin-table-wrap {
  overflow-x: auto;
  max-height: 26rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 0.8rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 0.92rem;
}

.admin-table th {
  color: oklch(0.75 0 0);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

[data-theme="light"] .admin-table th {
  color: oklch(0.38 0 0);
}

.admin-table-subcopy {
  margin-top: 0.25rem;
  color: var(--muted-foreground);
  font-size: 0.82rem;
}

.admin-log-tail {
  max-height: 40rem;
  overflow: auto;
  margin: 0;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--muted);
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-log-tail .log-error {
  color: oklch(0.72 0.18 25);
}

.admin-log-tail .log-warn {
  color: oklch(0.82 0.14 78);
}

.admin-log-tail .log-ts {
  color: var(--muted-foreground);
}

.founder-surface-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.founder-surface-card {
  padding: var(--card-padding);
  border-radius: var(--card-radius);
  background:
    linear-gradient(180deg, oklch(1 0 0 / 1.5%), transparent 28%),
    var(--muted);
}

.founder-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.founder-metric-stat {
  display: grid;
  gap: 0.28rem;
  padding: 0.85rem 0.9rem;
  border-radius: 0.95rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2.5%);
}

.founder-metric-stat strong {
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.founder-card-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.founder-card-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2%);
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

.founder-card-line strong {
  color: var(--foreground);
  font-size: 0.95rem;
}

#section-overview,
#section-runtime,
#section-infra,
#section-history {
  scroll-margin-top: 5.5rem;
}

@media (max-width: 1024px) {
  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-section,
  .summary-grid,
  .content-grid,
  .lab-grid,
  .curriculum-lab-grid,
  .admin-diagnostics-grid,
  .founder-surface-grid,
  .status-strip,
  .portal-footer-grid {
    grid-template-columns: 1fr;
  }

  .profile-meta-grid,
  .progress-meta-grid,
  .training-progress-grid,
  .training-stat-grid,
  .guest-preview-foot {
    grid-template-columns: 1fr;
  }

  .admin-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* brand-subtle hides alongside the mobile drawer breakpoint */
@media (max-width: 768px) {
  .brand-subtle {
    display: none;
  }
}

@media (max-width: 640px) {
  .topbar-nav {
    gap: 0.1rem;
  }

  .topbar-link {
    min-height: 2.5rem;
    padding: 0.5rem 0.6rem;
    font-size: 0.82rem;
  }

  .page-container {
    width: min(calc(100% - 1rem), var(--max-width));
  }

  .hero-copy,
  .surface-card {
    padding: 1rem;
  }

  .portal-topbar {
    min-height: auto;
    padding-top: 0.25rem;
    align-items: flex-start;
  }

  .hero-copy h1 {
    font-size: 2.35rem;
  }

  .dashboard-title,
  .progress-value {
    font-size: 1.9rem;
  }

  .progress-head,
  .training-section-head,
  .training-subsection-head,
  .recent-session-row,
  .curriculum-track-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .training-focus-pill {
    min-width: 0;
    width: 100%;
  }

  .portal-footer {
    padding-top: 1.25rem;
  }
}

/* ══════════════════════════════════════════════════════════════════════════ */
/* Curriculum — FreakLab Academy                                            */
/* ══════════════════════════════════════════════════════════════════════════ */

.cur-home {
  display: grid;
  gap: 2rem;
}

.cur-home-header {
  display: grid;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

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

.cur-home-header-copy {
  display: grid;
  gap: 0.4rem;
  max-width: 38rem;
}

.cur-home-title {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0.15rem 0 0;
}

.cur-home-subtitle {
  color: var(--muted-foreground);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0.45rem 0 0;
}

.cur-home-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.cur-home-stat {
  display: grid;
  gap: 0.3rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: oklch(1 0 0 / 2.5%);
}

.cur-home-stat-progress {
  background:
    radial-gradient(circle at top right, oklch(0.637 0.237 25.331 / 8%), transparent 55%),
    oklch(1 0 0 / 2.5%);
  border-color: oklch(0.637 0.237 25.331 / 22%);
}

.cur-home-stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--foreground);
  display: flex;
  align-items: baseline;
  gap: 0.05rem;
}

.cur-home-stat-pct {
  color: var(--primary);
}

.cur-home-stat-pct-sym {
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-left: 0.1rem;
}

.cur-home-stat-total {
  color: var(--muted-foreground);
  font-size: 0.95rem;
  font-weight: 500;
  margin-left: 0.15rem;
}

.cur-home-stat-sub {
  font-size: 0.78rem;
  color: var(--muted-foreground);
}

@media (max-width: 760px) {
  .cur-home-stats {
    grid-template-columns: 1fr;
  }
}

.cur-hero-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.25rem;
}

.cur-hero-progress-bar {
  flex: 1;
  max-width: 280px;
}

.cur-hero-progress-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.cur-level-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cur-free-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: oklch(0.79 0.18 149 / 12%);
  border: 1px solid oklch(0.79 0.18 149 / 20%);
  color: oklch(0.79 0.18 149);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cur-level-subtitle {
  color: var(--muted-foreground);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}

.cur-level-stats {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted-foreground);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  margin-top: auto;
}

.cur-level-progress {
  margin-top: 0.35rem;
}

.cur-progress-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.cur-progress-bar .progress-track {
  flex: 1;
  max-width: 300px;
}

.cur-progress-pct {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 600;
}

.cur-levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
}

.cur-level-card {
  display: grid;
  gap: 0.65rem;
  padding: 1.15rem 1.25rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.cur-level-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px oklch(0 0 0 / 18%);
  border-color: oklch(1 0 0 / 14%);
}

.cur-level-card[data-color="foundations"] { border-left: 4px solid var(--track-foundations); }
.cur-level-card[data-color="knowledge"] { border-left: 4px solid var(--track-knowledge); }
.cur-level-card[data-color="multimodal"] { border-left: 4px solid var(--track-multimodal); }
.cur-level-card[data-color="agents"] { border-left: 4px solid var(--track-agents); }
.cur-level-card[data-color="orange"] { border-left: 4px solid oklch(0.70 0.19 55); }
.cur-level-card[data-color="gold"] { border-left: 4px solid oklch(0.80 0.16 85); }

.cur-level-locked {
  opacity: 0.7;
  cursor: default;
}

.cur-level-locked:hover {
  transform: none;
  box-shadow: none;
}

/* ── Landing page sections ── */
.landing-section {
  padding: 3rem 0;
}

.landing-gap-section {
  padding: 4rem 0;
}

/* Stats grid (The Problem) */
.landing-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.landing-stat-card {
  padding: var(--card-padding);
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 3%);
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  text-align: center;
}

.landing-stat-card:hover {
  transform: translateY(-3px);
  border-color: oklch(0.637 0.237 25.331 / 30%);
  box-shadow: 0 8px 28px oklch(0 0 0 / 22%);
}

.landing-stat-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.1rem;
  line-height: 1;
}

.landing-stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--primary);
  line-height: 1;
  font-family: var(--font-mono);
}

.landing-stat-prefix {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-mono);
}

.landing-stat-suffix {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-mono);
}

.landing-stat-accent {
  color: var(--accent);
}

.landing-stat-label {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}

/* Compare grid (Why This Matters) */
.landing-why-section {
  padding: 2.5rem;
}

.landing-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.landing-compare-card {
  padding: var(--card-padding);
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
}

.landing-compare-card .section-label {
  margin-bottom: 0.75rem;
}

.landing-compare-card ul {
  margin: 0;
  padding: 0 0 0 1.15rem;
  display: grid;
  gap: 0.55rem;
}

.landing-compare-card li {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted-foreground);
}

.landing-compare-others {
  background: oklch(1 0 0 / 2%);
}

.landing-compare-freaklab {
  background: oklch(0.637 0.237 25.331 / 5%);
  border-color: oklch(0.637 0.237 25.331 / 20%);
}

.landing-compare-freaklab li {
  color: var(--foreground);
}

/* Timeline (Why Now) */
.landing-timeline-section {
  padding: 4rem 0;
}

.landing-timeline-section .section-copy-block {
  margin-bottom: 3rem;
}

.landing-timeline {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  padding-left: 2.5rem;
}

.landing-timeline-line {
  position: absolute;
  left: 0.55rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--border);
}

.landing-timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.landing-timeline-item:last-child {
  padding-bottom: 0;
}

.landing-timeline-dot {
  position: absolute;
  left: -2.25rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  border: 2px solid var(--border);
  z-index: 1;
}

.landing-timeline-dot-now {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px oklch(0.637 0.237 25.331 / 25%);
}

.landing-timeline-content {
  display: grid;
  gap: 0.25rem;
}

.landing-timeline-content strong {
  font-size: 1rem;
  color: var(--foreground);
}

.landing-timeline-content p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted-foreground);
  line-height: 1.55;
}

.landing-timeline-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.landing-timeline-now .landing-timeline-year {
  color: var(--primary);
}

.landing-timeline-now .landing-timeline-content strong {
  color: var(--primary);
}

/* ── Scroll animation initial states ── */
/* GSAP sets initial opacity/transforms via JS.
   Fallback: if .gsap-ready is NOT on body, everything stays visible. */
.gsap-ready [data-anim="fade"],
.gsap-ready [data-anim="card"],
.gsap-ready [data-anim="hero-headline"],
.gsap-ready [data-anim="hero-badge"],
.gsap-ready [data-anim="hero-sub"],
.gsap-ready [data-anim="hero-actions"],
.gsap-ready [data-anim="hero-meta"],
.gsap-ready .landing-timeline-item {
  opacity: 0;
  will-change: transform, opacity;
}

/* Word-split mask used by hero headline + section headlines: each word sits in
   an overflow-hidden box so its inner span can slide up from below. */
.word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.05;
}

.word-inner {
  display: inline-block;
  will-change: transform, opacity;
}

.gsap-ready [data-anim="fade"] {
  transform: translateY(30px);
}

.gsap-ready [data-anim="card"] {
  transform: translateY(40px) scale(0.96);
}

.gsap-ready [data-anim="timeline"] {
  transform: translateX(-20px);
}

/* ── Responsive: landing sections ── */
@media (max-width: 1024px) {
  .landing-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .landing-compare-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .landing-stats-grid {
    grid-template-columns: 1fr;
  }
  .landing-stat-number {
    font-size: 2rem;
  }
  .landing-why-section {
    padding: 1.5rem;
  }
  .landing-timeline {
    padding-left: 2rem;
  }
  .landing-timeline-dot {
    left: -1.75rem;
  }
}

/* ── Landing page academy teaser ── */
.landing-academy-section {
  margin-top: 1.5rem;
}

.gsap-ready .landing-academy-level {
  opacity: 0;
  transform: translateY(30px) scale(0.96);
}

.landing-academy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-top: 1rem;
}

.landing-academy-level {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2%);
  border-left: 3px solid var(--border);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.landing-academy-level:hover {
  transform: translateY(-3px);
  border-color: oklch(1 0 0 / 14%);
  background: oklch(1 0 0 / 4%);
  box-shadow: 0 8px 24px oklch(0 0 0 / 22%);
}

.landing-academy-level[data-color="foundations"]:hover { box-shadow: 0 8px 24px oklch(from var(--track-foundations) l c h / 0.18); }
.landing-academy-level[data-color="knowledge"]:hover   { box-shadow: 0 8px 24px oklch(from var(--track-knowledge) l c h / 0.18); }
.landing-academy-level[data-color="multimodal"]:hover  { box-shadow: 0 8px 24px oklch(from var(--track-multimodal) l c h / 0.18); }
.landing-academy-level[data-color="agents"]:hover      { box-shadow: 0 8px 24px oklch(from var(--track-agents) l c h / 0.18); }

.landing-academy-level[data-color="foundations"] { border-left-color: var(--track-foundations); }
.landing-academy-level[data-color="knowledge"] { border-left-color: var(--track-knowledge); }
.landing-academy-level[data-color="multimodal"] { border-left-color: var(--track-multimodal); }
.landing-academy-level[data-color="agents"] { border-left-color: var(--track-agents); }
.landing-academy-level[data-color="orange"] { border-left-color: oklch(0.70 0.19 55); }
.landing-academy-level[data-color="gold"] { border-left-color: oklch(0.80 0.16 85); }

.landing-academy-level .muted-copy {
  font-size: 0.82rem;
  margin: 0;
}

@media (max-width: 1024px) {
  .landing-academy-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .landing-academy-grid {
    grid-template-columns: 1fr;
  }
}

.lab-free-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid oklch(0.79 0.18 149 / 22%);
  background: oklch(0.79 0.18 149 / 12%);
  color: oklch(0.79 0.18 149);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cur-locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 4%);
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.cur-level-number {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 3%);
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cur-level-card[data-color="foundations"] .cur-level-number { color: var(--track-foundations); border-color: oklch(from var(--track-foundations) l c h / 35%); background: oklch(from var(--track-foundations) l c h / 10%); }
.cur-level-card[data-color="knowledge"]   .cur-level-number { color: var(--track-knowledge);   border-color: oklch(from var(--track-knowledge) l c h / 35%);   background: oklch(from var(--track-knowledge) l c h / 10%); }
.cur-level-card[data-color="multimodal"]  .cur-level-number { color: var(--track-multimodal);  border-color: oklch(from var(--track-multimodal) l c h / 35%);  background: oklch(from var(--track-multimodal) l c h / 10%); }
.cur-level-card[data-color="agents"]      .cur-level-number { color: var(--track-agents);      border-color: oklch(from var(--track-agents) l c h / 35%);      background: oklch(from var(--track-agents) l c h / 10%); }
.cur-level-card[data-color="orange"]      .cur-level-number { color: oklch(0.70 0.19 55); border-color: oklch(0.70 0.19 55 / 35%); background: oklch(0.70 0.19 55 / 10%); }
.cur-level-card[data-color="gold"]        .cur-level-number { color: oklch(0.80 0.16 85); border-color: oklch(0.80 0.16 85 / 35%); background: oklch(0.80 0.16 85 / 10%); }

.cur-level-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cur-level-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--muted-foreground);
  font-size: 0.84rem;
}

.cur-audience-tag {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 3%);
  color: var(--muted-foreground);
  font-size: 0.74rem;
}

/* Module cards */
.cur-modules-grid {
  display: grid;
  gap: 1rem;
}

.cur-module-card {
  display: grid;
  gap: 0.75rem;
  padding: 1.15rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease;
}

.cur-module-card:hover {
  border-color: oklch(0.637 0.237 25.331 / 28%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px oklch(0 0 0 / 18%);
}

.cur-module-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.cur-module-desc {
  color: var(--muted-foreground);
  font-size: 0.9rem;
  line-height: 1.6;
}

.cur-module-meta {
  display: flex;
  gap: 1rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* Lesson rows */
.cur-lesson-list {
  display: grid;
  gap: 0.5rem;
}

.cur-lesson-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2%);
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, border-color 160ms ease, padding-left 160ms ease;
  position: relative;
}

.cur-lesson-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12%;
  bottom: 12%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
  opacity: 0;
  transition: opacity 180ms ease;
}

.cur-lesson-row:hover {
  background: var(--muted);
  transform: translateX(4px);
  border-color: oklch(0.637 0.237 25.331 / 22%);
  padding-left: 1.15rem;
}

.cur-lesson-row:hover::before {
  opacity: 1;
}

.cur-lesson-row-read {
  border-color: oklch(0.79 0.18 149 / 15%);
}

.cur-lesson-check {
  flex-shrink: 0;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: transparent;
}

.cur-lesson-row-read .cur-lesson-check {
  border-color: oklch(0.79 0.18 149);
  background: oklch(0.79 0.18 149 / 15%);
  color: oklch(0.79 0.18 149);
}

.cur-lesson-title {
  flex: 1;
  font-weight: 500;
  font-size: 0.92rem;
}

.cur-lesson-time {
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  white-space: nowrap;
}

/* Reader view */
.cur-reader {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.cur-reader-header {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.cur-reader-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.cur-reader-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--muted-foreground);
  font-size: 0.84rem;
}

.cur-reader-content {
  font-size: 1.02rem;
  line-height: 1.85;
  color: oklch(0.88 0 0);
}

/* Lesson gate card — shown in place of the lesson body for tier-locked
   visitors. Two flavours via the `gated` flag on the API response:
   "signup" (anonymous → /#auth) and "paid" (free user → /#plans).
   The card fades + lifts on mount so the swap from loading → gated
   feels deliberate, and the primary CTA pulses softly to draw the
   eye through the brand-red glow. */
.cur-gate-card {
  margin: 1.5rem 0;
  padding: 2.25rem;
  border-radius: 1rem;
  border: 1px solid oklch(0.637 0.237 25.331 / 25%);
  background:
    radial-gradient(circle at top right, oklch(0.637 0.237 25.331 / 10%), transparent 55%),
    radial-gradient(circle at bottom left, oklch(0.637 0.237 25.331 / 6%), transparent 55%),
    var(--card);
  box-shadow: 0 18px 50px oklch(0 0 0 / 0.25);
  display: grid;
  gap: 0.85rem;
  text-align: center;
  justify-items: center;
  position: relative;
  overflow: hidden;
  animation: curGateEntry 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes curGateEntry {
  0%   { opacity: 0; transform: translateY(14px) scale(0.985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.cur-gate-eyebrow {
  margin: 0;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}

.cur-gate-heading {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.15;
}

.cur-gate-copy {
  margin: 0;
  max-width: 38rem;
  color: var(--muted-foreground);
  line-height: 1.65;
}

.cur-gate-context {
  margin: 0.25rem 0 0.65rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: oklch(1 0 0 / 4%);
  border: 1px solid oklch(1 0 0 / 6%);
  font-size: 0.85rem;
  color: var(--muted-foreground);
}

.cur-gate-context strong {
  color: var(--foreground);
}

.cur-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 0.4rem;
}

.cur-gate-actions .button-primary {
  animation: curGateCtaPulse 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes curGateCtaPulse {
  0%, 100% { box-shadow: 0 0 0 0 oklch(0.637 0.237 25.331 / 0.5); }
  50%      { box-shadow: 0 0 0 10px oklch(0.637 0.237 25.331 / 0); }
}

@media (prefers-reduced-motion: reduce) {
  .cur-gate-card { animation: none; }
  .cur-gate-actions .button-primary { animation: none; }
}

.cur-reader-content h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--foreground);
}

.cur-reader-content p {
  margin: 0 0 1.15rem;
}

.cur-reader-content strong {
  color: var(--foreground);
}

.cur-reader-content code {
  padding: 0.15rem 0.4rem;
  border-radius: 0.3rem;
  background: oklch(1 0 0 / 6%);
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.cur-reader-content blockquote {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--primary);
  border-radius: 0 0.5rem 0.5rem 0;
  background: oklch(0.637 0.237 25.331 / 5%);
  font-style: italic;
}

.cur-reader-content ul, .cur-reader-content ol {
  margin: 0 0 1.15rem;
  padding-left: 1.5rem;
}

.cur-reader-content li {
  margin: 0.4rem 0;
}

/* Takeaways box */
.cur-takeaways {
  margin: 2rem 0;
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid oklch(0.79 0.18 149 / 18%);
  background: oklch(0.79 0.18 149 / 5%);
}

.cur-takeaways h4 {
  margin: 0 0 0.65rem;
  color: oklch(0.79 0.18 149);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cur-takeaways ul {
  margin: 0;
  padding-left: 1.25rem;
}

.cur-takeaways li {
  margin: 0.35rem 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Related labs */
.cur-lab-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  border: 1px solid oklch(0.637 0.237 25.331 / 18%);
  background: oklch(0.637 0.237 25.331 / 5%);
  text-decoration: none;
  transition: background 140ms ease;
}

.cur-lab-link:hover {
  background: oklch(0.637 0.237 25.331 / 10%);
}

.cur-lab-link-icon {
  font-size: 1.5rem;
}

.cur-lab-link-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--foreground);
}

.cur-lab-link-sub {
  font-size: 0.82rem;
  color: var(--muted-foreground);
}

/* Mark as read button */
.cur-mark-read {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid oklch(0.79 0.18 149 / 25%);
  background: oklch(0.79 0.18 149 / 10%);
  color: oklch(0.79 0.18 149);
  font-weight: 600;
  cursor: pointer;
  transition: all 140ms ease;
}

.cur-mark-read:hover {
  background: oklch(0.79 0.18 149 / 18%);
}

.cur-mark-read-done {
  border-color: oklch(0.79 0.18 149 / 35%);
  background: oklch(0.79 0.18 149 / 15%);
  pointer-events: none;
}

/* Reader navigation */
.cur-reader-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Breadcrumb */
.cur-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.84rem;
  color: var(--muted-foreground);
}

.cur-breadcrumb a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 140ms ease;
}

.cur-breadcrumb a:hover {
  color: var(--foreground);
}

.cur-breadcrumb-sep {
  color: oklch(1 0 0 / 20%);
}

/* CVE cards */
.cur-cve-grid {
  display: grid;
  gap: 0.85rem;
}

.cur-cve-card {
  display: grid;
  gap: 0.5rem;
  padding: 1rem 1.15rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2%);
  border-left: 3px solid var(--muted);
}

.cur-cve-card[data-severity="CRITICAL"] { border-left-color: oklch(0.577 0.245 27.325); }
.cur-cve-card[data-severity="HIGH"] { border-left-color: oklch(0.70 0.19 25); }
.cur-cve-card[data-severity="MEDIUM"] { border-left-color: oklch(0.81 0.16 78); }
.cur-cve-card[data-severity="LOW"] { border-left-color: oklch(0.72 0.14 196); }

.cur-cve-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cur-cve-id {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
}

.cur-cve-severity {
  display: inline-flex;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cur-cve-severity[data-severity="CRITICAL"] { background: oklch(0.577 0.245 27.325 / 15%); color: oklch(0.577 0.245 27.325); }
.cur-cve-severity[data-severity="HIGH"] { background: oklch(0.70 0.19 25 / 15%); color: oklch(0.70 0.19 25); }
.cur-cve-severity[data-severity="MEDIUM"] { background: oklch(0.81 0.16 78 / 15%); color: oklch(0.81 0.16 78); }
.cur-cve-severity[data-severity="LOW"] { background: oklch(0.72 0.14 196 / 15%); color: oklch(0.72 0.14 196); }

.cur-cve-desc {
  font-size: 0.88rem;
  color: var(--muted-foreground);
  line-height: 1.55;
}

.cur-cve-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted-foreground);
}

.cur-cve-tags {
  display: flex;
  gap: 0.35rem;
}

.cur-cve-tag {
  display: inline-flex;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 3%);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.cur-cve-score {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
}

.cur-cve-id {
  text-decoration: none;
  transition: color 140ms ease;
}

.cur-cve-id:hover {
  color: var(--primary);
}

.cur-cve-filter-bar {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.cur-cve-search {
  width: 100%;
  min-height: 2.6rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

.cur-cve-search::placeholder {
  color: var(--muted-foreground);
}

.cur-cve-search:focus {
  outline: 2px solid oklch(0.637 0.237 25.331 / 25%);
  border-color: oklch(0.637 0.237 25.331 / 30%);
}

/* Dashboard widget */
.cur-dashboard-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  border: 1px solid oklch(0.81 0.16 78 / 18%);
  background:
    radial-gradient(circle at left, oklch(0.81 0.16 78 / 8%), transparent 50%),
    oklch(1 0 0 / 2.5%);
  cursor: pointer;
}

.cur-dashboard-card:hover {
  border-color: oklch(0.81 0.16 78 / 28%);
}

@media (max-width: 640px) {
  .cur-levels-grid {
    grid-template-columns: 1fr;
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }

  .cur-reader-title {
    font-size: 1.4rem;
  }

  .cur-reader-content {
    font-size: 0.95rem;
  }
}

/* ── Additions (auth, lab flip, OAuth buttons) ── */
.gap-sm { gap: 0.6rem; }

.google-btn,
.github-btn {
  gap: 0.5rem;
  min-height: 2.6rem;
  font-weight: 500;
}
.google-btn svg,
.github-btn svg {
  flex-shrink: 0;
}

.otp-header { text-align: center; }
.otp-sent-to { font-size: 0.85rem; color: var(--muted-foreground); margin: 0; }
.otp-sent-to strong { color: var(--foreground); }
.otp-input {
  text-align: center;
  font-size: 1.4rem !important;
  font-family: var(--font-mono) !important;
  letter-spacing: 0.35em;
  padding: 0.75rem 1rem !important;
}

/* Lab locked (previous lab not complete — signed-in users only) */
.lab-locked {
  opacity: 0.45;
  pointer-events: none;
}

/* ── Gate card borders — brand red + cyan, no animation ─ */
.lab-needs-sub .lab-flip-front {
  border-color: oklch(0.637 0.237 25.331 / 0.38) !important;
}
.lab-needs-signin .lab-flip-front {
  border-color: oklch(0.752 0.137 196 / 0.35) !important;
}

/* Lab card flip */
.lab-flip-wrap { position: relative; height: 100%; }
.lab-flip-wrap .lab-card { height: 100%; }
.lab-flip-card { perspective: 800px; cursor: pointer; }
.lab-flip-card .lab-flip-front,
.lab-flip-card .lab-flip-back {
  backface-visibility: hidden;
  transition: transform 0.5s cubic-bezier(0.4, 0.2, 0.2, 1);
}
.lab-flip-card .lab-flip-front { transform: rotateY(0deg); }
.lab-flip-card .lab-flip-back {
  position: absolute; inset: 0;
  transform: rotateY(180deg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.85rem;
  border-radius: 0.75rem; border: 1px solid var(--border);
  background: oklch(0.13 0 0);
  text-align: center; padding: 1.5rem;
}
.lab-flip-card .lab-flip-back h4 { font-size: 1rem; font-weight: 600; color: var(--foreground); }

/* Subscribe back — brand red tint */
.lab-flip-back--subscribe {
  background: oklch(0.14 0.015 25);
  border-color: oklch(0.637 0.237 25.331 / 0.3) !important;
}
/* Sign-in back — brand cyan tint */
.lab-flip-back--signin {
  background: oklch(0.13 0.014 196);
  border-color: oklch(0.752 0.137 196 / 0.28) !important;
}

/* Gate icon */
.lab-flip-gate-icon { font-size: 2rem; line-height: 1; }

/* Gate copy */
.lab-flip-gate-copy {
  font-size: 0.82rem; color: var(--muted-foreground);
  margin: 0; line-height: 1.5;
}

/* ── Gate buttons — brand hierarchy: primary CTA = red, secondary = cyan ── */

/* Smooth button glow: base shadow stays visible, pulses between low + high opacity */
@keyframes redBtnGlow {
  0%, 100% { box-shadow: 0 0 10px 1px oklch(0.637 0.237 25.331 / 0.18); }
  50%       { box-shadow: 0 0 22px 4px oklch(0.637 0.237 25.331 / 0.48); }
}
@keyframes cyanBtnGlow {
  0%, 100% { box-shadow: 0 0 10px 1px oklch(0.752 0.137 196 / 0.18); }
  50%       { box-shadow: 0 0 22px 4px oklch(0.752 0.137 196 / 0.48); }
}

/* "Subscribe to Unlock" — brand primary (red) */
.button-subscribe {
  display: inline-block;
  background: oklch(0.637 0.237 25.331);
  color: oklch(0.985 0 0);
  padding: 0.6rem 1.4rem;
  border-radius: 0.65rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}
.button-subscribe:hover { background: oklch(0.68 0.22 25); transform: translateY(-1px); }

/* "Sign in to Engage" — brand accent (cyan) */
.button-signin {
  display: inline-block;
  background: oklch(0.22 0.03 196);
  color: oklch(0.752 0.137 196);
  border: 1px solid oklch(0.752 0.137 196 / 0.45);
  padding: 0.6rem 1.4rem;
  border-radius: 0.65rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.button-signin:hover {
  background: oklch(0.26 0.04 196);
  border-color: oklch(0.752 0.137 196 / 0.7);
  transform: translateY(-1px);
}

/* Older underline-text variant of .lab-flip-detail-link removed —
   it overrode the ghost-button styling defined earlier in this file.
   Keep the .lab-flip-close rules untouched. */
.lab-flip-close {
  position: absolute; top: 0.65rem; right: 0.75rem;
  background: none; border: none;
  color: var(--muted-foreground); font-size: 1.3rem;
  cursor: pointer; padding: 0.2rem 0.4rem; line-height: 1;
  border-radius: 0.25rem; transition: color 150ms ease, background 150ms ease;
}
.lab-flip-close:hover { color: var(--foreground); background: oklch(1 0 0 / 8%); }
.lab-flip-card.flipped .lab-flip-front { transform: rotateY(-180deg); }
.lab-flip-card.flipped .lab-flip-back { transform: rotateY(0deg); }
.lab-flip-card[data-status="running"],
.lab-flip-card[data-status="starting"] { cursor: default; }
.lab-flip-card[data-status="running"] .lab-flip-front,
.lab-flip-card[data-status="starting"] .lab-flip-front { transform: rotateY(-180deg); }
.lab-flip-card[data-status="running"] .lab-flip-back,
.lab-flip-card[data-status="starting"] .lab-flip-back { transform: rotateY(0deg); }

/* ────────────────────────────────────────────────────────────
 * Motion vocabulary — tilt glow + keyword marquee
 * Vanilla port of the website's motion-hooks. Behaviour is wired
 * by portal/motion.js; this file only owns the visual styling.
 * ──────────────────────────────────────────────────────────── */

.tilt-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
  z-index: 0;
}

/* The tilt-glow sits at z-index 0 inside its card; ensure card
   content (which is unwrapped, no inner z-index) renders above. */
.curriculum-lab-card > *:not(.tilt-glow),
.cur-level-card > *:not(.tilt-glow),
.cert-showcase-card > *:not(.tilt-glow),
.cert-showcase-master > *:not(.tilt-glow),
.plan-card > *:not(.tilt-glow),
.landing-academy-level > *:not(.tilt-glow) {
  position: relative;
  z-index: 1;
}

.keyword-marquee {
  position: relative;
  overflow: hidden;
  margin: 2.5rem 0;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: oklch(from var(--card) l c h / 60%);
  /* Soft fade-to-bg on the left/right edges for a more polished feel */
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.keyword-marquee .marquee-inner {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 2rem;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted-foreground);
  will-change: transform;
  animation: marquee-scroll 38s linear infinite;
}

@keyframes marquee-scroll {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .keyword-marquee .marquee-inner { animation: none; }
}

.keyword-marquee:hover .marquee-inner {
  animation-play-state: paused;
}

.keyword-marquee .marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
}

.keyword-marquee .marquee-dot {
  display: inline-block;
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 50%;
  background: oklch(from var(--primary) l c h / 60%);
}

/* Dual-row marquee — second row reversed direction, slower */
.keyword-marquee-row2 {
  margin-top: -2.4rem; /* sit right under row 1, sharing the same band */
  border-top: none;
}
.keyword-marquee-row2 .marquee-inner {
  animation: marquee-scroll-rev 52s linear infinite;
  font-size: 0.66rem;
  letter-spacing: 0.36em;
  color: oklch(from var(--accent) l c h / 70%);
}
.keyword-marquee-row2 .marquee-dot {
  background: oklch(from var(--accent) l c h / 60%);
}
@keyframes marquee-scroll-rev {
  0%   { transform: translate3d(-50%, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .keyword-marquee-row2 .marquee-inner { animation: none; }
}

/* ════════════════════════════════════════════════════════════════════
 * Hero ambient orbs — drifting decorative blobs behind the hero copy.
 * Pure CSS keyframes, GPU-friendly. Hidden under the hero via z-index
 * but visible enough to add depth.
 * ════════════════════════════════════════════════════════════════════ */
.hero-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
  z-index: 0;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  will-change: transform;
}

.hero-orb-1 {
  width: 380px;
  height: 380px;
  top: -90px;
  left: -110px;
  background: radial-gradient(circle, oklch(0.637 0.237 25.331 / 0.35), transparent 65%);
  animation: orbDrift1 18s ease-in-out infinite alternate;
}

.hero-orb-2 {
  width: 320px;
  height: 320px;
  bottom: -80px;
  right: 30%;
  background: radial-gradient(circle, oklch(0.752 0.137 196 / 0.28), transparent 65%);
  animation: orbDrift2 22s ease-in-out infinite alternate;
}

.hero-orb-3 {
  width: 260px;
  height: 260px;
  top: 30%;
  right: -80px;
  background: radial-gradient(circle, oklch(0.79 0.18 149 / 0.22), transparent 65%);
  animation: orbDrift3 26s ease-in-out infinite alternate;
}

@keyframes orbDrift1 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(60px, 50px, 0) scale(1.1); }
}
@keyframes orbDrift2 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-50px, -40px, 0) scale(1.15); }
}
@keyframes orbDrift3 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-70px, 30px, 0) scale(0.95); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-orb { animation: none; }
}

/* Hero section needs to host orbs without breaking grid */
.hero-section-guest {
  position: relative;
  isolation: isolate;
}
/* Stack hero copy + terminal above the orbs without forcing the orbs
   into a grid cell — exclude .hero-orbs so it stays absolutely-positioned. */
.hero-section-guest > *:not(.hero-orbs) {
  position: relative;
  z-index: 1;
}


/* ════════════════════════════════════════════════════════════════════
 * Comparison list — Existing Options uses X icons (red) and FreakLabs
 * uses checkmarks (green). Symmetric structure, both icons SVG so
 * stroke draw-in animations are possible.
 * ════════════════════════════════════════════════════════════════════ */
.compare-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.compare-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.92rem;
  line-height: 1.55;
  position: relative;
}

.compare-text {
  flex: 1;
  display: inline-block;
}

.compare-list-others .compare-text {
  color: var(--muted-foreground);
}

.compare-list-freaklab .compare-text {
  color: var(--foreground);
  font-weight: 500;
}

/* X icon (Existing Options) and check icon (FreakLabs) share size + margin */
.compare-x-icon,
.compare-check {
  flex-shrink: 0;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.1rem;
}

.compare-x-icon {
  color: oklch(0.78 0.22 25); /* brand red */
  --x-len: 18;
}
.compare-check {
  color: oklch(0.79 0.18 149); /* fresh green */
  --check-len: 28;
}

/* SVG path stroke draw-in. Defaults to fully drawn so the lists are
   readable even if the ScrollTrigger never fires. JS adds .is-pending
   before the trigger to hide the strokes, then swaps to .is-revealed
   which animates them back to 0 (drawn). */
.compare-x-icon path,
.compare-check path {
  stroke-dasharray: var(--x-len, var(--check-len));
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 620ms cubic-bezier(0.55, 0.06, 0.45, 0.94);
}

.compare-list-others.is-pending .compare-x-icon path {
  stroke-dashoffset: var(--x-len);
}
.compare-list-others.is-revealed .compare-x-icon path {
  stroke-dashoffset: 0;
}
.compare-list-freaklab.is-pending .compare-check path {
  stroke-dashoffset: var(--check-len);
}
.compare-list-freaklab.is-revealed .compare-check path {
  stroke-dashoffset: 0;
}

/* ════════════════════════════════════════════════════════════════════
 * Stats section — prep for 3D rotateX scroll reveal. Cards keep the
 * existing hover lift; we only add `transform-style: preserve-3d`
 * and a perspective on the grid for the scroll-driven flip-in.
 * ════════════════════════════════════════════════════════════════════ */
.landing-stats-grid {
  perspective: 1200px;
}
.landing-stat-card {
  transform-style: preserve-3d;
}

/* ════════════════════════════════════════════════════════════════════
 * Timeline polish — dots get a glow ring on reveal that pulses once.
 * ════════════════════════════════════════════════════════════════════ */
.landing-timeline-dot {
  transition: box-shadow 320ms ease, transform 320ms ease;
}

.landing-timeline-dot.is-active {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 6px oklch(0.637 0.237 25.331 / 16%),
              0 0 18px oklch(0.637 0.237 25.331 / 0.45);
  animation: timelineDotPulse 1.4s ease-out 1;
}

@keyframes timelineDotPulse {
  0%   { box-shadow: 0 0 0 0 oklch(0.637 0.237 25.331 / 0.6), 0 0 0 0 oklch(0.637 0.237 25.331 / 0); }
  60%  { box-shadow: 0 0 0 14px oklch(0.637 0.237 25.331 / 0.0), 0 0 18px oklch(0.637 0.237 25.331 / 0.5); }
  100% { box-shadow: 0 0 0 6px oklch(0.637 0.237 25.331 / 16%), 0 0 18px oklch(0.637 0.237 25.331 / 0.45); }
}

/* ── AI Mentor add-on row on /#plans (sits below the main tier grid) ── */
.plan-addons-row {
  margin: 1.5rem auto 0;
  max-width: var(--max-width);
  padding: 0 1rem;
}

.plan-addon-card {
  position: relative;
  background:
    radial-gradient(ellipse at top right, oklch(from var(--accent) l c h / 14%), transparent 60%),
    linear-gradient(160deg, oklch(from var(--accent) l c h / 8%), oklch(from var(--card) l c h / 100%) 65%);
  border: 1px solid oklch(from var(--accent) l c h / 35%);
  border-radius: var(--card-radius);
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.plan-addon-tag-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.plan-addon-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: oklch(from var(--accent) l c h / 18%);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.plan-addon-price strong {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.plan-addon-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1.4rem;
  align-items: start;
}

@media (max-width: 760px) {
  .plan-addon-body { grid-template-columns: 1fr; }
}

.plan-addon-headline {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.plan-addon-title {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0;
  line-height: 1.15;
}

.plan-addon-desc {
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

.plan-addon-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.plan-addon-features li {
  font-size: 0.85rem;
  color: var(--muted-foreground);
  padding-left: 1.15rem;
  position: relative;
  line-height: 1.5;
}

.plan-addon-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.plan-addon-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid oklch(from var(--accent) l c h / 18%);
  margin-top: 0.4rem;
}

.plan-addon-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  color: var(--foreground);
  cursor: pointer;
  user-select: none;
}

.plan-addon-toggle input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.plan-addon-actions .button {
  min-width: 11rem;
}

/* ── Live threat intel strip on landing ────────────────────────────── */
.threat-feed-section .section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.threat-feed-pulse {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--success);
  position: relative;
}

.threat-feed-pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  background: oklch(from var(--success) l c h / 50%);
  animation: threat-feed-pulse-ring 2s ease-out infinite;
}

@keyframes threat-feed-pulse-ring {
  0%   { transform: scale(0.6); opacity: 0.7; }
  100% { transform: scale(2.4); opacity: 0; }
}

.threat-feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Horizontal marquee variant — top 4 items scroll continuously left.
   Reuses the same @keyframes marquee-scroll used by the keyword strip
   above, so cadence is consistent across the landing. Pause on hover. */
.threat-marquee {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  max-width: var(--max-width);
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: oklch(from var(--card) l c h / 60%);
  /* Soft fade on left/right edges so items slide in/out instead of
     hard-clipping at the viewport edge. */
  -webkit-mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
}

.threat-marquee-inner {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 1.4rem;
  white-space: nowrap;
  will-change: transform;
  animation: marquee-scroll 60s linear infinite;
}

.threat-marquee:hover .threat-marquee-inner {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .threat-marquee-inner { animation: none; }
}

.threat-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.25rem 0.35rem;
  font-size: 0.86rem;
  color: var(--foreground);
  text-decoration: none;
  border-radius: 0.4rem;
  transition: background 140ms ease;
}

.threat-marquee-item:hover {
  background: oklch(1 0 0 / 4%);
}

.threat-marquee-kind {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: oklch(from var(--primary) l c h / 12%);
  color: var(--primary);
  border: 1px solid oklch(from var(--primary) l c h / 24%);
}

.threat-marquee-sev {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.14rem 0.42rem;
  border-radius: 0.3rem;
  text-transform: uppercase;
}
.threat-marquee-sev-critical { background: oklch(0.34 0.20 25); color: oklch(0.95 0.10 25); }
.threat-marquee-sev-high     { background: oklch(0.36 0.18 50); color: oklch(0.93 0.12 50); }
.threat-marquee-sev-medium   { background: oklch(0.36 0.14 85); color: oklch(0.93 0.11 85); }
.threat-marquee-sev-low      { background: oklch(0.32 0.10 196); color: oklch(0.85 0.08 196); }

.threat-marquee-title {
  font-weight: 500;
}

.threat-marquee-fresh {
  color: var(--muted-foreground);
  font-size: 0.78rem;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
}

.threat-marquee-sep {
  color: var(--muted-foreground);
  opacity: 0.5;
  padding-left: 0.5rem;
}

.threat-feed-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-align: left;
  transition: border-color 0.18s ease, transform 0.18s ease;
  position: relative;
  overflow: hidden;
}

.threat-feed-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  transition: background 0.18s ease;
}

.threat-feed-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.threat-feed-card:hover::before { background: var(--accent); }

.threat-feed-card-sev-critical::before { background: oklch(from var(--destructive) l c h / 80%); }
.threat-feed-card-sev-high::before { background: oklch(from var(--destructive) l c h / 50%); }
.threat-feed-card-sev-medium::before { background: oklch(from var(--warning) l c h / 70%); }
.threat-feed-card-sev-low::before { background: oklch(from var(--success) l c h / 60%); }

.threat-feed-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.threat-feed-kind {
  font-weight: 700;
  color: var(--muted-foreground);
}

.threat-feed-sev {
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.threat-feed-sev-critical {
  background: oklch(from var(--destructive) l c h / 22%);
  color: var(--destructive);
}
.threat-feed-sev-high {
  background: oklch(from var(--destructive) l c h / 14%);
  color: var(--destructive);
}
.threat-feed-sev-medium {
  background: oklch(from var(--warning) l c h / 18%);
  color: var(--warning);
}
.threat-feed-sev-low {
  background: oklch(from var(--success) l c h / 14%);
  color: var(--success);
}

.threat-feed-fresh {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted-foreground);
  letter-spacing: 0;
  text-transform: none;
}

.threat-feed-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--foreground);
  text-decoration: none;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

a.threat-feed-title:hover { color: var(--accent); }

.threat-feed-summary {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--muted-foreground);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.threat-feed-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: auto;
}

.threat-feed-tag {
  font-size: 0.68rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-family: var(--font-mono);
}

.threat-feed-cta {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

/* ── Landing AI Mentor section: world-first hero + 3 pillars + compare ── */

.landing-mentor-section {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Hero: huge headline, soft primary-tinted backdrop, centered */
.landing-mentor-hero {
  text-align: center;
  padding: 3rem 2rem;
  border-radius: var(--card-radius);
  background:
    radial-gradient(circle at 50% 0%, color-mix(in oklab, var(--primary) 14%, transparent) 0%, transparent 60%),
    var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}
.landing-mentor-badge {
  background: color-mix(in oklab, var(--primary) 14%, var(--card));
  border: 1px solid color-mix(in oklab, var(--primary) 35%, transparent);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-weight: 600;
}
.landing-mentor-headline {
  margin: 0;
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 700;
  max-width: 820px;
  color: var(--foreground);
}
.landing-mentor-accent {
  background: linear-gradient(135deg, var(--primary), color-mix(in oklab, var(--primary) 60%, #f97316));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.landing-mentor-lede {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  max-width: 640px;
}

/* Three pillars: context / memory / live intel */
.landing-mentor-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.landing-mentor-pillar {
  padding: 1.5rem;
  border-radius: var(--card-radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.landing-mentor-pillar:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--primary) 35%, var(--border));
}
.landing-mentor-pillar-icon {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  background: color-mix(in oklab, var(--primary) 12%, var(--card));
  color: var(--primary);
}
.landing-mentor-pillar-icon svg { width: 1.3rem; height: 1.3rem; }
.landing-mentor-pillar-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--foreground);
}
.landing-mentor-pillar-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted-foreground);
}

/* Compare card — single tight block instead of two giant columns */
.landing-mentor-compare {
  padding: 2rem;
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.landing-mentor-compare-q {
  margin: 0;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--foreground);
}
.landing-mentor-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.landing-mentor-compare-side {
  padding: 1.25rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 2%);
}
.landing-mentor-compare-us {
  background: color-mix(in oklab, var(--primary) 6%, var(--card));
  border-color: color-mix(in oklab, var(--primary) 30%, var(--border));
}
.landing-mentor-compare-label {
  margin: 0 0 0.7rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--muted-foreground);
}
.landing-mentor-compare-us .landing-mentor-compare-label {
  color: var(--primary);
}
.landing-mentor-compare-side ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}
.landing-mentor-compare-side li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted-foreground);
}
.landing-mentor-compare-vs li::before {
  content: "✕";
  position: absolute;
  left: 0;
  top: 0;
  color: #ef4444;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.55;
}
.landing-mentor-compare-us li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.45;
}
.landing-mentor-compare-foot {
  margin: 0;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted-foreground);
}
.landing-mentor-compare-foot strong {
  color: var(--foreground);
}

@media (max-width: 900px) {
  .landing-mentor-pillars {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .landing-mentor-hero {
    padding: 2rem 1.25rem;
  }
  .landing-mentor-compare {
    padding: 1.25rem;
  }
  .landing-mentor-compare-grid {
    grid-template-columns: 1fr;
  }
}

/* The legacy .plan-grid rule used to set #plans-grid as a 4-col CSS grid;
   the new pricing UI manages its own grid via .plan-cards-grid, so the
   container itself is now a vertical stack. Without this override the
   currency header / mentor row / CTA bar were getting scattered as
   misaligned grid items. */
#plans-grid {
  display: block;
}

/* Per-seat label sub-line under the price on tier cards (Team) */
.plan-per-seat {
  margin: -0.2rem 0 0;
  font-size: 0.78rem;
  font-weight: 500;
}

/* Mentor row: Team-rate stacked price label */
.plan-mentor-row-price-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  text-align: right;
}
.plan-mentor-row-team-rate {
  font-size: 0.72rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

/* Mentor row when checkout isn't wired yet — softer than disabled, still
   tickable so we can capture intent and email when billing opens. */
.plan-mentor-row-pending {
  border-style: dashed;
}
.plan-mentor-soon {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  font-style: italic;
}

/* Currency selector at the top of the pricing page */
.plan-currency-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin: 0 0 1rem;
}
.plan-currency-label {
  margin: 0;
  font-size: 0.85rem;
}
.plan-currency-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem;
  background: var(--card);
}
.plan-currency-opt {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted-foreground);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.plan-currency-opt:hover {
  color: var(--foreground);
}
.plan-currency-opt.is-active {
  background: var(--primary);
  color: white;
}

/* ── Pricing v2: select-then-checkout with sticky CTA ─────────────────── */

/* Tier cards live in a grid inside #plans-grid (which is the host the JS
   writes into). The card is a <button> now so it's keyboard-accessible. */
.plan-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
}
button.plan-card {
  appearance: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
  width: 100%;
  position: relative;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}
button.plan-card:hover {
  border-color: color-mix(in oklab, var(--primary) 30%, var(--border));
  transform: translateY(-2px);
}
button.plan-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
button.plan-card:disabled {
  cursor: default;
  opacity: 0.85;
  transform: none;
}
.plan-card-featured {
  border-color: color-mix(in oklab, var(--primary) 35%, var(--border));
}
.plan-card-selected {
  border-color: var(--primary) !important;
  box-shadow:
    0 0 0 3px color-mix(in oklab, var(--primary) 18%, transparent),
    var(--card-shadow);
}
.plan-card-current {
  border-color: color-mix(in oklab, var(--success, #16a34a) 50%, var(--border));
}
.plan-card-status {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--success, #16a34a) 18%, transparent);
  color: var(--success, #16a34a);
}
.plan-card-status-pick {
  background: color-mix(in oklab, var(--primary) 18%, transparent);
  color: var(--primary);
}

/* Mentor add-on row — single tickable strip, no buttons */
.plan-mentor-row {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1.1rem 1.25rem;
  margin: 1.25rem 0 0;
  border: 1.5px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--card);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}
.plan-mentor-row:hover {
  border-color: color-mix(in oklab, var(--primary) 35%, var(--border));
}
.plan-mentor-row-on {
  border-color: var(--primary);
  background: color-mix(in oklab, var(--primary) 6%, var(--card));
}
.plan-mentor-row-disabled {
  cursor: not-allowed;
  opacity: 0.7;
}
.plan-mentor-check {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.18rem;
  accent-color: var(--primary);
  flex: 0 0 auto;
}
.plan-mentor-text { flex: 1; min-width: 0; }
.plan-mentor-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.25rem;
}
.plan-mentor-row-head strong { font-size: 1rem; }
.plan-mentor-row-price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.plan-mentor-soon {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
}

/* Sticky checkout CTA bar */
.plan-checkout-bar {
  position: sticky;
  bottom: 0.75rem;
  margin: 1.25rem 0 0;
  padding: 1rem 1.25rem;
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 96%, var(--primary) 4%);
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 5;
  backdrop-filter: blur(8px);
}
.plan-checkout-summary { flex: 1; min-width: 0; }
.plan-checkout-line { margin: 0; font-size: 0.95rem; }
.plan-checkout-summary .muted-copy { margin: 0.15rem 0 0; font-size: 0.82rem; }
.plan-checkout-cta {
  flex: 0 0 auto;
  min-width: 200px;
}
.plan-checkout-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (max-width: 600px) {
  .plan-checkout-bar { flex-direction: column; align-items: stretch; }
  .plan-checkout-cta { width: 100%; }
}

/* ── Curriculum progress (shared by /#dashboard + /#profile) ──────────── */
.curriculum-progress-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.curriculum-progress-totals {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}
.curriculum-progress-totals-text {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.95rem;
}
.curriculum-progress-totals-text strong { font-size: 1rem; }
.curriculum-progress-pct {
  font-weight: 700;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
}
.curriculum-progress-levels {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.curriculum-progress-level {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.7rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 1.5%);
  text-decoration: none;
  color: inherit;
  transition: border-color 140ms ease, transform 120ms ease;
}
.curriculum-progress-level:hover {
  border-color: color-mix(in oklab, var(--primary) 35%, var(--border));
  transform: translateY(-1px);
}
.curriculum-progress-level-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.86rem;
}
.curriculum-progress-level-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--primary) 14%, transparent);
  color: var(--primary);
}
.curriculum-progress-level-title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.curriculum-progress-level-pct {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  color: var(--muted-foreground);
  flex: 0 0 auto;
}
.curriculum-progress-empty {
  font-size: 0.88rem;
  padding: 1rem 0;
}

/* Dashboard placement: the curriculum card spans the full row underneath
   the Progress Overview + Skill Radar pair so the level breakdown gets
   real estate. */
.dashboard-curriculum-card {
  grid-column: 1 / -1;
}

/* (Profile no longer has a Curriculum/Skill row — that lives on the
   dashboard now to avoid duplication.) */

/* Profile hero — bio line under the meta */
.profile-hero-bio {
  margin: 0.65rem 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--foreground);
}

/* Profile information form (display name + bio) */
.profile-form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.profile-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.profile-form-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
}
.profile-form-hint {
  margin: 0;
  font-size: 0.78rem;
}
.profile-edit-textarea {
  resize: vertical;
  min-height: 3.5rem;
  font-family: inherit;
}
.profile-form-actions {
  display: flex;
  justify-content: flex-end;
}

/* Account & security blocks */
.profile-account-readonly {
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  background: oklch(1 0 0 / 2.5%);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--foreground);
  word-break: break-all;
}

/* Sign-in method rows */
.profile-signin-methods {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.profile-signin-method {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 1.5%);
  font-size: 0.88rem;
}
.profile-signin-method-icon {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--foreground);
  background: color-mix(in oklab, var(--primary) 12%, var(--card));
  flex: 0 0 auto;
}
.profile-signin-method-label { flex: 1; font-weight: 500; }
.profile-signin-method-status {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--success, #16a34a) 18%, transparent);
  color: var(--success, #16a34a);
}

/* ── Dashboard v2: KPI strip + side-by-side progress + radar ──────────── */
.dashboard-overview-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Row 1 — 4 KPI tiles */
.dashboard-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.dashboard-kpi-card {
  padding: 1rem 1.15rem;
  border-radius: var(--card-radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color 160ms ease, transform 160ms ease;
}
.dashboard-kpi-card:hover {
  border-color: color-mix(in oklab, var(--primary) 30%, var(--border));
  transform: translateY(-1px);
}
.dashboard-kpi-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--muted-foreground);
}
.dashboard-kpi-value {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
}
.dashboard-kpi-value small {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted-foreground);
}
.dashboard-kpi-track {
  height: 0.35rem;
  margin-top: 0.15rem;
}
.dashboard-kpi-hint {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Row 2 — side-by-side Labs + Lessons cards */
.dashboard-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
}
.dashboard-progress-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.dashboard-card-head {
  margin: 0;
}
.dashboard-card-headline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}
.dashboard-headline-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
}
.dashboard-headline-value small {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted-foreground);
}
.dashboard-headline-pct {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.dashboard-track-bars {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.dashboard-track-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.dashboard-track-info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.dashboard-track-name { font-weight: 600; }
.dashboard-card-cta {
  align-self: flex-start;
  margin-top: 0.25rem;
}

@media (max-width: 980px) {
  .dashboard-progress-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .dashboard-kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .dashboard-headline-value { font-size: 1.65rem; }
}

/* ── Team / org dashboard ──────────────────────────────────────────────── */
.org-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Empty-state card (not in any org) */
.org-empty .surface-title { margin-bottom: 0.4rem; }
.org-join-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}
.org-join-row .profile-edit-input { flex: 1; min-width: 16rem; }

/* Hero */
.org-hero {
  background:
    radial-gradient(circle at 0% 0%, color-mix(in oklab, var(--primary) 14%, transparent) 0%, transparent 55%),
    var(--card);
}
.org-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.org-hero-copy { flex: 1; min-width: 0; }
.org-hero-title {
  margin: 0.25rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.org-hero-seats {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: flex-start;
  min-width: 8rem;
}
.org-hero-seats-line { display: inline-flex; align-items: baseline; gap: 0.25rem; }
.org-hero-seats-line strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }

/* Section head with right-aligned action */
.org-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Member roster */
.org-member-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.org-member-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1.6fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: var(--card);
}
.org-member-avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), color-mix(in oklab, var(--primary) 60%, #f97316));
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.org-member-identity {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.org-member-name-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}
.org-member-self-pill {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--primary) 16%, transparent);
  color: var(--primary);
}
.org-member-role-pill {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
}
.org-member-role-admin {
  background: color-mix(in oklab, var(--success, #16a34a) 18%, transparent);
  color: var(--success, #16a34a);
}
.org-member-role-member {
  background: oklch(1 0 0 / 6%);
  color: var(--muted-foreground);
}
.org-member-email {
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.org-member-progress {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}
.org-member-progress-row {
  display: grid;
  grid-template-columns: 3.5rem 4rem 1fr;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}
.org-member-progress-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.org-member-progress-track {
  height: 0.4rem;
}
.org-member-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: stretch;
}

/* Invite list */
.org-invite-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.org-invite-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: oklch(1 0 0 / 1.5%);
  font-size: 0.88rem;
}
.org-invite-row code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.org-invite-status {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
}
.org-invite-status-pending {
  background: color-mix(in oklab, var(--primary) 14%, transparent);
  color: var(--primary);
}
.org-invite-status-used {
  background: color-mix(in oklab, var(--success, #16a34a) 18%, transparent);
  color: var(--success, #16a34a);
}
.org-invite-status-revoked {
  background: oklch(1 0 0 / 6%);
  color: var(--muted-foreground);
}
.org-invite-status-expired {
  background: color-mix(in oklab, var(--warning, #f59e0b) 18%, transparent);
  color: var(--warning, #f59e0b);
}

@media (max-width: 760px) {
  .org-member-row {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "avatar identity"
      "progress progress"
      "actions actions";
  }
  .org-member-avatar { grid-area: avatar; }
  .org-member-identity { grid-area: identity; }
  .org-member-progress { grid-area: progress; }
  .org-member-actions { grid-area: actions; flex-direction: row; }
  .org-invite-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
}

/* --------------------------------------------------------------------- */
/* Paddle checkout — "preparing your secure checkout" backdrop           */
/* --------------------------------------------------------------------- */
/* Sits behind Paddle's own overlay so the portal never goes blank while
   paddle.js loads + the transaction initialises. Branded to match the
   rest of the portal so the handoff feels seamless instead of jarring.   */

.paddle-preparing {
  position: fixed;
  inset: 0;
  z-index: 2147483640; /* one below Paddle's overlay; we just want backdrop */
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
      ellipse 80% 60% at 50% 35%,
      oklch(0.637 0.237 25.331 / 0.18),
      transparent 70%
    ),
    rgba(8, 6, 6, 0.86);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: auto;
}

.paddle-preparing.is-open { opacity: 1; }

.paddle-preparing-card {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  padding: 32px 28px 24px;
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(28, 18, 18, 0.92) 0%,
    rgba(14, 10, 10, 0.96) 100%
  );
  border: 1px solid oklch(0.637 0.237 25.331 / 0.28);
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 48px oklch(0.637 0.237 25.331 / 0.18);
  text-align: center;
  color: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  transform: translateY(8px);
  animation: paddlePreparingRise 320ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

@keyframes paddlePreparingRise {
  to { transform: translateY(0); }
}

.paddle-preparing-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-top-color: oklch(0.637 0.237 25.331);
  border-right-color: oklch(0.637 0.237 25.331 / 0.5);
  animation: paddlePreparingSpin 0.9s linear infinite;
  box-shadow: 0 0 18px oklch(0.637 0.237 25.331 / 0.35);
}

@keyframes paddlePreparingSpin {
  to { transform: rotate(360deg); }
}

.paddle-preparing-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: oklch(0.637 0.237 25.331);
  font-weight: 600;
  margin-bottom: 8px;
}

.paddle-preparing-title {
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 6px;
  color: #fff;
}

.paddle-preparing-plan {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 22px;
}

.paddle-preparing-footer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
}

.paddle-preparing-lock { font-size: 0.78rem; opacity: 0.85; }

@media (prefers-reduced-motion: reduce) {
  .paddle-preparing { transition: none; }
  .paddle-preparing-card { animation: none; transform: none; }
  .paddle-preparing-spinner { animation-duration: 1.8s; }
}
