:root {
  --bg: #0b0f14;
  --panel: #121a23;
  --panel-2: #0f171f;
  --panel-3: #172230;
  --border: #1e2935;
  --border-2: #263545;
  --text: #e6edf3;
  --muted: #8b97a5;
  --muted-2: #a6b2c0;
  --accent: #2dd4a7;
  --accent-2: #3fb950;
  --accent-soft: rgba(45, 212, 167, 0.12);
  --warn: #d8a657;
  --danger: #ff7b72;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --sidebar: 340px;
  --topbar-h: 78px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(45, 212, 167, 0.12), transparent 28%),
    linear-gradient(135deg, #0b0f14 0%, #0d131a 48%, #0a0d12 100%);
}

button,
input,
textarea {
  font: inherit;
}

button,
a,
input,
textarea {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 18px;
  border-right: 1px solid var(--border);
  background: rgba(11, 15, 20, 0.86);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  padding: 10px 8px 16px;
  border-bottom: 1px solid var(--border);
}

.brand-mark,
.module-step {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(45, 212, 167, 0.36);
  border-radius: 13px;
  color: var(--accent);
  background: linear-gradient(145deg, rgba(45, 212, 167, 0.16), rgba(63, 185, 80, 0.06));
}

.brand-title {
  display: block;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.15;
  font-weight: 800;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.sidebar-nav {
  display: grid;
  gap: 12px;
}

.sidebar-tools {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sidebar-tool {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0b1118;
}

.sidebar-tool:hover,
.sidebar-tool.active {
  text-decoration: none;
  border-color: rgba(45, 212, 167, 0.5);
  background: var(--accent-soft);
}

.module-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: stretch;
  width: 100%;
  min-height: 94px;
  padding: 0;
  color: inherit;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 26, 35, 0.96), rgba(13, 19, 26, 0.96));
}

.module-link {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 12px;
  color: inherit;
}

.module-link:hover {
  text-decoration: none;
}

.module-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  margin: 8px 8px 8px 0;
  color: var(--muted-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b1118;
}

.module-toggle:hover {
  color: var(--accent);
  border-color: rgba(45, 212, 167, 0.4);
}

.module-toggle svg {
  transition: transform 160ms ease;
}

.module-accordion.expanded .module-toggle svg {
  transform: rotate(90deg);
}

.module-card:hover,
.module-card.active {
  border-color: rgba(45, 212, 167, 0.5);
  background: linear-gradient(180deg, rgba(24, 38, 48, 0.98), rgba(15, 25, 32, 0.98));
}

.module-card.locked::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(139, 151, 165, 0.5);
}

.module-step {
  position: relative;
  width: 32px;
  height: 32px;
  margin-top: 2px;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  color: var(--muted-2);
  background: #0b1118;
  font-size: 0.78rem;
  font-weight: 800;
}

.module-accordion:not(:last-child) .module-step::after {
  content: "";
  position: absolute;
  top: 34px;
  left: 15px;
  width: 1px;
  height: 58px;
  background: var(--border-2);
}

.module-card.done .module-step {
  color: #06120e;
  border-color: var(--accent);
  background: var(--accent);
}

.sidebar-lessons {
  display: grid;
  gap: 10px;
  margin: 8px 0 4px 48px;
  padding: 0 0 2px 10px;
  border-left: 1px solid var(--border-2);
}

.sidebar-section {
  display: grid;
  gap: 5px;
}

.sidebar-section-title {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
}

.sidebar-lesson-list {
  display: grid;
  gap: 4px;
}

.sidebar-lesson {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  padding: 7px 8px;
  color: var(--muted-2);
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.3;
}

.sidebar-lesson:hover,
.sidebar-lesson.active {
  color: var(--text);
  text-decoration: none;
  border-color: rgba(45, 212, 167, 0.35);
  background: rgba(45, 212, 167, 0.08);
}

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

.sidebar-lesson-state {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  color: #06120e;
  background: #0b1118;
  font-size: 0.68rem;
  font-weight: 900;
}

.sidebar-lesson.done .sidebar-lesson-state {
  border-color: var(--accent);
  background: var(--accent);
}

.module-title {
  display: block;
  overflow: hidden;
  margin-right: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 750;
}

.module-subtitle {
  display: block;
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.mini-progress,
.global-progress,
.module-progress-bar {
  overflow: hidden;
  height: 8px;
  border-radius: 99px;
  background: #0a1118;
  border: 1px solid rgba(38, 53, 69, 0.75);
}

.mini-progress span,
.global-progress span,
.module-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.mini-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 0.76rem;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 380px) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 15, 20, 0.86);
  backdrop-filter: blur(14px);
}

.breadcrumb {
  min-width: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.breadcrumb strong {
  color: var(--text);
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 38px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0b1118;
}

.search-icon {
  position: absolute;
  top: 10px;
  left: 13px;
  color: var(--muted);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 420px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border-2);
  border-radius: 14px;
  background: #0c131b;
  box-shadow: var(--shadow);
}

