:root {
  color-scheme: light;
  --ink: #17202e;
  --soft-ink: #374151;
  --muted: #697487;
  --line: #dbe2ea;
  --paper: #ffffff;
  --background: #f3fbf8;
  --canvas: #f3fbf8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-tint: #fbfdff;
  --control: rgba(255, 255, 255, 0.9);
  --sidebar: #111827;
  --teal: #14b8a6;
  --teal-dark: #0f766e;
  --coral: #f9735b;
  --gold: #f4b63f;
  --blue: #3b82f6;
  --lavender: #8b7cf6;
  --code: #101725;
  --radius: 8px;
  --shadow: 0 18px 50px rgba(23, 32, 46, 0.1);
}

/* AI course readability pass */
.ai-overlay .python-detail {
  display: grid;
  gap: 22px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(248, 252, 250, 0.88), rgba(241, 248, 255, 0.72));
}

.ai-overlay .python-lesson-hero {
  padding: 28px;
  border-color: rgba(20, 184, 166, 0.2);
  background:
    linear-gradient(135deg, rgba(8, 20, 34, 0.98), rgba(15, 118, 110, 0.9) 54%, rgba(37, 99, 235, 0.78)),
    var(--sidebar);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.ai-overlay .python-lesson-hero h3 {
  max-width: 880px;
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1.08;
}

.ai-overlay .python-lesson-hero p {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  font-weight: 520;
}

.ai-overlay .eyebrow,
.ai-overlay .ai-explain-card span,
.ai-overlay .ai-project-grid span,
.ai-overlay .ai-resource-strip > span,
.ai-overlay .ai-lab-bridge-grid span,
.ai-overlay .ai-cheatsheet-card > .preview-lock-content > span,
.ai-overlay .ai-lab-recipe dt {
  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: 0.02em;
}

.ai-overlay :is(
  .ai-beginner-guide,
  .ai-visual-diagram,
  .ai-cheatsheet,
  .ai-notebook,
  .ai-project-card,
  .ai-tutorial-section,
  .ai-scenario-card,
  .ai-exercise-walkthrough,
  .python-exercise-card,
  .python-quiz-section,
  .python-interview-section
) {
  margin-top: 0;
  padding: 22px;
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.055);
}

.ai-overlay :is(
  .ai-explain-card,
  .ai-vocab-panel,
  .ai-lab-recipe,
  .ai-portfolio-proof,
  .python-info-card,
  .ai-vocab-grid article,
  .ai-lab-recipe-list > article,
  .ai-lab-recipe dl div,
  .ai-flow-node,
  .ai-diagram-callouts p,
  .ai-solve-steps article,
  .ai-line-explainer article,
  .ai-line-explainer dl div,
  .ai-guided-answer,
  .ai-notebook-cell,
  .ai-project-grid article,
  .ai-lab-bridge,
  .ai-cheatsheet-card,
  .ai-lab-bridge-grid article,
  .ai-lab-action-list li,
  .ai-tutorial-step,
  .ai-checkpoint-quiz,
  .python-quiz-card
) {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: none;
}

.ai-overlay :is(
  .ai-beginner-guide h4,
  .ai-visual-diagram h4,
  .ai-notebook h4,
  .ai-project-card h4,
  .ai-tutorial-section h4,
  .ai-exercise-walkthrough h4,
  .python-info-card h4,
  .python-exercise-card h4,
  .python-quiz-section h4,
  .python-interview-section h4
) {
  font-size: 1.16rem;
  line-height: 1.28;
}

.ai-overlay :is(
  .ai-explain-card p,
  .ai-vocab-panel p,
  .ai-lab-recipe p,
  .ai-lab-recipe dd,
  .ai-portfolio-proof li,
  .ai-visual-diagram header p:not(.eyebrow),
  .ai-exercise-walkthrough header p:not(.eyebrow),
  .ai-solve-steps p,
  .ai-line-explainer dd,
  .ai-line-explainer li,
  .ai-project-card header p,
  .ai-project-grid ul,
  .ai-step-actions,
  .ai-lab-bridge p,
  .ai-step-body p,
  .ai-cell-body p,
  .ai-cell-body li,
  .ai-scenario-card p,
  .python-info-card ul,
  .python-quiz-card label,
  .ai-checkpoint-quiz label
) {
  color: var(--soft-ink);
  font-weight: 520;
  line-height: 1.65;
}

.ai-overlay :is(
  .ai-beginner-guide > header > strong,
  .ai-lab-recipe > header > span,
  .ai-exercise-walkthrough > header > strong,
  .ai-project-card header strong,
  .ai-tutorial-section header span,
  .ai-scenario-card strong
) {
  min-height: auto;
  padding: 14px 16px;
  font-weight: 680;
  line-height: 1.5;
}

.ai-overlay .python-concept-grid {
  gap: 16px;
  margin-top: 0;
}

.ai-overlay .python-info-card {
  padding: 18px;
}

.ai-overlay .python-info-card pre,
.ai-overlay .python-exercise-card pre,
.ai-overlay .ai-lab-recipe pre,
.ai-overlay .ai-lab-bridge pre,
.ai-overlay .ai-lab-action-list pre,
.ai-overlay .ai-solve-steps pre,
.ai-overlay .ai-guided-answer pre,
.ai-overlay .ai-sample-data pre,
.ai-overlay .ai-tutorial-step pre,
.ai-overlay .ai-notebook textarea,
.ai-overlay .ai-notebook-output pre {
  font-size: 0.82rem;
  line-height: 1.62;
}

.ai-overlay .ai-visual-diagram {
  overflow-x: auto;
}

.ai-overlay .ai-flow-node {
  min-height: 112px;
  padding: 16px;
}

.ai-overlay .ai-flow-node strong,
.ai-overlay .ai-lab-recipe h6,
.ai-overlay .ai-solve-steps h5,
.ai-overlay .ai-step-body h5,
.ai-overlay .ai-lab-bridge h5 {
  font-weight: 760;
}

.ai-overlay .ai-notebook {
  gap: 20px;
}

.ai-overlay .ai-notebook > header {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.ai-overlay .ai-notebook-cells {
  gap: 16px;
}

.ai-overlay .ai-notebook-cell {
  grid-template-columns: 1fr;
}

.ai-overlay .ai-cell-prompt {
  justify-content: start;
  padding: 10px 16px;
  border-right: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(20, 184, 166, 0.07);
  font-size: 0.72rem;
  font-weight: 760;
}

.ai-overlay .code-cell .ai-cell-prompt {
  background: rgba(37, 99, 235, 0.07);
}

.ai-overlay .ai-cell-body {
  padding: 18px;
}

.ai-overlay .ai-cell-body h5 {
  font-size: 1rem;
  font-weight: 760;
}

.ai-overlay .ai-notebook-output strong,
.ai-overlay .python-lab-output strong {
  font-weight: 760;
  letter-spacing: 0.02em;
}

.ai-overlay .ai-notebook-footnote,
.ai-overlay .python-exercise-actions {
  font-weight: 620;
}

.ai-overlay .python-nav-group header strong,
.ai-overlay .python-nav button span,
.ai-overlay .python-nav button small,
.ai-overlay .python-progress-strip span {
  font-weight: 720;
}

.ai-overlay .python-nav-group header span {
  font-weight: 520;
}

:root[data-theme="dark"] .ai-overlay .python-detail {
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.9), rgba(15, 23, 42, 0.82));
}

:root[data-theme="dark"] .ai-overlay :is(
  .ai-beginner-guide,
  .ai-visual-diagram,
  .ai-notebook,
  .ai-project-card,
  .ai-tutorial-section,
  .ai-scenario-card,
  .ai-exercise-walkthrough,
  .python-exercise-card,
  .python-quiz-section,
  .python-interview-section,
  .ai-explain-card,
  .ai-vocab-panel,
  .ai-lab-recipe,
  .ai-portfolio-proof,
  .python-info-card,
  .ai-vocab-grid article,
  .ai-lab-recipe-list > article,
  .ai-lab-recipe dl div,
  .ai-flow-node,
  .ai-diagram-callouts p,
  .ai-solve-steps article,
  .ai-line-explainer article,
  .ai-line-explainer dl div,
  .ai-guided-answer,
  .ai-notebook-cell,
  .ai-project-grid article,
  .ai-lab-bridge,
  .ai-lab-bridge-grid article,
  .ai-lab-action-list li,
  .ai-tutorial-step,
  .ai-checkpoint-quiz,
  .python-quiz-card
) {
  border-color: rgba(71, 85, 105, 0.58);
  background: rgba(15, 23, 42, 0.78);
}

@media (max-width: 900px) {
  .ai-overlay .python-detail {
    padding: 18px;
  }

  .ai-overlay .python-lesson-hero,
  .ai-overlay :is(
    .ai-beginner-guide,
    .ai-visual-diagram,
    .ai-notebook,
    .ai-project-card,
    .ai-tutorial-section,
    .ai-scenario-card,
    .ai-exercise-walkthrough,
    .python-exercise-card,
    .python-quiz-section,
    .python-interview-section
  ) {
    padding: 18px;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf4fb;
  --soft-ink: #c6d2df;
  --muted: #91a1b7;
  --line: #26364d;
  --paper: #111827;
  --background: #07111f;
  --canvas: #07111f;
  --surface: #111827;
  --surface-soft: #0f172a;
  --surface-tint: #101a2b;
  --control: rgba(17, 24, 39, 0.9);
  --sidebar: #070d19;
  --teal: #2dd4bf;
  --teal-dark: #99f6e4;
  --coral: #fb9278;
  --gold: #facc5f;
  --blue: #93c5fd;
  --lavender: #c4b5fd;
  --code: #050916;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.13), transparent 34%),
    linear-gradient(315deg, rgba(59, 130, 246, 0.1), transparent 30%),
    linear-gradient(25deg, rgba(244, 182, 63, 0.08), transparent 34%),
    var(--canvas);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body.no-scroll {
  overflow: hidden;
}

body.lesson-course-open .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.lesson-course-open .pattern-sidebar {
  display: none;
}

body.lesson-course-open .content-shell > :is(
  #homeHero,
  .landing-explore,
  .landing-difference,
  #courseDashboard,
  .home-track-grid,
  #coursePage,
  .topbar,
  #practiceWorkspace,
  .course-footer
) {
  display: none !important;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.site-header {
  display: grid;
  width: 100%;
  align-items: center;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  gap: 28px;
  padding: 18px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.site-header .brand {
  min-width: 0;
  color: var(--ink);
}

.site-header .brand small {
  color: var(--muted);
}

.site-header .brand-mark {
  border-radius: 14px;
}

.site-nav {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.site-nav a,
.site-nav button {
  min-height: 42px;
  align-items: center;
  justify-content: center;
}

.site-nav-link,
.site-nav > button {
  display: inline-flex;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--teal-dark);
  background: var(--surface-soft);
  font-weight: 900;
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.site-nav-link:hover,
.site-nav > button:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 184, 166, 0.36);
  background: rgba(20, 184, 166, 0.08);
}

.site-nav-link[aria-current="page"] {
  color: #b06a00;
  border-color: transparent;
  background: transparent;
}

.site-primary-nav {
  justify-content: center;
  gap: clamp(14px, 2.6vw, 34px);
}

.site-primary-nav .site-nav-link,
.site-primary-nav .nav-button {
  min-height: 38px;
  padding: 0;
  border: 0;
  color: var(--soft-ink);
  background: transparent;
  box-shadow: none;
}

.site-primary-nav .site-nav-link:hover,
.site-primary-nav .nav-button:hover {
  color: var(--teal-dark);
  background: transparent;
}

.site-account-nav {
  justify-content: flex-end;
}

.site-nav .theme-toggle,
.site-nav .profile-link,
.site-nav .login-link {
  min-height: 42px;
  box-shadow: none;
}

.site-account-nav .theme-toggle,
.site-account-nav .profile-link,
.site-account-nav .login-link {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 28px rgba(23, 32, 46, 0.06);
}

.site-account-nav .login-link {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--teal), var(--blue));
}

.site-footer {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 1120px;
  margin: 46px auto 0;
  padding: 44px 20px 22px;
  border: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0;
  color: var(--soft-ink);
  background: transparent;
  box-shadow: none;
  text-align: center;
  backdrop-filter: none;
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer strong {
  color: var(--ink);
  font-size: 1.08rem;
}

.site-footer span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.footer-mission {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.footer-signal-row {
  display: flex;
  max-width: 820px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 8px;
}

.footer-signal-row span {
  margin: 0;
  color: rgba(100, 116, 139, 0.58);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
}

.site-footer-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.site-footer nav {
  display: none;
}

.site-footer a {
  color: var(--teal-dark);
  font-weight: 900;
  text-decoration: none;
}

.course-site-header {
  max-width: none;
  margin: 0 0 14px;
}

.public-landing-shell {
  min-height: 100vh;
  padding-bottom: 32px;
}

.public-site-header {
  max-width: 1180px;
  margin: 0 auto 14px;
}

.landing-page .site-account-nav .site-nav-link {
  color: var(--soft-ink);
  background: rgba(255, 255, 255, 0.76);
}

.landing-page .site-account-nav .site-nav-link:hover {
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.08);
}

body.workspace-page-open .course-site-header {
  grid-template-columns: auto minmax(280px, 1fr) auto;
  justify-content: space-between;
}

body.workspace-page-open .course-site-header .brand {
  justify-self: start;
}

body.workspace-page-open .course-site-header .site-primary-nav {
  display: flex;
  justify-content: center;
}

body.course-page-open .course-footer,
body.workspace-page-open .course-footer {
  display: none;
}

.auth-site-header,
.profile-topbar {
  grid-template-columns: auto auto;
  justify-content: space-between;
}

.auth-site-header .site-nav,
.profile-topbar .site-nav {
  justify-content: flex-end;
}

.course-footer {
  margin-top: 44px;
}

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

body.course-access-checking .app-shell {
  visibility: hidden;
}

.authenticated-course .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

.authenticated-course .pattern-sidebar {
  display: none;
}

.pattern-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  padding: 22px;
  overflow-y: auto;
  flex-direction: column;
  gap: 22px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(23, 32, 46, 0.96)),
    var(--sidebar);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.26);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  font-weight: 750;
}

.progress-panel {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.progress-label {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-weight: 800;
}

.progress-panel strong {
  display: block;
  margin-top: 6px;
  font-size: 1.5rem;
}

.progress-track {
  height: 8px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--gold), var(--teal));
  transition: width 180ms ease;
}

.pattern-list {
  display: grid;
  gap: 8px;
}

.pattern-button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.76);
  background: transparent;
  text-align: left;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.pattern-button:hover,
.pattern-button.active {
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.pattern-button span:first-child {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pattern-button span:last-child {
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.76rem;
  font-weight: 850;
  text-align: center;
}

.content-shell {
  min-width: 0;
  overflow-x: hidden;
  padding: 0 26px 26px;
}

.home-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 560px;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.85fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  margin: 0 -26px 0;
  padding: 66px min(7vw, 96px) 134px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: #ffffff;
  background:
    linear-gradient(155deg, rgba(55, 65, 81, 0.96) 0 39%, rgba(34, 34, 34, 0.98) 39% 100%),
    #252525;
  box-shadow: none;
}

.home-hero::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(105deg, rgba(52, 65, 83, 0.9) 0 35%, transparent 35%),
    radial-gradient(circle at 77% 15%, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 70%);
  content: "";
}

.home-hero::after {
  position: absolute;
  right: -7%;
  bottom: -120px;
  left: -7%;
  z-index: -1;
  height: 245px;
  background: var(--canvas);
  content: "";
  transform: skewY(8deg);
  transform-origin: left top;
}

.home-hero .eyebrow {
  color: rgba(255, 255, 255, 0.74);
}

.home-hero-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  min-height: 370px;
}

.home-hero-copy h1 {
  max-width: 740px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(3.1rem, 5vw, 5.35rem);
  line-height: 1.02;
}

.home-hero-copy > p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.62;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-hero-actions .run-button,
.home-hero-actions .icon-text-button {
  min-height: 48px;
  padding: 0 18px;
}

.home-hero-actions .run-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), #0ea5e9);
  box-shadow: 0 18px 36px rgba(20, 184, 166, 0.25);
}

.home-hero-actions .icon-text-button {
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
}

.landing-proof-strip {
  display: flex;
  width: min(640px, 100%);
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.landing-proof-strip span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.84rem;
  font-weight: 850;
}

.landing-proof-strip strong {
  color: #ffffff;
  font-size: 1rem;
}

.home-status {
  display: none;
  width: min(760px, 100%);
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(250, 204, 95, 0.34);
  border-radius: var(--radius);
  color: #fff7d1;
  background: rgba(250, 204, 95, 0.12);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.45;
}

.home-status.show {
  display: block;
}

