:root {
  color-scheme: light;
  --lp-bg: #e4f3f4;
  --lp-surface: #ffffff;
  --lp-surface-muted: #edf4f2;
  --lp-text: #1f2933;
  --lp-muted: #667085;
  --lp-border: #d7dee8;
  --lp-accent: #0f766e;
  --lp-accent-strong: #115e59;
  --lp-progress-complete: #0d4c61;
  --lp-warn: #a16207;
  --lp-success: #0d4c61;
  --lp-danger: #b42318;
  --lp-focus: #2563eb;
  --lp-radius: 8px;
  --lp-shadow: 0 12px 30px rgba(31, 41, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  color: var(--lp-text);
  background: var(--lp-bg);
}

body {
  margin: 0;
}

a {
  color: var(--lp-accent-strong);
}

a:hover {
  color: var(--lp-accent);
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--lp-focus);
  outline-offset: 2px;
}

.lp-skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  transform: translateY(-150%);
  padding: 0.5rem 0.75rem;
  border-radius: var(--lp-radius);
  color: #ffffff;
  background: var(--lp-focus);
}

.lp-skip-link:focus {
  transform: translateY(0);
}

.lp-site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--lp-border);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.lp-site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1180px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.lp-brand {
  color: var(--lp-muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.lp-category {
  color: var(--lp-muted);
  font-size: 0.92rem;
}

.lp-shell {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 2rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.lp-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow: auto;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  background: var(--lp-surface);
  box-shadow: var(--lp-shadow);
}

.lp-sidebar__header {
  padding: 1rem;
  border-bottom: 1px solid var(--lp-border);
}

.lp-sidebar__label,
.lp-kicker,
.lp-meta {
  margin: 0 0 0.35rem;
  color: var(--lp-muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
}

.lp-sidebar h2,
.lp-progress-panel h2 {
  margin: 0;
  font-size: 1rem;
}

.lp-sidebar__home-link {
  color: var(--lp-text);
  text-decoration: none;
}

.lp-sidebar__home-link:hover {
  color: var(--lp-accent-strong);
  text-decoration: underline;
}

.lp-sidebar__progress {
  margin: 0.45rem 0 0;
  color: var(--lp-muted);
  font-size: 0.92rem;
}

.lp-sidebar__nav ol,
.lp-unit-grid,
.lp-link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-sidebar__link {
  display: grid;
  grid-template-columns: 0.8rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  padding: 0.7rem 0.85rem 0.7rem calc(0.85rem + var(--depth, 0) * 1rem);
  color: var(--lp-text);
  text-decoration: none;
  border-bottom: 1px solid #eef2f6;
}

.lp-sidebar__link:hover,
.lp-sidebar__link.is-current {
  background: var(--lp-surface-muted);
}

.lp-sidebar__link.is-current {
  font-weight: 700;
}

.lp-sidebar__logos {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-top: 1px solid var(--lp-border);
  background: #ffffff;
}

.lp-sidebar__logo {
  display: block;
  width: 80%;
  max-width: 80%;
  height: auto;
  justify-self: center;
  object-fit: contain;
}

.lp-sidebar__logo--module {
  max-height: 10rem;
  max-width: 15rem;
}

.lp-sidebar__logo--funding {
  max-height: 10rem;
  max-width: 15rem;
}

.lp-main {
  min-width: 0;
}

.lp-site-footer {
  border-top: 1px solid var(--lp-border);
  background: rgba(255, 255, 255, 0.62);
}

.lp-site-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.15rem 1.25rem;
}

.lp-site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.25rem;
  justify-content: flex-end;
  font-size: 0.92rem;
}

.lp-site-footer__nav a {
  color: var(--lp-muted);
  text-decoration: none;
}

.lp-site-footer__nav a:hover {
  color: var(--lp-accent-strong);
  text-decoration: underline;
}

.lp-page,
.lp-home {
  max-width: 820px;
}

.lp-page-header {
  margin-bottom: 1.5rem;
}

.lp-page-header h1 {
  margin: 0;
  max-width: 68ch;
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.lp-lead {
  max-width: 68ch;
  margin: 1rem 0 0;
  color: var(--lp-muted);
  font-size: 1.12rem;
}

.lp-content {
  max-width: none;
}

.lp-content h2 {
  margin-top: 2.2rem;
  font-size: 1.55rem;
}

.lp-content h3 {
  margin-top: 1.8rem;
  font-size: 1.18rem;
}

.lp-content p,
.lp-content li {
  color: #2f3a45;
}

.lp-content :not(pre) > code {
  padding: 0.1rem 0.25rem;
  border-radius: 5px;
  background: #eef2f6;
}

.lp-content .highlight {
  margin: 1.5rem 0;
  overflow: hidden;
  border: 1px solid #2a3747;
  border-radius: var(--lp-radius);
  background: #18212f;
  box-shadow: var(--lp-shadow);
}

.lp-content pre {
  overflow-x: auto;
  margin: 1.5rem 0;
  padding: 1.1rem 1.2rem;
  border-radius: var(--lp-radius);
  background: #18212f !important;
  color: #f8fafc;
  font-size: 0.92rem;
  line-height: 1.7;
  tab-size: 2;
}

.lp-content .highlight pre {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.lp-content pre code {
  display: block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-family: "Cascadia Code", "Fira Code", Consolas, "Liberation Mono", Menlo, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.lp-content .highlight code > span {
  display: block !important;
}

.lp-content .highlight code > span > span {
  white-space: inherit;
  overflow-wrap: inherit;
}

.lp-content table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  overflow-x: auto;
  font-size: 0.96rem;
}

.lp-content th,
.lp-content td {
  padding: 0.8rem 1.25rem 0.8rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--lp-border);
}

.lp-content th:last-child,
.lp-content td:last-child {
  padding-right: 0;
}

.lp-content thead th {
  color: var(--lp-text);
  font-weight: 750;
  border-bottom: 2px solid #9aa8b8;
}

.lp-content tbody tr:last-child td {
  border-bottom-color: transparent;
}

.lp-module-info,
.lp-progress-panel,
.lp-quiz,
.lp-child-pages {
  margin: 1.5rem 0;
  padding: 1.2rem;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  background: var(--lp-surface);
  box-shadow: var(--lp-shadow);
}

.lp-module-info h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.lp-module-info dl {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.lp-module-info div {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr);
  gap: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #eef2f6;
}

.lp-module-info div:first-child {
  padding-top: 0;
  border-top: 0;
}

.lp-module-info dt {
  color: var(--lp-muted);
  font-weight: 700;
}

.lp-module-info dd {
  margin: 0;
  color: var(--lp-text);
}

.lp-person-list {
  display: inline;
}

.lp-person-list__item,
.lp-person-list__separator {
  display: inline;
}

.lp-person-list a {
  overflow-wrap: anywhere;
}

.lp-progress-panel {
  display: grid;
  gap: 1rem;
}

.lp-progress-bar {
  width: 100%;
  height: 0.65rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eaf0;
}

.lp-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--lp-progress-complete);
  transition: width 180ms ease;
}

