/* Devin University — devin.ai design system (marketing site tokens) */

@font-face {
  font-family: "NB International Pro";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("assets/fonts/NBInternationalPro-Light.woff2") format("woff2");
}
@font-face {
  font-family: "NB International Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/NBInternationalPro-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "NB International Pro";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/NBInternationalPro-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "NB International Pro";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("assets/fonts/NBInternationalPro-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "NB International Pro";
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url("assets/fonts/NBInternationalPro-Italic.woff2") format("woff2");
}
@font-face {
  font-family: "STK Bureau Serif";
  font-style: normal;
  font-weight: 300 400;
  font-display: swap;
  src: url("assets/fonts/STKBureauSerif-Book.woff2") format("woff2");
}
@font-face {
  font-family: "STK Bureau Serif";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("assets/fonts/STKBureauSerif-Medium.woff2") format("woff2");
}

:root {
  --bg: #f7f6f5;
  --surface: #ffffff;
  --ink: #191919;
  --ink-2: rgba(25, 25, 25, 0.56);
  --ink-3: rgba(25, 25, 25, 0.56);
  --line: rgba(0, 0, 0, 0.06);
  --blue: #2200ff;
  --blue-dark: #2200ff;
  --blue-soft: rgba(34, 0, 255, 0.05);
  --green: #19a974;
  --green-soft: #e7f7f0;
  --hover-bg: rgba(0, 0, 0, 0.04);
  --card-hover-border: rgba(0, 0, 0, 0.2);
  --amber: #b97f10;
  --amber-soft: #fdf3df;
  --radius: 2px;
  --shadow: none;
  --font: "NB International Pro", system-ui, sans-serif;
  --serif: "STK Bureau Serif", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-weight-strong: 600;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  /* canvas color revealed by macOS overscroll bounce; matches topbar/footer */
  background: var(--surface);
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.4;
}
::selection {
  background-color: var(--blue);
  color: var(--bg);
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}

/* ---------- Legacy-app banner (catalog home only) ---------- */
.legacy-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 28px;
  font-size: 14px;
  text-align: center;
  color: var(--ink);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.legacy-banner a {
  color: var(--blue);
  text-decoration: underline;
}
.legacy-banner-dismiss {
  border: 0;
  background: none;
  padding: 0 4px;
  font-size: 18px;
  line-height: 1;
  color: var(--ink-2);
}
.legacy-banner-dismiss:hover {
  color: var(--ink);
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  height: 60px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
}
.brand .logo {
  height: 20px;
  width: auto;
  display: block;
  margin-top: -4px;
}
.topbar nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
  color: var(--ink-2);
}
.topbar nav a:hover {
  color: var(--ink);
}
.topbar .spacer {
  flex: 1;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 2px;
  padding: 6px 12px 5px;
  font-size: 14px;
  font-weight: 400;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  transition: all 0.15s ease;
}
.btn:hover {
  background: var(--ink);
  color: #fff;
}
.btn.primary,
.btn.dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.btn.primary:hover,
.btn.dark:hover {
  opacity: 0.8;
}
.btn.lg {
  padding: 8px 16px 7px;
  font-size: 16px;
  border-radius: 2px;
}

/* ---------- Layout: sidebar + main ---------- */
.shell {
  display: flex;
  min-height: calc(100vh - 60px);
  position: relative;
  z-index: 1;
}

/* Contexts (e.g. .flow-mode) tune the --sidebar-* variables; states
   (e.g. .collapsed) set properties directly. Keeping the two on different
   layers means they never compete on specificity. */
.sidebar {
  --sidebar-w: 300px;
  --sidebar-pad-top: 22px;
  --sidebar-pad-x: 16px;
  --sidebar-pad-bottom: 40px;
  width: var(--sidebar-w);
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: var(--sidebar-pad-top) var(--sidebar-pad-x) var(--sidebar-pad-bottom);
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}
.lesson-toc .course-label,
.lesson-toc .course-name {
  padding-right: 32px;
}
.sidebar .course-label {
  display: inline-block;
  width: fit-content;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 10px;
  margin-bottom: 8px;
  text-decoration: none;
}
a.course-label:hover {
  color: var(--ink);
}
.sidebar .course-name {
  font-weight: 400;
  font-size: 16px;
  padding: 2px 10px 12px;
}

.progress-wrap {
  padding: 0 10px 18px;
}
.progress-bar {
  height: 6px;
  border-radius: 0;
  background: #eef0f2;
  overflow: hidden;
}
.progress-bar > div {
  height: 100%;
  border-radius: 0;
  background: var(--blue);
  transition: width 0.4s ease;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 7px;
}