.landing-visual {
  position: relative;
  display: grid;
  min-height: 440px;
  place-items: center;
}

.landing-preview-card {
  position: relative;
  display: grid;
  width: min(500px, 100%);
  min-height: 330px;
  grid-template-columns: minmax(0, 1fr) 112px;
  grid-template-rows: 42px 96px minmax(0, 1fr);
  gap: 14px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 26px;
  background: #ffffff;
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.28),
    0 0 0 10px rgba(255, 255, 255, 0.08);
  transform: rotate(-7deg);
}

.landing-preview-card::after {
  position: absolute;
  right: 24px;
  bottom: 18px;
  left: 24px;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  content: "";
}

.landing-preview-bar {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 8px;
  margin: -20px -20px 0;
  padding: 0 18px;
  background: #141827;
}

.landing-preview-bar span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #fb7185;
}

.landing-preview-bar span:nth-child(2) {
  background: var(--gold);
}

.landing-preview-bar span:nth-child(3) {
  background: var(--teal);
}

.landing-preview-grid {
  display: grid;
  grid-column: 1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.preview-tile {
  border-radius: 10px;
  box-shadow: inset 0 -18px 30px rgba(255, 255, 255, 0.18);
}

.tile-teal {
  background: #22c3d8;
}

.tile-gold {
  background: #ffca4d;
}

.tile-blue {
  background: #86d457;
}

.tile-coral {
  background: #fb6f6f;
}

.landing-code-preview {
  display: grid;
  grid-column: 1;
  gap: 11px;
  align-content: start;
  padding: 18px;
  border: 1px solid #e8eef5;
  border-radius: 14px;
  background: #fbfdff;
}

.landing-code-preview span {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #dbe5ef;
}

.landing-code-preview span:nth-child(1) {
  width: 78%;
}

.landing-code-preview span:nth-child(2) {
  width: 58%;
}

.landing-code-preview span:nth-child(3) {
  width: 86%;
  background: #c6eedf;
}

.landing-code-preview span:nth-child(4) {
  width: 52%;
  background: #fde7a2;
}

.landing-code-preview span:nth-child(5) {
  width: 68%;
  background: #dbeafe;
}

.landing-chart-preview {
  position: relative;
  grid-column: 2;
  grid-row: 2 / 4;
  border-radius: 16px;
  background:
    linear-gradient(180deg, #f8fbff 0 56%, #eef5fc 56% 100%);
}

.landing-chart-preview::before {
  position: absolute;
  top: 26px;
  left: 22px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background:
    conic-gradient(var(--teal) 0 36%, var(--blue) 36% 72%, var(--gold) 72% 100%);
  content: "";
}

.landing-chart-preview span {
  position: absolute;
  right: 18px;
  bottom: 42px;
  left: 18px;
  height: 10px;
  border-radius: 999px;
  background: #dbe5ef;
  box-shadow: 0 22px 0 #dbe5ef, 0 44px 0 #dbe5ef;
}

.home-readiness-card {
  position: relative;
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 360px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07)),
    rgba(255, 255, 255, 0.08);
}

.home-readiness-card .readiness-orbit {
  width: 150px;
  height: 150px;
}

.landing-visual .home-readiness-card {
  position: absolute;
  right: clamp(0px, 1.6vw, 24px);
  bottom: -24px;
  z-index: 2;
  width: min(310px, 80%);
  min-height: auto;
  padding: 16px;
  border-color: rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.82)),
    #111827;
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.28);
}

.landing-visual .home-readiness-card .readiness-orbit {
  width: 114px;
  height: 114px;
  margin: 0 auto;
}

.home-readiness-copy {
  text-align: center;
}

.home-readiness-copy span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #422900;
  background: var(--gold);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.home-readiness-copy strong {
  display: block;
  margin-top: 10px;
  color: #ffffff;
  font-size: 1.28rem;
}

.home-readiness-copy p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.45;
}

.home-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.home-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--teal), var(--blue));
  transition: width 220ms ease;
}

.home-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-stat-grid span {
  display: grid;
  min-height: 70px;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  text-align: center;
}

.home-stat-grid strong {
  color: #ffffff;
  font-size: 1.05rem;
}

.home-stat-grid small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.landing-explore {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: 760px;
  justify-items: center;
  gap: 10px;
  margin: -76px auto 34px;
  padding: 0 18px;
  text-align: center;
}

.landing-explore-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 18px 36px rgba(20, 184, 166, 0.22);
  transform: rotate(45deg);
}

.landing-explore-icon span {
  font-size: 0.9rem;
  font-weight: 950;
  transform: rotate(-45deg);
}

.landing-explore .eyebrow {
  margin: 0;
  color: var(--teal-dark);
}

.landing-explore h2 {
  max-width: 620px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1.16;
}

.landing-explore p:not(.eyebrow) {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.65;
}

.landing-difference {
  display: grid;
  max-width: 1180px;
  gap: 18px;
  margin: 0 auto 24px;
  padding: 22px;
  border: 1px solid rgba(20, 184, 166, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(59, 130, 246, 0.06)),
    rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 42px rgba(23, 32, 46, 0.08);
}

.landing-section-heading {
  display: grid;
  max-width: 760px;
  gap: 8px;
}

.landing-section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  line-height: 1.08;
}

.landing-section-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--soft-ink);
  font-weight: 750;
  line-height: 1.6;
}

.landing-comparison-grid,
.landing-value-grid {
  display: grid;
  gap: 14px;
}

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

.landing-comparison-card,
.landing-value-grid article {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.landing-comparison-card.featured {
  border-color: rgba(20, 184, 166, 0.36);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(245, 184, 74, 0.1)),
    rgba(255, 255, 255, 0.92);
}

.landing-comparison-card > span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.1);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.landing-comparison-card.muted > span {
  color: var(--muted);
  background: rgba(100, 116, 139, 0.1);
}

.landing-comparison-card ul {
  display: grid;
  margin: 14px 0 0;
  padding-left: 18px;
  gap: 9px;
  color: var(--soft-ink);
  font-weight: 750;
  line-height: 1.45;
}

.landing-value-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-value-grid strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
}

.landing-value-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.5;
}

.public-section-heading {
  max-width: 1180px;
  margin: 22px auto 16px;
}

.landing-access-panel {
  align-items: start;
  margin-top: 10px;
}

.landing-final-cta {
  width: fit-content;
  min-height: 48px;
  padding: 0 18px;
  text-decoration: none;
}

.landing-final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.preview-cta {
  text-decoration: none;
}

.preview-guest-banner {
  display: none;
  max-width: 1180px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto 18px;
  padding: 18px;
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(245, 184, 74, 0.1)),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(23, 32, 46, 0.08);
}

body.guest-preview .preview-guest-banner {
  display: flex;
}

.preview-guest-banner h2,
.preview-guest-banner p {
  margin: 0;
}

.preview-guest-banner h2 {
  color: var(--ink);
  font-size: 1.3rem;
}

.preview-guest-banner p:not(.eyebrow) {
  margin-top: 4px;
  color: var(--soft-ink);
  font-weight: 760;
  line-height: 1.45;
}

.preview-lock-content {
  min-width: 0;
  transition: filter 160ms ease, opacity 160ms ease;
}

.preview-locked-card,
.preview-locked-group {
  position: relative;
  overflow: hidden;
}

.preview-locked-card .preview-lock-content,
.preview-locked-group .question-group-body,
.preview-locked-group .question-group-heading {
  filter: blur(5px);
  opacity: 0.44;
  pointer-events: none;
  user-select: none;
}

.preview-lock-overlay {
  position: absolute;
  inset: 12px;
  z-index: 3;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  text-align: center;
  box-shadow: 0 18px 38px rgba(23, 32, 46, 0.14);
  backdrop-filter: blur(8px);
}

.preview-lock-overlay strong {
  font-size: 0.95rem;
  font-weight: 950;
}

.preview-lock-overlay span {
  max-width: 220px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 820;
  line-height: 1.35;
}

.preview-locked-item {
  cursor: not-allowed;
  opacity: 0.62;
}

.preview-locked-item:hover {
  transform: none;
}

.course-dashboard-heading {
  display: grid;
  max-width: 1180px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 18px;
  align-items: end;
  margin: 0 auto 16px;
  padding: 18px 20px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(37, 99, 235, 0.07)),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(23, 32, 46, 0.07);
}

.course-dashboard-heading[hidden] {
  display: none;
}

.course-dashboard-heading h1,
.course-dashboard-heading p {
  margin: 0;
}

.course-dashboard-heading h1 {
  color: var(--ink);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.course-dashboard-heading > p {
  color: var(--muted);
  font-weight: 820;
  line-height: 1.5;
}

.home-track-grid {
  display: grid;
  max-width: 1180px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 auto 24px;
}

.home-track-card {
  display: grid;
  gap: 14px;
  min-height: 260px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(23, 32, 46, 0.08);
}

.home-track-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.32rem;
  line-height: 1.15;
}

.home-track-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.5;
}

.home-track-head,
.home-track-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-track-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius);
  color: #07111f;
  background: linear-gradient(135deg, var(--teal), var(--gold));
}

.home-track-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.08);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.home-track-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.home-track-meta strong {
  color: var(--ink);
}

.home-card-button {
  display: inline-flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  align-self: end;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: var(--radius);
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.08);
  font-weight: 950;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.home-card-button:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 184, 166, 0.44);
  background: rgba(20, 184, 166, 0.14);
}

.home-track-python .home-track-icon {
  background: linear-gradient(135deg, var(--teal), var(--blue));
}

.home-track-java .home-track-icon {
  background: linear-gradient(135deg, var(--gold), var(--coral));
}

.home-track-system .home-track-icon {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
}

.home-track-database .home-track-icon {
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #17202e);
}

.home-track-ai {
  border-color: rgba(139, 124, 246, 0.28);
  background:
    linear-gradient(180deg, rgba(139, 124, 246, 0.1), rgba(255, 255, 255, 0.92)),
    rgba(255, 255, 255, 0.92);
}

.home-track-ai .home-track-icon {
  color: #ffffff;
  background: linear-gradient(135deg, var(--lavender), var(--blue));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.topbar-actions {
  display: flex;
  width: min(980px, 100%);
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--teal-dark);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: 2.5rem;
  line-height: 1.02;
}

.search-box {
  display: flex;
  flex: 1 1 280px;
  width: min(420px, 100%);
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 32px rgba(23, 32, 46, 0.07);
}

.pattern-select-field {
  display: none;
  flex: 0 1 260px;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: var(--radius);
  color: var(--soft-ink);
  background: var(--control);
  box-shadow: 0 14px 32px rgba(23, 32, 46, 0.07);
}

.authenticated-course .pattern-select-field {
  display: inline-flex;
}

.pattern-select-field span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pattern-select-field select {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 900;
}

.authenticated-course .studio-grid {
  grid-template-columns: minmax(240px, 310px) minmax(0, 1fr);
}

.cheatsheet-button,
.system-button,
.python-button,
.java-button,
.ai-button,
.architecture-button,
.theme-toggle,
.close-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: var(--radius);
  font-weight: 900;
}

.cheatsheet-button {
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 32px rgba(23, 32, 46, 0.07);
}

.cheatsheet-button:hover,
.system-button:hover,
.python-button:hover,
.java-button:hover,
.ai-button:hover,
.architecture-button:hover {
  background: rgba(20, 184, 166, 0.08);
}

.system-button {
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid rgba(249, 115, 91, 0.32);
  color: #b4532d;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(23, 32, 46, 0.07);
}

.python-button {
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid rgba(20, 184, 166, 0.3);
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(23, 32, 46, 0.07);
}

.java-button {
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid rgba(244, 182, 63, 0.38);
  color: #7a4b00;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(23, 32, 46, 0.07);
}

.ai-button {
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid rgba(139, 124, 246, 0.34);
  color: #5b4bd6;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(23, 32, 46, 0.07);
}

.architecture-button {
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #2563eb;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(23, 32, 46, 0.07);
}

.theme-toggle {
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid rgba(59, 130, 246, 0.26);
  color: var(--soft-ink);
  background: var(--control);
  box-shadow: 0 14px 32px rgba(23, 32, 46, 0.07);
}

.theme-toggle:hover {
  border-color: rgba(59, 130, 246, 0.42);
  color: var(--blue);
  background: rgba(59, 130, 246, 0.1);
}

.login-link,
.profile-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: var(--radius);
  color: var(--teal-dark);
  background: var(--control);
  box-shadow: 0 14px 32px rgba(23, 32, 46, 0.07);
  font-weight: 900;
  text-decoration: none;
}

.login-link:hover {
  background: rgba(20, 184, 166, 0.08);
}

.profile-link:hover {
  background: rgba(20, 184, 166, 0.08);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.question-panel,
.lesson-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.question-panel {
  position: sticky;
  top: 26px;
  max-height: calc(100vh - 52px);
  overflow: hidden;
}

.panel-heading {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-heading span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.panel-heading h2 {
  margin: 4px 0 0;
  font-size: 1.15rem;
}

.small-button,
.icon-text-button,
.done-button,
.run-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  font-weight: 850;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.small-button {
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--soft-ink);
  background: #ffffff;
}

.small-button:hover,
.icon-text-button:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 184, 166, 0.34);
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.08);
}

.small-button:disabled,
.icon-text-button:disabled {
  cursor: default;
  opacity: 0.68;
  transform: none;
}

.question-list {
  display: grid;
  max-height: calc(100vh - 134px);
  overflow-y: auto;
  padding: 10px;
  gap: 14px;
}

.question-group {
  display: grid;
  gap: 8px;
}

.question-group-heading {
  position: sticky;
  top: -10px;
  z-index: 1;
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(248, 250, 252, 0.96);
  backdrop-filter: blur(10px);
}

.question-group-heading span {
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.question-group-heading small {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 99px;
  color: #ffffff;
  background: var(--teal);
  font-size: 0.72rem;
  font-weight: 950;
}

.question-group-body {
  display: grid;
  gap: 8px;
}

.question-button {
  display: grid;
  width: 100%;
  min-height: 72px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--soft-ink);
  background: transparent;
  text-align: left;
}

.question-button:hover,
.question-button.active {
  border-color: rgba(20, 184, 166, 0.24);
  background: rgba(20, 184, 166, 0.08);
}

.question-button strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.96rem;
}

.question-button small {
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.solved-chip {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--teal);
  font-size: 0.72rem;
}

.lesson-panel {
  min-width: 0;
  overflow: hidden;
}

.lesson-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 24px;
  align-items: center;
  padding: 24px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(10, 22, 40, 0.98), rgba(20, 116, 104, 0.93) 55%, rgba(52, 112, 194, 0.86)),
    var(--sidebar);
}

.lesson-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.lesson-kicker span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.lesson-kicker span:first-child {
  width: 42px;
  justify-content: center;
  color: #ffffff;
  background: var(--coral);
}

.lesson-kicker span:last-child {
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.12);
}

.lesson-copy h2 {
  margin: 0;
  font-size: 3rem;
  line-height: 1.03;
}

.lesson-copy p {
  max-width: 720px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1rem;
  line-height: 1.7;
}

.problem-detail-card {
  max-width: 780px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.problem-detail-card > span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(249, 115, 91, 0.88);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.problem-detail-card p {
  max-width: none;
  margin: 10px 0 14px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.98rem;
  line-height: 1.58;
}

.problem-detail-card dl {
  display: grid;
  margin: 0;
  gap: 10px;
}

.problem-detail-card dl div {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 10px;
}

.problem-detail-card dt {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.problem-detail-card dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.5;
}

.sample-io-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.sample-io-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(5, 9, 22, 0.24);
}

.sample-io-card h4 {
  margin: 0;
  color: #ffffff;
  font-size: 0.9rem;
}

.sample-io-card div {
  display: grid;
  gap: 6px;
}

.sample-io-card strong {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.sample-io-card pre {
  min-width: 0;
  margin: 0;
  overflow-x: auto;
  padding: 10px;
  border-radius: var(--radius);
  color: #f8fafc;
  background: rgba(5, 9, 22, 0.76);
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.sample-io-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
}

.readiness-tracker {
  --readiness: 0%;
  position: relative;
  display: grid;
  width: 100%;
  gap: 14px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)),
    rgba(8, 19, 36, 0.42);
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.24);
}

.readiness-tracker::before {
  position: absolute;
  top: -70px;
  right: -56px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: rgba(244, 182, 63, 0.24);
  content: "";
}

