:root {
  color-scheme: light;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: #162538;
  background: #f5f4ef;
}

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

.page {
  max-width: 1220px;
  margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top)) clamp(16px, 5vw, 56px) calc(36px + env(safe-area-inset-bottom));
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0 0 16px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #1d3557;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.96rem;
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2.5px;
  text-underline-offset: 7px;
}

.site-nav .nav-pill {
  margin-left: auto;
  padding: 0 14px;
  border-radius: 999px;
  background: #e8effc;
  color: #1d4ed8;
  font-size: 0.9rem;
}
.site-nav .nav-pill:hover { background: #dbeafe; }

/* 히어로 */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: stretch;
  min-height: 360px;
  background: #162538;
  color: #f8fafc;
  border-radius: 4px;
  overflow: hidden;
}

.intro-copy {
  padding: clamp(24px, 4.5vw, 54px);
  align-self: center;
}

.institution {
  color: #e5c79b;
  margin: 0 0 10px;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.22;
  letter-spacing: -0.035em;
}

h1 { font-size: clamp(2.35rem, 5.2vw, 3.85rem); }

.instructor-credit {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0 7px;
  margin-top: 12px;
  color: inherit;
  line-height: 1.55;
  text-decoration: none;
}
.instructor-credit span { color: #e5c79b; }
.instructor-credit:hover { text-decoration: underline; text-underline-offset: 0.2em; }

.intro-copy > p:not(.institution) {
  max-width: 38ch;
  margin: 18px 0 0;
  line-height: 1.72;
  color: #dbe5f2;
  font-size: 1.03rem;
  word-break: keep-all;
}

.course-access {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(226, 232, 240, 0.28);
  display: flex;
  gap: 14px;
  align-items: center;
}

.course-access strong { display: block; font-size: 0.96rem; }

.scan-link {
  display: inline-flex;
  flex: none;
  background: #ffffff;
  padding: 4px;
  border-radius: 4px;
}

.course-access .scan-link img,
.tool-access .scan-link img,
.channel .scan-link img {
  width: 116px;
  height: 116px;
  object-fit: contain;
  image-rendering: pixelated;
}

.visible-url {
  display: inline-block;
  margin-top: 5px;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
  line-height: 1.45;
  text-underline-offset: 0.22em;
  color: inherit;
}

.intro > img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
}

