@font-face {
  font-family: "Involve";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/Involve-Regular.woff") format("woff");
}

:root {
  --ink: #231f20;
  --panel: #efefeb;
  --paper: #fbfbf9;
  --muted: #65615f;
  --quiet: #5d5957;
  --accent: #9b0923;
  --open: #2f765f;
  --warning: #b05d48;
  --line: rgba(35, 31, 32, .17);
  --page: clamp(20px, 4vw, 72px);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", "SF Mono", Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  color-scheme: light;
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
}

a,
button,
summary {
  color: inherit;
  font: inherit;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--paper);
  background: var(--accent);
  font-size: 13px;
  font-weight: 500;
}

.skip-link:focus { top: 12px; }

.topbar {
  min-height: 82px;
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 34px;
  padding: 0 var(--page);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.brand {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.035em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--paper);
  background: var(--accent);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
}

.topnav {
  min-width: 0;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.7vw, 34px);
}

.topnav > a,
.nav-menu > summary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 10px 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.nav-menu > summary::-webkit-details-marker { display: none; }

.nav-menu > summary {
  gap: 4px;
}

.topnav > a:hover,
.topnav > a:focus-visible,
.nav-menu > summary:hover,
.nav-menu[open] > summary {
  color: var(--accent);
}

.nav-menu { position: relative; }

.nav-menu > summary::after {
  width: 7px;
  height: 7px;
  content: "";
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transform-origin: center;
  transition: transform .18s ease;
}

.nav-menu[open] > summary::after {
  transform: rotate(225deg);
}

.submenu {
  width: 270px;
  position: absolute;
  z-index: 30;
  top: calc(100% + 10px);
  left: -18px;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 14px 14px 0 rgba(155, 9, 35, .035);
}

.nav-menu-roadmaps > .roadmap-submenu {
  width: 680px;
  max-width: calc(100vw - 48px);
  top: calc(100% + 22px);
  left: 50%;
  padding: 24px 26px 22px;
  border-top: 3px solid var(--accent);
  box-shadow: 0 26px 60px rgba(30, 25, 27, .20);
  /* Single-row desktop uses a deliberate optical offset from its trigger. */
  transform: translateX(-39%);
}

.roadmap-menu-groups {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
}

.roadmap-menu-group { min-width: 0; }
.roadmap-menu-group:first-child { padding-right: 25px; }

.roadmap-menu-group + .roadmap-menu-group {
  padding-left: 27px;
  border-left: 1px solid var(--line);
}

.roadmap-menu-label {
  display: block;
  margin-bottom: 9px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.submenu a {
  display: block;
  padding: 12px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.submenu a:last-child { border-bottom: 0; }
.submenu a:hover,
.submenu a:focus-visible { color: var(--paper); background: var(--accent); }

.roadmap-submenu .roadmap-menu-link {
  display: block;
  padding: 8px 4px;
  color: var(--ink);
  border-bottom: 0;
  background: transparent;
  font-family: "Involve", Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.roadmap-submenu .roadmap-menu-link:hover,
.roadmap-submenu .roadmap-menu-link:focus-visible {
  color: var(--accent);
  background: rgba(155, 9, 35, .055);
}

.roadmap-menu-note {
  display: block;
  margin: -8px 0 8px;
  padding: 0 4px;
  color: var(--quiet);
  font-family: "Involve", Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.nav-backdrop {
  width: 100%;
  position: fixed;
  inset: 0;
  z-index: 20;
  padding: 0;
  border: 0;
  background: rgba(28, 25, 26, .14);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  cursor: pointer;
}

.nav-backdrop[hidden] { display: none; }

.account {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  padding: 9px 12px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.account:hover { color: var(--accent); border-color: var(--accent); }
.account-compact { display: none; }

.login-form,
.logout-form,
.hero-login-form { margin: 0; }

.login-form,
.logout-form { justify-self: end; }

button.account {
  background: transparent;
  cursor: pointer;
}

.auth-nav-status {
  color: var(--accent);
  cursor: default;
}

.hero-login-form .primary {
  min-height: 52px;
  cursor: pointer;
}

.auth-access-note {
  max-width: 720px;
  margin-top: 16px;
  color: var(--quiet);
  font-size: 12px;
}

.auth-access-note p { margin: 4px 0; }

/* Kept for the authenticated navigation contract used by older pages. */
.topnav a, .login {
  min-height: 44px;
  padding: 10px 4px;
}

main { padding: 0 var(--page) 84px; }

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
}

h1,
h2,
h3,
p { overflow-wrap: break-word; }

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lead,
.page-intro {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.75;
}

.home-hero {
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  gap: clamp(38px, 7vw, 116px);
  align-items: center;
}

.home-hero > *, .page-head-split > *, .direction-grid > *, .catalog-grid > *, .trainer-grid > *, .career-grid > * { min-width: 0; }

.hero-copy { padding: 64px 0; }

.home-hero h1,
.hero h1 {
  margin: 0;
  font-size: clamp(46px, 6.2vw, 94px);
  line-height: .98;
  letter-spacing: -.045em;
}

.home-hero h1 span,
.hero h1 span { color: var(--accent); }

.home-hero .lead,
.hero-copy .lead { margin: 28px 0; }

.hero-actions,
.lesson-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 12px;
}

.primary,
.secondary {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px 18px;
  border: 1px solid var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.primary {
  min-width: 275px;
  color: var(--paper);
  background: var(--accent);
}

.secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, .45);
}

.primary:hover { background: #7d071c; }
.secondary:hover { color: var(--accent); border-color: var(--accent); }

.primary[disabled] {
  cursor: not-allowed;
  opacity: .5;
}

.access-note,
.quota,
.status-muted {
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.55;
}

.quick-start {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 24px 24px 0 rgba(155, 9, 35, .03);
}

.quick-start > header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 18px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .05em;
}

.quick-start > div { padding: 22px; }

.quick-start h2 {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.35;
}

.quick-start > div > a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.45;
}

.quick-start > div > a:hover { color: var(--ink); }

.quick-start b {
  color: var(--accent);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.online { color: var(--muted); }

#learning-loop,
#roadmaps,
#automation-stacks,
#trainers { scroll-margin-top: 24px; }

.learning-loop {
  padding: 68px 0 24px;
  border-top: 1px solid var(--line);
}

.learning-loop > header {
  max-width: 820px;
  margin-bottom: 32px;
}

.learning-loop h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 58px);
  line-height: 1;
  letter-spacing: -.03em;
}