.readiness-orbit {
  position: relative;
  display: grid;
  width: 124px;
  height: 124px;
  place-items: center;
  margin: 0 auto;
  padding: 8px;
  border-radius: 999px;
  background: conic-gradient(var(--gold) var(--readiness), rgba(255, 255, 255, 0.18) 0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.gold-coin {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  align-content: center;
  gap: 2px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  color: #4a2d00;
  background:
    radial-gradient(circle at 32% 25%, rgba(255, 255, 255, 0.8), transparent 24%),
    linear-gradient(145deg, #ffe99a, #f4b63f 46%, #bf7412);
  box-shadow:
    inset 0 8px 18px rgba(255, 255, 255, 0.36),
    inset 0 -10px 18px rgba(117, 65, 0, 0.2),
    0 18px 32px rgba(120, 72, 0, 0.28);
  text-align: center;
}

.gold-coin::after {
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(74, 45, 0, 0.32);
  border-radius: inherit;
  content: "";
}

.gold-coin span {
  position: relative;
  z-index: 1;
  font-size: 2rem;
  font-weight: 950;
  line-height: 1;
}

.gold-coin small {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.readiness-copy {
  position: relative;
  z-index: 1;
  text-align: center;
}

.readiness-copy span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: #422900;
  background: var(--gold);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.readiness-copy strong {
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
}

.readiness-copy p,
.readiness-next {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.45;
}

.readiness-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.readiness-stats span {
  display: grid;
  min-height: 66px;
  align-content: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  text-align: center;
}

.readiness-stats strong {
  font-size: 1rem;
}

.readiness-stats small {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.readiness-milestones {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.readiness-milestones span {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.09);
  font-size: 0.76rem;
  font-weight: 950;
}

.readiness-milestones span.active {
  border-color: rgba(255, 255, 255, 0.52);
  color: #4a2d00;
  background: linear-gradient(145deg, #ffe99a, var(--gold));
  box-shadow: 0 10px 20px rgba(244, 182, 63, 0.22);
}

.readiness-next {
  position: relative;
  z-index: 1;
  padding-top: 2px;
  text-align: center;
}

.insight-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.insight-band span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.insight-band p {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.6;
}

.done-button {
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid rgba(20, 184, 166, 0.24);
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.08);
}

.done-button.active {
  color: #ffffff;
  background: var(--teal);
}

.done-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: currentColor;
}

.flashcard-panel {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.flashcard-panel header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.flashcard-panel header span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flashcard-panel header h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 1.15rem;
}

.flashcard-panel header p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.flashcard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.flashcard {
  position: relative;
  min-height: 178px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  perspective: 900px;
  text-align: left;
}

.flashcard:focus-visible {
  outline: 3px solid rgba(20, 184, 166, 0.42);
  outline-offset: 3px;
}

.flashcard-face {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  backface-visibility: hidden;
  box-shadow: 0 12px 24px rgba(23, 32, 46, 0.08);
  transition: transform 220ms ease;
}

.flashcard-front {
  color: var(--ink);
  background: #ffffff;
}

.flashcard-back {
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(10, 22, 40, 0.98), rgba(20, 184, 166, 0.86)),
    var(--ink);
  transform: rotateY(180deg);
}

.flashcard.flipped .flashcard-front {
  transform: rotateY(180deg);
}

.flashcard.flipped .flashcard-back {
  transform: rotateY(360deg);
}

.flashcard small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flashcard-back small {
  color: rgba(255, 255, 255, 0.72);
}

.flashcard strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.38;
}

.flashcard em {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.1);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
}

.flashcard-back em {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.solution-guide {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.solution-guide header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.solution-guide header span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.solution-guide header h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 1.15rem;
}

.solution-guide header strong {
  flex: 0 0 auto;
  max-width: 320px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.1);
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: right;
}

.solution-reveal-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(244, 182, 63, 0.42);
  border-radius: var(--radius);
  color: #7a4b00;
  background: linear-gradient(135deg, rgba(255, 233, 154, 0.96), rgba(244, 182, 63, 0.9));
  box-shadow: 0 12px 24px rgba(244, 182, 63, 0.22);
  font-weight: 950;
}

.solution-lock-card {
  padding: 16px;
  border: 1px dashed rgba(20, 184, 166, 0.34);
  border-radius: 8px;
  color: var(--soft-ink);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(59, 130, 246, 0.06)),
    #ffffff;
}

.solution-lock-card strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
}

.solution-lock-card p {
  max-width: 780px;
  margin: 8px 0 0;
  line-height: 1.58;
}

.solution-detail-stack {
  display: grid;
  gap: 10px;
}

.solution-detail-card {
  overflow: hidden;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #f8fafc;
}

.solution-detail-card summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
  cursor: pointer;
  font-weight: 950;
}

.solution-detail-card summary::after {
  content: "";
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 99px;
  color: #ffffff;
  background:
    linear-gradient(#ffffff, #ffffff) center / 12px 2px no-repeat,
    linear-gradient(#ffffff, #ffffff) center / 2px 12px no-repeat,
    var(--ink);
  font-size: 1rem;
  line-height: 1;
}

.solution-detail-card[open] summary::after {
  background:
    linear-gradient(#ffffff, #ffffff) center / 12px 2px no-repeat,
    var(--ink);
}

.solution-detail-card summary span {
  color: var(--ink);
}

.solution-detail-card summary strong {
  max-width: none;
  padding: 5px 8px;
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.1);
  font-size: 0.76rem;
  line-height: 1.25;
  text-align: left;
}

.solution-detail-card p {
  margin: 0;
  padding: 14px;
  color: var(--soft-ink);
  line-height: 1.58;
}

.solution-detail-card pre {
  max-height: 300px;
  margin: 0;
  overflow: auto;
  padding: 14px;
  color: #dce6f3;
  background: #0f172a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.hint-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hint-card {
  min-width: 0;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #f8fafc;
}

.hint-card summary {
  cursor: pointer;
  padding: 12px;
  color: var(--ink);
  font-weight: 950;
}

.hint-card summary::marker {
  color: var(--coral);
}

.hint-card p {
  margin: 0;
  padding: 0 12px 12px;
  color: var(--soft-ink);
  line-height: 1.5;
}

.solution-explanation-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: #f8fafc;
}

.solution-explanation-card h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 0.98rem;
}

.solution-explanation-card p {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.58;
}

.editor-panel {
  padding: 18px;
  background: #f8fafc;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.language-tabs {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.language-tabs button {
  min-width: 92px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.language-tabs button.active {
  color: #ffffff;
  background: var(--ink);
}

.editor-actions {
  display: flex;
  gap: 8px;
}

.syntax-status {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: var(--radius);
  color: var(--soft-ink);
  background: rgba(248, 250, 252, 0.94);
}

.syntax-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.12);
}

.syntax-status strong,
.syntax-status small {
  display: block;
}

.syntax-status strong {
  color: var(--ink);
  font-size: 0.88rem;
}

.syntax-status small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.4;
}

.syntax-status[data-state="checking"] .syntax-dot {
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.syntax-status[data-state="ok"] .syntax-dot {
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.syntax-status[data-state="error"] .syntax-dot {
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(249, 115, 91, 0.16);
}

.syntax-status[data-state="warn"] .syntax-dot {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(244, 182, 63, 0.18);
}

.icon-text-button {
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--soft-ink);
  background: #ffffff;
}

.run-button {
  padding: 0 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.22);
  text-decoration: none;
}

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

.run-button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.code-shell {
  display: grid;
  min-height: 520px;
  max-height: 680px;
  overflow: hidden;
  grid-template-columns: 52px minmax(0, 1fr);
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: var(--radius);
  background: #081120;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 34px rgba(15, 23, 42, 0.12);
}

.code-shell.monaco-ready {
  grid-template-columns: minmax(0, 1fr);
  border-color: rgba(20, 184, 166, 0.2);
  background:
    linear-gradient(180deg, rgba(13, 24, 43, 0.98), rgba(8, 17, 32, 0.98)),
    #081120;
}

.monaco-editor-host {
  min-height: 520px;
  max-height: 680px;
  overflow: hidden;
  background: #081120;
}

.line-numbers,
#codeEditor {
  min-height: 520px;
  max-height: 680px;
  margin: 0;
  padding: 18px 0;
  overflow: auto;
  border: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.55;
}

.line-numbers {
  color: rgba(226, 232, 240, 0.38);
  background: #0b1020;
  text-align: right;
  user-select: none;
}

.line-numbers span {
  display: block;
  padding-right: 12px;
}

#codeEditor {
  width: 100%;
  resize: none;
  padding-right: 18px;
  padding-left: 16px;
  outline: 0;
  color: #e8edf7;
  background: transparent;
  caret-color: #ffffff;
  tab-size: 4;
}

#codeEditor::selection {
  background: rgba(249, 115, 91, 0.34);
}

.code-shell.monaco-ready > #codeEditor,
.code-shell.monaco-ready > .line-numbers,
.code-shell.monaco-ready > textarea,
.code-shell.monaco-ready > pre.line-numbers {
  display: none !important;
}

.output-panel {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.output-heading {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--soft-ink);
  font-size: 0.84rem;
  font-weight: 900;
}

#runStatus {
  color: var(--muted);
}

#runStatus.success {
  color: var(--teal-dark);
}

#runStatus.error {
  color: #c2412f;
}

#runOutput {
  min-height: 110px;
  max-height: 260px;
  margin: 0;
  overflow: auto;
  padding: 14px;
  color: #dce6f3;
  background: #0f172a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.cheatsheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  justify-items: end;
}

.cheatsheet-overlay[hidden] {
  display: none;
}

.system-overlay {
  position: fixed;
  inset: 0;
  z-index: 32;
  display: grid;
  justify-items: end;
}

.system-overlay[hidden] {
  display: none;
}

.architecture-overlay {
  position: fixed;
  inset: 0;
  z-index: 34;
  display: grid;
  justify-items: end;
}

.architecture-overlay[hidden] {
  display: none;
}

.python-overlay {
  position: fixed;
  inset: 0;
  z-index: 33;
  display: grid;
  justify-items: end;
}

.python-overlay[hidden] {
  display: none;
}

body.lesson-course-open .python-overlay {
  position: relative;
  inset: auto;
  z-index: auto;
  display: block;
  min-height: auto;
  margin-bottom: 22px;
  padding: 0;
  background: transparent;
}

.course-page[hidden] {
  display: none;
}

.cheatsheet-backdrop,
.system-backdrop,
.python-backdrop,
.architecture-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(6px);
}

body.lesson-course-open .python-backdrop {
  display: none;
}

.cheatsheet-drawer {
  position: relative;
  width: min(1120px, calc(100vw - 28px));
  height: calc(100vh - 28px);
  margin: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.34);
}

.system-drawer {
  position: relative;
  width: min(1320px, calc(100vw - 28px));
  height: calc(100vh - 28px);
  margin: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.34);
}

.python-drawer {
  width: min(1240px, calc(100vw - 28px));
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.06), rgba(244, 182, 63, 0.06)),
    #f8fafc;
}

body.lesson-course-open .python-drawer {
  width: 100%;
  min-height: calc(100vh - 230px);
  height: auto;
  margin: 0;
  overflow: visible;
  box-shadow: var(--shadow);
}

.course-page {
  display: grid;
  min-height: calc(100vh - 170px);
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.06), rgba(59, 130, 246, 0.06)),
    #f8fafc;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.34);
}

.cheatsheet-header,
.system-header,
.course-page-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(16px);
}

.cheatsheet-header h2,
.system-header h2,
.course-page-header h2 {
  margin: 0;
  font-size: 2rem;
}

.course-page-header p {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 760;
  line-height: 1.5;
}

.course-page-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: calc(100vh - 270px);
}

.course-switcher {
  position: sticky;
  top: 91px;
  display: grid;
  max-height: calc(100vh - 120px);
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.course-switcher button {
  display: flex;
  width: 100%;
  min-height: 68px;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--soft-ink);
  background: var(--surface);
  text-align: left;
}

.course-switcher button:hover,
.course-switcher button.active {
  border-color: rgba(20, 184, 166, 0.34);
  background: rgba(20, 184, 166, 0.08);
}

.course-switcher-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius);
  color: #07111f;
  background: linear-gradient(135deg, var(--teal), var(--gold));
  font-size: 0.9rem;
  font-weight: 950;
}

.course-switcher-icon-python {
  background: linear-gradient(135deg, var(--teal), var(--blue));
}

.course-switcher-icon-java {
  background: linear-gradient(135deg, var(--gold), var(--coral));
}

.course-switcher-icon-ai {
  color: #ffffff;
  background: linear-gradient(135deg, var(--lavender), var(--blue));
}

.course-switcher strong,
.course-switcher small {
  display: block;
}

.course-switcher strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.course-switcher small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.course-overview-detail {
  min-width: 0;
  padding: 22px;
}

.course-overview-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.36fr);
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(10, 22, 40, 0.98), rgba(20, 116, 104, 0.9) 58%, rgba(37, 99, 235, 0.78)),
    var(--sidebar);
}

.course-overview-java {
  background:
    linear-gradient(135deg, rgba(10, 22, 40, 0.98), rgba(151, 83, 16, 0.9) 54%, rgba(20, 116, 104, 0.82)),
    var(--sidebar);
}

.course-overview-ai {
  background:
    linear-gradient(135deg, rgba(10, 22, 40, 0.98), rgba(88, 65, 178, 0.9) 52%, rgba(37, 99, 235, 0.82)),
    var(--sidebar);
}

.course-overview-copy {
  display: grid;
  align-content: center;
  gap: 14px;
}

.course-overview-copy .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

.course-overview-copy h3 {
  max-width: 760px;
  margin: 0;
  color: #ffffff;
  font-size: 3.3rem;
  line-height: 1;
}

.course-overview-copy p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  font-weight: 730;
  line-height: 1.6;
}

.course-progress-track,
.course-module-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.course-progress-track {
  width: min(520px, 100%);
}

.course-progress-track span,
.course-module-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--teal), var(--blue));
}

.course-overview-stats {
  display: grid;
  gap: 10px;
}

.course-overview-stats span {
  display: grid;
  min-height: 82px;
  align-content: center;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
}

.course-overview-stats strong {
  color: #ffffff;
  font-size: 1.4rem;
}

.course-overview-stats small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.course-section-heading,
.course-action-panel {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 34px rgba(23, 32, 46, 0.06);
}

.course-section-heading h3,
.course-outcome-panel h3,
.course-action-panel h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
}

.course-section-heading > span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #07111f;
  background: var(--gold);
  font-size: 0.78rem;
  font-weight: 950;
}

.course-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.course-module-card,
.course-outcome-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 34px rgba(23, 32, 46, 0.06);
}

.course-module-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 168px;
  padding: 16px;
}

.course-module-card.complete {
  border-color: rgba(20, 184, 166, 0.34);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.09), rgba(244, 182, 63, 0.07)),
    rgba(255, 255, 255, 0.92);
}

.course-module-card span {
  display: inline-flex;
  width: fit-content;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.1);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.course-module-number {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(20, 184, 166, 0.2);
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.08);
  font-size: 0.72rem;
  font-weight: 950;
}

.course-module-card strong {
  display: block;
  margin-top: 12px;
  padding-right: 36px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.24;
}

.course-module-card p {
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
}

.course-module-progress {
  margin-top: auto;
  background: rgba(100, 116, 139, 0.16);
}

.course-outcome-panel {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
}

.course-outcome-panel ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
  padding-left: 20px;
  color: var(--soft-ink);
  font-weight: 750;
  line-height: 1.48;
}

.course-action-panel {
  align-items: center;
}

.course-action-panel p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 760;
  line-height: 1.5;
}

.course-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.course-action-buttons .run-button,
.course-action-buttons .icon-text-button {
  min-height: 44px;
  padding: 0 14px;
}

.python-progress-strip {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(220px, 1fr) minmax(160px, 0.45fr);
  gap: 14px;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.python-progress-strip span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.python-progress-strip strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
}

.python-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.16);
}

.python-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--blue));
  transition: width 180ms ease;
}

.python-progress-stat {
  text-align: right;
}

.python-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: calc(100vh - 176px);
}

.python-nav {
  position: sticky;
  top: 89px;
  display: grid;
  max-height: calc(100vh - 118px);
  align-content: start;
  gap: 14px;
  overflow: auto;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.python-nav-group {
  display: grid;
  gap: 10px;
}

.python-nav-group header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.python-nav-group header strong,
.python-nav-group header span {
  display: block;
}

.python-nav-group header strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.python-nav-group header span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.35;
}

.python-nav-group header small {
  display: grid;
  min-width: 42px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: #07111f;
  background: var(--gold);
  font-size: 0.74rem;
  font-weight: 950;
}

.python-nav-group > div {
  display: grid;
  gap: 8px;
}

.python-nav button {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--soft-ink);
  background: var(--surface);
  text-align: left;
}

.python-nav button.active,
.python-nav button:hover {
  border-color: rgba(20, 184, 166, 0.34);
  background: rgba(20, 184, 166, 0.08);
}

.python-nav button span {
  min-width: 0;
  font-weight: 900;
}

.python-nav button small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.python-detail {
  min-width: 0;
  padding: 22px;
}