/* flow sidebar: acts > steps (> tour stops); doubles as flow navigation */
.side-act {
  margin-bottom: 6px;
}
.side-act-head {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 10px 10px 4px;
}
.side-step {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.45;
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  border-radius: 0;
  font-size: 13px;
  color: var(--ink-2);
}
.side-step:hover {
  background: var(--hover-bg);
}
.side-step.active {
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-weight: 400;
}
.side-step .dot {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid #cdd1d6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
}
.side-step.done .dot {
  background: var(--green);
  border-color: var(--green);
}
.side-stops {
  padding: 1px 0 4px 28px;
}
.side-stop {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 4px 10px;
  border: 0;
  background: transparent;
  font-size: 12.5px;
  color: var(--ink-3);
}
.side-stop:hover {
  background: var(--hover-bg);
}
.side-stop.active {
  color: var(--blue-dark);
  font-weight: 400;
}
.side-restart {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  margin-top: 16px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  font-size: 12.5px;
  color: var(--ink-3);
}
.side-restart:hover {
  color: var(--ink);
  background: var(--hover-bg);
}

/* lesson table of contents: course lessons with completion state */
.lesson-toc-list .side-step .toc-num {
  font-family: var(--mono);
  font-size: 11px;
  line-height: inherit;
  color: var(--ink-3);
  flex-shrink: 0;
}
.lesson-toc-list .side-step.locked {
  opacity: 0.55;
  cursor: default;
}
.lesson-toc-list .side-step.locked:hover {
  background: transparent;
}
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ---------- Course home ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(0, 560px);
  gap: 48px;
  align-items: center;
  padding: 64px 56px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  border: 1px solid var(--line);
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 18px;
}
.hero h1 {
  font-size: 64px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -1.92px;
  max-width: 640px;
  transform: translateX(-4px);
}
.hero p.sub {
  margin-top: 18px;
  font-size: 18px;
  color: var(--ink-2);
  max-width: 520px;
}
.hero .hero-cta {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.hero .stats {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
}
.hero .stat {
  flex: 1;
}
.hero .stat b {
  display: block;
  font-size: 22px;
  font-weight: 400;
}
.hero .stat span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.section {
  padding: 72px 56px 20px;
}
.section + .section {
  padding-top: 8px;
}
.section h2 {
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.64px;
  margin-bottom: 6px;
}
.section .section-sub {
  color: var(--ink-3);
  font-size: 14px;
  margin-bottom: 26px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
}
.module-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}
.module-card:hover {
  transform: translateY(-2px);
  border-color: var(--card-hover-border);
}
.module-card.coming-soon {
  opacity: 0.6;
  cursor: default;
}
.module-card.coming-soon:hover {
  transform: none;
  border-color: var(--line);
}
.module-card .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.module-card .num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.module-card h3 {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  transform: translateX(-1px);
}
.module-card p {
  font-size: 13.5px;
  color: var(--ink-2);
  flex: 1;
}
.module-card .meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 2px;
}
.badge.todo {
  background: #f1f2f4;
  color: var(--ink-2);
}
.badge.progress {
  background: var(--blue-soft);
  color: var(--blue-dark);
}
.badge.done {
  background: var(--green-soft);
  color: var(--green);
}

/* ---------- Module landing ---------- */
.crumbs {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.crumbs a:hover {
  color: var(--ink);
}
.module-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  padding: 48px 56px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.module-hero .eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--blue-dark);
  margin-bottom: 10px;
}
.module-hero h1 {
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -1.2px;
  line-height: 1.04;
}
.module-hero .tagline {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 15.5px;
}
.module-hero .meta-row {
  display: flex;
  gap: 18px;
  margin: 20px 0 26px;
  font-size: 13px;
  color: var(--ink-3);
}
.module-hero .btn {
  margin-top: 28px;
}

.objectives {
  margin-top: 8px;
}
.objectives h4 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.objectives li {
  list-style: none;
  display: flex;
  gap: 11px;
  padding: 7px 0;
  font-size: 13.8px;
  color: var(--ink-2);
}
.objectives li::before {
  content: "✓";
  color: var(--blue);
  flex-shrink: 0;
}

.course-art img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--line);
}
.video-card {
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0e1116;
  aspect-ratio: 16/9;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.video-card .vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      420px 220px at 20% 15%,
      rgba(45, 114, 246, 0.35),
      transparent 70%
    ),
    radial-gradient(
      360px 220px at 85% 90%,
      rgba(122, 167, 251, 0.18),
      transparent 70%
    );
}
.video-card .play {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 0;
}
.video-card .vid-label {
  position: absolute;
  left: 18px;
  bottom: 14px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
}
.video-card .vid-dur {
  position: absolute;
  right: 16px;
  bottom: 14px;
  font-size: 11.5px;
  background: rgba(0, 0, 0, 0.55);
  padding: 3px 8px;
  border-radius: 0;
}
.video-note {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 10px;
}