.lp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
}

.lp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--lp-accent);
  border-radius: var(--lp-radius);
  color: #ffffff;
  background: var(--lp-accent);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.lp-button:hover {
  color: #ffffff;
  background: var(--lp-accent-strong);
}

.lp-button--secondary {
  color: var(--lp-accent-strong);
  background: #ffffff;
}

.lp-button--secondary:hover {
  color: #ffffff;
}

.lp-button--quiet {
  color: var(--lp-text);
  border-color: var(--lp-border);
  background: #ffffff;
}

.lp-button--quiet:hover {
  color: var(--lp-text);
  background: #f2f5f8;
}

.lp-unit-overview h2 {
  margin-top: 0;
}

.lp-unit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.lp-unit-card a {
  display: grid;
  grid-template-columns: 0.8rem minmax(0, 1fr);
  gap: 0.6rem;
  min-height: 9rem;
  padding: 1rem;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  color: var(--lp-text);
  background: var(--lp-surface);
  text-decoration: none;
}

.lp-unit-card a:hover {
  border-color: var(--lp-accent);
}

.lp-unit-card__title,
.lp-unit-card__description,
.lp-unit-card__meta {
  grid-column: 2;
}

.lp-unit-card__title {
  font-weight: 750;
}

.lp-unit-card__description,
.lp-unit-card__meta {
  color: var(--lp-muted);
}

.lp-status-dot {
  width: 0.7rem;
  height: 0.7rem;
  margin-top: 0.42rem;
  border: 2px solid var(--lp-border);
  border-radius: 999px;
  background: #ffffff;
}

[data-progress-state="started"] .lp-status-dot,
.lp-sidebar__link[data-progress-state="started"] .lp-status-dot {
  border-color: var(--lp-accent);
  background: #eba100;
}

[data-progress-state="completed"] .lp-status-dot,
.lp-sidebar__link[data-progress-state="completed"] .lp-status-dot {
  border-color: var(--lp-success);
  background: var(--lp-success);
}

.lp-question {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
}

.lp-question legend {
  padding: 0 0.35rem;
  font-weight: 750;
}

.lp-question label {
  display: block;
  margin: 0.7rem 0;
}

.lp-question input {
  margin-right: 0.5rem;
}

.lp-question__feedback,
.lp-quiz__result {
  min-height: 1.5rem;
  margin: 0.75rem 0 0;
  color: var(--lp-muted);
  font-weight: 700;
}

.lp-question.is-correct {
  border-color: #9fd5b4;
  background: #f0fdf4;
}

.lp-question.is-incorrect {
  border-color: #f6aaa5;
  background: #fff5f5;
}

.lp-quiz__result.is-success {
  color: var(--lp-success);
}

.lp-quiz__result.is-error {
  color: var(--lp-danger);
}

.lp-prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.lp-prev-next__item {
  display: block;
  padding: 1rem;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  background: var(--lp-surface);
  text-decoration: none;
}

.lp-prev-next__item span {
  display: block;
  color: var(--lp-muted);
  font-size: 0.88rem;
}

.lp-prev-next__item--next {
  text-align: right;
}

.lp-callout {
  margin: 1.4rem 0;
  padding: 1rem;
  border-left: 4px solid var(--lp-accent);
  border-radius: var(--lp-radius);
  background: var(--lp-surface-muted);
}

.lp-callout--task {
  border-left-color: var(--lp-warn);
  background: #fff8e8;
}

@media (max-width: 860px) {
  .lp-shell {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .lp-sidebar {
    position: static;
    max-height: none;
  }

  .lp-page-header h1 {
    max-width: none;
    font-size: 2.2rem;
  }

  .lp-prev-next {
    grid-template-columns: 1fr;
  }

  .lp-prev-next__item--next {
    text-align: left;
  }

  .lp-site-footer__nav {
    justify-content: flex-start;
  }

  .lp-module-info div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