.python-lesson-hero {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(10, 22, 40, 0.98), rgba(20, 116, 104, 0.9) 58%, rgba(37, 99, 235, 0.78)),
    var(--sidebar);
}

.python-lesson-hero .eyebrow {
  color: rgba(255, 255, 255, 0.74);
}

.python-lesson-hero h3 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
}

.python-lesson-hero p {
  max-width: 760px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

.ai-overlay .python-lesson-hero {
  background:
    linear-gradient(135deg, rgba(10, 22, 40, 0.98), rgba(88, 65, 178, 0.9) 52%, rgba(20, 116, 104, 0.82)),
    var(--sidebar);
}

.ai-scenario-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.48fr);
  gap: 18px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(139, 124, 246, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(139, 124, 246, 0.1), rgba(20, 184, 166, 0.08)),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 34px rgba(23, 32, 46, 0.06);
}

.ai-scenario-card h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.2rem;
}

.ai-scenario-card p {
  margin: 8px 0 0;
  color: var(--soft-ink);
  font-weight: 740;
  line-height: 1.55;
}

.ai-scenario-card strong {
  display: grid;
  align-content: center;
  min-height: 110px;
  padding: 16px;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: var(--radius);
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.1);
  line-height: 1.5;
}

.ai-beginner-guide {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(239, 246, 255, 0.94)),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 34px rgba(23, 32, 46, 0.06);
}

.ai-beginner-guide > header,
.ai-lab-recipe > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.36fr);
  gap: 16px;
  align-items: start;
}

.ai-beginner-guide h4,
.ai-vocab-panel h5,
.ai-lab-recipe h5,
.ai-portfolio-proof h5 {
  margin: 0;
  color: var(--ink);
  line-height: 1.18;
}

.ai-beginner-guide h4 {
  max-width: 880px;
  font-size: 1.45rem;
}

.ai-beginner-guide > header > strong,
.ai-lab-recipe > header > span {
  display: grid;
  min-height: 78px;
  align-content: center;
  padding: 14px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: var(--radius);
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.11);
  font-weight: 950;
  line-height: 1.45;
}

.ai-explain-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) repeat(3, minmax(190px, 0.94fr));
  gap: 12px;
  align-items: start;
}

.ai-explain-card,
.ai-vocab-panel,
.ai-lab-recipe,
.ai-portfolio-proof {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}

.ai-explain-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.ai-explain-card p,
.ai-explain-card li,
.ai-vocab-panel p,
.ai-lab-recipe p,
.ai-lab-recipe dd,
.ai-portfolio-proof li {
  margin: 0;
  color: var(--soft-ink);
  font-weight: 730;
  line-height: 1.55;
}

.ai-explain-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.ai-explain-card p + p {
  margin-top: 10px;
}

.ai-vocab-panel {
  display: grid;
  gap: 12px;
}

.ai-vocab-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ai-vocab-grid article {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: var(--radius);
  background: rgba(20, 184, 166, 0.07);
}

.ai-vocab-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.95rem;
}

.ai-foundation-card {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.78), rgba(240, 253, 250, 0.94)),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 34px rgba(23, 32, 46, 0.06);
}

.ai-foundation-card > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.34fr);
  gap: 16px;
  align-items: start;
}

.ai-foundation-card h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.42rem;
  line-height: 1.18;
}

.ai-foundation-card header p:not(.eyebrow) {
  max-width: 900px;
  margin: 8px 0 0;
  color: var(--soft-ink);
  font-weight: 730;
  line-height: 1.58;
}

.ai-foundation-card > header > strong {
  display: grid;
  min-height: 92px;
  align-content: center;
  padding: 14px;
  border: 1px solid rgba(250, 204, 21, 0.36);
  border-radius: var(--radius);
  color: #6d4700;
  background: rgba(250, 204, 21, 0.15);
  line-height: 1.45;
}

.ai-foundation-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
  gap: 14px;
  align-items: stretch;
}

.ai-foundation-steps {
  display: grid;
  gap: 10px;
}

.ai-foundation-steps article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.ai-foundation-steps b {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: #102033;
  background: linear-gradient(135deg, #facc15, #14b8a6);
  font-size: 0.72rem;
  font-weight: 950;
}

.ai-foundation-steps h5 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.25;
}

.ai-foundation-steps p {
  margin: 6px 0 0;
  color: var(--soft-ink);
  font-size: 0.92rem;
  font-weight: 720;
  line-height: 1.52;
}

.ai-foundation-picture {
  display: grid;
  align-content: space-between;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 12% 18%, rgba(250, 204, 21, 0.22), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(56, 189, 248, 0.18), transparent 30%),
    rgba(255, 255, 255, 0.88);
}

.ai-foundation-picture figcaption {
  display: grid;
  gap: 4px;
}

.ai-foundation-picture figcaption span {
  color: var(--teal-dark);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.ai-foundation-picture figcaption strong {
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1.25;
}

.ai-picture-board {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.ai-picture-node {
  display: grid;
  min-width: 128px;
  flex: 1 1 132px;
  gap: 6px;
  padding: 13px;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 22px rgba(23, 32, 46, 0.05);
}

.ai-picture-node small {
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  color: #0f766e;
  background: rgba(20, 184, 166, 0.11);
  font-size: 0.68rem;
  font-weight: 950;
}

.ai-picture-node strong {
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.22;
}

.ai-picture-node p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 730;
  line-height: 1.42;
}

.ai-picture-link {
  align-self: center;
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.2), rgba(37, 99, 235, 0.62));
}

.ai-picture-node.tone-input {
  border-color: rgba(56, 189, 248, 0.34);
  background: rgba(240, 249, 255, 0.9);
}

.ai-picture-node.tone-data {
  border-color: rgba(20, 184, 166, 0.34);
  background: rgba(240, 253, 250, 0.9);
}

.ai-picture-node.tone-model {
  border-color: rgba(124, 58, 237, 0.28);
  background: rgba(245, 243, 255, 0.9);
}

.ai-picture-node.tone-tool {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(255, 251, 235, 0.9);
}

.ai-picture-node.tone-guard {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(254, 242, 242, 0.9);
}

.ai-picture-node.tone-output {
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(239, 246, 255, 0.9);
}

.ai-foundation-picture > p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--soft-ink);
  background: rgba(15, 23, 42, 0.05);
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.45;
}

.ai-lab-recipe {
  display: grid;
  gap: 14px;
}

.ai-lab-recipe-list {
  display: grid;
  gap: 12px;
}

.ai-lab-recipe-list > article {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius);
  background: rgba(239, 246, 255, 0.68);
}

.ai-lab-recipe-list b {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  color: #102033;
  background: linear-gradient(135deg, #facc15, #38bdf8);
  font-size: 0.78rem;
  font-weight: 950;
}

.ai-lab-recipe h6 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
}

.ai-lab-recipe pre {
  margin: 10px 0;
  overflow: auto;
  padding: 12px;
  border-radius: 8px;
  color: #dce6f3;
  background: #0f172a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.ai-lab-recipe dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.ai-lab-recipe dl div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
}

.ai-lab-recipe dt {
  margin-bottom: 4px;
  color: var(--teal-dark);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.ai-portfolio-proof {
  background:
    linear-gradient(135deg, rgba(250, 204, 21, 0.12), rgba(20, 184, 166, 0.08)),
    rgba(255, 255, 255, 0.86);
}

.ai-portfolio-proof ul {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 18px;
}

.ai-visual-diagram {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(239, 246, 255, 0.92)),
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.14), transparent 34%);
  box-shadow: 0 16px 34px rgba(23, 32, 46, 0.06);
}

.ai-visual-diagram > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.ai-visual-diagram h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.35rem;
}

.ai-visual-diagram header p:not(.eyebrow) {
  max-width: 840px;
  margin: 8px 0 0;
  color: var(--soft-ink);
  font-weight: 740;
  line-height: 1.55;
}

.ai-visual-diagram > header > span {
  padding: 10px 12px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  color: #17409d;
  background: rgba(37, 99, 235, 0.08);
  font-size: 0.78rem;
  font-weight: 950;
  white-space: nowrap;
}

.ai-flow-diagram {
  display: grid;
  grid-template-columns: repeat(6, minmax(128px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.ai-flow-node {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  min-height: 124px;
  padding: 14px;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 22px rgba(23, 32, 46, 0.05);
}

.ai-flow-node b {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  color: #082f49;
  background: linear-gradient(135deg, #facc15, #5eead4);
  font-size: 0.74rem;
  font-weight: 950;
}

.ai-flow-node strong {
  display: block;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.2;
}

.ai-flow-node span {
  display: block;
  margin-top: 6px;
  color: var(--soft-ink);
  font-size: 0.88rem;
  font-weight: 730;
  line-height: 1.35;
}

.ai-flow-node:not(:last-of-type)::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -14px;
  width: 18px;
  height: 2px;
  background: rgba(37, 99, 235, 0.36);
}

.ai-flow-node:not(:last-of-type)::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: calc(50% - 4px);
  right: -16px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid rgba(37, 99, 235, 0.54);
}

.ai-flow-arrow {
  display: none;
}

.ai-flow-node.tone-input {
  border-color: rgba(20, 184, 166, 0.3);
  background: rgba(236, 253, 245, 0.94);
}

.ai-flow-node.tone-build,
.ai-flow-node.tone-data {
  border-color: rgba(14, 165, 233, 0.28);
  background: rgba(240, 249, 255, 0.94);
}

.ai-flow-node.tone-model {
  border-color: rgba(139, 124, 246, 0.3);
  background: rgba(245, 243, 255, 0.94);
}

.ai-flow-node.tone-tool {
  border-color: rgba(249, 115, 22, 0.26);
  background: rgba(255, 247, 237, 0.94);
}

.ai-flow-node.tone-guard {
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(254, 242, 242, 0.94);
}

.ai-flow-node.tone-output {
  border-color: rgba(250, 204, 21, 0.34);
  background: rgba(254, 252, 232, 0.96);
}

.ai-diagram-callouts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ai-diagram-callouts p {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: var(--radius);
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.08);
  font-weight: 850;
  line-height: 1.45;
}

.ai-cheatsheet {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.82), rgba(239, 246, 255, 0.9)),
    rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 34px rgba(23, 32, 46, 0.06);
}

.ai-cheatsheet > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.ai-cheatsheet h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.35rem;
}

.ai-cheatsheet header p:not(.eyebrow) {
  max-width: 840px;
  margin: 8px 0 0;
  color: var(--soft-ink);
  font-weight: 730;
  line-height: 1.55;
}

.ai-cheatsheet > header > strong {
  padding: 10px 12px;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.1);
  font-size: 0.8rem;
  white-space: nowrap;
}

.ai-cheatsheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.ai-cheatsheet-card {
  position: relative;
  display: grid;
  min-height: 360px;
  overflow: hidden;
  padding: 15px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 26px rgba(23, 32, 46, 0.055);
}

.ai-cheatsheet-card .preview-lock-content {
  display: grid;
  align-content: start;
  gap: 10px;
}

.ai-cheatsheet-card > .preview-lock-content > span {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.1);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.ai-cheatsheet-card:nth-child(3n + 2) > .preview-lock-content > span {
  color: #2563eb;
  background: rgba(59, 130, 246, 0.12);
}

.ai-cheatsheet-card:nth-child(3n) > .preview-lock-content > span {
  color: #7c3aed;
  background: rgba(139, 124, 246, 0.13);
}

.ai-cheatsheet-card h5 {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.2;
}

.ai-cheatsheet-card p {
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.9rem;
  font-weight: 720;
  line-height: 1.45;
}

.ai-cheatsheet-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--soft-ink);
  font-size: 0.86rem;
  line-height: 1.42;
}

.ai-cheatsheet-card pre {
  margin: 0;
  max-height: 168px;
  overflow: auto;
  padding: 11px;
  border-radius: 8px;
  color: #dce6f3;
  background: #0f172a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  line-height: 1.45;
}

.ai-exercise-walkthrough {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(250, 204, 21, 0.42);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(236, 253, 245, 0.92)),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 34px rgba(23, 32, 46, 0.06);
}

.ai-exercise-walkthrough > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.32fr);
  gap: 16px;
  align-items: start;
}

.ai-exercise-walkthrough h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.18;
}

.ai-exercise-walkthrough header p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--soft-ink);
  font-weight: 760;
  line-height: 1.55;
}

.ai-exercise-walkthrough > header > strong {
  display: grid;
  min-height: 80px;
  align-content: center;
  padding: 14px;
  border: 1px solid rgba(250, 204, 21, 0.46);
  border-radius: var(--radius);
  color: #735100;
  background: rgba(250, 204, 21, 0.16);
  font-weight: 950;
  line-height: 1.35;
}

.ai-solve-steps {
  display: grid;
  gap: 12px;
}

.ai-solve-steps article {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.ai-solve-steps b {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  color: #102033;
  background: linear-gradient(135deg, #facc15, #14b8a6);
  font-size: 0.78rem;
  font-weight: 950;
}

.ai-solve-steps h5 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1rem;
}

.ai-solve-steps p {
  margin: 0;
  color: var(--soft-ink);
  font-weight: 740;
  line-height: 1.5;
}

.ai-solve-steps pre,
.ai-guided-answer pre {
  margin: 10px 0 0;
  overflow: auto;
  padding: 12px;
  border-radius: 8px;
  color: #dce6f3;
  background: #0f172a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.ai-line-explainer {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 12px;
}

.ai-line-explainer article,
.ai-guided-answer {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}

.ai-line-explainer dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.ai-line-explainer dl div {
  display: grid;
  grid-template-columns: minmax(160px, 0.45fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(20, 184, 166, 0.2);
  border-radius: 8px;
  background: rgba(20, 184, 166, 0.06);
}

.ai-line-explainer dt,
.ai-line-explainer dd {
  margin: 0;
}

.ai-line-explainer code {
  color: #0f766e;
  font-weight: 900;
  white-space: normal;
}

.ai-line-explainer dd,
.ai-line-explainer li {
  color: var(--soft-ink);
  font-weight: 740;
  line-height: 1.45;
}

.ai-line-explainer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.ai-guided-answer summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 950;
}

.ai-notebook {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(240, 253, 250, 0.92)),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 34px rgba(23, 32, 46, 0.06);
}

.ai-notebook > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.ai-notebook h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.2;
}

.ai-notebook > header p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--soft-ink);
  font-weight: 740;
  line-height: 1.5;
}

.ai-notebook-cells {
  display: grid;
  gap: 12px;
}

.ai-notebook-cell {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}

.ai-cell-prompt {
  display: grid;
  align-content: start;
  justify-content: center;
  padding: 16px 8px;
  border-right: 1px solid var(--line);
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.08);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  font-weight: 950;
  white-space: nowrap;
}

.code-cell .ai-cell-prompt {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.08);
}

.ai-cell-body {
  min-width: 0;
  padding: 16px;
}

.ai-cell-body > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.ai-cell-body h5 {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
}

.ai-cell-body p,
.ai-cell-body li {
  color: var(--soft-ink);
  font-weight: 740;
  line-height: 1.5;
}

.ai-cell-body p {
  margin: 8px 0 0;
}

.ai-cell-body ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 20px;
}

.ai-cell-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ghost-button {
  color: var(--soft-ink);
  background: rgba(255, 255, 255, 0.7);
}

.ai-notebook textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.22);
  border-radius: 8px;
  color: #dce6f3;
  background: #0f172a;
  outline: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.84rem;
  line-height: 1.55;
}

.ai-notebook textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
}

.ai-notebook-output {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.ai-notebook-output article {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.ai-notebook-output strong {
  display: block;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.ai-notebook-output pre {
  min-height: 86px;
  max-height: 260px;
  margin: 0;
  overflow: auto;
  padding: 12px;
  color: #dce6f3;
  background: #0f172a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.48;
  white-space: pre-wrap;
}

.ai-notebook-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.ai-project-card,
.ai-tutorial-section {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(250, 204, 21, 0.08)),
    rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 34px rgba(23, 32, 46, 0.06);
}

.ai-project-card header,
.ai-tutorial-section header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
  gap: 16px;
  align-items: start;
}

.ai-project-card h4,
.ai-tutorial-section h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.35rem;
}

.ai-project-card header p {
  margin: 8px 0 0;
  color: var(--soft-ink);
  font-weight: 740;
  line-height: 1.55;
}

.ai-project-card header strong,
.ai-tutorial-section header span {
  display: grid;
  min-height: 92px;
  align-content: center;
  padding: 14px;
  border: 1px solid rgba(250, 204, 21, 0.34);
  border-radius: var(--radius);
  color: #6d4700;
  background: rgba(250, 204, 21, 0.14);
  line-height: 1.45;
}

