:root {
  --ink: #15212b;
  --muted: #52616b;
  --green: #0f7667;
  --green-dark: #075d53;
  --blue: #205375;
  --line: #d9e2df;
  --paper: #fff;
  --soft: #f5f8f7;
  --max: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

[hidden] { display: none !important; }

a {
  color: var(--blue);
  text-underline-offset: 0.2em;
}

a:hover { color: var(--green-dark); }

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 20;
  padding: 10px 16px;
  color: #fff;
  background: var(--green-dark);
  border-radius: 6px;
}

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

.course-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}

.course-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  width: min(var(--max), calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
}

.course-brand {
  flex: 0 0 auto;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.course-brand span {
  margin-left: 6px;
  color: var(--green);
}

.course-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.course-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.course-header nav a:hover { color: var(--green-dark); }

.course-main,
.course-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.course-hero {
  max-width: 850px;
  padding: 56px 0 40px;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h2 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
}

h3 {
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 1.13rem;
  line-height: 1.35;
}

.course-hero p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 1.05rem;
}

.course-hero p:first-of-type strong {
  color: var(--green-dark);
  font-size: 1.15rem;
}

.course-eyebrow {
  color: var(--green-dark) !important;
  font-size: 0.8rem !important;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.course-section {
  padding: 36px 0 42px;
  border-top: 1px solid var(--line);
}

.course-section > p { max-width: 840px; color: var(--muted); }

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.course-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.course-card p {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.97rem;
}

.course-card p strong { color: var(--ink); }

.course-card p:last-child {
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 10px;
}

.course-card p:last-child a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 13px;
  color: #fff;
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.35;
  text-decoration: none;
}

.course-card p:last-child a:hover {
  color: #fff;
  background: var(--green-dark);
  border-color: var(--green-dark);
}

code {
  padding: 0.08rem 0.28rem;
  color: var(--ink);
  background: #e7eeeb;
  border-radius: 4px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

ul { padding-left: 22px; }
li + li { margin-top: 10px; }

.module-fallback a {
  display: inline-block;
  min-height: 40px;
  padding: 6px 0;
}

.course-status {
  margin: 24px 0 0;
  padding: 12px 16px;
  background: #fff8e8;
  border: 1px solid #ead8aa;
  border-radius: 6px;
  font-size: 0.95rem;
}

.course-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 26px 0 36px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.course-footer p { margin: 0; }
.course-footer a { font-weight: 700; }

@media (max-width: 850px) {
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-header-inner { align-items: flex-start; flex-direction: column; gap: 4px; padding: 12px 0; }
  .course-header nav { gap: 0 8px; }
  .course-header nav a { padding: 4px 0; margin-right: 8px; }
  html { scroll-padding-top: 135px; }
}

@media (max-width: 560px) {
  html { scroll-padding-top: 180px; }
  .course-header-inner,
  .course-main,
  .course-footer { width: calc(100% - 28px); }
  .course-grid { grid-template-columns: 1fr; }
  .course-hero { padding: 36px 0 28px; }
  .course-card { padding: 21px; }
  .course-section { padding: 28px 0 32px; }
  .course-header nav a { font-size: 0.8rem; }
  .course-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