.search-result {
  display: block;
  padding: 10px;
  border-radius: 10px;
  color: var(--text);
}

.search-result:hover,
.search-result.active,
.search-result:focus-visible {
  background: var(--panel);
  text-decoration: none;
}

.search-result small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
}

mark {
  color: #06120e;
  background: var(--accent);
  border-radius: 4px;
  padding: 0 2px;
}

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

.timer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0b1118;
}

.timer-time {
  min-width: 70px;
  padding-left: 6px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 12px;
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: var(--panel-3);
}

.btn:hover {
  border-color: rgba(45, 212, 167, 0.45);
  background: #1b2a38;
}

.btn.primary {
  color: #06120e;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 800;
}

.btn.ghost {
  background: #0b1118;
}

.btn.small {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 0.82rem;
}

.global-widget {
  min-width: 126px;
  color: var(--muted);
  font-size: 0.76rem;
}

.global-widget b {
  color: var(--text);
}

.content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.welcome-banner,
.completion-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(45, 212, 167, 0.28);
  border-radius: 16px;
  background: rgba(18, 26, 35, 0.92);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
}

.welcome-banner h2,
.completion-panel h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.welcome-banner p,
.completion-panel p {
  margin: 0;
  color: var(--muted-2);
  line-height: 1.5;
}

.completion-panel {
  align-items: flex-start;
  border-color: rgba(216, 166, 87, 0.38);
  background: linear-gradient(145deg, rgba(216, 166, 87, 0.12), rgba(18, 26, 35, 0.92));
}

.hero-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  margin-bottom: 18px;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  min-height: 310px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(11, 15, 20, 0.94), rgba(11, 15, 20, 0.48)),
    url("assets/hero-curso-ia-dark.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-panel h1,
.page-title {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 3.4rem);
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.hero-panel p {
  max-width: 680px;
  color: var(--muted-2);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

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

.metric {
  min-height: 149px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
}

.metric b {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.metric strong {
  display: block;
  font-size: 1.9rem;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

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

.panel {
  grid-column: span 4;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(18, 26, 35, 0.88);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
}

.panel.wide {
  grid-column: span 8;
}

.panel.full {
  grid-column: 1 / -1;
}

.panel.final {
  border-color: rgba(216, 166, 87, 0.38);
  background: linear-gradient(145deg, rgba(216, 166, 87, 0.12), rgba(18, 26, 35, 0.9));
}

.panel h3,
.lesson-aside h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

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

.code-window {
  overflow: hidden;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  background: #080d12;
}

.code-dots {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.code-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
}

.code-dots span:nth-child(2) {
  background: var(--warn);
}

.code-dots span:nth-child(3) {
  background: var(--accent-2);
}

pre {
  overflow: auto;
  margin: 0;
  padding: 14px;
  color: #c9d7e5;
  background: #080d12;
  font-size: 0.84rem;
  line-height: 1.55;
}

code {
  color: #bfe9da;
  border: 1px solid rgba(45, 212, 167, 0.18);
  border-radius: 6px;
  background: rgba(45, 212, 167, 0.08);
  padding: 0.08rem 0.28rem;
}

pre code {
  padding: 0;
  color: inherit;
  border: 0;
  background: transparent;
}

.svg-stage {
  width: 100%;
  min-height: 190px;
  color: var(--muted);
}

.data-list,
.time-list,
.resource-list,
.practice-resource-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.data-list li,
.time-list li,
.resource-list li,
.practice-resource-list li {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0d141c;
}

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

.ladder-step {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0d141c;
}

.ladder-step b {
  color: var(--accent);
}

.launcher-grid,
.launcher-strip {
  display: grid;
  gap: 12px;
}

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

.launcher-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 116px;
  padding: 16px;
  color: var(--text);
  border: 1px solid rgba(45, 212, 167, 0.25);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(45, 212, 167, 0.12), rgba(13, 20, 28, 0.94));
}

.launcher-card:hover {
  text-decoration: none;
  border-color: rgba(45, 212, 167, 0.58);
  background: linear-gradient(145deg, rgba(45, 212, 167, 0.18), rgba(18, 29, 38, 0.98));
}

.launcher-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(45, 212, 167, 0.34);
  border-radius: 13px;
  background: #0b1118;
  font-size: 1.25rem;
}

.launcher-card strong,
.launcher-card small {
  display: block;
}

.launcher-card strong {
  margin-bottom: 6px;
  line-height: 1.25;
}

.launcher-card small {
  color: var(--muted-2);
  line-height: 1.45;
}

.module-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.page-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(18, 26, 35, 0.9);
}

.meta-grid {
  display: grid;
  gap: 10px;
}

.meta-item {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0d141c;
}

.meta-item b {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.section-list {
  display: grid;
  gap: 14px;
}

.section-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15, 23, 31, 0.72);
}

.section-card summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 800;
}

.section-card summary::marker {
  color: var(--accent);
}