.ai-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.ai-project-grid article {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.ai-project-grid span,
.ai-resource-strip > span {
  display: block;
  margin-bottom: 8px;
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ai-project-grid ul,
.ai-step-actions {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--soft-ink);
  font-weight: 740;
  line-height: 1.45;
}

.ai-lab-bridge {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.96), rgba(255, 251, 235, 0.9)),
    rgba(255, 255, 255, 0.94);
}

.ai-lab-bridge-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.ai-lab-bridge h5 {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
}

.ai-lab-bridge p {
  margin: 6px 0 0;
  color: var(--soft-ink);
  font-weight: 740;
  line-height: 1.5;
}

.ai-lab-bridge-head span {
  display: inline-grid;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: #735100;
  background: rgba(250, 204, 21, 0.18);
  font-size: 0.75rem;
  font-weight: 950;
  white-space: nowrap;
}

.ai-lab-bridge-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 12px;
}

.ai-lab-bridge-grid article {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.ai-lab-bridge-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--teal-dark);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.ai-lab-bridge pre,
.ai-lab-action-list pre {
  margin: 8px 0 0;
  overflow: auto;
  padding: 10px;
  border-radius: 8px;
  color: #dce6f3;
  background: #0f172a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.76rem;
  line-height: 1.48;
  white-space: pre-wrap;
}

.ai-lab-action-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ai-lab-steps;
}

.ai-lab-action-list li {
  position: relative;
  min-width: 0;
  padding: 12px 12px 12px 48px;
  border: 1px solid rgba(20, 184, 166, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  counter-increment: ai-lab-steps;
}

.ai-lab-action-list li::before {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  color: #102033;
  background: linear-gradient(135deg, #facc15, #14b8a6);
  content: counter(ai-lab-steps);
  font-size: 0.72rem;
  font-weight: 950;
}

.ai-lab-action-list strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.ai-pill-list,
.ai-resource-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-pill-list b,
.ai-resource-strip a {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.11);
  font-size: 0.8rem;
  font-weight: 900;
  text-decoration: none;
}

.ai-resource-strip {
  align-items: center;
  padding: 12px;
  border: 1px dashed rgba(20, 184, 166, 0.34);
  border-radius: var(--radius);
  background: rgba(20, 184, 166, 0.06);
}

.ai-resource-strip > span {
  width: 100%;
  margin-bottom: 0;
}

.ai-sample-data {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
}

.ai-sample-data summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--ink);
  font-weight: 900;
}

.ai-sample-data pre,
.ai-tutorial-step pre {
  margin: 0;
  overflow: auto;
  padding: 14px;
  color: #dce6f3;
  background: #0f172a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.ai-project-solution-files {
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.ai-project-solution-files summary {
  display: flex;
  min-height: 58px;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--ink);
  font-weight: 950;
}

.ai-project-solution-files summary strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.12);
  font-size: 0.78rem;
  white-space: nowrap;
}

.ai-project-solution-list {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.ai-project-solution-list article {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.92);
}

.ai-project-solution-list header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.ai-project-solution-list header span {
  min-width: 0;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.ai-project-solution-list header b {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #6d4700;
  background: rgba(250, 204, 21, 0.18);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.ai-project-solution-list pre {
  max-height: 520px;
  margin: 0;
  overflow: auto;
  padding: 14px;
  color: #dce6f3;
  background: #0f172a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.ai-tutorial-list {
  display: grid;
  gap: 12px;
}

.ai-tutorial-step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.ai-step-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: #122033;
  background:
    linear-gradient(135deg, #facc15, #14b8a6);
  font-size: 0.82rem;
  font-weight: 950;
}

.ai-step-body {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.ai-step-body h5 {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
}

.ai-step-body p {
  margin: 0;
  color: var(--soft-ink);
  font-weight: 720;
  line-height: 1.55;
}

.ai-checkpoint-quiz {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: var(--radius);
  background: rgba(37, 99, 235, 0.06);
}

.ai-checkpoint-quiz > strong {
  color: var(--ink);
  line-height: 1.35;
}

.ai-checkpoint-quiz > div {
  display: grid;
  gap: 8px;
}

.ai-checkpoint-quiz label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--soft-ink);
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.35;
}

.python-concept-grid,
.python-quiz-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.python-info-card,
.python-exercise-card,
.python-quiz-section,
.python-interview-section,
.python-quiz-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 34px rgba(23, 32, 46, 0.06);
}

.python-info-card {
  min-width: 0;
  padding: 16px;
}

.python-info-card h4,
.python-exercise-card h4,
.python-quiz-section h4,
.python-interview-section h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
}

.python-info-card ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--soft-ink);
  line-height: 1.48;
}

.python-info-card pre,
.python-exercise-card pre {
  margin: 12px 0 0;
  overflow: auto;
  padding: 12px;
  border-radius: 8px;
  color: #e8edf7;
  background: #0f172a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem;
  line-height: 1.5;
}

.python-exercise-card,
.python-quiz-section,
.python-interview-section {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
}

.python-exercise-card header,
.python-quiz-section header,
.python-interview-section header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.python-exercise-card textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #dce6f3;
  background: #0f172a;
  outline: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.55;
}

.python-exercise-card textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
}

.python-exercise-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.python-exercise-actions strong {
  color: var(--ink);
}

.python-lab-output {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.python-lab-output article {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.python-lab-output strong {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.python-lab-output pre {
  min-height: 92px;
  max-height: 220px;
  margin: 0;
  overflow: auto;
  padding: 12px;
  color: #dce6f3;
  background: #0f172a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.python-check-result {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.45;
}

.python-check-result[data-state="ok"] {
  color: var(--teal-dark);
}

.python-check-result[data-state="warn"] {
  color: #b4532d;
}

.python-quiz-card {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 14px;
}

.python-quiz-card > strong {
  color: var(--ink);
  line-height: 1.35;
}

.python-quiz-card > div {
  display: grid;
  gap: 8px;
}

.python-quiz-card label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--soft-ink);
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.35;
}

.python-quiz-card input {
  margin-top: 3px;
}

.python-interview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.close-button {
  width: 44px;
  padding: 0;
  border: 1px solid var(--line);
  color: var(--soft-ink);
  background: #ffffff;
}

.close-button:hover {
  color: #ffffff;
  background: var(--ink);
}

.cheatsheet-intro {
  margin: 0;
  padding: 18px 22px 0;
  color: var(--muted);
  line-height: 1.65;
}

.cheatsheet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 22px;
}

.dsa-pattern-reference {
  margin: 0 22px 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(23, 32, 46, 0.08);
}

.dsa-pattern-reference header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.dsa-pattern-reference h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 1.25rem;
}

.dsa-pattern-reference header a {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: 8px;
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.08);
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
}

.dsa-pattern-reference > p {
  max-width: 820px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

.dsa-pattern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 12px;
}

.dsa-pattern-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  min-height: 340px;
  padding: 12px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #f8fafc;
}

.dsa-pattern-card > div {
  min-width: 0;
}

.dsa-pattern-card > .preview-lock-content {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
}

.dsa-pattern-card > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 99px;
  color: #ffffff;
  background: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
}

.dsa-pattern-card > .preview-lock-content > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 99px;
  color: #ffffff;
  background: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
}

.dsa-pattern-card h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.96rem;
}

.dsa-pattern-card small {
  display: inline-flex;
  width: fit-content;
  margin-top: 7px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.1);
  font-size: 0.72rem;
  font-weight: 950;
}

.dsa-pattern-card p {
  margin: 6px 0 0;
  color: var(--soft-ink);
  font-size: 0.85rem;
  line-height: 1.45;
}

.dsa-pattern-card pre {
  margin: 10px 0 0;
  overflow: auto;
  padding: 10px;
  border-radius: 8px;
  color: #dce6f3;
  background: #0f172a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  line-height: 1.48;
}

.dsa-problem-map {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(100, 116, 139, 0.2);
}

.dsa-problem-map strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dsa-problem-list {
  display: flex;
  max-height: 118px;
  overflow: auto;
  flex-wrap: wrap;
  gap: 6px;
}

.dsa-problem-chip,
.dsa-empty-chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 850;
}

.dsa-problem-chip {
  border: 1px solid rgba(20, 184, 166, 0.22);
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.08);
}

.dsa-problem-chip:hover,
.dsa-problem-chip:focus-visible {
  border-color: rgba(249, 115, 91, 0.5);
  color: #b4532d;
  background: rgba(249, 115, 91, 0.1);
}

.dsa-empty-chip {
  color: var(--muted);
  background: rgba(100, 116, 139, 0.1);
}

.system-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100% - 89px);
}

.system-nav {
  position: sticky;
  top: 89px;
  height: calc(100vh - 117px);
  overflow: auto;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.system-nav button {
  display: grid;
  width: 100%;
  min-height: 58px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--soft-ink);
  background: transparent;
  text-align: left;
}

.system-nav button:hover,
.system-nav button.active {
  border-color: rgba(249, 115, 91, 0.24);
  background: rgba(249, 115, 91, 0.08);
}

.system-nav strong {
  font-size: 0.92rem;
}

.system-nav span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.system-detail {
  padding: 22px;
}

.system-course-overview {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(59, 130, 246, 0.07)),
    #ffffff;
  box-shadow: 0 14px 30px rgba(23, 32, 46, 0.07);
}

.system-course-overview > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.38fr);
  gap: 18px;
  align-items: end;
}

.system-course-overview h3 {
  max-width: 780px;
  margin: 4px 0 8px;
  color: var(--ink);
  font-size: clamp(1.6rem, 3vw, 2.45rem);
  line-height: 1.08;
}

.system-course-overview p {
  max-width: 860px;
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.6;
}

.system-course-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.system-course-stats span {
  display: grid;
  min-height: 82px;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.system-course-stats strong {
  color: var(--ink);
  font-size: 1.45rem;
}

.system-course-stats small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.system-course-module-grid,
.system-rubric-grid {
  display: grid;
  gap: 12px;
}

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

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

.system-course-module-grid article,
.system-rubric-grid article {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
}

.system-course-module-grid span {
  color: var(--teal-dark);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.system-course-module-grid strong,
.system-rubric-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  line-height: 1.2;
}

.system-course-module-grid p,
.system-rubric-grid span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.45;
}

.system-hero {
  display: block;
  padding: 22px;
  border-radius: var(--radius);
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.98), rgba(47, 75, 117, 0.92) 58%, rgba(124, 67, 67, 0.9)),
    #111827;
}

.system-hero h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.05;
}

.system-hero p {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

.system-lesson-meta {
  display: flex;
  max-width: 860px;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.system-lesson-meta span {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  font-weight: 850;
}

.diagram-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.2);
}

.system-diagram-card {
  margin-top: 16px;
  box-shadow: 0 14px 30px rgba(23, 32, 46, 0.1);
}

.architecture-diagram {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  padding: 14px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98)),
    #f8fafc;
}

.diagram-lane {
  --lane-color: var(--teal);
  padding: 14px;
  border: 1px solid #dbe2ea;
  border-top: 5px solid var(--lane-color);
  border-radius: 8px;
  background: #ffffff;
}

.diagram-lane.lane-1 {
  --lane-color: var(--blue);
}

.diagram-lane.lane-2 {
  --lane-color: var(--coral);
}

.diagram-lane.lane-3 {
  --lane-color: var(--gold);
}

.diagram-lane h4 {
  margin: 0 0 12px;
  color: var(--soft-ink);
  font-size: 0.83rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.diagram-steps {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 0;
  list-style: none;
}

.diagram-step {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  padding: 0 0 14px;
}

.diagram-step::before {
  position: absolute;
  top: 30px;
  bottom: 0;
  left: 15px;
  width: 2px;
  border-radius: 99px;
  background: rgba(100, 116, 139, 0.24);
  content: "";
}

.diagram-step::after {
  position: absolute;
  bottom: 1px;
  left: 11px;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(100, 116, 139, 0.52);
  border-bottom: 2px solid rgba(100, 116, 139, 0.52);
  content: "";
  transform: rotate(45deg);
}

.diagram-step:last-child {
  padding-bottom: 0;
}

.diagram-step:last-child::before,
.diagram-step:last-child::after {
  display: none;
}

.step-number {
  position: relative;
  z-index: 1;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 3px solid #ffffff;
  border-radius: 99px;
  color: #ffffff;
  background: var(--lane-color);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.16);
  font-size: 0.78rem;
  font-weight: 950;
}

.step-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(23, 32, 46, 0.08);
  border-radius: 8px;
  background: #f8fafc;
}

.step-copy strong {
  color: var(--ink);
  font-size: 0.93rem;
  line-height: 1.2;
}

.step-copy small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
}

.architecture-detail {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.system-video-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.28fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(59, 130, 246, 0.08)),
    #ffffff;
  box-shadow: 0 14px 30px rgba(23, 32, 46, 0.07);
}

.system-video-preview {
  position: relative;
  display: grid;
  min-height: 176px;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(20, 118, 110, 0.85)),
    #111827;
}

.system-video-preview::before {
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  content: "";
}

.system-video-preview::after {
  position: absolute;
  top: 18px;
  right: 18px;
  left: 18px;
  height: 9px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--coral) 0 16%, transparent 16% 22%, var(--gold) 22% 38%, transparent 38% 44%, var(--teal) 44% 60%, transparent 60%);
  content: "";
}

.system-video-play {
  position: relative;
  z-index: 1;
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.system-video-play svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
}

.system-video-line {
  position: absolute;
  right: 24px;
  bottom: 38px;
  left: 24px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.system-video-line.short {
  right: 74px;
  bottom: 22px;
}

.system-video-copy {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
}

.system-video-copy h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
}

.system-video-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.55;
}

.system-video-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 3px;
}

.system-video-links a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.system-video-links a:hover {
  border-color: rgba(20, 184, 166, 0.5);
  background: rgba(20, 184, 166, 0.1);
}

.system-premium-section,
.system-drill-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(23, 32, 46, 0.07);
}

.system-premium-section > header,
.system-drill-panel > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.system-premium-section h4,
.system-drill-panel h4 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 1.2rem;
}

.system-premium-section > header > span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  color: #422900;
  background: var(--gold);
  font-size: 0.82rem;
  font-weight: 950;
}

.system-premium-grid,
.system-drill-grid {
  display: grid;
  gap: 12px;
}

.system-premium-grid {
  grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr));
}

.system-drill-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
}

.system-premium-card,
.system-drill-grid article {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  background: #f8fafc;
}

.system-premium-card h5,
.system-drill-grid h5 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 1rem;
}

.system-script-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 10px;
  list-style: none;
}

.system-script-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
}

.system-script-list li > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  font-size: 0.75rem;
  font-weight: 950;
}

.system-script-list strong,
.system-pair-list strong {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
}

.system-script-list p {
  margin: 3px 0 0;
  color: var(--soft-ink);
  font-size: 0.86rem;
  line-height: 1.45;
}

.system-pair-list {
  display: grid;
  gap: 9px;
}

.system-pair-list div {
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: #ffffff;
}

.system-pair-list div:nth-child(2n) {
  border-left-color: var(--blue);
}

.system-pair-list div:nth-child(3n) {
  border-left-color: var(--coral);
}

.system-pair-list span {
  display: block;
  margin-top: 5px;
  color: var(--soft-ink);
  font-size: 0.84rem;
  line-height: 1.45;
}

.system-signal-list {
  display: grid;
  margin: 0;
  padding-left: 18px;
  gap: 9px;
  color: var(--soft-ink);
  font-size: 0.88rem;
  line-height: 1.45;
}

.scale-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  border-radius: var(--radius);
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.98), rgba(20, 118, 110, 0.92) 50%, rgba(37, 99, 235, 0.88)),
    #111827;
}

.scale-hero h3 {
  max-width: 720px;
  margin: 0;
  font-size: 2rem;
  line-height: 1.06;
}

.scale-hero p {
  max-width: 780px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.65;
}

.scale-target-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.scale-target-card {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
}

.scale-target-card strong,
.scale-target-card span {
  display: block;
}

.scale-target-card strong {
  font-size: 1rem;
}

.scale-target-card span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.86rem;
  line-height: 1.45;
}

.scale-section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(23, 32, 46, 0.07);
}

.scale-section > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.scale-section h4 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 1.18rem;
}

.scale-diagram {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe2ea;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98)),
    #f8fafc;
}

.scale-lane {
  --lane-color: var(--teal);
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe2ea;
  border-left: 5px solid var(--lane-color);
  border-radius: 8px;
  background: #ffffff;
}

.scale-lane.lane-1 {
  --lane-color: var(--blue);
}

.scale-lane.lane-2 {
  --lane-color: var(--coral);
}

.scale-lane.lane-3 {
  --lane-color: var(--gold);
}