/* 차시 목록 */
.lesson-list { margin-top: clamp(32px, 5.5vw, 58px); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.lesson-list h2 { font-size: clamp(1.38rem, 2.5vw, 1.85rem); }
.section-sub { margin: 0; font-size: 0.93rem; color: #4a5d75; }

.lesson-list ol {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.lesson {
  min-width: 0;
  padding: clamp(18px, 2.2vw, 26px);
  border: 1px solid #d7dde6;
  border-top: 3.5px solid #2b4c7e;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  word-break: keep-all;
}

.lesson.is-ot {
  border-top-color: #b7791f;
  background: #fffdf8;
}

.lesson-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
}

.session {
  margin: 0;
  color: #2b4c7e;
  font-size: 0.92rem;
  font-weight: 800;
}
.lesson.is-ot .session { color: #9c6213; }

.slide-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: #4a5d75;
  background: #eef2f7;
  padding: 3px 8px;
  border-radius: 999px;
}

.lesson h3 { font-size: clamp(1.12rem, 2.1vw, 1.36rem); }

.summary {
  flex: 1;
  margin: 12px 0 20px;
  color: #3e526a;
  line-height: 1.65;
  font-size: 0.95rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.actions a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-weight: 700;
}

.open {
  padding: 0 14px;
  color: #ffffff;
  background: #1d4ed8;
  text-decoration: none;
  gap: 0.55em;
  border-radius: 4px;
}
.open:hover { background: #1e40af; }

.lesson.is-ot .open { background: #162538; }
.lesson.is-ot .open:hover { background: #0f1b2b; }

.download {
  color: #2b4c7e;
  text-underline-offset: 0.22em;
  font-size: 0.9rem;
}

/* 실습 도구 연동 배너 (목표 노드 앱) */
.tool-spotlight {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-left: 5px solid #2563eb;
  padding: clamp(20px, 3vw, 32px);
}

.tool-copy p {
  margin: 10px 0 16px;
  color: #3e526a;
  line-height: 1.68;
  max-width: 60ch;
  word-break: keep-all;
}

.tool-kicker {
  margin: 0 0 6px !important;
  color: #1d4ed8 !important;
  font-size: 0.88rem;
  font-weight: 800;
}

.tool-access {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: #f1f5f9;
  border-radius: 6px;
}

.tool-access .visible-url {
  margin-top: 2px;
  font-size: 0.82rem;
  color: #1e3a8a;
  text-align: center;
}

/* 강사·채널 소개 페이지 */
.intro-heading { padding: 20px 0 24px; }
.intro-heading .institution { color: #2b4c7e; }
.intro-heading h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }

.profile, .channel {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  margin-top: 12px;
  background: #ffffff;
  border: 1px solid #d7dde6;
  border-top: 3.5px solid #2b4c7e;
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #3d5468;
}

.profile-copy, .channel-copy {
  padding: clamp(19px, 4vw, 40px);
  word-break: keep-all;
}

.profile h2, .channel h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.profile-role { margin: 7px 0 16px; font-weight: 700; color: #2b4c7e; }
.roles { margin: 0 0 18px; padding-left: 1.15em; line-height: 1.7; }
.profile-detail { margin-bottom: 18px; padding-top: 16px; border-top: 1px solid #e2e8f0; }
.profile-list { margin: 7px 0 0; padding-left: 1.15em; line-height: 1.65; }
.profile-list li + li { margin-top: 4px; }
.research-source { color: #1d4ed8; font-size: 0.88rem; font-weight: 650; text-underline-offset: 0.2em; }
.profile-list .research-source { display: inline-block; margin-left: 0.35em; }
.paper-topic { margin: 7px 0 4px; font-weight: 700; line-height: 1.6; }
.paper-reference { margin: 0 0 6px; max-width: 67ch; color: #3e526a; line-height: 1.55; font-size: 0.92rem; word-break: normal; }
.career { margin: 7px 0 0; }
.career div { display: grid; grid-template-columns: 6.2em minmax(0, 1fr); gap: 0.8em; padding: 7px 0; line-height: 1.5; border-bottom: 1px solid #e2e8f0; }
.career dt { color: #2b4c7e; font-weight: 700; }
.career dd { margin: 0; }
.profile-source { margin: 12px 0 0; font-size: 0.88rem; }
.profile-source a, .footer a { color: #1d4ed8; text-underline-offset: 0.2em; }

.channel { grid-template-columns: minmax(0, 1fr) minmax(180px, auto); margin-top: 24px; }
.channel-copy p { max-width: 52ch; margin: 12px 0 17px; color: #334155; line-height: 1.75; }
.channel-copy .open { display: inline-flex; min-height: 44px; align-items: center; }
.channel-access { display: grid; justify-items: center; align-content: center; padding: 22px; max-width: 255px; background: #edf2f7; }
.channel-access .visible-url { text-align: center; }
.channel .scan-link img { width: 140px; height: 140px; }

.footer {
  border-top: 1px solid #cbd5e1;
  margin-top: 30px;
  padding-top: 14px;
  color: #475569;
  line-height: 1.65;
  font-size: 0.9rem;
  word-break: keep-all;
}

a:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }

@media (max-width: 920px) {
  .lesson-list ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .page { padding-top: calc(14px + env(safe-area-inset-top)); }
  .site-nav .nav-pill { margin-left: 0; }
  .intro { grid-template-columns: 1fr; min-height: 0; }
  .intro > img { min-height: 0; max-height: 230px; }
  .lesson-list ol { grid-template-columns: 1fr; }
  .summary { margin-bottom: 14px; }
  .course-access .scan-link img { width: 102px; height: 102px; }
  .tool-spotlight { grid-template-columns: 1fr; }
  .tool-access { flex-direction: row; justify-content: flex-start; gap: 14px; }
  .profile { grid-template-columns: 1fr; }
  .profile-image { height: clamp(140px, 44vw, 210px); }
  .channel { grid-template-columns: 1fr; }
  .channel-access { max-width: none; }
}
