.beta-body {
  min-height: 100vh;
  background: var(--bg);
}

.beta-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.beta-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}

.beta-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.beta-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.beta-brand span {
  display: grid;
  gap: 2px;
}

.beta-brand small,
.beta-copy p,
.lesson-grid p,
.choice-card span,
.console-panel p,
.beta-topbar p {
  color: var(--muted);
}

.beta-steps {
  display: grid;
  gap: 8px;
}

.beta-steps button,
.beta-side-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font: 800 0.92rem/1 Inter, sans-serif;
  padding: 0 12px;
  cursor: pointer;
}

.beta-steps button.is-active,
.beta-steps button:hover,
.beta-side-link:hover {
  color: var(--ink);
  border-color: var(--line);
  background: color-mix(in srgb, var(--blue) 12%, transparent);
}

.beta-side-link {
  margin-top: auto;
  border-color: var(--line);
}

.beta-main {
  width: min(1040px, calc(100% - 32px));
  display: grid;
  gap: 18px;
  align-content: start;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 46px) 0 110px;
}

.beta-topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.beta-topbar h1,
.beta-card h2 {
  margin: 0 0 10px;
  font-family: Manrope, Inter, sans-serif;
  line-height: 1.02;
}

.beta-topbar h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}

.beta-card h2 {
  font-size: clamp(1.55rem, 3vw, 2.55rem);
}

.beta-progress-chip {
  min-width: 128px;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
}

.beta-progress-chip span {
  font-family: Manrope, Inter, sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
}

.beta-progress-chip small {
  color: var(--soft);
  font-weight: 800;
}

.beta-card {
  display: none;
  gap: 22px;
  min-height: 500px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: var(--shadow);
}

.beta-card.is-active {
  display: grid;
}

.beta-label {
  color: var(--green);
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.choice-grid,
.lesson-grid,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

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

.choice-card,
.lesson-grid article,
.summary-card,
.console-panel,
.mentor-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel-2) 76%, transparent);
  padding: 16px;
}

.choice-card {
  min-height: 142px;
  display: grid;
  gap: 8px;
  text-align: left;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.choice-card.is-selected {
  border-color: color-mix(in srgb, var(--blue) 70%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 12%, transparent);
}

.code-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 14px;
}

.code-editor {
  width: 100%;
  min-height: 270px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #dff4ff;
  background: #020917;
  font: 700 0.95rem/1.7 "JetBrains Mono", monospace;
  padding: 18px;
  resize: vertical;
  outline: none;
}

.console-panel {
  display: grid;
  align-content: start;
  gap: 10px;
}

.console-panel.is-success {
  border-color: color-mix(in srgb, var(--green) 70%, var(--line));
}

.console-panel.is-error {
  border-color: #ff9f9f;
}

.chat-row {
  border-radius: 14px;
  padding: 14px;
  color: var(--ink);
  background: color-mix(in srgb, var(--blue) 10%, transparent);
}

.mentor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.beta-actions {
  position: fixed;
  left: 280px;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px max(16px, calc((100vw - 280px - 1040px) / 2 + 16px));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
}

.beta-button {
  min-height: 46px;
  min-width: 132px;
  border-radius: 999px;
  font: 800 0.92rem/1 Inter, sans-serif;
  cursor: pointer;
  padding: 0 18px;
}

.beta-button.primary {
  border: 0;
  color: #04111e;
  background: linear-gradient(135deg, #95ddff, #4cc0f7);
}

.beta-button.ghost {
  color: var(--ink);
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--panel) 80%, transparent);
}

.beta-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 900px) {
  .beta-shell {
    display: block;
  }

  .beta-sidebar {
    position: static;
    height: auto;
  }

  .beta-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow-x: auto;
  }

  .beta-steps button {
    min-width: 124px;
  }

  .choice-grid,
  .lesson-grid,
  .summary-grid,
  .code-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .beta-actions {
    left: 0;
  }
}

@media (max-width: 560px) {
  .beta-main {
    padding-bottom: 142px;
  }

  .beta-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .beta-button {
    width: 100%;
  }
}