.scale-lane h5 {
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.86rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scale-node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.scale-node,
.scale-card,
.architecture-pair-list div,
.scale-roadmap li {
  border: 1px solid rgba(23, 32, 46, 0.08);
  border-radius: 8px;
  background: #f8fafc;
}

.scale-node {
  min-height: 96px;
  padding: 12px;
}

.scale-node strong,
.scale-node span,
.architecture-pair-list strong,
.architecture-pair-list span,
.scale-roadmap strong,
.scale-roadmap span {
  display: block;
}

.scale-node strong,
.scale-card h5,
.architecture-pair-list strong,
.scale-roadmap strong {
  color: var(--ink);
}

.scale-node span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.scale-card-grid,
.scale-split-grid {
  display: grid;
  gap: 12px;
}

.scale-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
}

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

.scale-card {
  min-height: 132px;
  padding: 14px;
}

.scale-card h5 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.scale-card p {
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.9rem;
  line-height: 1.5;
}

.risk-card {
  border-left: 4px solid var(--coral);
}

.risk-card:nth-child(2n) {
  border-left-color: var(--blue);
}

.risk-card:nth-child(3n) {
  border-left-color: var(--teal);
}

.architecture-pair-list {
  display: grid;
  gap: 9px;
}

.architecture-pair-list div {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.architecture-pair-list strong {
  font-size: 0.9rem;
}

.architecture-pair-list span {
  color: var(--soft-ink);
  font-size: 0.86rem;
  line-height: 1.45;
}

.scale-roadmap {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 9px;
  list-style: none;
}

.scale-roadmap li {
  padding: 12px;
  border-left: 4px solid var(--gold);
}

.scale-roadmap span {
  margin-top: 4px;
  color: var(--soft-ink);
  font-size: 0.88rem;
  line-height: 1.45;
}

.system-answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.system-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.system-summary-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(23, 32, 46, 0.07);
}

.system-summary-card h4 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.system-summary-card p {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.6;
}

.concept-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 10px;
  list-style: none;
}

.concept-list li {
  padding-left: 12px;
  border-left: 3px solid var(--teal);
}

.concept-list li:nth-child(2n) {
  border-left-color: var(--blue);
}

.concept-list li:nth-child(3n) {
  border-left-color: var(--coral);
}

.concept-list strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 0.9rem;
}

.concept-list span {
  display: block;
  color: var(--soft-ink);
  font-size: 0.88rem;
  line-height: 1.45;
}

.system-answer-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(23, 32, 46, 0.07);
}

.system-answer-card h4 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.system-answer-card ul {
  display: grid;
  margin: 0;
  padding-left: 18px;
  gap: 8px;
  color: var(--soft-ink);
  line-height: 1.55;
}

.system-cheatsheet-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(23, 32, 46, 0.07);
}

.system-cheatsheet-panel header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.system-cheatsheet-panel h4 {
  margin: 4px 0 0;
  font-size: 1.2rem;
}

.system-cheatsheet-grid {
  display: grid;
  gap: 14px;
}

.system-cheat-layer {
  --layer-color: var(--teal);
  padding: 14px;
  border: 1px solid #dbe2ea;
  border-left: 5px solid var(--layer-color);
  border-radius: 8px;
  background: #f8fafc;
}

.system-cheat-layer.layer-1 {
  --layer-color: var(--blue);
}

.system-cheat-layer.layer-2 {
  --layer-color: var(--coral);
}

.system-cheat-layer.layer-3 {
  --layer-color: var(--gold);
}

.system-layer-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.system-layer-heading > span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--layer-color);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.system-layer-heading h5 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.system-layer-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.system-layer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 12px;
}

.system-cheat-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 190px;
  padding: 14px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #ffffff;
}

.system-cheat-card > span,
.system-cheat-card .preview-lock-content > span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(20, 184, 166, 0.1);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.system-cheat-card:nth-child(3n + 2) > span,
.system-cheat-card:nth-child(3n + 2) .preview-lock-content > span {
  color: #2563eb;
  background: rgba(59, 130, 246, 0.12);
}

.system-cheat-card:nth-child(3n) > span,
.system-cheat-card:nth-child(3n) .preview-lock-content > span {
  color: #c2412f;
  background: rgba(249, 115, 91, 0.12);
}

.system-cheat-card h6 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.system-cheat-card p {
  display: grid;
  margin: 0;
  gap: 6px;
  color: var(--soft-ink);
  font-size: 0.86rem;
  line-height: 1.42;
}

.system-cheat-card p span {
  display: block;
}

.database-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(23, 32, 46, 0.07);
}

.database-panel > header {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(300px, 1fr);
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.database-panel h4 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 1.2rem;
}

.database-panel > header > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.database-diagram-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.db-diagram-card,
.database-question-card,
.database-cheat-card {
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #f8fafc;
}

.db-diagram-card {
  padding: 14px;
}

.db-diagram-card h5,
.database-question-card h5,
.database-cheat-card h5 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.acid-map {
  position: relative;
  display: grid;
  min-height: 300px;
  margin-top: 12px;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(20, 184, 166, 0.1) 1px, transparent 1px),
    linear-gradient(180deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px),
    #ffffff;
  background-size: 28px 28px;
}

.acid-center {
  display: grid;
  width: 134px;
  height: 134px;
  place-items: center;
  padding: 16px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--ink);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.22);
  font-weight: 950;
  line-height: 1.2;
  text-align: center;
}

.acid-node {
  position: absolute;
  display: grid;
  width: 142px;
  min-height: 72px;
  align-content: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(23, 32, 46, 0.1);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(23, 32, 46, 0.08);
}

.acid-node strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.acid-node span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.acid-a {
  top: 16px;
  left: 18px;
  border-top: 4px solid var(--teal);
}

.acid-c {
  top: 16px;
  right: 18px;
  border-top: 4px solid var(--blue);
}

.acid-i {
  bottom: 16px;
  left: 18px;
  border-top: 4px solid var(--coral);
}

.acid-d {
  right: 18px;
  bottom: 16px;
  border-top: 4px solid var(--gold);
}

.cap-map {
  position: relative;
  min-height: 300px;
  margin-top: 12px;
  border-radius: 8px;
  background:
    linear-gradient(150deg, transparent 49%, rgba(20, 184, 166, 0.32) 50%, transparent 51%),
    linear-gradient(30deg, transparent 49%, rgba(249, 115, 91, 0.34) 50%, transparent 51%),
    linear-gradient(90deg, transparent 49%, rgba(59, 130, 246, 0.32) 50%, transparent 51%),
    #ffffff;
}

.cap-point {
  position: absolute;
  display: grid;
  min-width: 132px;
  min-height: 48px;
  place-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(23, 32, 46, 0.12);
  font-size: 0.84rem;
  font-weight: 950;
  text-align: center;
}

.cap-c {
  top: 18px;
  left: 50%;
  background: var(--teal);
  transform: translateX(-50%);
}

.cap-a {
  bottom: 18px;
  left: 20px;
  background: var(--blue);
}

.cap-p {
  right: 20px;
  bottom: 18px;
  background: var(--coral);
}

.cap-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(220px, 54%);
  padding: 14px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  color: var(--soft-ink);
  background: rgba(248, 250, 252, 0.94);
  font-weight: 850;
  line-height: 1.45;
  text-align: center;
  transform: translate(-50%, -50%);
}

.database-question-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.database-question-card {
  display: grid;
  gap: 9px;
  padding: 14px;
  background: #ffffff;
}

.database-question-card p {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.52;
}

.database-question-card small {
  display: block;
  padding-left: 10px;
  border-left: 3px solid var(--teal);
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.database-cheatsheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.database-cheat-card {
  padding: 14px;
}

.database-cheat-card ul {
  display: grid;
  margin: 10px 0 0;
  padding-left: 18px;
  gap: 7px;
  color: var(--soft-ink);
  line-height: 1.45;
}

.source-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.source-note a {
  color: var(--teal-dark);
  font-weight: 850;
}

.cheat-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(23, 32, 46, 0.08);
}

.cheat-card header {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.cheat-card h3 {
  margin: 0;
  font-size: 1.08rem;
}

.cheat-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.cheat-code-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.cheat-code {
  min-width: 0;
}

.cheat-code:first-child {
  border-right: 1px solid #223048;
}

.cheat-code h4 {
  margin: 0;
  padding: 10px 12px;
  color: #dbeafe;
  background: #111827;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.cheat-code pre {
  min-height: 170px;
  margin: 0;
  overflow: auto;
  padding: 12px;
  color: #e8edf7;
  background: #0f172a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.5;
}

.login-page {
  min-height: 100svh;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(20, 118, 110, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(37, 99, 235, 0.12), transparent 34%),
    var(--background);
}

.auth-page-frame {
  display: grid;
  width: min(1180px, calc(100% - 32px));
  min-height: 100svh;
  grid-template-rows: auto 1fr auto;
  gap: 20px;
  margin: 0 auto;
  padding: 24px 0;
}

.login-shell {
  display: grid;
  min-height: 0;
  place-items: center;
  padding: 10px 0;
  grid-template-columns: 1fr;
}

.login-hero-panel {
  display: none;
}

.login-card {
  display: grid;
  gap: 18px;
  width: min(100%, 440px);
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 2rem;
}

.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.login-tabs button,
.login-submit {
  min-height: 46px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 900;
}

.login-tabs button {
  color: var(--muted);
  background: transparent;
}

.login-tabs button.active {
  color: #07111f;
  background: var(--gold);
}

#loginForm {
  display: grid;
  gap: 12px;
}

#loginForm label {
  display: grid;
  gap: 7px;
  color: var(--soft-ink);
  font-weight: 850;
}

#loginForm input {
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface-soft);
  outline: 0;
}

#loginForm input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
}

.account-agreement {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: var(--radius);
  background: rgba(20, 184, 166, 0.06);
}

.account-agreement[hidden] {
  display: none;
}

.agreement-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--soft-ink);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.45;
}

.agreement-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--teal);
}

.agreement-details {
  border-top: 1px solid rgba(20, 184, 166, 0.18);
  padding-top: 10px;
}

.agreement-details summary {
  color: var(--teal-dark);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 950;
}

.agreement-details div {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.agreement-details p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
  line-height: 1.45;
}

.agreement-details strong {
  color: var(--soft-ink);
}

.agreement-check a,
.site-footer-meta a,
.legal-card a {
  color: var(--teal-dark);
  font-weight: 950;
  text-decoration: none;
}

.agreement-check a:hover,
.site-footer-meta a:hover,
.legal-card a:hover {
  text-decoration: underline;
}

.legal-page {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(20, 184, 166, 0.18), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(245, 184, 74, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(247, 251, 249, 0.96), rgba(238, 247, 255, 0.96));
}

.legal-shell {
  display: grid;
  gap: 20px;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.legal-card {
  display: grid;
  gap: 22px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 48px rgba(23, 32, 46, 0.08);
}

.legal-hero {
  display: grid;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.95;
}

.legal-hero p,
.legal-section p,
.legal-section li {
  color: var(--soft-ink);
  line-height: 1.7;
}

.legal-contact {
  font-weight: 900;
}

.legal-section {
  display: grid;
  gap: 10px;
}

.legal-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
}

.legal-section p {
  margin: 0;
}

.legal-section ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.legal-footer {
  margin-top: 0;
}

.login-submit {
  color: #07111f;
  background: linear-gradient(135deg, var(--gold), var(--teal));
}

.login-submit.secondary {
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.auth-help-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.auth-help-links[hidden] {
  display: none;
}

.auth-help-links button {
  border: 0;
  color: var(--teal-dark);
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.auth-help-links button:hover,
.auth-help-links button:focus-visible {
  color: var(--blue);
  text-decoration: underline;
}

.login-status {
  color: var(--teal-dark);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.45;
}

.access-panel {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--soft-ink);
  background: var(--surface-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.recovery-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: var(--radius);
  color: var(--soft-ink);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(37, 99, 235, 0.06)),
    var(--surface-soft);
}

.recovery-panel[hidden] {
  display: none;
}

.recovery-panel header {
  display: grid;
  gap: 5px;
}

.recovery-panel strong {
  color: var(--ink);
  font-size: 1rem;
}

.recovery-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 730;
  line-height: 1.5;
}

.recovery-panel label {
  display: grid;
  gap: 7px;
  color: var(--soft-ink);
  font-weight: 850;
}

.recovery-panel label[hidden] {
  display: none;
}

.recovery-panel input {
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  outline: 0;
}

.recovery-panel input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
}

.recovery-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.resend-panel {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: var(--radius);
  color: var(--soft-ink);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(244, 182, 63, 0.08)),
    var(--surface-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.resend-panel[hidden] {
  display: none;
}

.resend-panel strong {
  color: var(--ink);
}

.resend-panel p {
  margin: 0;
}

.login-status[data-state="error"] {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-color: rgba(249, 115, 91, 0.36);
  color: #b4532d;
  background: rgba(249, 115, 91, 0.08);
  font-weight: 700;
}

.login-status[hidden] {
  display: none;
}

.access-panel {
  display: grid;
  gap: 10px;
}

.access-panel[hidden] {
  display: none;
}

.access-panel strong {
  color: var(--ink);
}

.access-panel p {
  margin: 0;
}

.profile-page {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(20, 184, 166, 0.2), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(245, 184, 74, 0.2), transparent 28%),
    linear-gradient(135deg, rgba(247, 251, 249, 0.96), rgba(238, 247, 255, 0.96));
}

.profile-shell {
  display: grid;
  gap: 20px;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.profile-topbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  backdrop-filter: blur(18px);
}

.profile-hero,
.profile-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 48px rgba(23, 32, 46, 0.08);
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 24px;
  align-items: stretch;
  padding: 28px;
}

.profile-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.98;
}

.profile-hero p {
  max-width: 620px;
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.6;
}

.profile-access-card {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(245, 184, 74, 0.42);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 249, 230, 0.92));
}

.profile-access-card span,
.profile-access-card small,
.payment-method small,
.payment-form header small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-access-card strong {
  font-size: 1.8rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.72fr);
  gap: 20px;
  align-items: start;
}

.profile-panel {
  min-width: 0;
  padding: 22px;
}

.profile-panel header {
  margin-bottom: 16px;
}

.profile-panel h2 {
  margin: 2px 0 0;
  font-size: 1.25rem;
}

.profile-form,
.profile-side,
.payment-form,
.payment-list {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.profile-form-grid,
.payment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-form label,
.payment-form label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: var(--soft-ink);
  font-size: 0.84rem;
  font-weight: 900;
}

.profile-form input,
.payment-form input,
.payment-form select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface-soft);
  outline: 0;
  font-size: 0.95rem;
  font-weight: 760;
  line-height: normal;
}

.profile-form input::placeholder,
.payment-form input::placeholder {
  color: rgba(105, 116, 135, 0.72);
  font-weight: 760;
}

.profile-form input:focus,
.payment-form input:focus,
.payment-form select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
}

.profile-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.profile-actions .login-submit {
  width: auto;
  min-width: 148px;
  padding: 0 18px;
}

.profile-status {
  min-height: 22px;
  margin: 0;
  color: var(--teal-dark);
  font-size: 0.9rem;
  font-weight: 900;
}

.profile-status[data-state="error"] {
  color: #b4532d;
}

.payment-method {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.billing-safe-card,
.payment-plan-card {
  display: grid;
  gap: 7px;
  padding: 14px 0 14px 15px;
  border-left: 4px solid var(--teal);
  color: var(--soft-ink);
}

.payment-plan-card {
  border-left-color: var(--gold);
}

.billing-safe-card span,
.payment-plan-card span {
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.billing-safe-card strong,
.payment-plan-card strong {
  color: var(--ink);
  font-size: 1.18rem;
}

.payment-plan-card strong {
  font-size: 2rem;
  line-height: 1;
}

.billing-safe-card small,
.payment-plan-card small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
  line-height: 1.45;
}

.payment-method div:first-child {
  display: grid;
  gap: 4px;
}

.payment-method span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.payment-method strong {
  color: var(--ink);
}

.payment-method-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.payment-method-actions button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--soft-ink);
  background: var(--surface-soft);
  font-weight: 900;
}

.profile-check {
  grid-template-columns: auto 1fr;
  align-items: center;
  justify-content: start;
}

.profile-check input {
  width: 18px;
  min-height: 18px;
}

.payment-gateway-card {
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(244, 182, 63, 0.08)),
    rgba(255, 255, 255, 0.9);
}

.payment-gateway-steps {
  display: grid;
  gap: 10px;
  counter-reset: gateway-step;
}

.payment-gateway-steps span {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: var(--radius);
  color: var(--soft-ink);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 850;
}

.payment-gateway-steps span::before {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  color: #073a35;
  background: linear-gradient(135deg, var(--gold), var(--teal));
  content: counter(gateway-step, decimal-leading-zero);
  counter-increment: gateway-step;
  font-size: 0.68rem;
  font-weight: 1000;
}

.payment-gateway-card .login-submit[disabled] {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.82;
}

