:root {
  color-scheme: light;
  --ink: #14213d;
  --muted: #5a6478;
  --paper: #ffffff;
  --page: #f3f6fb;
  --line: #d8dfeb;
  --blue: #1756a9;
  --blue-dark: #123f7d;
  --blue-soft: #eaf2ff;
  --coral: #d8694b;
  --code: #111827;
  --code-text: #e5edf8;
  --content: 72rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--page); line-height: 1.65; }

a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--blue-dark); }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 3px solid #f5b82e; outline-offset: 3px; }
code { overflow-wrap: anywhere; }

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: .7rem 1rem;
  border-radius: .35rem;
  color: #fff;
  background: var(--ink);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); color: white; }

.site-header { border-bottom: 1px solid var(--line); background: rgb(255 255 255 / .96); box-shadow: 0 .25rem .75rem rgb(20 33 61 / .06); backdrop-filter: blur(10px); }
main { width: 100%; }
.nav-shell, .hero, .page-shell, .footer-shell { width: min(var(--content), calc(100% - 2rem)); margin-inline: auto; }
.nav-shell { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: .35rem;
  color: #fff;
  background: var(--blue);
  font-family: Georgia, serif;
  font-size: 1.15rem;
}
.nav-note { color: var(--muted); font-size: 0.92rem; }

.course-intro { padding: clamp(4rem, 9vw, 7.5rem) 0 3.5rem; }
.hero { padding: clamp(3.5rem, 8vw, 6rem) 0 3rem; }
.hero.compact { padding-block: 3rem 2.25rem; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 .9rem;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 1.8rem;
  height: 0.2rem;
  border-radius: 99px;
  background: var(--coral);
}
h1, h2, h3, h4 { line-height: 1.12; text-wrap: balance; }
h1 { max-width: 16ch; margin: 0; color: var(--ink); font-size: clamp(2.65rem, 7vw, 5.4rem); font-weight: 800; letter-spacing: -.055em; }
.compact h1 { max-width: 22ch; font-size: clamp(2.35rem, 5.5vw, 4.4rem); }
.lead {
  max-width: 52rem;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2.3vw, 1.35rem);
}
.course-reference { margin: 1.7rem 0 0; font-weight: 800; }

.section { padding: 1.5rem 0 5rem; }
.section-heading { max-width: 52rem; margin-bottom: 2rem; }
.section-heading h2, .article h2 { margin: 0 0 .75rem; font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.035em; }
.section-heading p { color: var(--muted); }
.course-map { display: grid; gap: 1rem; }
.program-card {
  min-height: 0;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  color: inherit;
  background: var(--paper);
  box-shadow: 0 10px 30px rgb(20 33 61 / .04);
}
.section-number, .step-no {
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.program-card h3 { margin: .7rem 0; font-size: 1.45rem; }
.program-card p { margin: 0; color: var(--muted); }
.reference-card { border-left: 4px solid var(--coral); }
.card-link { display: inline-block; margin-top: 1.2rem; font-weight: 800; }
.schedule {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .75rem;
  margin: 2rem 0 3rem;
}
.schedule div { padding: 1rem; border-top: .35rem solid var(--coral); color: var(--ink); background: var(--paper); box-shadow: 0 10px 30px rgb(20 33 61 / .04); }
.schedule strong, .schedule span { display: block; }
.schedule span { margin-top: .35rem; color: var(--muted); font-size: .88rem; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0 0 1rem; color: var(--muted); font-size: .92rem; }
.breadcrumb a { color: inherit; }
.lesson-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}
.lesson-nav {
  position: sticky;
  top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--paper);
}
.lesson-nav strong { display: block; margin: .15rem .55rem .7rem; }
.lesson-nav ol { margin: 0; padding: 0; list-style: none; counter-reset: lesson; }
.lesson-nav li { counter-increment: lesson; }
.lesson-nav a {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: .45rem;
  padding: .48rem .55rem;
  border-radius: .35rem;
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
}
.lesson-nav a::before { content: counter(lesson, decimal-leading-zero); color: var(--blue); font-weight: 850; }
.lesson-nav a:hover, .lesson-nav a[aria-current="page"] { color: var(--blue); background: var(--blue-soft); }

