:root {
  --ink: #191a18;
  --paper: #f4f8f3;
  --card: #fff;
  --green: #246844;
  --muted: #70746d;
  --line: #d7dbd5;
  --red: #8d2d25;
}

* { box-sizing: border-box; }

html {
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body > main { flex: 1; }
button { font: inherit; }
a { color: inherit; }

.login-screen {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.login-wrap {
  width: min(100%, 450px);
  text-align: center;
}

.learn-mark {
  display: block;
  width: 94px;
  height: auto;
  margin: 0 auto 16px;
}

.login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 32px 30px 36px;
  box-shadow: 0 3px 9px rgba(20, 30, 22, 0.1);
}

.login-card h1 {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.25;
}

.login-description {
  max-width: 330px;
  margin: 0 auto 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.login-card form { margin: 0; }

.google-button {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid #c9ccc7;
  border-radius: 4px;
  background: #fff;
  color: #171817;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 1px rgba(20, 30, 22, 0.06);
}

.google-button:hover {
  border-color: #969b94;
  background: #fafbf9;
}

.google-button:focus-visible {
  outline: 3px solid rgba(36, 104, 68, 0.25);
  outline-offset: 2px;
}

.google-mark { width: 22px; height: 22px; flex: 0 0 auto; }

.legal-links {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.legal-links a:hover { color: var(--green); }

.legal-page {
  min-height: calc(100vh - 48px);
  padding: 64px 24px 90px;
}

.legal-document {
  width: min(100%, 720px);
  margin: 0 auto;
}

.legal-back {
  display: inline-block;
  margin-bottom: 60px;
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.legal-back:hover { text-decoration: underline; }

.legal-kicker {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legal-document h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 72px);
  letter-spacing: -0.055em;
  line-height: 1;
}

.legal-updated {
  margin: 18px 0 56px;
  color: var(--muted);
  font-size: 13px;
}

.legal-document section {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.legal-document h2 {
  margin: 0 0 12px;
  font-size: 19px;
}

.legal-document section p {
  margin: 0;
  color: #4f534d;
  font-size: 16px;
  line-height: 1.7;
}

.legal-document section a { color: var(--green); }

.flash {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 10;
  transform: translateX(-50%);
  padding: 11px 16px;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}

.flash-notice { background: var(--green); }
.flash-alert { background: var(--red); }

.dashboard-shell {
  min-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  padding: 0 clamp(22px, 5vw, 72px) 72px;
}

.site-nav {
  min-height: 88px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand small {
  margin-left: 3px;
  color: #718078;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

.nav-leading {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 38px);
}

.sign-out-button {
  border: 0;
  background: transparent;
  text-decoration: underline;
  cursor: pointer;
  font-size: 13px;
}

.course-grid {
  width: 100%;
  max-width: 1060px;
  margin: auto;
  padding: 72px 0;
}

.course-card {
  position: relative;
  min-height: 330px;
  display: grid;
  grid-template-columns: minmax(220px, 38%) 1fr;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 12px 38px rgba(38, 55, 44, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.course-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 46px rgba(38, 55, 44, 0.13);
}

.course-card:focus-visible {
  outline: 3px solid rgba(66, 122, 244, 0.35);
  outline-offset: 4px;
}

.course-card-logo {
  display: grid;
  place-items: center;
  padding: 54px;
  background: #d9ecff;
}

.course-card-logo img {
  width: min(100%, 210px);
  height: auto;
}

.course-card-body {
  align-self: center;
  padding: 48px clamp(34px, 5vw, 68px);
}

.course-label,
.course-kicker {
  margin: 0 0 12px;
  color: #3468d6;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.course-card h1 {
  margin: 0;
  font-size: clamp(31px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.course-description {
  max-width: 570px;
  margin: 20px 0 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.course-card-arrow {
  position: absolute;
  right: 24px;
  bottom: 20px;
  color: #427af4;
  font-size: 27px;
}

.enrollment-summary {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #555d67;
  cursor: help;
  font-size: 13px;
  font-weight: 700;
}

.avatar-stack {
  display: flex;
  padding-left: 7px;
}

.enrollment-avatar {
  width: 31px;
  height: 31px;
  margin-left: -7px;
  border: 2px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  background: #dce4ee;
}

.avatar-fallback,
.enrollment-overflow {
  display: grid;
  place-items: center;
  color: #fff;
  background: #315a80;
  font-size: 11px;
  font-weight: 800;
}

.enrollment-overflow { background: #1d3450; }

.course-page {
  min-height: calc(100vh - 48px);
  background: #cfe7ff;
}

.course-nav {
  width: min(calc(100% - 48px), 1080px);
  margin: 0 auto;
  border-color: rgba(33, 77, 121, 0.18);
}

.back-link {
  color: #244e7b;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover { text-decoration: underline; }

.course-hero {
  width: min(calc(100% - 48px), 1080px);
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  padding: 72px 0 90px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: center;
  gap: clamp(50px, 9vw, 130px);
}

.course-hero-copy h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.course-hero-copy h1 span {
  display: inline;
  padding: 5px 12px 8px;
  color: #fff;
  background: #427af4;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.course-hero-copy > p:not(.course-kicker) {
  max-width: 610px;
  margin: 28px 0;
  color: #24466a;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.65;
}

.course-hero .enrollment-summary { margin: 0 0 32px; color: #24466a; }
.course-hero .enrollment-avatar { border-color: #cfe7ff; }

.course-hero-logo {
  width: min(100%, 340px);
  justify-self: center;
}

.course-hero-copy form { display: inline; }

.enroll-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid #1d56ca;
  border-radius: 5px;
  background: #fff;
  color: #1d56ca;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(27, 67, 112, 0.1);
}

.enroll-button:hover { background: #f7fbff; }
.enroll-button:focus-visible { outline: 3px solid rgba(29, 86, 202, 0.3); outline-offset: 3px; }

.learning-page {
  min-height: calc(100vh - 48px);
  padding-bottom: 64px;
  background: #f5f8fc;
}

.learning-topbar {
  width: min(calc(100% - 48px), 1440px);
  margin: 0 auto;
}

.learning-workspace {
  width: min(calc(100% - 48px), 1440px);
  margin: 32px auto 0;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  align-items: start;
  gap: clamp(36px, 5vw, 76px);
}

.course-sidebar {
  max-height: calc(100vh - 145px);
  position: sticky;
  top: 24px;
  overflow-y: auto;
  border: 1px solid #d9e1e9;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(34, 70, 108, 0.06);
}

.course-sidebar-heading {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 13px;
  background: #cfe7ff;
}

.course-sidebar-logo { width: 42px; height: 42px; flex: 0 0 auto; }

.course-sidebar-heading p {
  margin: 0;
  color: #315a80;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.course-sidebar-heading h2 {
  margin: 3px 0 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.course-welcome-link {
  min-height: 48px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #e2e7ec;
  color: #3d4954;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.course-welcome-link:hover,
.course-welcome-link.active { color: #1d56ca; background: #f1f6ff; }

.domain-tree { padding: 8px 0 14px; }
.domain-tree details { border-bottom: 1px solid #edf0f3; }
.domain-tree details:last-child { border-bottom: 0; }

.domain-tree summary {
  padding: 14px 17px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #27323b;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.domain-tree summary::-webkit-details-marker { display: none; }

.domain-tree summary small {
  display: block;
  margin-bottom: 3px;
  color: #427af4;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.tree-folder {
  width: 15px;
  height: 11px;
  margin-top: 4px;
  position: relative;
  flex: 0 0 auto;
  border-radius: 2px;
  background: #8aa6c2;
}

.tree-folder::before {
  content: "";
  width: 7px;
  height: 3px;
  position: absolute;
  top: -3px;
  left: 1px;
  border-radius: 2px 2px 0 0;
  background: #8aa6c2;
}

.domain-tree ul { margin: 0; padding: 0 0 9px; list-style: none; }

.domain-tree li a {
  min-height: 36px;
  padding: 6px 14px 6px 30px;
  display: grid;
  grid-template-columns: 13px 1fr 8px;
  align-items: start;
  gap: 7px;
  color: #67717a;
  font-size: 11px;
  line-height: 1.35;
  text-decoration: none;
}

.domain-tree li a:hover,
.domain-tree li a.active { color: #1d56ca; background: #f1f6ff; }

.tree-branch {
  width: 11px;
  height: 9px;
  border-bottom: 1px solid #c5ced7;
  border-left: 1px solid #c5ced7;
}

.video-dot {
  width: 7px;
  height: 7px;
  margin-top: 3px;
  border-radius: 50%;
  background: #427af4;
}

.lesson-content { min-width: 0; padding: 42px 0 80px; }

.welcome-content { max-width: 800px; }

.welcome-content h1 {
  margin: 0;
  font-size: clamp(48px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.welcome-lead {
  max-width: 670px;
  margin: 28px 0 36px;
  color: #66717b;
  font-size: 18px;
  line-height: 1.65;
}

.welcome-stats {
  max-width: 680px;
  margin-bottom: 38px;
  padding: 23px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #d7dfe7;
  border-bottom: 1px solid #d7dfe7;
}

.welcome-stats div { display: flex; flex-direction: column; gap: 4px; }
.welcome-stats strong { font-size: 25px; }
.welcome-stats span { color: #75808a; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }

.start-course-link {
  display: inline-block;
  color: #1d56ca;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.start-course-link:hover { text-decoration: underline; }

.curriculum-source { margin: 22px 0 0; color: #87919a; font-size: 11px; }
.curriculum-source a { color: #5c7186; }

.competency-content { max-width: 940px; }

.competency-domain {
  margin: 0 0 9px;
  color: #427af4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.competency-content > h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(34px, 4.4vw, 55px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.competency-title {
  max-width: 760px;
  margin: 38px 0 24px;
  padding-top: 22px;
  border-top: 1px solid #d8e0e8;
}

.competency-title p {
  margin: 0 0 7px;
  color: #75808a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.competency-title h2 { max-width: 700px; margin: 0; font-size: clamp(20px, 2.6vw, 29px); line-height: 1.25; }

.compact-video {
  width: clamp(320px, 30vw, 430px);
  max-width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #101820;
  box-shadow: 0 8px 26px rgba(16, 36, 54, 0.14);
}

.compact-video iframe { width: 100%; height: 100%; border: 0; }

.lesson-coming-soon {
  width: clamp(320px, 30vw, 430px);
  max-width: 100%;
  min-height: 145px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 17px;
  border: 1px dashed #bec9d4;
  border-radius: 8px;
  color: #5e6973;
  background: #fff;
}

.lesson-coming-soon > span { color: #91a2b3; }
.lesson-coming-soon strong { color: #303b44; }
.lesson-coming-soon p { margin: 5px 0 0; font-size: 12px; }

@media (max-width: 940px) {
  .learning-workspace { grid-template-columns: 285px minmax(0, 1fr); gap: 30px; }
}

.enrolled-page {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
  padding: 30px 20px;
  background: #f1f7ff;
}

.enrolled-card {
  width: min(100%, 500px);
  padding: 56px 40px;
  border: 1px solid #d5dfeb;
  border-radius: 14px;
  background: #fff;
  text-align: center;
  box-shadow: 0 12px 34px rgba(34, 70, 108, 0.09);
}

.enrolled-logo { width: 105px; height: auto; margin-bottom: 25px; }

.enrolled-card h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 62px);
  letter-spacing: -0.05em;
}

.enrolled-card > p:not(.course-kicker) {
  margin: 15px 0 30px;
  color: var(--muted);
  line-height: 1.6;
}

.site-footer {
  min-height: 48px;
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  color: #7a817b;
  background: #fff;
  font-size: 10px;
  letter-spacing: 0.04em;
}

@media (max-width: 560px) {
  .login-card { padding: 28px 22px 30px; }
  .dashboard-shell { padding: 0 20px; }
  .site-nav { min-height: 72px; }
  .brand small { display: block; margin: 2px 0 0; }
  .nav-leading { gap: 15px; }
  .course-grid { padding: 38px 0; }
  .course-card { grid-template-columns: 1fr; }
  .course-card-logo { padding: 40px; }
  .course-card-logo img { width: 145px; }
  .course-card-body { padding: 32px 25px 45px; }
  .course-nav { width: calc(100% - 40px); }
  .course-hero { width: calc(100% - 40px); min-height: auto; padding: 45px 0 70px; grid-template-columns: 1fr; }
  .course-hero-logo { width: 190px; grid-row: 1; }
  .learning-page { padding-bottom: 60px; }
  .learning-topbar { width: calc(100% - 40px); }
  .learning-workspace { width: calc(100% - 40px); margin-top: 24px; grid-template-columns: 1fr; }
  .course-sidebar { max-height: 62vh; position: static; }
  .lesson-content { padding-top: 20px; }
  .welcome-content h1 { font-size: 48px; }
  .welcome-stats { gap: 12px; }
  .compact-video, .lesson-coming-soon { width: 100%; }
  .enrolled-card { padding: 46px 25px; }
  .site-footer { min-height: 56px; flex-direction: column; justify-content: center; gap: 4px; }
}