.learning-loop ol {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
}

.learning-loop li {
  min-width: 0;
  padding: clamp(20px, 2.6vw, 32px);
  border-right: 1px solid var(--line);
  background: rgba(238, 232, 229, .54);
}

.learning-loop li:last-child { border-right: 0; }

.learning-loop b {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.learning-loop h3 {
  margin: 42px 0 10px;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.1;
}

.learning-loop p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.home-section { padding-top: 20px; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding: 70px 0 26px;
  border-top: 1px solid var(--line);
}

.section-head h2 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(30px, 4vw, 58px);
  line-height: 1;
  letter-spacing: -.03em;
}

.section-head > p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.direction-grid,
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

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

.portal-card,
.catalog-card,
.trainer-card {
  border: 1px solid var(--line);
  background: var(--panel);
}

.portal-card {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 36px);
}

.card-number {
  color: var(--accent);
  font-family: var(--display);
  font-size: 38px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.portal-card h3 {
  margin: 26px 0 12px;
  font-size: clamp(24px, 2.8vw, 38px);
  line-height: 1.15;
  letter-spacing: -.025em;
}

.portal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.portal-card > a {
  margin-top: auto;
  padding-top: 28px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  text-underline-offset: 5px;
}

.roadmap-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.roadmap-role-card {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--line);
  background: #fff;
}

.roadmap-role-card h3 {
  margin: 8px 0 12px;
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.roadmap-role-card > p:not(.eyebrow) { color: var(--muted); }

.roadmap-role-card > a:not(.roadmap-start-button) {
  margin-top: auto;
  padding-top: 20px;
  color: var(--accent);
}

.roadmap-intro-card { background: #fff; }

.roadmap-intro-card ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  list-style: none;
}

.roadmap-intro-card li::before {
  margin-right: 9px;
  color: var(--accent);
  content: "•";
}

.roadmap-start-button,
.automation-start-cta {
  width: fit-content;
  justify-self: center;
  margin-top: 20px;
  padding: 10px 22px;
  color: var(--paper);
  background: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.automation-stacks {
  padding-top: clamp(46px, 7vw, 82px);
  scroll-margin-top: 28px;
}

.automation-stacks > h3 {
  margin: 8px 0 24px;
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -.045em;
}

.roadmap-stack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.roadmap-stack-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: clamp(22px, 3vw, 30px);
  color: var(--ink);
  background: #fff;
  border-right: 1px solid var(--line);
  text-decoration: none;
}

.roadmap-stack-card:last-child { border-right: 0; }

.roadmap-stack-card strong {
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
}

.roadmap-stack-card span {
  color: var(--muted);
  font-size: 14px;
}

.roadmap-stack-card:hover,
.roadmap-stack-card:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.automation-start-copy {
  display: grid;
  gap: 0;
}

.automation-start-copy section {
  padding: clamp(24px, 4vw, 42px) 0;
  border-top: 1px solid var(--line);
}

.automation-start-copy h2 {
  max-width: 28ch;
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(25px, 3.5vw, 42px);
  line-height: 1.12;
}

.automation-start-copy p {
  max-width: 72ch;
  margin: 0;
  color: var(--muted);
}

.page-head {
  min-height: 340px;
  padding: 70px 0 54px;
}

.access-gate {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  max-width: 900px;
  padding: 72px 0;
}

.access-gate h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(44px, 7vw, 92px);
  line-height: .98;
  letter-spacing: -.055em;
}

.access-gate .lead {
  margin: 28px 0 32px;
  font-size: clamp(17px, 1.8vw, 22px);
}

.access-gate form { margin: 0; }

.page-head-split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: clamp(32px, 7vw, 110px);
  align-items: end;
}

.page-head:not(.page-head-split) { max-width: 980px; }