.article { min-width: 0; max-width: 790px; padding: clamp(1.4rem, 5vw, 3rem); overflow: hidden; border: 1px solid var(--line); background: var(--paper); box-shadow: 0 1rem 3rem rgb(20 33 61 / .06); }
.section.page-shell > .article { max-width: none; }
.article h2 { margin-top: 3rem; }
.article h2:first-child { margin-top: 0; }
.article h3 { margin: 2rem 0 .6rem; font-size: 1.25rem; }
.article p, .article li { color: #34445c; }
.article li + li { margin-top: .45rem; }
.article code:not(pre code) { padding: .12em .35em; border-radius: .3em; color: #174779; background: var(--blue-soft); }

.callout {
  margin: 1.6rem 0;
  padding: 1.1rem 1.3rem;
  border-left: 4px solid var(--blue);
  background: var(--paper);
}
.callout.success { border-color: #24704e; background: #e9f2ec; }
.callout strong { display: block; margin-bottom: .2rem; }
.callout p { margin: 0; }
details.callout > summary { color: var(--ink); font-weight: 800; cursor: pointer; }
details.callout > summary::marker { color: var(--blue); }
details.callout.success > summary::marker { color: #24704e; }
details.callout > summary:focus-visible { outline: 3px solid #f5b82e; outline-offset: 3px; }
details.callout[open] > summary { margin-bottom: .4rem; }
details.callout p strong { display: inline; margin-bottom: 0; }

.code-block { position: relative; min-width: 0; max-width: 100%; margin: 1.2rem 0 1.7rem; overflow: hidden; }
.code-path {
  display: block;
  padding: .55rem .85rem;
  border-radius: .5rem .5rem 0 0;
  color: #cbd5e1;
  background: #26354d;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem;
}
pre {
  max-width: 100%;
  margin: 0;
  padding: 1.15rem;
  overflow-x: auto;
  border-radius: 0 0 .5rem .5rem;
  color: var(--code-text);
  background: var(--code);
  font: .9rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  tab-size: 4;
}
pre code { color: inherit; font: inherit; }
.copy-button {
  position: absolute;
  top: .35rem;
  right: .45rem;
  padding: .28rem .55rem;
  border: 1px solid #64748b;
  border-radius: .35rem;
  color: #fff;
  background: #35445c;
  font: inherit;
  font-size: .75rem;
  cursor: pointer;
}

.checklist { padding: 0; list-style: none; }
.checklist li { position: relative; padding-left: 1.8rem; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: #24704e; font-weight: 900; }
.step-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.step-card { padding: 1.2rem 0; border-top: 1px solid var(--line); background: transparent; }
.step-card:last-child { border-bottom: 1px solid var(--line); }
.step-card h3, .platform-card h3 { margin: .45rem 0 .5rem; }
.step-card p, .platform-card p { margin: 0; font-size: .94rem; }
.platform-card ul { margin-bottom: 0; }
.platform-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.platform-card { padding: 1.15rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--paper); }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.pager a { max-width: 48%; font-weight: 800; text-decoration: none; }
.pager a:last-child { margin-left: auto; text-align: right; }
.site-footer { margin-top: 4rem; border-top: 1px solid var(--line); }
.footer-shell { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.5rem 2rem; color: var(--muted); font-size: .82rem; }

@media (max-width: 900px) {
  .schedule { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platform-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-nav { position: static; }
  .lesson-nav ol { display: grid; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .nav-shell { align-items: flex-start; flex-direction: column; padding-block: .85rem; }
  .nav-note { display: none; }
  .schedule { grid-template-columns: 1fr; }
  .lesson-nav ol { grid-template-columns: 1fr; }
  .pager, .footer-shell { flex-direction: column; }
  .pager a, .pager a:last-child { max-width: 100%; margin: 0; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; }
  .site-header, .site-footer { display: none; }
  .page-shell, .hero, .footer-shell { width: 100%; }
  .article, .lesson-section { box-shadow: none; }
  details.callout > :not(summary) { display: block !important; }
  details.callout > summary { margin-bottom: .4rem; list-style: none; }
  details.callout > summary::marker { content: ""; }
}