.empty-payment {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-soft);
  font-weight: 800;
}

.back-link {
  color: var(--teal-dark);
  font-weight: 900;
  text-decoration: none;
}

.login-page.is-authenticated .login-tabs,
.login-page.is-authenticated #loginForm {
  display: none;
}

.login-page.is-authenticated .login-card {
  align-content: center;
}

.login-page.is-authenticated .back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (max-height: 720px) and (min-width: 921px) {
  .login-hero-panel {
    gap: 18px;
    padding: 28px;
  }

  .login-hero-panel h1 {
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.04;
  }

  .login-hero-panel p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .login-trust-grid span {
    padding: 10px;
    font-size: 0.8rem;
  }

  .login-card {
    padding: 28px;
  }
}

:root[data-theme="dark"] body {
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.1), transparent 34%),
    linear-gradient(315deg, rgba(147, 197, 253, 0.09), transparent 30%),
    linear-gradient(25deg, rgba(250, 204, 95, 0.06), transparent 34%),
    var(--canvas);
}

:root[data-theme="dark"] .pattern-sidebar {
  background:
    linear-gradient(180deg, rgba(7, 13, 25, 0.99), rgba(13, 20, 35, 0.97)),
    var(--sidebar);
}

:root[data-theme="dark"] .question-panel,
:root[data-theme="dark"] .lesson-panel,
:root[data-theme="dark"] .site-header,
:root[data-theme="dark"] .site-footer,
:root[data-theme="dark"] .login-card,
:root[data-theme="dark"] .legal-card,
:root[data-theme="dark"] .resend-panel,
:root[data-theme="dark"] .recovery-panel,
:root[data-theme="dark"] .cheatsheet-drawer,
:root[data-theme="dark"] .system-drawer,
:root[data-theme="dark"] .python-drawer,
:root[data-theme="dark"] .course-page,
:root[data-theme="dark"] .architecture-drawer,
:root[data-theme="dark"] .system-course-overview,
:root[data-theme="dark"] .system-video-panel,
:root[data-theme="dark"] .system-premium-section,
:root[data-theme="dark"] .system-drill-panel,
:root[data-theme="dark"] .dsa-pattern-reference,
:root[data-theme="dark"] .system-summary-card,
:root[data-theme="dark"] .system-answer-card,
:root[data-theme="dark"] .system-cheatsheet-panel,
:root[data-theme="dark"] .scale-section,
:root[data-theme="dark"] .database-panel,
:root[data-theme="dark"] .cheat-card,
:root[data-theme="dark"] .home-track-card,
:root[data-theme="dark"] .landing-difference,
:root[data-theme="dark"] .landing-comparison-card,
:root[data-theme="dark"] .landing-value-grid article,
:root[data-theme="dark"] .preview-guest-banner,
:root[data-theme="dark"] .course-dashboard-heading,
:root[data-theme="dark"] .course-section-heading,
:root[data-theme="dark"] .course-action-panel,
:root[data-theme="dark"] .course-outcome-panel,
:root[data-theme="dark"] .output-panel {
  border-color: var(--line);
  background: rgba(17, 24, 39, 0.94);
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .legal-page {
  background:
    radial-gradient(circle at 12% 8%, rgba(20, 184, 166, 0.16), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(245, 184, 74, 0.12), transparent 28%),
    linear-gradient(135deg, #111827, #0f172a);
}

:root[data-theme="dark"] .search-box,
:root[data-theme="dark"] .pattern-select-field,
:root[data-theme="dark"] .cheatsheet-button,
:root[data-theme="dark"] .system-button,
:root[data-theme="dark"] .python-button,
:root[data-theme="dark"] .java-button,
:root[data-theme="dark"] .ai-button,
:root[data-theme="dark"] .architecture-button,
:root[data-theme="dark"] .login-link,
:root[data-theme="dark"] .profile-link,
:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .site-nav-link,
:root[data-theme="dark"] .site-nav > button,
:root[data-theme="dark"] .small-button,
:root[data-theme="dark"] .icon-text-button,
:root[data-theme="dark"] .close-button,
:root[data-theme="dark"] .language-tabs {
  border-color: var(--line);
  color: var(--soft-ink);
  background: var(--control);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
}

:root[data-theme="dark"] .preview-lock-overlay {
  border-color: rgba(45, 212, 191, 0.28);
  color: var(--ink);
  background: rgba(15, 23, 42, 0.84);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

:root[data-theme="dark"] .pattern-select-field select {
  color: var(--ink);
}

:root[data-theme="dark"] .system-button {
  color: var(--coral);
}

:root[data-theme="dark"] .architecture-button {
  color: var(--blue);
}

:root[data-theme="dark"] .python-button {
  color: var(--teal-dark);
}

:root[data-theme="dark"] .java-button {
  color: var(--gold);
}

:root[data-theme="dark"] .ai-button {
  color: var(--lavender);
}

:root[data-theme="dark"] .profile-page {
  background:
    radial-gradient(circle at 12% 8%, rgba(20, 184, 166, 0.16), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(245, 184, 74, 0.12), transparent 28%),
    linear-gradient(135deg, #111827, #0f172a);
}

:root[data-theme="dark"] .profile-topbar,
:root[data-theme="dark"] .profile-hero,
:root[data-theme="dark"] .profile-panel,
:root[data-theme="dark"] .payment-gateway-card,
:root[data-theme="dark"] .payment-gateway-steps span,
:root[data-theme="dark"] .payment-method,
:root[data-theme="dark"] .billing-safe-card,
:root[data-theme="dark"] .payment-plan-card,
:root[data-theme="dark"] .empty-payment {
  border-color: var(--line);
  background: rgba(17, 24, 39, 0.92);
}

:root[data-theme="dark"] .profile-nav a,
:root[data-theme="dark"] .profile-nav button,
:root[data-theme="dark"] .payment-method-actions button,
:root[data-theme="dark"] .profile-form input,
:root[data-theme="dark"] .payment-form input,
:root[data-theme="dark"] .payment-form select {
  border-color: var(--line);
  color: var(--soft-ink);
  background: var(--control);
}

:root[data-theme="dark"] .profile-access-card {
  border-color: rgba(245, 184, 74, 0.28);
  background: rgba(245, 184, 74, 0.1);
}

:root[data-theme="dark"] .billing-safe-card,
:root[data-theme="dark"] .payment-plan-card {
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
}

:root[data-theme="dark"] .system-course-module-grid article,
:root[data-theme="dark"] .system-rubric-grid article,
:root[data-theme="dark"] .system-premium-card,
:root[data-theme="dark"] .system-drill-grid article,
:root[data-theme="dark"] .system-pair-list div {
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.72);
}

:root[data-theme="dark"] .system-course-overview h3,
:root[data-theme="dark"] .system-course-module-grid strong,
:root[data-theme="dark"] .system-rubric-grid strong,
:root[data-theme="dark"] .system-premium-section h4,
:root[data-theme="dark"] .system-drill-panel h4,
:root[data-theme="dark"] .system-premium-card h5,
:root[data-theme="dark"] .system-drill-grid h5,
:root[data-theme="dark"] .system-script-list strong,
:root[data-theme="dark"] .system-pair-list strong {
  color: var(--ink);
}

:root[data-theme="dark"] .system-course-overview p,
:root[data-theme="dark"] .system-course-module-grid p,
:root[data-theme="dark"] .system-rubric-grid span,
:root[data-theme="dark"] .system-video-copy p:not(.eyebrow),
:root[data-theme="dark"] .system-script-list p,
:root[data-theme="dark"] .system-pair-list span,
:root[data-theme="dark"] .system-signal-list {
  color: var(--soft-ink);
}

:root[data-theme="dark"] .system-video-copy h4 {
  color: var(--ink);
}

:root[data-theme="dark"] .system-video-links a {
  border-color: rgba(45, 212, 191, 0.24);
  color: var(--teal-dark);
  background: rgba(15, 23, 42, 0.72);
}

:root[data-theme="dark"] .course-site-header,
:root[data-theme="dark"] .site-footer {
  border-color: rgba(148, 163, 184, 0.2);
  background: transparent;
  box-shadow: none;
}

:root[data-theme="dark"] .site-primary-nav .site-nav-link,
:root[data-theme="dark"] .site-primary-nav .nav-button {
  border: 0;
  color: rgba(226, 232, 240, 0.78);
  background: transparent;
  box-shadow: none;
}

:root[data-theme="dark"] .site-primary-nav .site-nav-link:hover,
:root[data-theme="dark"] .site-primary-nav .nav-button:hover {
  color: var(--teal-dark);
  background: transparent;
}

:root[data-theme="dark"] .site-account-nav .login-link {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--teal), var(--blue));
}

:root[data-theme="dark"] .home-hero {
  background:
    linear-gradient(155deg, rgba(15, 23, 42, 0.98) 0 39%, rgba(17, 24, 39, 0.99) 39% 100%),
    #111827;
}

:root[data-theme="dark"] .home-hero::after {
  background: var(--canvas);
}

:root[data-theme="dark"] .home-readiness-card {
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.74);
}

:root[data-theme="dark"] .landing-visual .home-readiness-card {
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.9)),
    #111827;
}

:root[data-theme="dark"] .landing-preview-card {
  border-color: rgba(148, 163, 184, 0.28);
  background: #f8fbff;
}

:root[data-theme="dark"] .landing-explore h2 {
  color: var(--ink);
}

:root[data-theme="dark"] .landing-explore p:not(.eyebrow),
:root[data-theme="dark"] .footer-signal-row span,
:root[data-theme="dark"] .site-footer-meta {
  color: var(--muted);
}

:root[data-theme="dark"] .home-card-button {
  border-color: rgba(45, 212, 191, 0.24);
  color: var(--teal-dark);
  background: rgba(45, 212, 191, 0.1);
}

:root[data-theme="dark"] .home-track-badge {
  border-color: rgba(45, 212, 191, 0.24);
  color: var(--teal-dark);
  background: rgba(45, 212, 191, 0.1);
}

:root[data-theme="dark"] .course-page-header,
:root[data-theme="dark"] .course-switcher {
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.94);
}

:root[data-theme="dark"] .course-switcher button,
:root[data-theme="dark"] .course-module-card {
  border-color: var(--line);
  background: var(--surface-soft);
}

:root[data-theme="dark"] .course-module-card span {
  color: var(--teal-dark);
  background: rgba(45, 212, 191, 0.12);
}

:root[data-theme="dark"] .course-module-card.complete {
  border-color: rgba(45, 212, 191, 0.28);
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.1), rgba(250, 204, 95, 0.06)),
    var(--surface-soft);
}

:root[data-theme="dark"] .course-module-number {
  border-color: rgba(45, 212, 191, 0.22);
  color: var(--teal-dark);
  background: rgba(45, 212, 191, 0.1);
}

:root[data-theme="dark"] .cheatsheet-button {
  color: var(--teal-dark);
}

:root[data-theme="dark"] .home-track-card h2,
:root[data-theme="dark"] .home-track-meta strong,
:root[data-theme="dark"] .course-switcher strong,
:root[data-theme="dark"] .course-section-heading h3,
:root[data-theme="dark"] .course-outcome-panel h3,
:root[data-theme="dark"] .course-action-panel h3,
:root[data-theme="dark"] .course-module-card strong,
:root[data-theme="dark"] .topbar h1,
:root[data-theme="dark"] .panel-heading h2,
:root[data-theme="dark"] .flashcard-panel header h3,
:root[data-theme="dark"] .solution-guide header h3,
:root[data-theme="dark"] .solution-detail-card summary span,
:root[data-theme="dark"] .dsa-pattern-reference h3,
:root[data-theme="dark"] .dsa-pattern-card h4,
:root[data-theme="dark"] .system-summary-card h4,
:root[data-theme="dark"] .system-answer-card h4,
:root[data-theme="dark"] .scale-section h4,
:root[data-theme="dark"] .scale-lane h5,
:root[data-theme="dark"] .scale-node strong,
:root[data-theme="dark"] .scale-card h5,
:root[data-theme="dark"] .architecture-pair-list strong,
:root[data-theme="dark"] .scale-roadmap strong,
:root[data-theme="dark"] .database-panel h4,
:root[data-theme="dark"] .database-question-card h5,
:root[data-theme="dark"] .database-cheat-card h5,
:root[data-theme="dark"] .cheat-card h3 {
  color: var(--ink);
}

:root[data-theme="dark"] .question-group-heading,
:root[data-theme="dark"] .insight-band,
:root[data-theme="dark"] .flashcard-panel,
:root[data-theme="dark"] .solution-guide,
:root[data-theme="dark"] .editor-panel,
:root[data-theme="dark"] .syntax-status,
:root[data-theme="dark"] .cheatsheet-header,
:root[data-theme="dark"] .system-header,
:root[data-theme="dark"] .system-nav,
:root[data-theme="dark"] .python-progress-strip,
:root[data-theme="dark"] .python-nav,
:root[data-theme="dark"] .solution-detail-card summary,
:root[data-theme="dark"] .output-heading {
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.94);
}

:root[data-theme="dark"] .flashcard-front,
:root[data-theme="dark"] .solution-detail-card,
:root[data-theme="dark"] .solution-lock-card,
:root[data-theme="dark"] .dsa-pattern-card,
:root[data-theme="dark"] .system-cheat-layer,
:root[data-theme="dark"] .system-cheat-card,
:root[data-theme="dark"] .python-info-card,
:root[data-theme="dark"] .python-exercise-card,
:root[data-theme="dark"] .python-quiz-section,
:root[data-theme="dark"] .python-interview-section,
:root[data-theme="dark"] .python-quiz-card,
:root[data-theme="dark"] .ai-scenario-card,
:root[data-theme="dark"] .ai-beginner-guide,
:root[data-theme="dark"] .ai-foundation-card,
:root[data-theme="dark"] .ai-foundation-steps article,
:root[data-theme="dark"] .ai-foundation-picture,
:root[data-theme="dark"] .ai-picture-node,
:root[data-theme="dark"] .ai-explain-card,
:root[data-theme="dark"] .ai-vocab-panel,
:root[data-theme="dark"] .ai-vocab-grid article,
:root[data-theme="dark"] .ai-lab-recipe,
:root[data-theme="dark"] .ai-lab-recipe-list > article,
:root[data-theme="dark"] .ai-lab-recipe dl div,
:root[data-theme="dark"] .ai-portfolio-proof,
:root[data-theme="dark"] .ai-visual-diagram,
:root[data-theme="dark"] .ai-cheatsheet,
:root[data-theme="dark"] .ai-cheatsheet-card,
:root[data-theme="dark"] .ai-flow-node,
:root[data-theme="dark"] .ai-diagram-callouts p,
:root[data-theme="dark"] .ai-exercise-walkthrough,
:root[data-theme="dark"] .ai-solve-steps article,
:root[data-theme="dark"] .ai-line-explainer article,
:root[data-theme="dark"] .ai-line-explainer dl div,
:root[data-theme="dark"] .ai-guided-answer,
:root[data-theme="dark"] .ai-notebook,
:root[data-theme="dark"] .ai-notebook-cell,
:root[data-theme="dark"] .ai-notebook-output article,
:root[data-theme="dark"] .ai-project-card,
:root[data-theme="dark"] .ai-lab-bridge,
:root[data-theme="dark"] .ai-lab-bridge-grid article,
:root[data-theme="dark"] .ai-lab-action-list li,
:root[data-theme="dark"] .ai-tutorial-section,
:root[data-theme="dark"] .ai-project-grid article,
:root[data-theme="dark"] .ai-sample-data,
:root[data-theme="dark"] .ai-project-solution-files,
:root[data-theme="dark"] .ai-project-solution-list article,
:root[data-theme="dark"] .ai-tutorial-step,
:root[data-theme="dark"] .ai-checkpoint-quiz,
:root[data-theme="dark"] .python-nav button,
:root[data-theme="dark"] .scale-lane,
:root[data-theme="dark"] .scale-node,
:root[data-theme="dark"] .scale-card,
:root[data-theme="dark"] .architecture-pair-list div,
:root[data-theme="dark"] .scale-roadmap li,
:root[data-theme="dark"] .database-question-card,
:root[data-theme="dark"] .database-cheat-card,
:root[data-theme="dark"] .db-diagram-card,
:root[data-theme="dark"] .diagram-lane,
:root[data-theme="dark"] .step-copy {
  border-color: var(--line);
  background: var(--surface-soft);
}

:root[data-theme="dark"] .solution-reveal-button {
  color: #422900;
}

