:root {
  color-scheme: light;
  --bg: #f4f7f8;
  --surface: #ffffff;
  --surface-2: #eaf0f2;
  --ink: #10222b;
  --muted: #5f7078;
  --line: #d8e2e5;
  --navy: #0b2534;
  --cyan: #00a7a5;
  --cyan-bright: #19d5c8;
  --orange: #f0a04b;
  --shadow: 0 18px 48px rgba(10, 32, 43, .1);
  --radius: 18px;
  --shell: 1180px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08131f;
  --surface: #0e202d;
  --surface-2: #142c3b;
  --ink: #edf8f7;
  --muted: #9fb2b9;
  --line: #23404f;
  --navy: #07111c;
  --cyan: #16c7bd;
  --cyan-bright: #4de4d7;
  --shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.6; }
a { color: inherit; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.shell { width: min(calc(100% - 32px), var(--shell)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; background: var(--ink); color: var(--bg); transform: translateY(-140%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 20%); background: color-mix(in srgb, var(--bg), transparent 8%); backdrop-filter: blur(18px); }
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; line-height: 1.15; margin-right: auto; }
.brand-mark { display: grid; place-items: center; width: 39px; aspect-ratio: 1; border: 1px solid var(--cyan); border-radius: 11px; color: var(--cyan-bright); font-weight: 850; letter-spacing: -2px; }
.brand-mark span { color: var(--orange); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: .92rem; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: .72rem; margin-top: 3px; }
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a { color: var(--muted); padding: 10px 13px; border-radius: 9px; text-decoration: none; font-size: .91rem; font-weight: 650; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.icon-button, .nav-toggle { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); cursor: pointer; }
.nav-toggle { display: none; padding-inline: 13px; }

.hero { position: relative; overflow: hidden; padding: clamp(64px, 9vw, 118px) 0 76px; background: radial-gradient(circle at 75% 10%, color-mix(in srgb, var(--cyan), transparent 85%), transparent 34%); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .055; background-image: linear-gradient(var(--ink) 1px, transparent 1px), linear-gradient(90deg, var(--ink) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to bottom, black, transparent 90%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: clamp(40px, 7vw, 90px); align-items: center; }
.eyebrow, .kicker { margin: 0 0 13px; color: var(--cyan); font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 9px; }
.eyebrow span { width: 28px; height: 2px; background: var(--cyan); }
.hero h1 { max-width: 750px; margin: 0; font-size: clamp(2.6rem, 6vw, 5.3rem); line-height: .98; letter-spacing: -.065em; }
.hero h1 em { color: var(--cyan-bright); font-style: normal; }
.hero-lead { max-width: 650px; margin: 28px 0 0; color: var(--muted); font-size: clamp(1.02rem, 2vw, 1.22rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 14px; padding: 0 20px; border: 1px solid transparent; border-radius: 11px; text-decoration: none; font-weight: 760; cursor: pointer; }
.button-primary { background: var(--cyan); color: #041615; box-shadow: 0 12px 26px color-mix(in srgb, var(--cyan), transparent 74%); }
.button-primary:hover { background: var(--cyan-bright); transform: translateY(-1px); }
.button-ghost { border-color: var(--line); background: var(--surface); }
.hero-facts { display: flex; gap: 32px; list-style: none; padding: 0; margin: 40px 0 0; }
.hero-facts li { display: grid; }
.hero-facts strong { font-size: 1.3rem; }
.hero-facts span { color: var(--muted); font-size: .78rem; }

.progress-panel { padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: color-mix(in srgb, var(--surface), transparent 6%); box-shadow: var(--shadow); }
.panel-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.panel-heading h2 { margin: 0; font-size: 1.25rem; }
.panel-heading .kicker { margin-bottom: 2px; }
.progress-percent { color: var(--cyan-bright); font-size: 1.7rem; font-weight: 850; }
.progress-track { height: 9px; margin-top: 24px; overflow: hidden; border-radius: 99px; background: var(--surface-2); }
.progress-track span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--cyan-bright)); border-radius: inherit; transition: width .35s ease; }
.progress-caption { margin: 9px 0 22px; color: var(--muted); font-size: .84rem; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric { padding: 14px; border-radius: 12px; background: var(--surface-2); }
.metric span, .next-card span { color: var(--muted); font-size: .72rem; }
.metric strong { display: block; margin-top: 3px; font-size: .96rem; }
.next-card { display: grid; gap: 4px; margin-top: 12px; padding: 17px; border-left: 3px solid var(--orange); border-radius: 4px 12px 12px 4px; background: color-mix(in srgb, var(--orange), transparent 90%); }
.next-card .lesson-code { color: var(--orange); font-weight: 800; letter-spacing: .1em; }

.section { padding-block: 86px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 36px; margin-bottom: 34px; }
.section-heading h2, .project-band h2 { margin: 0; font-size: clamp(1.9rem, 4vw, 3.2rem); line-height: 1.08; letter-spacing: -.045em; }
.section-heading > p { max-width: 470px; margin: 0; color: var(--muted); }
.phase-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.phase-card { position: relative; min-height: 218px; padding: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.phase-card.current { border-color: color-mix(in srgb, var(--cyan), var(--line)); box-shadow: inset 0 3px var(--cyan); }
.phase-number { position: absolute; top: 10px; right: 16px; color: color-mix(in srgb, var(--muted), transparent 70%); font-size: 2.8rem; font-weight: 900; line-height: 1; }
.phase-card > p:first-of-type { margin: 0; color: var(--cyan); font-size: .72rem; font-weight: 780; text-transform: uppercase; letter-spacing: .1em; }
.phase-card h3 { margin: 30px 0 8px; font-size: 1.13rem; }
.phase-card h3 + p { margin: 0; color: var(--muted); font-size: .88rem; }
.mini-progress { position: absolute; left: 22px; right: 22px; bottom: 20px; height: 4px; border-radius: 9px; background: var(--surface-2); }
.mini-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--cyan); }

.project-band { padding-block: 68px; background: var(--navy); color: #effaf9; }
.project-band-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 70px; }
.project-band p:not(.eyebrow) { max-width: 620px; color: #a9bdc5; }
.eyebrow.light { color: var(--cyan-bright); }
.text-link { display: inline-flex; gap: 10px; margin-top: 12px; color: var(--cyan-bright); font-weight: 760; text-underline-offset: 4px; }
.architecture-preview { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 38px; border: 1px solid #294453; border-radius: 20px; background: #0e2938; }
.architecture-preview span { padding: 12px 15px; border: 1px solid #365361; border-radius: 9px; background: #102f3f; font-size: .84rem; font-weight: 720; }
.architecture-preview i { color: var(--cyan-bright); font-style: normal; }

.method-list { display: grid; grid-template-columns: repeat(5, 1fr); list-style: none; padding: 0; margin: 0; counter-reset: steps; }
.method-list li { min-height: 180px; padding: 20px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.method-list li:last-child { border-right: 0; }
.method-list span { color: var(--cyan); font-size: .73rem; font-weight: 800; letter-spacing: .08em; }
.method-list strong { display: block; margin-top: 29px; font-size: 1.05rem; }
.method-list p { margin: 6px 0 0; color: var(--muted); font-size: .84rem; }
.site-footer { padding: 38px 0; border-top: 1px solid var(--line); }
.site-footer .shell { display: flex; justify-content: space-between; align-items: center; }
.site-footer p { margin: 0; line-height: 1.4; }
.site-footer span { color: var(--muted); font-size: .8rem; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer a { color: var(--muted); font-size: .85rem; }

@media (max-width: 900px) {
  .hero-grid, .project-band-grid { grid-template-columns: 1fr; }
  .progress-panel { max-width: 620px; }
  .phase-grid { grid-template-columns: repeat(2, 1fr); }
  .method-list { grid-template-columns: repeat(2, 1fr); }
  .method-list li:last-child { grid-column: span 2; }
}

@media (max-width: 680px) {
  .header-inner { min-height: 66px; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .main-nav { position: absolute; top: calc(100% + 1px); left: 16px; right: 16px; display: none; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
  .main-nav.open { display: grid; }
  .main-nav a { min-height: 44px; }
  .hero { padding-top: 54px; }
  .hero h1 { font-size: clamp(2.45rem, 15vw, 4rem); }
  .hero-facts { gap: 18px; }
  .section { padding-block: 62px; }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; }
  .phase-grid { grid-template-columns: 1fr; }
  .method-list { grid-template-columns: 1fr; }
  .method-list li, .method-list li:last-child { grid-column: auto; border-right: 0; }
  .architecture-preview { padding: 24px 16px; }
  .site-footer .shell { align-items: start; flex-direction: column; gap: 22px; }
}

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

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

.page-intro {
  padding: 74px 0 66px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 82% 12%, color-mix(in srgb, var(--cyan), transparent 85%), transparent 30%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-2), transparent 32%), transparent);
}
.page-intro h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1;
  letter-spacing: -.06em;
}
.page-intro .shell > p:last-child {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}
.catalog-section { padding-block: 42px 90px; }
.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1.7fr) repeat(4, minmax(135px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 30px color-mix(in srgb, var(--ink), transparent 94%);
}
.filter-panel label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .04em;
}
.filter-panel input, .filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
}
.filter-reset { min-height: 46px; white-space: nowrap; }
.catalog-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 26px 2px 18px;
  color: var(--muted);
  font-size: .82rem;
}
.catalog-meta p { margin: 0; }
#result-count { color: var(--ink); font-weight: 750; }
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.lesson-card {
  position: relative;
  display: flex;
  min-height: 340px;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.lesson-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--cyan), var(--line));
  box-shadow: var(--shadow);
}
.lesson-card[data-track="python"] { box-shadow: inset 0 3px var(--orange); }
.lesson-card[data-track="engineering"] { box-shadow: inset 0 3px var(--cyan); }
.lesson-card-top, .lesson-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.lesson-id {
  color: var(--cyan);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .12em;
}
.status-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 760;
}
.status-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.status-badge.in-progress { color: var(--orange); border-color: color-mix(in srgb, var(--orange), transparent 55%); }
.status-badge.completed { color: var(--cyan-bright); border-color: color-mix(in srgb, var(--cyan), transparent 55%); }
.status-badge.completed::before { background: currentColor; }
.lesson-card .lesson-meta { margin: 25px 0 6px; }
.lesson-meta { color: var(--muted); font-size: .76rem; font-weight: 650; }
.lesson-card h2 {
  margin: 0;
  font-size: 1.27rem;
  line-height: 1.24;
  letter-spacing: -.025em;
}
.lesson-summary {
  display: -webkit-box;
  margin: 13px 0 22px;
  overflow: hidden;
  color: var(--muted);
  font-size: .86rem;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.lesson-card-footer {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.track-badge {
  color: var(--cyan);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.lesson-card[data-track="python"] .track-badge { color: var(--orange); }
.score-note { color: var(--muted); font-size: .69rem; }
.lesson-card-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 42px;
  margin-top: 14px;
  color: var(--ink);
  font-size: .82rem;
  font-weight: 780;
  text-decoration: none;
}
.lesson-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.lesson-card-link:focus-visible { outline: none; }
.lesson-card:has(.lesson-card-link:focus-visible) { outline: 3px solid var(--orange); outline-offset: 3px; }
.empty-state {
  padding: 70px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  background: var(--surface);
}
.empty-state > span { color: var(--cyan); font-size: 2rem; font-weight: 900; }
.empty-state h1, .empty-state h2 { margin: 10px 0 6px; }
.empty-state p { max-width: 540px; margin: 0 auto 24px; color: var(--muted); }

.lesson-main { padding: 28px 0 88px; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: .77rem;
}
.breadcrumb a { text-underline-offset: 3px; }
.lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: clamp(30px, 5vw, 66px);
  align-items: start;
}
.lesson-article {
  min-width: 0;
  max-width: 820px;
}
.lesson-header {
  padding: clamp(30px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 5%, color-mix(in srgb, var(--cyan), transparent 80%), transparent 34%),
    var(--surface);
}
.lesson-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.lesson-header .lesson-meta { margin: 26px 0 5px; }
.lesson-header h1 {
  margin: 0;
  font-size: clamp(2.15rem, 5vw, 4.15rem);
  line-height: 1.02;
  letter-spacing: -.055em;
}
.lesson-lead {
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}
.lesson-block {
  position: relative;
  padding: 58px 8px 16px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 95px;
}
.lesson-block h2 {
  max-width: 720px;
  margin: 0 0 22px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}
.lesson-block > p:not(.kicker, .section-index, .reflection-note) {
  max-width: 74ch;
  font-size: .99rem;
}
.section-index {
  position: absolute;
  top: 54px;
  right: 8px;
  margin: 0;
  color: color-mix(in srgb, var(--muted), transparent 65%);
  font-size: 2.7rem;
  font-weight: 900;
  line-height: 1;
}
.check-list, .instruction-list {
  display: grid;
  gap: 11px;
  padding: 0;
  list-style: none;
}
.check-list li {
  position: relative;
  padding: 14px 16px 14px 48px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 16px;
  color: var(--cyan);
  font-weight: 900;
}
.example-box {
  margin: 25px 0;
  padding: 20px 22px;
  border-left: 3px solid var(--cyan);
  border-radius: 4px 12px 12px 4px;
  background: color-mix(in srgb, var(--cyan), transparent 91%);
}
.example-box strong {
  color: var(--cyan);
  font-size: .73rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.example-box p { margin: 7px 0 0; }
.practice-block {
  margin-top: 44px;
  padding: 34px;
  border: 1px solid color-mix(in srgb, var(--orange), transparent 55%);
  border-radius: 20px;
  background: color-mix(in srgb, var(--orange), transparent 93%);
}
.instruction-list { counter-reset: instructions; }
.instruction-list li {
  position: relative;
  padding: 4px 0 18px 52px;
  counter-increment: instructions;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.instruction-list li::before {
  content: counter(instructions);
  position: absolute;
  left: 0;
  display: grid;
  width: 34px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--orange);
  border-radius: 50%;
  color: var(--orange);
  font-weight: 850;
}
.evidence-box {
  margin-top: 8px;
  padding: 18px;
  border-radius: 12px;
  background: var(--surface);
}
.evidence-box strong { color: var(--orange); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.evidence-box p { margin: 5px 0 0; }
.practice-check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin-top: 14px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 720;
}
.practice-check input { width: 20px; height: 20px; accent-color: var(--cyan); }
.verification-block blockquote {
  margin: 0;
  padding: 22px 24px;
  border-left: 3px solid var(--cyan);
  border-radius: 4px 12px 12px 4px;
  background: var(--surface);
  font-size: 1.16rem;
  font-weight: 650;
}
.reflection-note { color: var(--muted); font-size: .83rem; }
.lesson-aside {
  position: sticky;
  top: 102px;
  display: grid;
  gap: 14px;
}
.aside-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.aside-card .kicker { margin-bottom: 9px; }
.progress-facts {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  margin: 20px 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: .78rem;
}
.progress-facts dt { color: var(--muted); }
.progress-facts dd { margin: 0; font-weight: 730; }
.aside-card .button { width: 100%; margin-top: 8px; }
.table-of-contents ol { display: grid; gap: 6px; padding-left: 24px; margin: 0; color: var(--muted); font-size: .77rem; }
.table-of-contents a { text-decoration: none; }
.table-of-contents a:hover { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.lesson-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-top: 38px;
}
.lesson-nav-link {
  display: grid;
  min-height: 96px;
  align-content: center;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  text-decoration: none;
}
.lesson-nav-link:last-child { text-align: right; }
.lesson-nav-link small { color: var(--cyan); font-weight: 760; }
.lesson-nav-link strong { font-size: .82rem; }
.lesson-nav-link.disabled { color: var(--muted); opacity: .62; }

.quiz-form { display: grid; gap: 18px; }
.quiz-question {
  min-width: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.quiz-question legend {
  width: 100%;
  padding: 0 4px 12px;
  font-size: .98rem;
  font-weight: 720;
}
.quiz-question legend span {
  display: block;
  margin-bottom: 5px;
  color: var(--cyan);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.quiz-option {
  display: flex;
  gap: 11px;
  align-items: start;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  font-size: .87rem;
}
.quiz-option:hover { border-color: var(--cyan); }
.quiz-option input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--cyan); }
.quiz-question[data-result="correct"] { border-color: var(--cyan); }
.quiz-question[data-result="incorrect"] { border-color: var(--orange); }
.quiz-option[data-correct="true"] { border-style: solid; border-color: var(--cyan); }
.quiz-option[data-correct="true"]::after { content: "Correta"; margin-left: auto; color: var(--cyan); font-size: .68rem; font-weight: 800; }
.quiz-option[data-selected="true"][data-correct="false"]::after { content: "Sua resposta"; margin-left: auto; color: var(--orange); font-size: .68rem; font-weight: 800; }
.quiz-explanation { margin-top: 13px; padding: 14px; border-radius: 9px; background: var(--surface-2); font-size: .83rem; }
.quiz-actions { display: flex; }
.quiz-summary { padding: 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: .86rem; }
.quiz-summary.success { color: var(--cyan-bright); border-color: var(--cyan); }
.quiz-summary.warning { color: var(--orange); border-color: var(--orange); }
.quiz-summary.error { color: #ef6d76; border-color: #ef6d76; }
.lesson-not-found { margin-top: 44px; }

.section-tinted { background: var(--surface-2); }
.data-section { border-top: 1px solid var(--line); }
.data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.data-grid h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.04em; }
.data-grid p { max-width: 620px; color: var(--muted); }
.data-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.file-button { cursor: pointer; }
.danger-link {
  padding: 10px 4px;
  border: 0;
  background: transparent;
  color: #ef6d76;
  cursor: pointer;
  font-size: .82rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.data-message { flex-basis: 100%; min-height: 1.5em; margin: 0; font-size: .82rem; }
.data-message.success { color: var(--cyan); }
.data-message.error { color: #ef6d76; }
.project-intro .scope-notice {
  max-width: 860px;
  margin-top: 30px;
  padding: 15px 18px;
  border-left: 3px solid var(--orange);
  border-radius: 4px 10px 10px 4px;
  background: color-mix(in srgb, var(--orange), transparent 90%);
  color: var(--ink);
  font-size: .86rem;
}
.two-column-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.content-card {
  position: relative;
  min-height: 240px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.content-card > span {
  position: absolute;
  top: 18px;
  right: 22px;
  color: color-mix(in srgb, var(--muted), transparent 70%);
  font-size: 3rem;
  font-weight: 900;
}
.content-card h3 { margin: 36px 0 12px; font-size: 1.4rem; }
.content-card p { color: var(--muted); }
.architecture-stack {
  display: grid;
  max-width: 720px;
  justify-items: center;
  gap: 7px;
  margin: 0 auto;
}
.architecture-layer {
  width: min(100%, calc(560px + (var(--layer, 0) * 10px)));
  padding: 15px 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  text-align: center;
  font-size: .88rem;
  font-weight: 730;
}
.architecture-layer:nth-of-type(1), .architecture-layer:nth-of-type(9) { border-color: var(--orange); }
.architecture-layer:nth-of-type(5) { border-color: var(--cyan); box-shadow: inset 0 0 0 1px var(--cyan); }
.architecture-arrow { color: var(--cyan); font-weight: 900; }
.tabs {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.tab-list { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tab-list button {
  min-height: 58px;
  flex: 1;
  padding: 10px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 740;
  white-space: nowrap;
}
.tab-list button:last-child { border-right: 0; }
.tab-list button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 -3px var(--cyan); }
.tab-list button span { margin-left: 5px; color: var(--cyan); }
.tab-panel { padding: 12px 26px 26px; }
.tab-panel dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin: 0; }
.requirement-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.requirement-item dt { color: var(--cyan); font-size: .76rem; font-weight: 850; }
.requirement-item dd { margin: 0; font-size: .87rem; }
.milestone-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 38px;
  align-items: start;
}
.milestone-list { display: grid; gap: 9px; padding: 0; margin: 0; list-style: none; }
.milestone-item label {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 72px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  cursor: pointer;
}
.milestone-item input { width: 21px; height: 21px; flex: 0 0 auto; accent-color: var(--cyan); }
.milestone-item span { display: grid; }
.milestone-item small { color: var(--cyan); font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.milestone-item strong { font-size: .89rem; }
.milestone-item:has(input:checked) label { border-color: var(--cyan); }
.milestone-item:has(input:checked) strong { text-decoration: line-through; text-decoration-color: var(--muted); }
.checklist-summary {
  position: sticky;
  top: 102px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.checklist-summary > span { color: var(--muted); font-size: .75rem; }
.checklist-summary > strong { display: block; margin-top: 3px; font-size: 1.7rem; }
.checklist-summary .progress-track { margin-top: 16px; }
.checklist-summary p { color: var(--muted); font-size: .78rem; }
.entity-model {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
}
.entity-card { padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.entity-card h3 { margin: 2px 0 15px; font-size: 1.45rem; }
.entity-label { margin: 0; color: var(--cyan); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.entity-card ul { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding-left: 20px; color: var(--muted); font-size: .8rem; }
.entity-relation { display: grid; justify-items: center; gap: 5px; color: var(--muted); font-size: .7rem; }
.entity-relation strong { display: grid; width: 32px; aspect-ratio: 1; place-items: center; border: 1px solid var(--cyan); border-radius: 50%; color: var(--cyan); }
.deliverables { margin-top: 30px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.deliverables h3 { margin: 0 0 16px; }
.deliverables ul { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 30px; padding-left: 22px; color: var(--muted); }
.error-page { min-height: calc(100vh - 185px); padding-block: clamp(80px, 13vw, 150px); }
.error-code { float: right; margin: -40px 0 0 30px; color: color-mix(in srgb, var(--cyan), transparent 83%); font-size: clamp(7rem, 22vw, 17rem); font-weight: 950; line-height: .7; letter-spacing: -.1em; }
.error-page h1 { max-width: 700px; margin: 0; font-size: clamp(2.8rem, 7vw, 5.7rem); line-height: .95; letter-spacing: -.06em; }
.error-page > p:not(.eyebrow, .error-code) { max-width: 630px; color: var(--muted); }

/* Primeiros passos */
.getting-started-main { overflow: hidden; }
.start-hero {
  padding: clamp(58px, 8vw, 96px) 0 70px;
  background:
    radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--orange), transparent 88%), transparent 32%),
    radial-gradient(circle at 8% 85%, color-mix(in srgb, var(--cyan), transparent 88%), transparent 30%);
}
.start-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: clamp(34px, 7vw, 88px);
  align-items: center;
}
.start-hero h1 {
  max-width: 760px;
  margin: 12px 0 22px;
  font-size: clamp(3rem, 7.5vw, 6.4rem);
  line-height: .94;
  letter-spacing: -.065em;
}
.start-hero h1 em { color: var(--cyan); font-style: normal; }
.start-outcome {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.start-outcome h2 { margin: 4px 0 20px; font-size: 1.45rem; }
.start-outcome .check-list { margin: 0; }
.start-outcome .check-list li { background: var(--surface-2); }
.beginner-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 25px;
  padding: 14px 17px;
  border: 1px solid color-mix(in srgb, var(--cyan), transparent 55%);
  border-radius: 12px;
  background: color-mix(in srgb, var(--cyan), transparent 93%);
  font-size: .83rem;
}
.beginner-notice span { color: var(--muted); }
.beginner-notice .text-link { color: var(--cyan); }
.definition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}
.definition-grid > div {
  min-height: 180px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.definition-grid dt { margin-bottom: 10px; color: var(--cyan); font-size: 1.02rem; font-weight: 850; }
.definition-grid dd { margin: 0; color: var(--muted); font-size: .88rem; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tool-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.step-badge {
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  width: 38px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  color: var(--cyan);
  font-weight: 900;
}
.tool-card h3 { margin: 5px 0 8px; font-size: 1.55rem; letter-spacing: -.03em; }
.tool-card > p:not(.kicker, .expected-result) { color: var(--muted); }
.plain-steps { display: grid; gap: 9px; padding-left: 21px; font-size: .86rem; }
.plain-steps li::marker { color: var(--cyan); font-weight: 850; }
.expected-result {
  margin-top: auto;
  padding: 14px;
  border-left: 3px solid var(--orange);
  border-radius: 4px 9px 9px 4px;
  background: color-mix(in srgb, var(--orange), transparent 92%);
  font-size: .8rem;
}
.resource-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.resource-actions .button { flex: 1 1 auto; text-align: center; }
.resource-actions .text-link { font-size: .78rem; }
.setup-timeline { display: grid; gap: 0; max-width: 920px; padding: 0; margin: 0 auto; list-style: none; }
.setup-timeline > li { display: grid; grid-template-columns: 54px 1fr; gap: 20px; position: relative; padding-bottom: 34px; }
.setup-timeline > li:not(:last-child)::before { content: ""; position: absolute; top: 44px; bottom: 0; left: 21px; width: 1px; background: var(--line); }
.setup-timeline > li > span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 44px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  background: var(--bg);
  color: var(--cyan);
  font-weight: 900;
}
.setup-timeline h3 { margin: 4px 0 7px; font-size: 1.2rem; }
.setup-timeline p { max-width: 76ch; margin: 0; color: var(--muted); }
.code-block {
  max-width: 100%;
  margin: 15px 0 0;
  padding: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--navy);
  color: #edf8f7;
  line-height: 1.7;
  tab-size: 4;
}
code, kbd { font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; }
p code, li code, dd code, dt code {
  padding: .12em .34em;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: .9em;
}
kbd { padding: 2px 7px; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 5px; background: var(--surface); font-size: .8em; }
.troubleshooting-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.troubleshooting-list > div { padding: 22px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.troubleshooting-list dt { margin-bottom: 7px; color: var(--orange); font-weight: 820; }
.troubleshooting-list dd { margin: 0; color: var(--muted); font-size: .86rem; }
.start-finish { text-align: center; }
.start-finish h2 { margin: 4px auto 14px; font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -.045em; }
.start-finish > p:not(.kicker, .platform-note) { max-width: 720px; margin-inline: auto; color: var(--muted); }
.start-finish .hero-actions { justify-content: center; }
.platform-note { max-width: 740px; margin: 28px auto 0; color: var(--muted); font-size: .8rem; }
.platform-note a { color: var(--cyan); text-underline-offset: 3px; }

/* Estrutura didática das aulas */
.preparation-block {
  margin-top: 38px;
  padding: 30px;
  border: 1px solid color-mix(in srgb, var(--cyan), transparent 55%);
  border-radius: 18px;
  background: color-mix(in srgb, var(--cyan), transparent 94%);
}
.preparation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.preparation-grid h3 { margin: 0 0 10px; font-size: 1rem; }
.preparation-grid ul { display: grid; gap: 8px; margin: 0; padding-left: 20px; color: var(--muted); font-size: .86rem; }
.resource-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.resource-list a {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--cyan);
  font-size: .82rem;
  font-weight: 760;
  text-decoration: none;
}
.resource-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.resource-list small { display: block; margin-top: 3px; color: var(--muted); font-weight: 500; }
.glossary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.glossary-grid > div { padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.glossary-grid dt { color: var(--cyan); font-weight: 820; }
.glossary-grid dd { margin: 5px 0 0; color: var(--muted); font-size: .86rem; }
.guided-example-block {
  margin-top: 30px;
  padding: 34px;
  border: 1px solid color-mix(in srgb, var(--cyan), transparent 52%);
  border-radius: 20px;
  background: color-mix(in srgb, var(--cyan), transparent 94%);
}
.guided-context { color: var(--muted); }
.guided-result { margin-top: 12px; padding: 17px; border-radius: 11px; background: var(--surface); }
.guided-result strong { color: var(--cyan); }
.guided-result p { margin: 5px 0 0; }

@media (max-width: 1080px) {
  .filter-panel { grid-template-columns: repeat(3, 1fr); }
  .search-field { grid-column: span 2; }
  .lesson-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: auto; }
}

@media (max-width: 900px) {
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-article { max-width: none; }
  .lesson-aside { position: static; grid-row: 1; grid-template-columns: 1fr 1fr; }
  .table-of-contents { display: none; }
  .milestone-layout { grid-template-columns: 1fr; }
  .checklist-summary { position: static; grid-row: 1; }
  .entity-model { grid-template-columns: 1fr; }
  .entity-relation { grid-template-columns: auto 1fr auto; }
  .data-grid { grid-template-columns: 1fr; gap: 26px; }
  .start-hero-grid { grid-template-columns: 1fr; }
  .definition-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .static-nav { display: flex; position: static; padding: 0; border: 0; box-shadow: none; background: transparent; }
  body[data-page="not-found"] .header-inner { flex-wrap: wrap; padding-block: 10px; }
  body[data-page="not-found"] .static-nav { order: 3; width: 100%; flex-wrap: wrap; justify-content: center; padding-top: 7px; border-top: 1px solid var(--line); }
  body[data-page="not-found"] .static-nav a { display: inline-flex; min-height: 44px; align-items: center; }
  .page-intro { padding: 50px 0 45px; }
  .filter-panel { grid-template-columns: 1fr; padding: 14px; }
  .search-field { grid-column: auto; }
  .catalog-meta { align-items: start; flex-direction: column; gap: 4px; }
  .lesson-grid { grid-template-columns: 1fr; }
  .lesson-card { min-height: 320px; }
  .lesson-header { padding: 28px 22px; }
  .lesson-header h1 { font-size: clamp(2rem, 11vw, 3.2rem); }
  .lesson-block { padding-inline: 0; }
  .practice-block { padding: 26px 20px; }
  .lesson-aside { grid-template-columns: 1fr; }
  .lesson-navigation { grid-template-columns: 1fr; }
  .lesson-nav-link:last-child { text-align: left; }
  .quiz-question { padding: 16px; }
  .quiz-option { flex-wrap: wrap; }
  .two-column-cards, .tab-panel dl { grid-template-columns: 1fr; }
  .tab-list button { flex: 0 0 auto; }
  .tab-panel { padding-inline: 16px; }
  .entity-card ul, .deliverables ul { grid-template-columns: 1fr; }
  .error-code { float: none; margin: 0 0 40px; }
  .definition-grid, .troubleshooting-list, .preparation-grid, .glossary-grid { grid-template-columns: 1fr; }
  .definition-grid > div { min-height: auto; }
  .tool-card, .preparation-block, .guided-example-block { padding: 24px 20px; }
  .setup-timeline > li { grid-template-columns: 44px 1fr; gap: 13px; }
  .setup-timeline > li > span { width: 38px; }
  .setup-timeline > li:not(:last-child)::before { left: 18px; top: 38px; }
}

@media print {
  :root, [data-theme="dark"] {
    --bg: #fff;
    --surface: #fff;
    --surface-2: #f4f4f4;
    --ink: #111;
    --muted: #444;
    --line: #bbb;
    --cyan: #006d6b;
    --orange: #8c4b00;
  }
  .site-header, .site-footer, .lesson-aside, .lesson-navigation, .quiz-actions, .practice-check, .skip-link { display: none !important; }
  .lesson-main { padding: 0; }
  .lesson-layout { display: block; }
  .lesson-article { max-width: none; }
  .lesson-header, .lesson-block, .practice-block, .quiz-question { break-inside: avoid; box-shadow: none; }
  .lesson-header { padding: 24px 0; border: 0; border-bottom: 2px solid #111; border-radius: 0; }
  .lesson-block { padding-top: 28px; }
  a { color: #111; text-decoration: none; }
}

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