.page-head h1,
.lesson-body h1 {
  max-width: 1040px;
  margin: 0;
  font-size: clamp(42px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -.04em;
}

.page-head .lead,
.page-head .page-intro { margin: 22px 0 0; }

.module-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.module-list li {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) minmax(150px, auto);
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.module-list li > span:first-child {
  color: var(--accent);
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.module-list h2 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.3;
}

.module-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.module-list .module-category {
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.module-duration {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.learning-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.learning-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.learning-status-available { color: #2f7458; }
.learning-status-completed { color: #315d9a; }
.learning-status-locked { color: var(--muted); }

.module-state-locked {
  background: #f5f5f2;
}

.module-state-locked > div {
  opacity: .72;
}

.text-button {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.text-button:hover { color: var(--ink); }

.admin-head { min-height: 300px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.admin-shell {
  width: min(100%, 1180px);
  min-width: 0;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 62px) var(--page-x) 90px;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  color: var(--paper);
  background: var(--ink);
}

.admin-toolbar-simple { grid-template-columns: minmax(0, 1fr) auto; }

.admin-toolbar h1 {
  min-width: 0;
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.1;
}

.admin-search {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-search input,
.admin-search button,
.admin-add,
.admin-filters select,
.admin-filters button,
.admin-inline-form input,
.admin-inline-form select,
.admin-inline-form button,
.admin-access-line input,
.admin-access-line button,
.admin-module-line button,
.admin-conflict-row button {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  font: inherit;
}

.admin-search input { color: var(--paper); border-color: #655f60; background: #373132; }
.admin-search button { color: var(--ink); background: var(--paper); }

.admin-add {
  color: var(--ink);
  background: var(--paper);
  text-decoration: none;
  white-space: nowrap;
}

.admin-nav {
  display: flex;
  gap: 22px;
  padding: 18px 2px;
  border-bottom: 1px solid var(--line);
}

.admin-nav a { color: var(--muted); text-decoration: none; }
.admin-nav a.is-current { color: var(--accent); }

.admin-practice-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  padding: 0 30px;
  color: var(--paper);
  background: var(--ink);
}

.admin-practice-header h1 {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}

.admin-practice-header h1 span:last-child {
  color: #bdb7b4;
  font-weight: 400;
}

.admin-practice-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 30px;
  border: 1px solid var(--line);
  border-top: 0;
  background: #fff;
}

.admin-practice-search {
  width: max-content;
  max-width: 100%;
  min-height: 52px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #8d8885;
  border-radius: 11px;
  background: #f4f2f0;
}

.admin-practice-search:focus-within {
  border-color: var(--accent);
  outline: 2px solid rgba(155, 9, 35, .16);
  outline-offset: 2px;
}

.admin-practice-search-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-practice-search input {
  width: 19ch;
  min-width: 0;
  padding: 0;
  color: var(--ink);
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
}

.admin-practice-search input::placeholder {
  color: #5f5956;
  opacity: 1;
}

.admin-practice-counter {
  padding: 14px 21px;
  color: #fff;
  border-radius: 999px;
  background: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.admin-practice-empty {
  min-height: 260px;
  display: grid;
  align-content: center;
  justify-items: start;
  padding: clamp(32px, 6vw, 72px) 30px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--paper);
}

.admin-practice-empty h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 30px);
}

.admin-practice-empty p { margin: 0; color: var(--muted); }

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  padding: 20px 0;
}

.admin-filters label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }

.admin-student-list {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--paper);
}

.admin-student-row { min-width: 0; }
.admin-student-row + .admin-student-row { border-top: 1px solid var(--line); }
.admin-student-row.is-selected { background: #fff8f8; }

.admin-student-summary {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, .8fr) minmax(190px, 1fr) 24px;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  color: var(--ink);
  text-decoration: none;
}

.admin-student-summary > span { display: grid; min-width: 0; gap: 4px; }
.admin-student-summary strong, .admin-student-summary small { overflow-wrap: anywhere; }
.admin-student-summary small { color: var(--muted); }
.admin-student-name > strong { font-size: 18px; }
.admin-row-arrow { color: var(--accent); font-size: 18px; }

.admin-student-details { border-top: 1px solid #d9aeb5; }
.admin-student-details > section { padding: 22px 20px; border-bottom: 1px solid var(--line); }
.admin-student-details > section:last-child { border-bottom: 0; }
.admin-student-details h2 { margin: 0 0 14px; font-size: 18px; }
.admin-student-details p { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 8px 0; }
.admin-student-details p span { color: var(--muted); overflow-wrap: anywhere; }

.admin-access-line { padding: 14px 0; border-bottom: 1px solid var(--line); }
.admin-access-line form { display: inline-flex; max-width: 100%; gap: 8px; margin: 8px 8px 0 0; }
.danger-action { color: var(--accent); }

.admin-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.admin-inline-form input { flex: 1 1 170px; }
.admin-module-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.admin-audit-list { margin: 0; padding: 0; list-style: none; }
.admin-audit-list li { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.admin-audit-list time { color: var(--muted); }

.admin-flat-section { margin-top: 22px; border: 1px solid var(--line); background: var(--paper); }
.admin-flat-section > header { display: flex; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.admin-flat-section h2 { margin: 0; font-size: 20px; }
.admin-flat-section > p { padding: 0 20px 20px; }
.admin-pending-row, .admin-conflict-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 1fr) minmax(0, .8fr); gap: 18px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.admin-pending-row span { color: var(--muted); overflow-wrap: anywhere; }
.admin-conflict-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.admin-conflict-row form { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 820px) {
  .admin-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .admin-search { grid-column: 1 / -1; grid-row: 2; }
  .admin-student-summary { grid-template-columns: minmax(0, 1fr) 24px; }
  .admin-student-summary > span:not(.admin-student-name):not(.admin-row-arrow) { grid-column: 1; }
  .admin-row-arrow { grid-column: 2; grid-row: 1; }
  .admin-pending-row { grid-template-columns: minmax(0, 1fr); gap: 5px; }
}

@media (max-width: 520px) {
  .admin-shell { padding-inline: 12px; }
  .admin-toolbar { grid-template-columns: minmax(0, 1fr) auto; padding: 14px; }
  .admin-toolbar h1 { font-size: 21px; }
  .admin-add { padding-inline: 9px; }
  .admin-search { grid-template-columns: minmax(0, 1fr); }
  .admin-nav { gap: 14px; overflow-wrap: anywhere; }
  .admin-filters, .admin-filters label, .admin-filters select, .admin-filters button { width: 100%; }
  .admin-student-summary { padding: 16px 14px; }
  .admin-student-details > section { padding: 18px 14px; }
  .admin-access-line form, .admin-access-line input, .admin-access-line button { width: 100%; }
  .admin-audit-list li { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .admin-conflict-row { grid-template-columns: minmax(0, 1fr); }
  .admin-practice-header { min-height: 78px; padding: 0 18px; }
  .admin-practice-header h1 { font-size: 23px; }
  .admin-practice-tools { justify-content: flex-start; padding: 14px 18px; }
  .admin-practice-search input { width: 18ch; font-size: 15px; }
  .admin-practice-counter { padding: 12px 15px; font-size: 14px; }
  .admin-practice-empty { min-height: 220px; padding: 36px 18px; }
}

.admin-learners {
  display: grid;
  gap: 18px;
}

.admin-learner {
  border: 1px solid var(--line);
  background: var(--panel);
}

.admin-learner > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.admin-learner h2 {
  margin: 8px 0 0;
  font-size: 28px;
}

.admin-program-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.admin-program-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.admin-program-form select,
.admin-program-form button,
.admin-module-list button {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.admin-program-form select { padding: 0 34px 0 12px; }

.admin-program-form button,
.admin-module-list button {
  padding: 0 16px;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

.admin-program-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.admin-program-summary strong { color: var(--ink); }

.admin-module-list {
  list-style: none;
  margin: 0;
  padding: 0 24px 10px;
}

.admin-module-list li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.admin-module-list li > span {
  color: var(--accent);
  font-size: 12px;
}

.admin-module-list li > div {
  display: grid;
  gap: 3px;
}

.admin-module-list small { color: var(--muted); }

.admin-module-list .secondary-action {
  background: transparent;
  color: var(--ink);
}

.admin-empty {
  margin: 0;
  padding: 24px;
  color: var(--muted);
}

.module-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.module-actions a,
.catalog-card footer a,
.trainer-card footer a {
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  text-underline-offset: 4px;
}

.filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filterbar a {
  padding: 9px 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}

.filterbar a:not(.selected):hover {
  color: var(--accent);
  border-color: var(--accent);
}

.filterbar .selected {
  color: var(--paper);
  border-color: var(--accent);
  background: var(--accent);
}

.catalog-card,
.trainer-card {
  min-width: 0;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.trainer-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.trainer-card-meta > span:first-child {
  margin-right: auto;
  overflow-wrap: anywhere;
}

.trainer-level,
.trainer-format {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 7px;
  color: var(--muted);
  border: 1px solid var(--line);
  font-family: var(--body);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
}

.trainer-format {
  color: var(--accent);
  border-color: rgba(155, 9, 35, .42);
  background: rgba(155, 9, 35, .035);
}

.portal-card:hover,
.catalog-card:has(a):hover,
.trainer-card:has(a):hover { border-color: var(--accent); }

.catalog-card h2,
.trainer-card h2 {
  margin: 28px 0 10px;
  font-size: 20px;
  line-height: 1.25;
}

.catalog-card > p:not(.eyebrow),
.trainer-card > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.catalog-card footer,
.trainer-card footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 14px;
  margin-top: auto;
  padding-top: 22px;
  color: var(--quiet);
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.trainer-task {
  max-width: 1020px;
  margin-inline: auto;
}

.trainer-task .page-head {
  min-height: 0;
  padding-bottom: 40px;
}

.trainer-task-section {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: clamp(18px, 4vw, 46px);
  padding: clamp(28px, 5vw, 50px) 0;
  border-top: 1px solid var(--line);
}

.task-kicker {
  margin: 5px 0 0;
  color: var(--accent);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1;
  text-transform: uppercase;
}

.trainer-task-section h2 {
  margin: 0 0 18px;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -.025em;
}

.trainer-task-section p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.trainer-task > a {
  display: inline-block;
  margin-top: 18px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  text-underline-offset: 4px;
}

.trainer-task-steps {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: trainer-step;
}

.trainer-task-steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  color: var(--ink);
  border-top: 1px solid var(--line);
  counter-increment: trainer-step;
  line-height: 1.55;
}

.trainer-task-steps li::before {
  content: counter(trainer-step, decimal-leading-zero);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}

.trainer-task-materials {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.trainer-task-materials li {
  position: relative;
  padding: 14px 16px 14px 34px;
  color: var(--ink);
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.55;
}

.trainer-task-materials li::before {
  position: absolute;
  top: 20px;
  left: 12px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  content: "";
}

.task-hint {
  margin-top: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.task-hint summary {
  padding: 14px 16px;
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.task-hint p {
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 14px;
}

.sandbox-page {
  --terminal: #181719;
  --terminal-panel: #211f21;
  --terminal-line: #353136;
  --terminal-text: #f1edeb;
  padding-bottom: 36px;
}

.sandbox-head {
  max-width: 1080px;
  min-height: 0;
  padding-bottom: 38px;
}

.sandbox-head h1 { max-width: 920px; }

.sandbox-safety {
  width: fit-content;
  max-width: 720px;
  margin-top: 24px;
  padding: 10px 12px;
  color: var(--muted);
  border-left: 2px solid var(--accent);
  background: var(--panel);
  font-size: 12px;
  line-height: 1.5;
}

.sandbox-layout {
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1.6fr);
  gap: 18px;
  align-items: stretch;
}

.sandbox-brief,
.sandbox-shell {
  min-width: 0;
  border: 1px solid var(--line);
}

.sandbox-brief {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 3vw, 34px);
  background: var(--panel);
}

.sandbox-brief h2 {
  margin: 18px 0 26px;
  font-size: clamp(23px, 2.8vw, 34px);
  line-height: 1.12;
  letter-spacing: -.025em;
}

.sandbox-progress {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.sandbox-progress li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  transition: color 160ms ease, padding-left 160ms ease;
}

.sandbox-progress li > span {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 600;
}

.sandbox-progress li p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.sandbox-progress li.complete {
  padding-left: 7px;
  color: var(--ink);
}

.sandbox-progress li.complete > span { color: var(--open); }

.sandbox-brief .task-hint { margin-top: auto; }

.sandbox-shell {
  display: grid;
  grid-template-rows: auto minmax(380px, 1fr) auto;
  overflow: hidden;
  color: var(--terminal-text);
  border-color: var(--terminal);
  background: var(--terminal);
}

.sandbox-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid var(--terminal-line);
  background: var(--terminal-panel);
}

.sandbox-toolbar > div {
  display: flex;
  gap: 7px;
}

.sandbox-toolbar > div span {
  width: 9px;
  height: 9px;
  border: 1px solid #827b80;
  border-radius: 50%;
}

.sandbox-toolbar p {
  margin: 0;
  color: #9b9499;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
}

.sandbox-toolbar button {
  justify-self: end;
  padding: 6px 8px;
  color: #c5bec2;
  border: 1px solid #514c50;
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  cursor: pointer;
}

.sandbox-terminal {
  min-height: 0;
  overflow: auto;
  padding: 22px;
  scrollbar-color: #514c50 transparent;
}

.sandbox-terminal p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
}

.sandbox-terminal p + p { margin-top: 3px; }
.terminal-system { color: #9f989d; }
.terminal-entry { color: #e88da0; }
.terminal-error { color: #ff98a9; }

.sandbox-command {
  padding: 16px;
  border-top: 1px solid var(--terminal-line);
  background: var(--terminal-panel);
}

.sandbox-command > label {
  display: block;
  margin-bottom: 10px;
  color: #a9a2a7;
  font-family: var(--mono);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.sandbox-command > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.sandbox-command input {
  min-width: 0;
  padding: 12px 13px;
  color: var(--terminal-text);
  border: 1px solid #514c50;
  border-right: 0;
  border-radius: 0;
  outline: 0;
  background: #121113;
  font-family: var(--mono);
  font-size: 14px;
}

.sandbox-command input:focus-visible {
  border-color: #d56a7f;
  box-shadow: inset 0 0 0 1px #d56a7f;
}

.sandbox-command button {
  padding: 0 16px;
  color: #fff;
  border: 1px solid var(--accent);
  background: var(--accent);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.sandbox-command > p {
  margin: 9px 0 0;
  color: #827b80;
  font-size: 10px;
}

.sandbox-back {
  display: inline-block;
  margin-top: 22px;
  color: var(--accent);
  font-size: 13px;
  text-underline-offset: 4px;
}

.access {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-color: var(--line);
  background: rgba(255, 255, 255, .58);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.access::before {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--quiet);
  content: "";
}

.access-free,
.access-open {
  color: var(--muted);
}

.access-free::before,
.access-open::before {
  background: var(--open);
}

.access-paid::before {
  background: var(--accent);
}

.access-soon::before {
  background: var(--quiet);
}

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: center;
}

.mental-model,
.track-card,
.guide-section,
.lab-state,
.lab-grid > article,
.lesson-body section,
.demo-panel {
  border: 1px solid var(--line);
  background: rgba(238, 232, 229, .76);
}

.mental-model { padding: 24px; }
.mental-model ol { list-style: none; margin: 0; padding: 0; }

.mental-model li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.mental-model b { color: var(--accent); }

.lab-state { background: var(--panel); }

.lab-grid > article {
  min-width: 0;
  padding: clamp(22px, 3vw, 30px);
}

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

.section-intro { grid-column: 1 / -1; }
.track-card { padding: 30px; }

.track-index {
  color: var(--accent);
  font-family: var(--display);
  font-size: 42px;
  font-weight: 600;
}

.track-layout {
  display: grid;
  grid-template-columns: minmax(210px, .32fr) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 72px);
  padding-top: 32px;
}

.track-nav {
  position: sticky;
  top: 20px;
  align-self: start;
}

.track-nav a {
  display: block;
  padding: 12px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}

.track-nav a:hover { color: var(--accent); }

.stack-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0;
  border: 1px solid var(--line);
}

.stack-strip span {
  padding: 18px;
  text-align: center;
  border-right: 1px solid var(--line);
  font-size: 12px;
}

.stack-strip span:last-child { border-right: 0; }

.demo-panel,
.lab-state {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: center;
  padding: 30px;
}

.guide-toc {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 0;
  background: rgba(247, 247, 244, .96);
}

.guide-toc a {
  padding: 9px 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
}

.guide-toc a:hover { color: var(--accent); border-color: var(--accent); }

.guide-section {
  margin: 18px 0;
  padding: clamp(24px, 4vw, 48px);
  scroll-margin-top: 70px;
}

.compare-grid,
.action-grid,
.lab-grid,
.three-questions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.action-grid,
.three-questions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.three-questions > h2 { grid-column: 1 / -1; }

.compare-grid article,
.action-grid article,
.three-questions article {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  background: rgba(247, 247, 244, .48);
}

.notice {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--warning);
  background: rgba(176, 93, 72, .07);
}

.notice h2,
.notice h3 { margin-top: 0; }

.lesson-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.lesson-list li {
  min-width: 0;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.lesson-list li > span:first-child {
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.lesson-list h2 {
  margin: 0 0 5px;
  font-size: 17px;
}

.lesson-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.lesson-list a {
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
}

.lesson-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 900px);
  gap: clamp(32px, 6vw, 92px);
  padding-top: 48px;
}

.lesson-sidebar, .lesson-body { min-width: 0; }
.lesson-body h2 { overflow-wrap: anywhere; }

.lesson-sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.lesson-sidebar a { color: var(--accent); }

.lesson-body section {
  margin: 18px 0;
  padding: clamp(22px, 4vw, 42px);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .92em;
}

pre { max-width: 100%; overflow: auto; padding: 18px; color: #f7f7f4; background: #2b2526; }

pre code {
  font-size: 13px;
  line-height: 1.6;
}

[role="tablist"] {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

[role="tab"] {
  padding: 10px 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

[role="tab"][aria-selected="true"] {
  color: var(--paper);
  background: var(--accent);
  border-color: var(--accent);
}

[role="tabpanel"]:focus-visible { outline: 2px solid var(--accent); }
.knowledge-check details { margin-top: 14px; }
.knowledge-check summary { cursor: pointer; font-weight: 500; }

.status-demo {
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
}

.auth-pending-shell {
  min-height: calc(100vh - 164px);
  display: grid;
  place-items: center;
  padding: 64px 0;
}

.auth-pending-card {
  width: min(100%, 980px);
  min-width: 0;
  padding: clamp(28px, 6vw, 68px);
  border: 1px solid var(--line);
  border-top-color: var(--accent);
  background: var(--panel);
}

.auth-pending-card-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-start;
}

.auth-pending-status {
  display: inline-flex;
  flex: none;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  color: var(--accent);
  border: 1px solid rgba(155, 9, 35, .42);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-pending-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(155, 9, 35, .1);
}

.auth-pending-card h1 {
  max-width: 850px;
  margin-top: 42px;
  font-size: clamp(38px, 5vw, 68px);
  overflow-wrap: anywhere;
}

.auth-pending-card .lead { max-width: 700px; }

.auth-pending-steps {
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.auth-pending-steps li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.auth-pending-steps li > span,
.telegram-handle { color: var(--accent); }

.auth-pending-steps strong {
  font-family: var(--display);
  font-size: clamp(15px, 2vw, 20px);
}

.telegram-handle { overflow-wrap: anywhere; }

.auth-pending-steps p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.auth-pending-note {
  margin: 22px 0 0;
  color: var(--quiet);
  font-size: 11px;
}

.auth-choice-shell {
  display: grid;
  min-height: min(720px, calc(100vh - 170px));
  padding: clamp(34px, 7vw, 92px) var(--page-x);
  place-items: start center;
}

.auth-choice-card {
  width: min(100%, 720px);
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  background: var(--paper);
}

.auth-choice-card h1 {
  margin: 18px 0 12px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1;
}

.auth-choice-list {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

.auth-choice-list form { margin: 0; }

.auth-choice-list .primary {
  display: flex;
  width: 100%;
  justify-content: space-between;
}

.auth-email-form {
  display: grid;
  gap: 9px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.auth-email-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.auth-email-form input,
.auth-code-form input {
  min-width: 0;
  padding: 13px 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  font: inherit;
}

.auth-code-form {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.auth-code-form input {
  max-width: 240px;
  font-size: 28px;
  letter-spacing: .22em;
}

.auth-code-form .primary { justify-self: start; }
.auth-form-error { color: var(--accent); }
.auth-unavailable { color: var(--muted); }

.dashboard-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 70px 0 34px;
}

.dashboard-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(36px, 8vw, 120px);
  align-items: end;
  padding-bottom: 44px;
}

.dashboard-head h1 { max-width: 900px; }

.identity-stamp {
  width: 178px;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  gap: 10px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  text-align: center;
  text-transform: uppercase;
  transform: rotate(5deg);
}

.identity-stamp > span {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
}

.identity-stamp strong {
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .12em;
}

.dashboard-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 18px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.dashboard-status > div {
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.dashboard-status > div:last-child { border-right: 0; }

.dashboard-status dt {
  margin-bottom: 9px;
  color: var(--quiet);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.dashboard-status dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--open);
  box-shadow: 0 0 0 4px rgba(47, 118, 95, .1);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
  gap: 18px;
}

.personal-lab-card {
  margin-top: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line);
  background: #fff;
}

.personal-lab-card h2 {
  max-width: 18ch;
  margin: 0.55rem 0 1rem;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
}

.personal-lab-card > p:not(.eyebrow) {
  max-width: 64ch;
  color: var(--muted);
}

.compact-action {
  display: inline-flex;
  width: auto;
  min-width: 0;
  justify-content: center;
  margin-top: 1.2rem;
  padding: 0.9rem 1.25rem;
}

.lab-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.lab-actions form {
  margin: 0;
}

.lab-credentials code {
  overflow-wrap: anywhere;
  font: 600 0.95em/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (max-width: 620px) {
  .lab-actions,
  .lab-actions > *,
  .lab-actions form,
  .lab-actions button {
    width: 100%;
  }
}

.next-action-card,
.increment-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
}

.next-action-card { padding: clamp(26px, 5vw, 54px); }

.next-action-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 70px;
  color: var(--quiet);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.lesson-kicker {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.next-action-card h2 {
  max-width: 760px;
  margin: 12px 0;
  font-size: clamp(27px, 3.5vw, 48px);
  line-height: 1.12;
}

.next-action-card > p:not(.lesson-kicker) {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.7;
}

.next-action-card .primary { margin-top: 24px; }

.increment-card {
  padding: clamp(24px, 3vw, 34px);
  border-top-color: var(--warning);
}

.increment-label {
  display: inline-block;
  margin: 4px 0 38px;
  padding: 6px 8px;
  color: var(--warning);
  border: 1px solid rgba(176, 93, 72, .5);
  font-size: 10px;
}

.increment-card h2 {
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.25;
}

.increment-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.text-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--accent);
  font-size: 12px;
}

.cicd-hero {
  max-width: none !important;
  min-height: 0;
}

.cicd-hero .lead { max-width: 860px; }

.pipeline-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 36px;
  border: 1px solid var(--line);
}

.pipeline-flow span {
  position: relative;
  min-width: 0;
  padding: 15px 24px 15px 14px;
  color: var(--muted);
  border-right: 1px solid var(--line);
  background: rgba(238, 232, 229, .6);
  font-size: 11px;
  line-height: 1.45;
}

.pipeline-flow span:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: 7px;
  color: var(--accent);
  transform: translateY(-50%);
}

.pipeline-flow span:last-child { border-right: 0; }

.cicd-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.cicd-overview article,
.stack-grid article,
.ci-tool-grid article {
  min-width: 0;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  background: rgba(238, 232, 229, .68);
}

.cicd-overview article:last-child { grid-column: 1 / -1; }

.cicd-overview article > span,
.stack-grid article > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.cicd-overview h2,
.cicd-section > header h2 {
  margin: 24px 0 12px;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.08;
  letter-spacing: -.025em;
}

.cicd-overview p,
.cicd-section > header > p:last-child,
.stack-grid p,
.ci-tool-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.cicd-section {
  padding-top: 72px;
}

.cicd-section > header {
  max-width: 880px;
  margin-bottom: 28px;
}

.cicd-section > header h2 { margin-top: 0; }

.stack-grid,
.ci-tool-grid {
  display: grid;
  gap: 14px;
}

.stack-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ci-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stack-grid h3,
.ci-tool-grid h3 {
  margin: 26px 0 12px;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.15;
}

.ci-tool-grid code {
  color: var(--accent);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .92em;
}

.lesson-route { padding-bottom: 10px; }

.contacts-head { min-height: 160px; }

.contacts-head h1 { font-size: clamp(42px, 5vw, 64px); }

.contact-channels {
  border: 1px solid var(--line);
  background: rgba(238, 232, 229, .34);
  padding: clamp(20px, 2.5vw, 30px);
}

.contact-channels > h2 {
  margin: 0 0 14px;
  font-size: clamp(23px, 2vw, 30px);
}

.contact-channel-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--line);
  background: var(--paper);
}

.contact-channel {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(16px, 2vw, 24px);
  min-height: 100px;
  padding: 18px clamp(18px, 2.2vw, 28px);
  color: var(--muted);
  background: var(--paper);
  text-decoration: none;
}

.contact-channel + .contact-channel { border-top: 1px solid var(--line); }

.contact-channel:hover { background: #faf8f7; }

.contact-channel:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.contact-channel-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
}

.contact-channel-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-channel-icon-telegram {
  color: #0b6f9f;
  background: rgba(34, 158, 217, .14);
}

.contact-channel-icon-email {
  color: var(--accent);
  background: rgba(155, 9, 35, .09);
}

.contact-channel-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.contact-channel-copy .eyebrow { margin: 0; }

.contact-channel strong {
  color: var(--ink);
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.1;
}

.contact-channel-telegram strong { color: #0b6f9f; }

.contact-channel-email strong { color: var(--accent); }

.contact-channel-arrow {
  color: var(--quiet);
  font-size: 24px;
  line-height: 1;
}

.contact-legal-link {
  margin: 24px 0 0;
  color: var(--quiet);
}

.contact-legal-link a { color: var(--accent); }

.legal-head { min-height: 300px; }

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 18px;
  align-items: start;
}

.legal-document-list,
.legal-requisites,
.legal-copy section,
.legal-document-footer {
  border: 1px solid var(--line);
  background: rgba(238, 232, 229, .68);
}

.legal-document-list { padding: clamp(22px, 3vw, 34px); }

.legal-document-list > h2 {
  margin: 0 0 24px;
  font-size: clamp(26px, 3vw, 40px);
}

.legal-document-list > a {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.legal-document-list > a:hover { color: var(--accent); }

.legal-document-list > a > span:first-child {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.legal-document-list strong {
  color: inherit;
  font-weight: 500;
}

.legal-requisites {
  padding: clamp(22px, 3vw, 34px);
}

.legal-requisites h2 {
  margin: 0 0 28px;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.2;
}

.legal-requisites dl { margin: 0; }

.legal-requisites dl > div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.legal-requisites dt { color: var(--quiet); }
.legal-requisites dd { margin: 0; overflow-wrap: anywhere; }

.legal-document {
  max-width: 980px;
  margin: 0 auto;
}

.legal-document .page-head { min-height: 0; }

.legal-revision {
  margin: 26px 0 0;
  color: var(--quiet);
  font-size: 12px;
}

.legal-copy {
  display: grid;
  gap: 14px;
}

.legal-copy section {
  padding: clamp(24px, 4vw, 44px);
}

.legal-copy h2 {
  max-width: 28ch;
  margin: 0 0 24px;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -.025em;
}

.legal-copy p,
.legal-copy li {
  max-width: 78ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.legal-copy p { margin: 0 0 16px; }
.legal-copy p:last-child { margin-bottom: 0; }
.legal-copy ul { margin: 18px 0 0; padding-left: 22px; }
.legal-copy li + li { margin-top: 10px; }

.legal-document-footer {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: clamp(22px, 3vw, 32px);
  color: var(--muted);
  font-size: 13px;
}

.legal-document-footer strong { color: var(--ink); }
.legal-document-footer > a { margin-top: 10px; color: var(--accent); }

body > footer,
.site-footer {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) repeat(2, minmax(150px, 1fr)) minmax(220px, 1.2fr);
  gap: clamp(28px, 4vw, 64px);
  padding: 38px var(--page) 42px;
  color: var(--quiet);
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.6;
}

body > footer a,
.site-footer a { text-underline-offset: 3px; }

.site-footer > * {
  min-width: 0;
  align-content: start;
}

.site-footer strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-weight: 600;
}

.site-footer p { margin: 0 0 12px; }

.site-footer .manual-term-note {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 11px;
  line-height: 1.55;
}

.site-footer .manual-term-note strong {
  display: inline;
  margin: 0;
}

.site-footer nav,
.footer-requisites {
  display: grid;
  justify-items: start;
  gap: 5px;
}

.site-footer nav a,
.footer-brand a,
.footer-requisites a { color: var(--quiet); }

.site-footer nav a:hover,
.footer-brand a:hover,
.footer-requisites a:hover { color: var(--accent); }

@media (max-width: 1199px) {
  .nav-menu-roadmaps > .roadmap-submenu {
    width: 640px;
    max-width: calc(100vw - 40px);
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px 24px;
    padding-block: 14px;
  }

  .topnav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    width: 100%;
  }

  .account {
    grid-column: 2;
    grid-row: 1;
  }

  .login-form,
  .logout-form,
  .auth-nav-status {
    grid-column: 2;
    grid-row: 1;
  }

  .home-hero, .page-head-split { grid-template-columns: minmax(0, 1fr); }

  .home-hero {
    min-height: auto;
    padding: 48px 0;
  }

  .hero { grid-template-columns: minmax(0, 1fr); }
  .quick-start { max-width: 650px; }

  .page-head {
    min-height: 0;
    padding-block: 48px;
  }

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

  .lesson-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .track-grid,
  .lab-grid { grid-template-columns: minmax(0, 1fr); }

  .stack-strip { grid-template-columns: minmax(0, 1fr); }

  .stack-strip span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stack-strip span:last-child { border-bottom: 0; }

  .dashboard-head { align-items: start; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .pipeline-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .pipeline-flow span:nth-child(3) { border-right: 0; }
  .pipeline-flow span:nth-child(-n + 3) { border-bottom: 1px solid var(--line); }

  .stack-grid { grid-template-columns: minmax(0, 1fr); }
  .legal-layout { grid-template-columns: minmax(0, 1fr); }
  .site-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) and (max-width: 980px) {
  .nav-menu-roadmaps > .submenu {
    width: 640px;
    max-width: calc(100vw - 40px);
    position: absolute;
    top: calc(100% + 22px);
    right: auto;
    /*
     * Chromium keeps positioned <details> children trigger-relative here,
     * so subtract the compact topnav inset to center against the viewport.
     */
    left: calc(50vw - var(--page));
    transform: translateX(-50%);
  }
}

@media (max-width: 767px) {
  body.nav-menu-open { overflow: hidden; }
  body.nav-menu-open .topnav { overflow: visible; }

  .nav-menu-roadmaps > .roadmap-submenu {
    width: auto;
    max-width: none;
    max-height: calc(100dvh - var(--nav-menu-top, 126px) - 16px);
    position: fixed;
    top: var(--nav-menu-top, 126px);
    right: 16px;
    left: 16px;
    overflow-y: auto;
    transform: none;
  }

  .roadmap-menu-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .roadmap-menu-group:first-child { padding-right: 0; }

  .roadmap-menu-group + .roadmap-menu-group {
    margin-top: 14px;
    padding-top: 17px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 680px) {
  .topbar { gap: 12px; }

  .contact-channel {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    min-height: 100px;
    padding: 18px;
  }

  .contact-channel-icon { width: 44px; height: 44px; }

  .topnav {
    max-width: 100%;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .topnav::-webkit-scrollbar { display: none; }

  .topnav > a,
  .nav-menu > summary {
    padding-inline: 0;
    font-size: 12px;
  }

  .topnav > .topnav-mentor { display: none; }

  .submenu {
    position: fixed;
    top: 126px;
    right: 20px;
    left: 20px;
    width: auto;
    max-height: calc(100vh - 146px);
    overflow-y: auto;
  }

  .account-full { display: none; }
  .account-compact { display: inline; font-size: 11px; }

  main { padding-bottom: 56px; }

  .home-hero h1,
  .hero h1,
  .page-head h1,
  .lesson-body h1 { font-size: clamp(36px, 12vw, 44px); }

  .hero-copy { padding: 16px 0 8px; }
  .hero-actions { width: 100%; }
  .hero-login-form { width: 100%; }
  .primary,
  .secondary {
    width: 100%;
    min-width: 0;
  }

  .quick-start > div { padding: 18px; }
  .quick-start > div > a { grid-template-columns: 34px minmax(0, 1fr) auto; }

  .section-head {
    align-items: start;
    flex-direction: column;
    padding-top: 52px;
  }

  .learning-loop ol { grid-template-columns: minmax(0, 1fr); }

  .learning-loop li {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .learning-loop li:last-child { border-bottom: 0; }

  .learning-loop h3 { margin-top: 18px; }

  .guide-toc {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .guide-toc a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .guide-section { scroll-margin-top: 76px; }

  .direction-grid,
  .catalog-grid,
  .trainer-grid,
  .career-grid,
  .roadmap-role-grid,
  .roadmap-stack-grid { grid-template-columns: minmax(0, 1fr); }

  .roadmap-stack-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .roadmap-stack-card:last-child { border-bottom: 0; }

  .trainer-task-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .trainer-task-section .task-kicker { margin-top: 0; }

  .sandbox-layout { grid-template-columns: minmax(0, 1fr); }

  .sandbox-shell { grid-template-rows: auto minmax(320px, 58vh) auto; }

  .sandbox-toolbar {
    grid-template-columns: 1fr auto;
  }

  .sandbox-toolbar > p { display: none; }

  .sandbox-command > div { grid-template-columns: minmax(0, 1fr); }

  .sandbox-command input {
    border-right: 1px solid #514c50;
    border-bottom: 0;
  }

  .sandbox-command button { min-height: 42px; }

  .cicd-overview,
  .ci-tool-grid { grid-template-columns: minmax(0, 1fr); }

  .cicd-overview article:last-child { grid-column: auto; }

  .pipeline-flow { grid-template-columns: minmax(0, 1fr); }

  .pipeline-flow span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .pipeline-flow span:nth-child(3) { border-right: 0; }
  .pipeline-flow span:last-child { border-bottom: 0; }

  .track-layout,
  .track-grid,
  .compare-grid,
  .action-grid,
  .lab-grid,
  .three-questions { grid-template-columns: minmax(0, 1fr); }

  .track-nav { position: static; }

  .module-list li {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  .module-list li > span:first-child { overflow-wrap: anywhere; }

  .lesson-list li {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
  }

  .module-actions,
  .module-list li > footer {
    grid-column: 1;
    justify-self: start;
  }

  .lesson-list li > :last-child {
    grid-column: 2;
    justify-self: start;
  }

  .module-actions { justify-content: flex-start; }

  .demo-panel,
  .lab-state {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-head { grid-template-columns: minmax(0, 1fr); }
  .identity-stamp { width: 132px; }
  .dashboard-status { grid-template-columns: minmax(0, 1fr); }
  .dashboard-status > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .dashboard-status > div:last-child { border-bottom: 0; }
  .next-action-meta { margin-bottom: 42px; }
  .admin-learner > header {
    align-items: stretch;
    flex-direction: column;
  }
  .admin-program-form {
    align-items: stretch;
    flex-direction: column;
  }
  .admin-program-form button { width: 100%; }
  .admin-module-list li {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .admin-module-list li form {
    grid-column: 2;
    justify-self: start;
  }
  .auth-pending-card-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .auth-pending-card h1 { margin-top: 34px; }

  body > footer,
  .site-footer { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 390px) {
  :root { --page: 16px; }

  .topnav {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .account {
    max-width: 128px;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }

  .dashboard-shell { padding-top: 44px; }
  .dashboard-head h1 {
    font-size: 34px;
    overflow-wrap: anywhere;
  }
  .dashboard-grid,
  .next-action-card,
  .increment-card { width: 100%; }
  .next-action-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .next-action-card .primary {
    width: 100%;
    gap: 12px;
  }
  .auth-pending-shell {
    min-height: auto;
    padding: 44px 0;
  }
  .auth-pending-card {
    width: 100%;
    padding: 24px 20px;
  }
  .auth-pending-card h1 { font-size: 30px; }
  .auth-pending-steps li {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