:root[data-theme="dark"] .ai-project-card header strong,
:root[data-theme="dark"] .ai-tutorial-section header span,
:root[data-theme="dark"] .ai-beginner-guide > header > strong,
:root[data-theme="dark"] .ai-foundation-card > header > strong,
:root[data-theme="dark"] .ai-lab-recipe > header > span,
:root[data-theme="dark"] .ai-visual-diagram > header > span,
:root[data-theme="dark"] .ai-cheatsheet > header > strong,
:root[data-theme="dark"] .ai-exercise-walkthrough > header > strong,
:root[data-theme="dark"] .ai-lab-bridge-head span {
  color: #fde68a;
  background: rgba(250, 204, 21, 0.11);
}

:root[data-theme="dark"] .ai-flow-node.tone-input,
:root[data-theme="dark"] .ai-flow-node.tone-build,
:root[data-theme="dark"] .ai-flow-node.tone-data,
:root[data-theme="dark"] .ai-flow-node.tone-model,
:root[data-theme="dark"] .ai-flow-node.tone-tool,
:root[data-theme="dark"] .ai-flow-node.tone-guard,
:root[data-theme="dark"] .ai-flow-node.tone-output {
  background: rgba(15, 23, 42, 0.82);
}

:root[data-theme="dark"] .ai-picture-node.tone-input,
:root[data-theme="dark"] .ai-picture-node.tone-build,
:root[data-theme="dark"] .ai-picture-node.tone-data,
:root[data-theme="dark"] .ai-picture-node.tone-model,
:root[data-theme="dark"] .ai-picture-node.tone-tool,
:root[data-theme="dark"] .ai-picture-node.tone-guard,
:root[data-theme="dark"] .ai-picture-node.tone-output,
:root[data-theme="dark"] .ai-foundation-picture > p {
  background: rgba(15, 23, 42, 0.72);
}

:root[data-theme="dark"] .ai-pill-list b,
:root[data-theme="dark"] .ai-resource-strip a,
:root[data-theme="dark"] .ai-project-solution-files summary strong {
  color: #7dd3fc;
  background: rgba(20, 184, 166, 0.13);
}

:root[data-theme="dark"] .flashcard-back {
  background:
    linear-gradient(135deg, rgba(6, 13, 25, 0.98), rgba(20, 184, 166, 0.72)),
    var(--surface-soft);
}

:root[data-theme="dark"] .solution-detail-card summary strong,
:root[data-theme="dark"] .solution-guide header strong,
:root[data-theme="dark"] .dsa-pattern-card small,
:root[data-theme="dark"] .dsa-problem-chip,
:root[data-theme="dark"] .system-cheat-card > span {
  color: var(--teal-dark);
  background: rgba(45, 212, 191, 0.12);
}

:root[data-theme="dark"] .solution-detail-card summary::after,
:root[data-theme="dark"] .dsa-pattern-card > span,
:root[data-theme="dark"] .question-group-heading small,
:root[data-theme="dark"] .solved-chip,
:root[data-theme="dark"] .done-button.active,
:root[data-theme="dark"] .lesson-kicker span:first-child {
  color: #07111f;
  background: var(--teal);
}

:root[data-theme="dark"] .lesson-kicker span:first-child {
  background: var(--coral);
}

:root[data-theme="dark"] .language-tabs button.active {
  color: #07111f;
  background: var(--teal);
}

:root[data-theme="dark"] .question-button:hover,
:root[data-theme="dark"] .question-button.active,
:root[data-theme="dark"] .pattern-button:hover,
:root[data-theme="dark"] .pattern-button.active,
:root[data-theme="dark"] .system-nav button:hover,
:root[data-theme="dark"] .system-nav button.active,
:root[data-theme="dark"] .python-nav button:hover,
:root[data-theme="dark"] .python-nav button.active {
  border-color: rgba(45, 212, 191, 0.28);
  background: rgba(45, 212, 191, 0.1);
}

:root[data-theme="dark"] .python-lab-output strong {
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.94);
}

:root[data-theme="dark"] .architecture-diagram,
:root[data-theme="dark"] .scale-diagram,
:root[data-theme="dark"] .acid-map {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.98)),
    var(--surface-soft);
}

:root[data-theme="dark"] .diagram-card,
:root[data-theme="dark"] .acid-node,
:root[data-theme="dark"] .cap-core {
  border-color: var(--line);
  background: rgba(17, 24, 39, 0.96);
}

:root[data-theme="dark"] .cap-map {
  background:
    linear-gradient(150deg, transparent 49%, rgba(45, 212, 191, 0.28) 50%, transparent 51%),
    linear-gradient(30deg, transparent 49%, rgba(251, 146, 120, 0.28) 50%, transparent 51%),
    linear-gradient(90deg, transparent 49%, rgba(147, 197, 253, 0.28) 50%, transparent 51%),
    var(--surface-soft);
}

:root[data-theme="dark"] .line-numbers {
  background: #050916;
}

:root[data-theme="dark"] #codeEditor,
:root[data-theme="dark"] #runOutput,
:root[data-theme="dark"] .python-info-card pre,
:root[data-theme="dark"] .python-exercise-card pre,
:root[data-theme="dark"] .python-exercise-card textarea,
:root[data-theme="dark"] .python-lab-output pre,
:root[data-theme="dark"] .dsa-pattern-card pre,
:root[data-theme="dark"] .solution-detail-card pre,
:root[data-theme="dark"] .cheat-code pre {
  background: #050916;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .pattern-sidebar {
    position: relative;
    height: auto;
  }

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

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

  .course-dashboard-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

  .question-panel {
    position: relative;
    top: auto;
    max-height: none;
  }

  .question-list {
    max-height: 430px;
  }
}

@media (max-width: 920px) {
  .content-shell {
    padding: 16px;
  }

  .auth-page-frame {
    width: min(100% - 32px, 1180px);
    padding: 16px 0;
  }

  .site-header,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px 0;
  }

  .site-nav,
  .site-footer nav {
    width: 100%;
    justify-content: flex-start;
  }

  .site-primary-nav,
  .site-account-nav {
    justify-content: flex-start;
  }

  .site-nav > * {
    flex: 1 1 auto;
  }

  .home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 42px 22px 118px;
  }

  .home-hero-copy {
    min-height: auto;
  }

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

  .home-readiness-card {
    min-height: auto;
  }

  .landing-visual {
    min-height: 420px;
  }

  .landing-preview-card {
    width: min(500px, 92vw);
  }

  .landing-visual .home-readiness-card {
    right: auto;
    bottom: -30px;
    width: min(320px, 88%);
  }

  .landing-explore {
    margin-top: -62px;
  }

  .course-page-layout,
  .course-overview-hero,
  .course-outcome-panel ul {
    grid-template-columns: 1fr;
  }

  .course-switcher {
    position: relative;
    top: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .course-overview-copy h3 {
    font-size: 2.8rem;
  }

  .course-section-heading,
  .course-action-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar,
  .studio-grid,
  .lesson-hero,
  .insight-band,
  .editor-toolbar {
    grid-template-columns: 1fr;
  }

  .topbar,
  .insight-band,
  .editor-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .pattern-select-field,
  .search-box {
    width: 100%;
    flex: 0 0 auto;
  }

  .cheatsheet-button {
    width: 100%;
  }

  .system-button {
    width: 100%;
  }

  .python-button {
    width: 100%;
  }

  .java-button {
    width: 100%;
  }

  .ai-button {
    width: 100%;
  }

  .architecture-button {
    width: 100%;
  }

  .theme-toggle {
    width: 100%;
  }

  .login-link,
  .profile-link {
    width: 100%;
  }

  .login-shell {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .login-hero-panel {
    min-height: auto;
  }

  .login-card {
    min-height: auto;
    border-left: 0;
  }

  .system-layout,
  .python-layout,
  .system-course-overview > header,
  .system-video-panel,
  .system-premium-grid,
  .system-drill-grid,
  .system-hero,
  .scale-hero,
  .ai-scenario-card,
  .ai-beginner-guide > header,
  .ai-foundation-card > header,
  .ai-foundation-layout,
  .ai-lab-recipe > header,
  .ai-visual-diagram > header,
  .ai-cheatsheet > header,
  .ai-exercise-walkthrough > header,
  .ai-notebook > header,
  .ai-notebook-cell,
  .ai-cell-body > header,
  .ai-notebook-output,
  .ai-explain-grid,
  .ai-vocab-grid,
  .ai-lab-recipe dl,
  .ai-flow-diagram,
  .ai-cheatsheet-grid,
  .ai-diagram-callouts,
  .ai-line-explainer,
  .ai-line-explainer dl div,
  .ai-project-card header,
  .ai-lab-bridge-head,
  .ai-lab-bridge-grid,
  .ai-tutorial-section header,
  .ai-project-grid,
  .python-progress-strip,
  .python-concept-grid,
  .python-quiz-grid,
  .python-lab-output,
  .python-interview-list,
  .scale-split-grid,
  .system-summary-grid,
  .system-answer-grid,
  .system-course-module-grid,
  .system-rubric-grid,
  .database-panel > header,
  .database-diagram-grid {
    grid-template-columns: 1fr;
  }

  .system-nav {
    position: relative;
    top: auto;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .python-nav {
    position: relative;
    top: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .python-progress-stat {
    text-align: left;
  }

  .studio-grid {
    display: grid;
  }

  .lesson-hero {
    display: grid;
  }

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

  .readiness-tracker {
    max-width: 320px;
  }

  .profile-hero,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-access-card {
    min-height: 140px;
  }
}

@media (max-width: 640px) {
  .pattern-sidebar {
    padding: 16px;
  }

  .pattern-list {
    grid-template-columns: 1fr;
  }

  .home-track-grid,
  .home-stat-grid,
  .course-dashboard-heading,
  .course-module-grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    padding: 34px 18px 92px;
  }

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

  .home-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .home-hero-actions .run-button,
  .home-hero-actions .icon-text-button {
    width: 100%;
  }

  .landing-proof-strip span {
    width: 100%;
    justify-content: center;
  }

  .landing-visual {
    min-height: auto;
  }

  .landing-preview-card {
    min-height: 300px;
    grid-template-columns: 1fr;
    grid-template-rows: 42px 76px 1fr;
    transform: none;
  }

  .landing-chart-preview {
    display: none;
  }

  .landing-visual .home-readiness-card {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: -24px;
  }

  .landing-explore {
    margin-top: -42px;
  }

  .course-page {
    min-height: auto;
  }

  .course-page-header,
  .course-overview-detail,
  .course-overview-hero,
  .course-section-heading,
  .course-outcome-panel,
  .course-action-panel {
    padding: 16px;
  }

  .course-page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .course-overview-copy h3 {
    font-size: 2.1rem;
  }

  .course-action-buttons,
  .course-action-buttons .run-button,
  .course-action-buttons .icon-text-button {
    width: 100%;
  }

  .topbar h1 {
    font-size: 2rem;
  }

  .profile-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .auth-page-frame {
    width: min(100% - 20px, 1180px);
    padding: 10px 0;
  }

  .site-header,
  .site-footer {
    padding: 14px;
  }

  .site-header {
    padding: 12px 0;
  }

  .site-nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .site-primary-nav {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .site-primary-nav .site-nav-link,
  .site-primary-nav .nav-button {
    flex: 0 0 auto;
  }

  .profile-topbar,
  .profile-nav,
  .profile-actions,
  .payment-method {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .profile-form-grid,
  .payment-grid {
    grid-template-columns: 1fr;
  }

  .lesson-copy h2 {
    font-size: 2.2rem;
  }

  .lesson-hero,
  .insight-band,
  .flashcard-panel,
  .solution-guide,
  .editor-panel,
  .python-detail,
  .python-lesson-hero,
  .ai-scenario-card,
  .ai-beginner-guide,
  .ai-foundation-card,
  .ai-explain-card,
  .ai-vocab-panel,
  .ai-lab-recipe,
  .ai-portfolio-proof,
  .ai-visual-diagram,
  .ai-exercise-walkthrough,
  .ai-notebook,
  .python-exercise-card,
  .python-quiz-section,
  .python-interview-section,
  .ai-project-card,
  .ai-lab-bridge,
  .ai-tutorial-section {
    padding: 16px;
  }

  .python-lesson-hero,
  .ai-beginner-guide > header,
  .ai-foundation-card > header,
  .ai-lab-recipe > header,
  .ai-visual-diagram > header,
  .ai-exercise-walkthrough > header,
  .ai-notebook > header,
  .ai-cell-body > header,
  .ai-project-card header,
  .ai-lab-bridge-head,
  .ai-tutorial-section header,
  .python-exercise-card header,
  .python-quiz-section header,
  .python-interview-section header,
  .python-exercise-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-tutorial-step {
    grid-template-columns: 1fr;
  }

  .ai-lab-recipe-list > article {
    grid-template-columns: 1fr;
  }

  .ai-foundation-steps article {
    grid-template-columns: 1fr;
  }

  .ai-picture-link {
    display: none;
  }

  .ai-solve-steps article {
    grid-template-columns: 1fr;
  }

  .ai-cell-prompt {
    justify-content: start;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .ai-cell-actions {
    justify-content: flex-start;
  }

  .ai-flow-node:not(:last-of-type)::after {
    top: auto;
    right: auto;
    bottom: -15px;
    left: 28px;
    width: 2px;
    height: 18px;
  }

  .ai-flow-node:not(:last-of-type)::before {
    top: auto;
    right: auto;
    bottom: -18px;
    left: 24px;
    border-top: 7px solid rgba(37, 99, 235, 0.54);
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
    border-bottom: 0;
  }

  .flashcard-panel header {
    align-items: stretch;
    flex-direction: column;
  }

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

  .solution-guide header {
    align-items: stretch;
    flex-direction: column;
  }

  .solution-guide header strong {
    max-width: none;
    text-align: left;
  }

  .solution-detail-card summary {
    align-items: stretch;
    flex-direction: column;
    padding: 12px 14px;
  }

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

  .problem-detail-card dl div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .editor-actions {
    flex-direction: column;
  }

  .language-tabs,
  .language-tabs button,
  .icon-text-button,
  .run-button,
  .python-exercise-actions .run-button,
  .theme-toggle,
  .done-button {
    width: 100%;
  }

  .login-trust-grid {
    grid-template-columns: 1fr;
  }

  .code-shell {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .code-shell.monaco-ready {
    grid-template-columns: minmax(0, 1fr);
  }

  .cheatsheet-grid,
  .dsa-pattern-grid,
  .python-concept-grid,
  .python-quiz-grid,
  .python-lab-output,
  .python-interview-list,
  .cheat-code-grid,
  .scale-target-grid,
  .scale-card-grid,
  .scale-node-grid,
  .system-summary-grid,
  .system-answer-grid,
  .database-question-grid,
  .database-cheatsheet-grid {
    grid-template-columns: 1fr;
  }

  .dsa-pattern-reference header {
    align-items: stretch;
    flex-direction: column;
  }

  .dsa-pattern-reference header a {
    width: fit-content;
  }

  .acid-map,
  .cap-map {
    min-height: 380px;
  }

  .acid-node {
    width: 128px;
  }

  .cheat-code:first-child {
    border-right: 0;
    border-bottom: 1px solid #223048;
  }
}

/* Keep the AI course visually calm after shared course styles are applied. */
.ai-overlay .python-lesson-hero {
  background:
    linear-gradient(135deg, rgba(8, 20, 34, 0.98), rgba(15, 118, 110, 0.9) 54%, rgba(37, 99, 235, 0.78)),
    var(--sidebar);
}

.ai-overlay .python-lesson-hero h3,
.ai-overlay :is(
  .ai-beginner-guide h4,
  .ai-visual-diagram h4,
  .ai-notebook h4,
  .ai-project-card h4,
  .ai-tutorial-section h4,
  .ai-exercise-walkthrough h4,
  .python-info-card h4,
  .python-exercise-card h4,
  .python-quiz-section h4,
  .python-interview-section h4
) {
  font-weight: 760;
  letter-spacing: 0;
}

.ai-overlay .python-lesson-hero .done-button {
  border-color: rgba(255, 255, 255, 0.22);
  color: #e7fff8;
  background: rgba(255, 255, 255, 0.08);
}

.ai-overlay .python-lesson-hero .done-button.active {
  color: #082f49;
  background: linear-gradient(135deg, var(--gold), var(--teal));
}

.ai-overlay .ai-visual-diagram {
  overflow: visible;
}

.ai-overlay .ai-flow-diagram {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.ai-overlay .ai-flow-node {
  min-height: 112px;
  padding: 12px;
}

.ai-overlay .ai-flow-node b {
  width: 28px;
  height: 28px;
}

.ai-overlay .ai-flow-node strong {
  font-size: 0.92rem;
}

.ai-overlay .ai-flow-node span {
  font-size: 0.82rem;
}

@media (max-width: 1180px) {
  .ai-overlay .ai-flow-diagram {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ai-overlay .ai-flow-node:not(:last-of-type)::before,
  .ai-overlay .ai-flow-node:not(:last-of-type)::after {
    display: none;
  }
}
