:root {
  color-scheme: light;
  --course-ink: #1a2430;
  --course-muted: #546579;
  --course-panel: #fffdf9;
  --course-line: rgba(17, 24, 39, 0.12);
  --course-accent: #8c5f1d;
  --course-accent-soft: #f6ead5;
  --course-shadow: 0 14px 36px rgba(13, 28, 35, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  box-sizing: border-box;
  max-width: 1440px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px clamp(12px, 3vw, 36px) 40px;
  background: #f4efe8 !important;
  color: var(--course-ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

body *,
body *::before,
body *::after {
  box-sizing: border-box;
}

.modern-course-header {
  position: sticky;
  top: 10px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 24px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(13, 25, 35, 0.97);
  box-shadow: var(--course-shadow);
  color: #edf2f7;
}

.modern-course-brand {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  color: #fff !important;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none !important;
}

.modern-course-brand span {
  margin-top: 3px;
  color: #c3d1dc;
  font-size: 0.76rem;
  font-weight: 500;
}

.modern-course-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.modern-course-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #edf2f7 !important;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
}

.modern-course-nav a:hover,
.modern-course-nav a:focus-visible {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
}

.modern-course-nav a:first-child {
  border-color: transparent;
  background: linear-gradient(135deg, #b97d2b, #d9a04d);
  color: #1a1a1a !important;
}

.modern-course-header a:focus-visible {
  outline: 2px solid #f0c578;
  outline-offset: 3px;
}

body > p,
body > div,
body > center,
body > section {
  max-width: 100%;
}

body > p {
  margin-top: 0.9em;
  margin-bottom: 0.9em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #132b40;
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.25;
  text-wrap: pretty;
}

h1,
h2 {
  letter-spacing: -0.035em;
}

p {
  line-height: 1.7;
}

a {
  color: #245d69;
  text-underline-offset: 0.16em;
}

a:hover {
  color: #173c47;
}

a:focus-visible {
  outline: 2px solid #9b6824;
  outline-offset: 2px;
}

img:not([usemap]) {
  max-width: 100%;
  height: auto;
}

table {
  max-width: 100%;
}

th,
td {
  line-height: 1.5;
}

hr {
  border: 0;
  border-top: 1px solid var(--course-line);
}

iframe,
video,
object,
embed {
  max-width: 100%;
}

@media (max-width: 760px) {
  body {
    padding: 10px 10px 28px;
  }

  .modern-course-header {
    position: static;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
    padding: 13px;
  }

  .modern-course-nav {
    justify-content: flex-start;
  }

  .modern-course-nav a {
    min-height: 34px;
    padding: 6px 9px;
  }

  body > table {
    display: block;
    overflow-x: auto;
  }
}

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