.lesson-list {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}

.lesson-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0b1118;
}

.lesson-row.done a {
  color: var(--muted-2);
  text-decoration: line-through;
}

.lesson-check {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.lesson-main,
.reader {
  min-width: 0;
}

.lesson-tools {
  position: sticky;
  top: var(--topbar-h);
  display: grid;
  min-width: 0;
  gap: 14px;
}

.lesson-aside {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(18, 26, 35, 0.94);
  overflow-wrap: anywhere;
}

.practice-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.practice-panel h4 {
  margin: 14px 0 10px;
  color: var(--muted-2);
  font-size: 0.9rem;
}

.practice-resource-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.practice-resource-list a {
  min-width: 0;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 3px 8px;
  color: var(--accent);
  border: 1px solid rgba(45, 212, 167, 0.28);
  border-radius: 99px;
  background: rgba(45, 212, 167, 0.1);
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1;
}

.badge.green {
  color: #8ee69f;
  border-color: rgba(63, 185, 80, 0.3);
  background: rgba(63, 185, 80, 0.1);
}

.badge.muted-badge {
  color: var(--muted-2);
  border-color: var(--border-2);
  background: #0b1118;
}

.resources-hero {
  margin-bottom: 18px;
}

.resource-filter-panel {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(18, 26, 35, 0.9);
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  min-height: 32px;
  padding: 7px 11px;
  color: var(--muted-2);
  border: 1px solid var(--border-2);
  border-radius: 99px;
  background: #0b1118;
}

.chip:hover,
.chip.active {
  color: #06120e;
  border-color: transparent;
  background: var(--accent);
}

.resource-categories {
  display: grid;
  gap: 18px;
}

.resource-category {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(18, 26, 35, 0.86);
}

.resource-category-head {
  margin-bottom: 14px;
}

.resource-category h3 {
  margin: 0 0 6px;
}

.resource-category p {
  margin: 0;
}

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

.resource-card {
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0d141c;
}

.resource-card h4 {
  margin: 0 0 8px;
  line-height: 1.25;
}

.resource-card p {
  flex: 1;
  margin: 0 0 12px;
  color: var(--muted-2);
  line-height: 1.5;
}

.badge-row,
.module-chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.module-chip-row span {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 3px 7px;
  color: var(--muted-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0b1118;
  font-size: 0.72rem;
  font-weight: 800;
}

.resource-open {
  align-self: flex-start;
  margin-top: auto;
}

.lesson-complete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid rgba(45, 212, 167, 0.32);
  border-radius: 14px;
  background: var(--accent-soft);
}

.note-box {
  display: grid;
  gap: 8px;
}

.note-box textarea {
  min-height: 180px;
  resize: vertical;
  padding: 12px;
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  background: #0b1118;
  line-height: 1.5;
}

.save-status {
  color: var(--muted);
  font-size: 0.82rem;
}

.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

.markdown {
  color: #dbe4ed;
  line-height: 1.7;
  /* corta la fuga de ancho intrínseco de tablas anchas; el scroll vive en .table-wrap */
  overflow-x: clip;
}

.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4 {
  margin: 1.4em 0 0.45em;
  color: var(--text);
  line-height: 1.18;
}

.markdown h1:first-child,
.markdown h2:first-child,
.markdown h3:first-child,
.markdown h4:first-child {
  margin-top: 0;
}

.markdown p {
  margin: 0 0 1em;
}

.markdown ul,
.markdown ol {
  padding-left: 1.35rem;
}

.markdown li {
  margin: 0.35rem 0;
}

.markdown blockquote {
  margin: 1rem 0;
  padding: 12px 14px;
  color: var(--muted-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: rgba(45, 212, 167, 0.08);
}

.markdown .table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin: 1rem 0;
}

.markdown table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.markdown th,
.markdown td {
  padding: 10px;
  border: 1px solid var(--border);
  vertical-align: top;
}

.markdown th {
  color: var(--text);
  background: #101923;
}

.markdown hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.task-list {
  padding-left: 0;
  list-style: none;
}

.task-list input {
  margin-right: 8px;
  accent-color: var(--accent);
}

.empty {
  padding: 18px;
  color: var(--muted);
  border: 1px dashed var(--border-2);
  border-radius: 14px;
  background: rgba(18, 26, 35, 0.48);
}

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

.hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .topbar,
  .hero-dashboard,
  .module-head,
  .lesson-layout {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .lesson-tools {
    position: static;
  }

  .panel,
  .panel.wide {
    grid-column: span 6;
  }

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

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

  .sidebar {
    position: relative;
    height: auto;
    max-height: 56vh;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .topbar {
    position: relative;
    padding: 14px;
  }

  .content {
    padding: 14px;
  }

  .metric-grid,
  .ladder {
    grid-template-columns: 1fr;
  }

  .welcome-banner,
  .completion-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel,
  .panel.wide {
    grid-column: 1 / -1;
  }

  .launcher-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: 260px;
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