.lesson-list {
  padding: 40px 56px 72px;
}
.lesson-list h2 {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 16px;
}
.lesson-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 15px 20px;
  margin-bottom: 10px;
  transition: border-color 0.15s ease;
}
.lesson-row:hover {
  border-color: var(--card-hover-border);
}
.lesson-row .idx {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-3);
  width: 36px;
}
.lesson-row .t {
  flex: 1;
  font-size: 14.5px;
  font-weight: 400;
}
.lesson-row .type {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--bg);
  border-radius: 2px;
  padding: 4px 10px;
}
.lesson-row .type.sandbox {
  background: var(--blue-soft);
  color: var(--blue-dark);
}
.lesson-row .state {
  font-size: 12px;
  color: var(--ink-3);
  width: 92px;
  text-align: right;
  margin-left: 12px;
}
.lesson-row .state.done {
  color: var(--green);
}
.lesson-row .state.progress {
  color: var(--blue-dark);
}
.lesson-row.coming-soon {
  opacity: 0.55;
}
.lesson-row.coming-soon:hover {
  border-color: var(--line);
}

/* ---------- Reading / video lesson page (full-width, no sidebar) ---------- */
.lesson-page {
  flex: 1;
  padding: 56px 56px 80px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.lesson-page-inner {
  max-width: 760px;
  margin: 0 auto;
}
.lesson-page .crumbs {
  margin-bottom: 22px;
}
.lesson-page .lesson-kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--blue-dark);
  margin-bottom: 8px;
}
.lesson-page h1 {
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -1.2px;
  line-height: 1.04;
  margin-bottom: 24px;
}
.lesson-page .video-card.lesson-video {
  margin-bottom: 8px;
}
.lesson-video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.lesson-video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.lesson-page .script p {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 16px;
}
.lesson-page .script img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.lesson-page .script li {
  font-family: var(--serif);
}
.script strong,
.script b {
  font-family: var(--serif);
  font-weight: var(--font-weight-strong);
  color: var(--ink);
}
.script ul,
.script ol {
  padding-left: 1.4em;
  margin: 0 0 16px;
}
.script li {
  margin-bottom: 8px;
}
.script table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.script th,
.script td {
  padding: 12px 16px 12px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.script th {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
}
.script tbody tr:last-child td {
  border-bottom: none;
}
.script .callout {
  margin: 0 0 16px;
  padding: 16px 18px;
  background: var(--blue-soft);
  border-left: 3px solid var(--blue);
}
.script .callout .callout-label {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--blue-dark);
  margin-bottom: 6px;
}
.script .callout p {
  margin: 0;
}
.lesson-page-nav {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ---------- Quiz (knowledge check) lesson ---------- */
.quiz-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 28px 32px;
  margin-top: 24px;
}
.quiz-progress {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.quiz-prompt {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 20px;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz-option {
  text-align: left;
  padding: 13px 16px;
  font-size: 14.5px;
  line-height: 1.5;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  transition: all 0.15s ease;
}
.quiz-option:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--blue-soft);
}
.quiz-option:disabled {
  cursor: default;
  color: var(--ink-2);
}
.quiz-option.correct {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--ink);
}
.quiz-option.wrong {
  border-color: #d64545;
  background: #fbecec;
  color: var(--ink);
}
.quiz-feedback {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--green);
  background: var(--green-soft);
  font-size: 14px;
}
.quiz-feedback.wrong {
  border-left-color: var(--amber);
  background: var(--amber-soft);
}
.quiz-feedback b {
  display: block;
  font-size: 13px;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.quiz-feedback p {
  margin: 0;
  color: var(--ink-2);
}
.quiz-nav {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.quiz-results {
  text-align: center;
  padding: 40px 32px;
}
.quiz-score {
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.quiz-score-note {
  color: var(--ink-2);
  margin-top: 8px;
  font-size: 14.5px;
}
.quiz-results .quiz-nav {
  justify-content: center;
  margin-top: 28px;
}

/* ---------- Lesson page (sandbox pane) ---------- */
.lesson-shell {
  display: flex;
  height: calc(100vh - 60px - 54px);
}
.pane-sandbox {
  flex: 1.25;
  min-width: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.sandbox-frame {
  flex: 0 0 auto;
  max-width: 100%;
  max-height: 100%;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sandbox-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #f7f8f9;
}
.sandbox-chrome .dots span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
}
.sandbox-chrome .dots span:nth-child(1) {
  background: #f56b62;
}
.sandbox-chrome .dots span:nth-child(2) {
  background: #f5bd4f;
}
.sandbox-chrome .dots span:nth-child(3) {
  background: #53c64d;
}
.sandbox-chrome .url {
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  padding: 5px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sandbox-chrome .live {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--green);
  border-radius: 2px;
  padding: 3px 8px;
}
/* persistent lesson navigation attached to the simulated browser window */
.flow-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.flow-bottom-bar .btn[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

/* course complete */
.congrats {
  padding: 96px 56px 72px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.congrats-badge {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.congrats .eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--blue-dark);
}
.congrats h1 {
  font-size: 64px;
  font-weight: 400;
  letter-spacing: -1.92px;
  line-height: 1;
  margin: 12px 0 14px;
}
.congrats .sub {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 600px;
  margin: 0 auto;
}
.congrats-stats {
  display: flex;
  justify-content: center;
  gap: 56px;
  margin-top: 40px;
}
.congrats-stats .stat b {
  display: block;
  font-size: 26px;
  font-weight: 300;
  letter-spacing: -0.5px;
}
.congrats-stats .stat span {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-3);
}
.congrats .hero-cta {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 12px;
}
.next-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
}
.next-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.next-card:hover {
  transform: translateY(-2px);
  border-color: var(--card-hover-border);
}
.next-card .num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--blue-dark);
}
.next-card h3 {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
}
.next-card p {
  font-size: 13.5px;
  color: var(--ink-2);
  flex: 1;
}
.next-card .go {
  font-size: 13px;
  color: var(--blue-dark);
}

.callout {
  border: 1px solid rgba(34, 0, 255, 0.2);
  background: var(--blue-soft);
  border-radius: 2px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--blue-dark);
  margin: 18px 0;
}
.callout b {
  display: block;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 26px 56px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12.5px;
  color: var(--ink-3);
  position: relative;
  z-index: 1;
}
.footer .made-with {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.footer .heart {
  color: #e25555;
}

/* flow mode: slim persistent sidebar nav, sandbox gets ~2/3 of viewport */
body:has(.shell.flow-mode) {
  overflow: hidden;
  height: 100vh;
}
.shell.flow-mode {
  height: calc(100vh - 60px);
  min-height: 0;
}
.shell.flow-mode #flow-sidebar-slot {
  height: 100%;
}
.shell.flow-mode .sidebar {
  --sidebar-w: 240px;
  --sidebar-pad-top: 18px;
  --sidebar-pad-x: 10px;
  --sidebar-pad-bottom: 32px;
  position: relative;
  top: 0;
  height: 100%;
}
.shell.flow-mode .lesson-shell {
  height: calc(100vh - 60px);
}

/* collapsible sidebar: shrinks to a thin rail, content fades out */
.sidebar {
  transition:
    width 0.25s ease,
    padding 0.25s ease;
}
.sidebar.collapsed {
  width: 40px;
  padding-left: 8px;
  padding-right: 8px;
  overflow: hidden;
}
.sidebar > * {
  transition: opacity 0.15s ease;
}
.side-collapse {
  /* sticky (not absolute): the sidebar scrolls, and the button must stay
     pinned to the top-right of the scrollport rather than scroll away. */
  position: sticky;
  top: 10px;
  z-index: 2;
  margin: calc(10px - var(--sidebar-pad-top))
    calc(8px - var(--sidebar-pad-x)) -24px auto;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  border-radius: 2px;
  font-size: 13px;
  line-height: 1;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar.collapsed .side-collapse {
  /* .collapsed sets padding directly (not via --sidebar-pad-x), so the
     margin above would pull the button flush against the sidebar edge. */
  margin-right: 0;
}
.side-collapse:hover {
  color: var(--ink);
  background: var(--hover-bg);
}
.sidebar.collapsed > :not(.side-collapse) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.shell.flow-mode .pane-sandbox {
  flex: 1;
}

/* embedded walkthrough (engine iframes inside the sandbox pane) */
.sandbox-scale-wrap {
  position: relative;
  overflow: hidden;
  background: #0d0d0f;
}
.sandbox-stage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  background: #0d0d0f;
}
.sandbox-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0d0d0f;
  opacity: 1;
  transition: opacity 180ms ease;
}
.sandbox-screen.hidden-frame {
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  visibility: hidden;
}
.sandbox-chrome .walkthrough-step {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .module-hero {
    grid-template-columns: 1fr;
  }
}
