/**
 * LearnPath — base styles.
 * Themes (css/themes/*.css) only set the --lp-* custom properties below,
 * plus small optional overrides. Everything is scoped to .lp so it never
 * leaks into the site template.
 */

.lp {
  --lp-accent: #0d7a7e;
  --lp-accent-ink: #ffffff;
  --lp-bg: transparent;
  --lp-surface: #ffffff;
  --lp-surface-2: #f3f6f6;
  --lp-text: #1c2b2c;
  --lp-muted: #5c6d6e;
  --lp-border: rgba(17, 66, 69, 0.14);
  --lp-success: #1a7a52;
  --lp-radius: 14px;
  --lp-shadow: 0 1px 2px rgba(16, 40, 42, 0.05), 0 10px 28px -16px rgba(16, 40, 42, 0.22);
  --lp-font: inherit;
  --lp-heading-font: inherit;
  --lp-gap: clamp(16px, 2.4vw, 28px);

  --lp-accent-soft: color-mix(in srgb, var(--lp-accent) 11%, transparent);
  --lp-accent-line: color-mix(in srgb, var(--lp-accent) 35%, transparent);
  --lp-radius-sm: calc(var(--lp-radius) * 0.6);

  background: var(--lp-bg);
  color: var(--lp-text);
  font-family: var(--lp-font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

.lp svg { width: 1em; height: 1em; display: block; flex: none; }
.lp a { color: inherit; }
.lp p { margin: 0; }
.lp [hidden] { display: none !important; }

.lp h1, .lp h2, .lp h3 {
  font-family: var(--lp-heading-font);
  color: var(--lp-text);
  margin: 0;
  line-height: 1.2;
}

/* ── Shared bits ─────────────────────────────────────────── */

.lp-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lp-accent);
  display: flex;
  gap: 0.5em;
  align-items: center;
  flex-wrap: wrap;
}

.lp-label {
  font-weight: 700;
  color: var(--lp-text);
  margin-right: 0.35em;
}

.lp-page-title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: var(--lp-gap) !important; }

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0.55em 1.15em;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-sm);
  background: var(--lp-surface);
  color: var(--lp-text) !important;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
  max-width: 100%;
}

.lp-btn > span:not([aria-hidden]) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-btn:hover { border-color: var(--lp-accent-line); background: var(--lp-accent-soft); }
.lp-btn:focus-visible, .lp-tab:focus-visible, .lp-lesson a:focus-visible { outline: 3px solid var(--lp-accent-line); outline-offset: 2px; }

.lp-btn--primary {
  background: var(--lp-accent);
  border-color: var(--lp-accent);
  color: var(--lp-accent-ink) !important;
}

.lp-btn--primary:hover { background: color-mix(in srgb, var(--lp-accent) 86%, #000); border-color: transparent; }
.lp-btn--small { min-height: 36px; padding: 0.35em 0.9em; font-size: 0.85rem; }

.lp-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.7em;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--lp-surface-2);
  color: var(--lp-muted);
}

.lp-empty,
.lp-notice {
  padding: 1.1rem 1.25rem;
  border: 1px dashed var(--lp-border);
  border-radius: var(--lp-radius);
  color: var(--lp-muted);
  background: var(--lp-surface);
}

.lp-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  border-style: solid;
  margin-bottom: var(--lp-gap);
  color: var(--lp-text);
}

.lp-notice--lock { border-color: var(--lp-accent-line); background: var(--lp-accent-soft); }

/* ── Progress bar ────────────────────────────────────────── */

.lp-progress { margin-top: 1.25rem; max-width: 560px; }

.lp-progress__track {
  height: 8px;
  border-radius: 999px;
  background: var(--lp-surface-2);
  overflow: hidden;
}

.lp-progress__bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--lp-accent);
  transition: width 0.6s ease;
}

.lp-progress__text {
  margin-top: 0.45rem !important;
  font-size: 0.85rem;
  color: var(--lp-muted);
  display: flex;
  gap: 0.6em;
}

.lp-progress__text strong { color: var(--lp-text); }

.lp-progress--compact {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  flex: 1 1 120px;
  min-width: 0;
}

.lp-progress--compact .lp-progress__track { flex: 1; height: 6px; }
.lp-progress--compact .lp-progress__text { margin: 0 !important; font-weight: 700; color: var(--lp-text); font-variant-numeric: tabular-nums; }

/* ── Hero ────────────────────────────────────────────────── */

.lp-hero { margin-bottom: var(--lp-gap); }
.lp-hero__title { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin: 0.35rem 0 0.4rem !important; letter-spacing: -0.01em; }
.lp-hero__stats { color: var(--lp-muted); font-weight: 600; display: flex; gap: 0.5em; flex-wrap: wrap; }
.lp-hero__desc { margin-top: 1rem; max-width: 72ch; color: var(--lp-text); }
.lp-hero__desc > :last-child { margin-bottom: 0; }
.lp-hero__people { margin-top: 0.75rem !important; color: var(--lp-muted); }
.lp-hero--compact .lp-hero__title { margin-top: 0 !important; }

/* ── Course layout ───────────────────────────────────────── */

.lp-layout {
  display: grid;
  gap: var(--lp-gap);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.lp-stage { order: 1; min-width: 0; }
.lp-outline { order: 2; min-width: 0; }

@media (min-width: 900px) {
  .lp-layout { grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); }
  .lp-stage { order: 2; }
  .lp-outline { order: 1; position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
}

.lp-outline {
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  padding: 0.75rem;
  box-shadow: var(--lp-shadow);
}

.lp-outline__title {
  font-size: 0.75rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lp-muted) !important;
  padding: 0.6rem 0.6rem 0.4rem;
}

.lp-lessons,
.lp-resources { list-style: none; margin: 0 0 0.5rem; padding: 0; }

.lp-lesson a,
.lp-resource a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.55rem 0.6rem;
  border-radius: var(--lp-radius-sm);
  text-decoration: none !important;
  color: var(--lp-text);
  font-size: 0.92rem;
  transition: background-color 0.15s;
}

.lp-lesson a:hover,
.lp-resource a:hover { background: var(--lp-surface-2); }

.lp-lesson.is-active a {
  background: var(--lp-accent-soft);
  box-shadow: inset 3px 0 0 var(--lp-accent);
  font-weight: 600;
}

.lp-lesson__num {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border: 1.5px solid var(--lp-border);
  color: var(--lp-muted);
  background: var(--lp-surface);
}

.lp-lesson.is-extra .lp-lesson__num { border-style: dashed; }
.lp-lesson.is-active .lp-lesson__num { border-color: var(--lp-accent); color: var(--lp-accent); }

.lp-lesson__check {
  position: absolute;
  inset: -1.5px;
  border-radius: 50%;
  display: none;
  place-items: center;
  background: var(--lp-success);
  color: #fff;
  font-size: 15px;
}

.lp-lesson.is-done .lp-lesson__check { display: grid; }
.lp-lesson__title { overflow-wrap: anywhere; }
.lp-lesson__time { font-size: 0.78rem; color: var(--lp-muted); font-variant-numeric: tabular-nums; }

.lp-resource a { grid-template-columns: auto minmax(0, 1fr); }
.lp-resource__icon { color: var(--lp-accent); font-size: 1.1rem; }
.lp-resource.is-done .lp-resource__icon { color: var(--lp-success); }

/* ── Stage ───────────────────────────────────────────────── */

.lp-stage__head { margin-bottom: 1rem; }
.lp-stage__title { font-size: clamp(1.3rem, 2.4vw, 1.75rem); margin-top: 0.3rem !important; }
.lp-stage__desc { margin-top: 1.25rem; max-width: 72ch; }
.lp-stage__desc > :last-child { margin-bottom: 0; }

.lp-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.lp-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 42px;
  padding: 0.45em 1em;
  border: 1px solid var(--lp-border);
  border-radius: 999px;
  background: var(--lp-surface);
  color: var(--lp-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.lp-tab:hover { color: var(--lp-text); border-color: var(--lp-accent-line); }

.lp-tab[aria-selected="true"] {
  background: var(--lp-accent);
  border-color: var(--lp-accent);
  color: var(--lp-accent-ink);
}

.lp-tab__icon { font-size: 1rem; }
.lp-tab__check { display: none; font-size: 1rem; }
.lp-tab.is-done .lp-tab__check { display: block; }

.lp-media {
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  box-shadow: var(--lp-shadow);
  overflow: hidden;
}

.lp-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0b1213;
}

.lp-frame iframe,
.lp-frame video,
.lp-frame__host,
.lp-frame__host iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.lp-frame--doc { aspect-ratio: auto; height: min(78vh, 900px); background: var(--lp-surface-2); }

.lp-audio {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: clamp(16px, 3vw, 28px);
  background: linear-gradient(135deg, var(--lp-accent-soft), transparent 70%);
}

.lp-audio__art {
  width: 64px;
  height: 64px;
  border-radius: var(--lp-radius-sm);
  display: grid;
  place-items: center;
  background: var(--lp-accent);
  color: var(--lp-accent-ink);
  font-size: 28px;
  flex: none;
}

.lp-audio__body { flex: 1; min-width: 0; }
.lp-audio__title { font-weight: 700; margin-bottom: 0.5rem !important; }
.lp-audio audio { width: 100%; display: block; }

.lp-doclink { padding: 1.5rem; font-weight: 600; }

.lp-media__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.9rem;
  border-top: 1px solid var(--lp-border);
  min-height: 52px;
}

.lp-media__status {
  font-size: 0.85rem;
  color: var(--lp-muted);
  display: flex;
  gap: 0.6em;
  align-items: center;
  flex-wrap: wrap;
}

.lp-media__status.is-done { color: var(--lp-success); font-weight: 600; }

.lp-linkbtn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--lp-accent);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.lp-locked {
  align-content: center;
  display: grid;
  place-items: center;
  gap: 0.75rem;
  text-align: center;
  aspect-ratio: 16 / 9;
  border-radius: var(--lp-radius);
  background: var(--lp-surface-2);
  border: 1px solid var(--lp-border);
  color: var(--lp-muted);
  padding: 1.5rem;
}

.lp-locked__icon { font-size: 2.2rem; color: var(--lp-accent); }

.lp-pager {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: var(--lp-gap);
  flex-wrap: wrap;
}

.lp-pager__next { margin-left: auto; }
.lp-pager .lp-btn { max-width: min(100%, 360px); }

/* ── Course list ─────────────────────────────────────────── */

.lp-group + .lp-group { margin-top: calc(var(--lp-gap) * 1.6); }
.lp-group__title { font-size: 1.3rem; margin-bottom: 1rem !important; padding-bottom: 0.5rem; border-bottom: 2px solid var(--lp-accent-line); }

.lp-grid { display: grid; gap: var(--lp-gap); grid-template-columns: minmax(0, 1fr); }

@media (min-width: 640px) {
  .lp-grid--2, .lp-grid--3, .lp-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .lp-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lp-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.lp-card {
  display: flex;
  flex-direction: column;
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  box-shadow: var(--lp-shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.lp-card:hover { transform: translateY(-2px); }

.lp-card__media { display: block; aspect-ratio: 16 / 9; background: var(--lp-surface-2); overflow: hidden; }
.lp-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lp-card__body { display: flex; flex-direction: column; gap: 0.45rem; padding: 1.1rem 1.15rem 1.15rem; flex: 1; }
.lp-card__title { font-size: 1.12rem; }
.lp-card__title a { text-decoration: none; }
.lp-card__title a:hover { color: var(--lp-accent); }
.lp-card__meta, .lp-card__people { font-size: 0.86rem; color: var(--lp-muted); display: flex; gap: 0.45em; flex-wrap: wrap; }

.lp-card__foot {
  margin-top: auto;
  padding-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.lp-card__foot .lp-chip, .lp-card__foot .lp-progress { margin-right: auto; }
.lp-card.is-locked .lp-card__media img { filter: grayscale(0.6); opacity: 0.8; }

/* ── Dashboard ───────────────────────────────────────────── */

.lp-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }

.lp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem 1.5rem;
  align-items: center;
  padding: 1rem 1.15rem;
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  box-shadow: var(--lp-shadow);
}

@media (min-width: 760px) {
  .lp-row { grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) auto; }
}

.lp-row__title { font-size: 1.1rem; margin-top: 0.15rem !important; }
.lp-row__title a { text-decoration: none; }
.lp-row__title a:hover { color: var(--lp-accent); }
.lp-row__meta { font-size: 0.85rem; color: var(--lp-muted); margin-top: 0.2rem !important; display: flex; gap: 0.45em; flex-wrap: wrap; }
.lp-row.is-done .lp-progress__bar { background: var(--lp-success); }

/* ── Media bar: actions + saving equaliser ───────────────── */

.lp-media__actions { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
.lp-stage__people { margin-top: 0.5rem !important; color: var(--lp-muted); font-size: 0.92rem; }

.lp {
  --lp-saving: #d62828;
}

.lp-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
  padding: 0 2px;
  color: var(--lp-accent);
  transition: color 0.35s ease;
}

.lp-eq i {
  display: block;
  width: 4px;
  border-radius: 2px;
  background: currentColor;
  transform-origin: bottom;
}

.lp-eq i:nth-child(1) { height: 7px; }
.lp-eq i:nth-child(2) { height: 11px; }
.lp-eq i:nth-child(3) { height: 18px; }
.lp-eq i:nth-child(4) { height: 15px; }
.lp-eq i:nth-child(5) { height: 8px; }

.lp-eq.is-playing i { animation: lp-eq 0.9s ease-in-out infinite; }
.lp-eq.is-playing i:nth-child(2) { animation-delay: -0.55s; }
.lp-eq.is-playing i:nth-child(3) { animation-delay: -0.25s; }
.lp-eq.is-playing i:nth-child(4) { animation-delay: -0.7s; }
.lp-eq.is-playing i:nth-child(5) { animation-delay: -0.4s; }

.lp-eq.is-saving,
.lp-eq.is-error { color: var(--lp-saving); }
.lp-eq.is-error i { animation: lp-eq-blink 1.2s ease-in-out infinite; }

@keyframes lp-eq {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}

@keyframes lp-eq-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ── Document viewer (lightbox) ──────────────────────────── */

html.lp-noscroll { overflow: hidden; }

.lp-lightbox {
  width: min(1100px, calc(100vw - 24px));
  height: min(92vh, 1000px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  background: var(--lp-surface);
  color: var(--lp-text);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.lp-lightbox[open] { display: flex; flex-direction: column; }
.lp-lightbox::backdrop { background: rgba(8, 14, 16, 0.72); }

.lp-lightbox__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.6rem 0.6rem 1.1rem;
  border-bottom: 1px solid var(--lp-border);
}

.lp-lightbox__title {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-lightbox__close {
  appearance: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--lp-radius-sm);
  background: transparent;
  color: var(--lp-text);
  font-size: 22px;
  cursor: pointer;
}

.lp-lightbox__close:hover { background: var(--lp-surface-2); }
.lp-lightbox__body { flex: 1; min-height: 0; background: var(--lp-surface-2); }
.lp-lightbox__body iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (prefers-reduced-motion: reduce) {
  .lp-eq.is-playing i, .lp-eq.is-error i { animation: none; }
}

/* ── Course list: stat tiles + filters ───────────────────── */

.lp-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 20px);
  margin-bottom: var(--lp-gap);
}

.lp-stat {
  padding: clamp(14px, 2vw, 22px);
  border: 1px solid var(--lp-accent-line);
  border-radius: calc(var(--lp-radius) * 1.3);
  background: var(--lp-accent-soft);
}

.lp-stat strong {
  display: block;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.1;
  font-weight: 800;
  color: var(--lp-text);
  font-variant-numeric: tabular-nums;
}

.lp-stat span { display: block; margin-top: 0.3rem; color: var(--lp-muted); font-size: 0.92rem; letter-spacing: 0.02em; }

.lp-filters {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: var(--lp-gap);
}

.lp-filter { position: relative; }
.lp-filter--end { margin-left: auto; }

.lp-filter__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 44px;
  padding: 0.45em 1.1em;
  border: 1px solid var(--lp-accent-line);
  border-radius: 999px;
  background: var(--lp-accent-soft);
  color: var(--lp-text);
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

.lp-filter__btn svg { font-size: 1.15rem; color: var(--lp-accent); }
.lp-filter__btn:hover, .lp-filter__btn.is-active { border-color: var(--lp-accent); }
.lp-filter__btn:focus-visible, .lp-filter__option:focus-visible { outline: 3px solid var(--lp-accent-line); outline-offset: 2px; }

.lp-filter__menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  min-width: 230px;
  padding: 0.4rem;
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  box-shadow: 0 18px 40px -16px rgba(16, 40, 42, 0.35);
}

.lp-filter--end .lp-filter__menu { left: auto; right: 0; }

.lp-filter__option {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 0;
  border-radius: var(--lp-radius-sm);
  background: transparent;
  color: var(--lp-text);
  font: inherit;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}

.lp-filter__option:hover { background: var(--lp-surface-2); }
.lp-filter__option[aria-checked="true"] { background: var(--lp-accent-soft); color: var(--lp-accent); font-weight: 700; }
.lp-filter__check { width: 1em; visibility: hidden; }
.lp-filter__option[aria-checked="true"] .lp-filter__check { visibility: visible; }

.lp-card[hidden], .lp-group[hidden] { display: none !important; }
.lp-card__body > .lp-chip { align-self: flex-start; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.72rem; font-weight: 700; }
.lp-chip--inprogress { background: var(--lp-accent-soft); color: var(--lp-accent); }
.lp-chip--done { background: color-mix(in srgb, var(--lp-success) 14%, transparent); color: var(--lp-success); }

/* ── Course details: show more ───────────────────────────── */

.lp-more { margin-top: 1rem; max-width: 72ch; }
.lp-more > summary { list-style: none; width: max-content; }
.lp-more > summary::-webkit-details-marker { display: none; }
.lp-more > summary svg { transition: transform 0.2s; }
.lp-more[open] > summary svg { transform: rotate(180deg); }
.lp-more__close, .lp-more[open] .lp-more__open { display: none; }
.lp-more[open] .lp-more__close { display: inline; }
.lp-more__body { margin-top: 1rem; padding: 1rem 1.25rem; border-left: 3px solid var(--lp-accent-line); background: var(--lp-surface); border-radius: 0 var(--lp-radius-sm) var(--lp-radius-sm) 0; }
.lp-more__body > :last-child { margin-bottom: 0; }

@media (max-width: 520px) {
  .lp-stats { grid-template-columns: 1fr 1fr; }
  .lp-stat:last-child { grid-column: 1 / -1; }
}

/* ── Modules ─────────────────────────────────────────────── */

.lp-module { --lp-gap: 14px; }
.lp-modcard {
  display: grid;
  gap: 0.6rem;
  padding: 1rem 1.1rem;
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  box-shadow: var(--lp-shadow);
}
.lp-modcard > .lp-btn { justify-self: start; }
.lp-modcard__title { font-size: 1.1rem !important; }
.lp-modcard__text { color: var(--lp-muted); font-size: 0.92rem; }
.lp-modcard .lp-progress { margin: 0; max-width: none; }

.lp-stats--mini { gap: 8px; margin-bottom: 12px; }
.lp-stats--mini .lp-stat { padding: 10px 12px; border-radius: var(--lp-radius); }
.lp-stats--mini .lp-stat strong { font-size: 1.35rem; }
.lp-stats--mini .lp-stat span { font-size: 0.72rem; letter-spacing: 0; }
.lp-stat span { overflow-wrap: normal; word-break: normal; hyphens: none; }

.lp-modlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lp-modlist__item { display: grid; gap: 4px; padding: 10px 12px; background: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: var(--lp-radius-sm); }
.lp-modlist__title { font-weight: 600; text-decoration: none; color: var(--lp-text); }
.lp-modlist__title:hover { color: var(--lp-accent); }
.lp-modlist__more { margin-top: 10px !important; font-size: 0.88rem; }
.lp-modlist__more a { color: var(--lp-accent); font-weight: 600; text-decoration: none; }

.lp-card--row { flex-direction: row; }
.lp-card--row .lp-card__media { flex: 0 0 34%; aspect-ratio: auto; min-height: 100%; }
.lp-card--row .lp-card__body { padding: 0.8rem 1rem; }
.lp-card__intro { font-size: 0.88rem; color: var(--lp-muted); }

@media (max-width: 520px) {
  .lp-card--row { flex-direction: column; }
}

/* ── Accordion menu module ───────────────────────────────── */

.lp-acc { display: grid; gap: 8px; }
.lp-acc__level {
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  overflow: hidden;
}
.lp-acc__level[open] { box-shadow: var(--lp-shadow); }
.lp-acc__summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--lp-text);
  user-select: none;
}
.lp-acc__summary::-webkit-details-marker { display: none; }
.lp-acc__summary:hover { background: var(--lp-surface-2); }
.lp-acc__summary:focus-visible, .lp-acc__toggle:focus-visible, .lp-acc a:focus-visible { outline: 3px solid var(--lp-accent-line); outline-offset: -3px; }
.lp-acc__chev { color: var(--lp-accent); font-size: 1rem; transition: transform 0.2s ease; display: inline-flex; }
.lp-acc__level[open] > .lp-acc__summary .lp-acc__chev { transform: rotate(90deg); }
.lp-acc__label { flex: 1; min-width: 0; }
.lp-acc__count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lp-muted);
  background: var(--lp-surface-2);
  border-radius: 999px;
  padding: 0.1em 0.6em;
  font-variant-numeric: tabular-nums;
}
.lp-acc__level.is-active > .lp-acc__summary { color: var(--lp-accent); }

.lp-acc__courses { list-style: none; margin: 0; padding: 0 0 0.35rem; border-top: 1px solid var(--lp-border); }
.lp-acc__course + .lp-acc__course { border-top: 1px solid color-mix(in srgb, var(--lp-border) 60%, transparent); }
.lp-acc__row { display: flex; align-items: stretch; }
.lp-acc__link {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.45rem 0.4rem 0.45rem 1rem;
  color: var(--lp-text) !important;
  text-decoration: none !important;
  font-size: 0.93rem;
}
.lp-acc__link:hover { color: var(--lp-accent) !important; }
.lp-acc__title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lp-acc__course.is-active > .lp-acc__row { background: var(--lp-accent-soft); box-shadow: inset 3px 0 0 var(--lp-accent); }
.lp-acc__course.is-active > .lp-acc__row .lp-acc__link { font-weight: 700; }
.lp-acc__course.is-locked .lp-acc__link { color: var(--lp-muted) !important; }
.lp-acc__pct { font-size: 0.75rem; font-weight: 700; color: var(--lp-accent); font-variant-numeric: tabular-nums; }
.lp-acc__course.is-done .lp-acc__pct { color: var(--lp-success); font-size: 0.95rem; }
.lp-acc__lock { color: var(--lp-muted); font-size: 0.95rem; }
.lp-acc__toggle {
  appearance: none;
  flex: none;
  width: 44px;
  border: 0;
  background: transparent;
  color: var(--lp-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1rem;
}
.lp-acc__toggle svg { transition: transform 0.2s ease; }
.lp-acc__toggle[aria-expanded="true"] svg { transform: rotate(90deg); color: var(--lp-accent); }
.lp-acc__toggle:hover { color: var(--lp-accent); }

.lp-acc__lessons { list-style: none; margin: 0; padding: 0.2rem 0.5rem 0.5rem 1.4rem; }
.lp-acc__lesson a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 36px;
  padding: 0.3rem 0.5rem;
  border-radius: var(--lp-radius-sm);
  color: var(--lp-text) !important;
  text-decoration: none !important;
  font-size: 0.86rem;
}
.lp-acc__lesson a:hover { background: var(--lp-surface-2); }
.lp-acc__num {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--lp-muted);
  border: 1.5px solid var(--lp-border);
  font-variant-numeric: tabular-nums;
}
.lp-acc__lesson.is-extra .lp-acc__num { border-style: dashed; }
.lp-acc__lesson.is-done .lp-acc__num { background: var(--lp-success); border-color: var(--lp-success); color: #fff; font-size: 0.8rem; }
.lp-acc__lesson.is-active a { background: var(--lp-accent-soft); font-weight: 700; }
.lp-acc__lesson.is-active .lp-acc__num { border-color: var(--lp-accent); color: var(--lp-accent); }
.lp-acc__lesson.is-active.is-done .lp-acc__num { color: #fff; }
.lp-acc__ltitle { min-width: 0; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  .lp-acc__chev, .lp-acc__toggle svg { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lp *, .lp *::before, .lp *::after { transition: none !important; }
}

/* ── Paid courses: plans, buy box, accesses (1.6) ───────────────────── */
.lp-chip--paid { background: color-mix(in srgb, #c98a12 16%, transparent); color: #8a5c00; font-weight: 700; }
.lp-chip__icon { font-size: 0.85em; }
.lp-card.is-locked.is-paid .lp-card__media img { filter: none; opacity: 1; }

.lp-plans {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: var(--lp-gap);
  align-items: stretch;
  margin: var(--lp-gap) 0;
}
.lp-plans--compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; margin: 0; }

.lp-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(18px, 2.4vw, 26px);
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  box-shadow: var(--lp-shadow);
}
.lp-plan.is-featured { border: 2px solid var(--lp-accent); }
.lp-plan.is-owned { border-color: var(--lp-success); background: color-mix(in srgb, var(--lp-success) 5%, var(--lp-surface)); }
.lp-plan__flag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--lp-accent);
  color: var(--lp-accent-ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.lp-plan__title { margin: 0 !important; font-size: 1.15rem; }
.lp-plan__price { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.lp-plan__price strong { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.1; color: var(--lp-text); }
.lp-plan__price span { color: var(--lp-muted); font-size: 0.92rem; }
.lp-plan--compact .lp-plan__price strong { font-size: 1.4rem; }
.lp-plan__desc { color: var(--lp-muted); font-size: 0.95rem; }
.lp-plan__desc > :last-child { margin-bottom: 0; }
.lp-plan__scope { margin: 0; padding: 0; list-style: none; font-size: 0.92rem; }
.lp-plan__scope li { position: relative; padding-left: 22px; margin: 4px 0; }
.lp-plan__scope li::before { content: "✓"; position: absolute; left: 0; color: var(--lp-success); font-weight: 700; }
.lp-plan__scope-line { margin: 0; color: var(--lp-muted); font-size: 0.88rem; }
.lp-plan__buy { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.lp-plan__buy .lp-btn { width: 100%; justify-content: center; }
.lp-plan__owned { margin: auto 0 0; padding-top: 6px; color: var(--lp-success); font-weight: 600; }
.lp-plan__note { margin: auto 0 0; color: var(--lp-muted); font-size: 0.9rem; font-style: italic; }
.lp-plans__mine { text-align: center; }

.lp-buy {
  margin: 0 0 var(--lp-gap);
  padding: clamp(18px, 2.6vw, 30px);
  border-radius: var(--lp-radius);
  background: var(--lp-accent-soft);
  border: 1px solid var(--lp-accent-line);
}
.lp-buy__head { margin-bottom: 16px; }
.lp-buy__title { margin: 0 0 6px !important; font-size: 1.3rem; }
.lp-buy__text { margin: 0; color: var(--lp-muted); }
.lp-buy__login, .lp-buy__all { margin: 14px 0 0; font-size: 0.92rem; }

.lp-accesses {
  margin: 0 0 var(--lp-gap);
}
.lp-accesses__title { margin: 0 0 10px !important; font-size: 1.1rem; }
.lp-accesses__list { margin: 0; padding: 0; list-style: none; }
.lp-access { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 0; border-top: 1px solid var(--lp-border); }
.lp-access:first-child { border-top: 0; }
.lp-access__main { flex: 1 1 240px; display: flex; flex-direction: column; gap: 2px; }
.lp-access__when { color: var(--lp-muted); font-size: 0.92rem; }
.lp-access__alert { color: #a3460a; font-size: 0.9rem; font-weight: 600; }
.lp-access__manage { margin: 0; }

/* 1.6.1 */
.lp-bypass { margin: 0 0 var(--lp-gap); padding: 10px 14px; border-radius: var(--lp-radius-sm); background: color-mix(in srgb, #c98a12 12%, transparent); color: #7a5100; font-size: 0.92rem; }
.lp-plan__trial { margin: 0; color: var(--lp-success); font-weight: 600; font-size: 0.95rem; }
.lp-plan__pick { display: flex; flex-direction: column; gap: 4px; font-size: 0.88rem; color: var(--lp-muted); }
.lp-plan__pick select { width: 100%; padding: 8px 10px; border: 1px solid var(--lp-border); border-radius: var(--lp-radius-sm); background: var(--lp-surface); color: var(--lp-text); font: inherit; }

/* 1.6.2 */
.lp-plans--compact { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.lp-buy__more > summary { display: inline-flex; list-style: none; cursor: pointer; }
.lp-buy__more > summary::-webkit-details-marker { display: none; }
.lp-buy__more[open] > summary { display: none; }
.lp-code {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--lp-accent);
  color: var(--lp-accent-ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.6;
  vertical-align: middle;
  white-space: nowrap;
}
.lp-code--hero { font-size: 0.8rem; margin-right: 8px; position: relative; top: -0.25em; }
.lp-card__media { position: relative; }
.lp-card__media .lp-code { position: absolute; top: 10px; left: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.lp-secret { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 10px 0 0; padding: 10px 14px; border: 1px dashed var(--lp-accent-line); border-radius: var(--lp-radius-sm); background: var(--lp-accent-soft); }
.lp-secret__value { font-size: 1rem; padding: 2px 8px; border-radius: 6px; background: var(--lp-surface); color: var(--lp-text); user-select: all; }
.lp-plan__fee { margin: -4px 0 0; color: var(--lp-muted); font-size: 0.85rem; }

/* 1.6.3: description uses the full width; availability tags */
.lp-hero__desc, .lp-more, .lp-stage__desc { max-width: none; }
.lp-progress { max-width: none; }
.lp-card__badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.lp-card__media .lp-card__badges .lp-code { position: static; }
.lp-card__tags { margin: 0; }
.lp-card__tags .lp-card__badges { position: static; }
.lp-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.6;
  vertical-align: middle;
  white-space: nowrap;
  background: #fff3cd;
  color: #7a5100;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.lp-tag--partial { background: #e2f0ff; color: #0b4f8a; }
.lp-tag--unavailable { background: #eceff1; color: #4a5560; }
.lp-tag--hero { font-size: 0.8rem; margin-left: 8px; position: relative; top: -0.25em; box-shadow: none; }
.lp-lesson__title .lp-tag { margin-left: 6px; box-shadow: none; font-size: 0.66rem; }
.lp-lesson.is-pending a { opacity: .75; }
.lp-card__intro { margin: 0; color: var(--lp-muted); font-size: 0.93rem; }

/* 1.6.3: plan cards */
.lp-plan--center { text-align: center; }
.lp-plan--center .lp-plan__price { justify-content: center; }
.lp-plan--right { text-align: right; }
.lp-plan--right .lp-plan__price { justify-content: flex-end; }
.lp-plan--capitalize .lp-plan__title { text-transform: capitalize; }
.lp-plan--uppercase .lp-plan__title { text-transform: uppercase; letter-spacing: .02em; }
.lp-plan__facts { margin: 0; padding: 0; list-style: none; font-size: 0.93rem; }
.lp-plan__facts li { margin: 3px 0; }
.lp-plan__facts.has-bullets, .lp-plan__scope.has-bullets { padding-left: 1.2em; list-style: disc; }
.lp-plan--center .lp-plan__facts.has-bullets, .lp-plan--center .lp-plan__scope.has-bullets,
.lp-plan--right .lp-plan__facts.has-bullets, .lp-plan--right .lp-plan__scope.has-bullets { list-style-position: inside; padding-left: 0; }
.lp-plan__scope.has-bullets li { padding-left: 0; }
.lp-plan__scope.has-bullets li::before { content: none; }
.lp-plan__fact-label { font-weight: 600; }
.lp-plan__includes-title { margin: 0; font-weight: 600; font-size: 0.93rem; }
.lp-plan__pick { margin: 0; padding: 0; border: 0; min-width: 0; text-align: left; }
.lp-plan__pick legend { font-size: 0.88rem; color: var(--lp-muted); margin-bottom: 6px; padding: 0; }
.lp-plan__options { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow: auto; padding: 6px; border: 1px solid var(--lp-border); border-radius: var(--lp-radius-sm); background: var(--lp-surface); }
.lp-plan__option { display: flex; gap: 8px; align-items: flex-start; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 0.92rem; line-height: 1.35; }
.lp-plan__option:hover { background: var(--lp-accent-soft); }
.lp-plan__option input { margin-top: 3px; flex: none; }
.lp-plan__code { display: inline-block; min-width: 2.2em; font-weight: 700; color: var(--lp-accent); }
.lp-plan__pick-total { margin: 6px 0 0; font-size: 0.9rem; font-weight: 600; }
.lp-plan__pick-total.is-error { color: #b42318; }

/* 1.6.4: course's own price */
.lp-plans--offer { grid-template-columns: minmax(min(100%, 260px), 420px); margin-bottom: 14px; }
.lp-buy__or { margin: 4px 0 10px; font-weight: 600; color: var(--lp-muted); }
.lp-buy__plans-link { margin-top: 4px; }

/* 1.7: course shop, footer */
.lp-shop__group { margin-bottom: var(--lp-gap); }
.lp-shop__list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--lp-border); border-radius: var(--lp-radius); background: var(--lp-surface); box-shadow: var(--lp-shadow); overflow: hidden; }
.lp-shop__item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--lp-border); }
.lp-shop__item:first-child { border-top: 0; }
.lp-shop__item.is-selected { background: var(--lp-accent-soft); }
.lp-shop__item.is-owned { opacity: .7; }
.lp-shop__check input { width: 1.2rem; height: 1.2rem; cursor: pointer; }
.lp-shop__img { flex: 0 0 96px; aspect-ratio: 16 / 9; border-radius: var(--lp-radius-sm); overflow: hidden; background: var(--lp-surface-2); }
.lp-shop__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-shop__main { flex: 1 1 auto; min-width: 0; }
.lp-shop__title { margin: 0; font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lp-shop__title .lp-card__badges { position: static; display: inline-flex; }
.lp-shop__title .lp-code, .lp-shop__title .lp-tag { box-shadow: none; }
.lp-shop__title a { color: var(--lp-text); }
.lp-shop__meta { margin: 2px 0 0; color: var(--lp-muted); font-size: 0.9rem; }
.lp-shop__all { display: inline-flex; align-items: center; gap: 0.6rem; margin: 0 0 0.75rem; padding: 0.4rem 0.9rem; font-weight: 600; cursor: pointer; }
.lp-shop__all input, .lp-shop__grouptitle input { width: 1.15rem; height: 1.15rem; accent-color: var(--lp-accent); }
.lp-shop__grouptitle label { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.lp-shop__desc { margin: 4px 0 0; font-size: 0.92rem; line-height: 1.45; max-width: 70ch; }
.lp-shop__price { flex: none; text-align: right; font-size: 1.05rem; }
.lp-shop__bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 14px 18px; border-radius: var(--lp-radius); background: var(--lp-surface); border: 1px solid var(--lp-accent-line); box-shadow: 0 -6px 24px -12px rgba(0,0,0,.25); }
.lp-shop__total { margin: 0; font-weight: 600; }
.lp-shop__total.is-error { color: #b42318; }
@media (max-width: 560px) {
  .lp-shop__img { display: none; }
  .lp-shop__item { padding: 10px 12px; gap: 10px; }
}
.lp-footer { margin-top: calc(var(--lp-gap) * 1.5); padding-top: 14px; border-top: 1px solid var(--lp-border); text-align: center; color: var(--lp-muted); font-size: 0.85rem; }
.lp-access__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-access__actions form { margin: 0; }
.lp-plan__paynote { margin: 0; font-size: 0.82rem; color: var(--lp-muted); font-style: italic; }
.lp-access__note { color: var(--lp-muted); font-size: 0.85rem; }
.lp-pending { border-color: #f0c36d; }

/* 1.8: plans in rows (one plan per line) */
.lp-plans.lp-plans--rows { grid-template-columns: 1fr; }
.lp-plans--rows .lp-plan {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(0, 2fr) minmax(170px, 0.9fr);
  grid-auto-flow: row dense;
  column-gap: clamp(16px, 2.5vw, 32px);
  row-gap: 6px;
  align-items: start;
  text-align: left;
}
.lp-plans--rows .lp-plan > * { grid-column: 2; }
.lp-plans--rows .lp-plan > .lp-plan__title,
.lp-plans--rows .lp-plan > .lp-plan__price,
.lp-plans--rows .lp-plan > .lp-plan__fee { grid-column: 1; }
.lp-plans--rows .lp-plan > .lp-plan__buy,
.lp-plans--rows .lp-plan > .lp-plan__owned,
.lp-plans--rows .lp-plan > .lp-plan__note { grid-column: 3; grid-row: 1 / span 6; margin-top: 0; padding-top: 0; align-self: center; }
.lp-plans--rows .lp-plan > .lp-plan__flag { grid-column: 1; position: static; transform: none; justify-self: start; }
.lp-plans--rows .lp-plan__price { justify-content: flex-start; }
.lp-plans--offer.lp-plans--rows { grid-template-columns: 1fr; }
@media (max-width: 760px) {
  .lp-plans--rows .lp-plan { display: flex; }
}

/* ── Learner progress (site, read-only) ─────────────────── */
.lp-filterbar { display: grid; gap: 0.6rem; margin: 0 0 1.25rem; }
.lp-filterbar__row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.lp-filterbar select, .lp-search input {
  min-height: 2.6rem; padding: 0.4rem 0.7rem; border: 1px solid var(--lp-border); border-radius: var(--lp-radius-sm);
  background-color: var(--lp-surface); color: inherit; font: inherit; max-width: 100%;
}
.lp-filterbar select { flex: 1 1 12rem; min-width: 0; }
.lp-search { position: relative; flex: 1 1 18rem; display: flex; }
.lp-search input { width: 100%; padding-right: 2.8rem; }
.lp-search__btn { position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%); width: 2.2rem; height: 2.2rem; display: grid; place-items: center;
  border: 0; border-radius: var(--lp-radius-sm); background: transparent; color: var(--lp-accent); cursor: pointer; }
.lp-search__btn:hover, .lp-search__btn:focus-visible { background: var(--lp-accent-soft); }
.lp-export { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.lp-filterbar__count { margin-left: auto; }
.lp-muted { color: var(--lp-muted); font-size: 0.85em; }
.lp-nowrap { white-space: nowrap; }
.lp-table-wrap { overflow-x: auto; border: 1px solid var(--lp-border); border-radius: var(--lp-radius); background: var(--lp-surface); }
.lp-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.lp-table th, .lp-table td { padding: 0.6rem 0.8rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--lp-border); }
.lp-table thead th { background: var(--lp-thead-bg, var(--lp-accent-soft)); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--lp-thead-fg, var(--lp-accent)); border-bottom: 2px solid var(--lp-accent-line); }
.lp-table tbody tr:last-child > * { border-bottom: 0; }
.lp-table tbody th { font-weight: 600; }
.lp-meter { display: flex; align-items: center; gap: 0.6rem; min-width: 8rem; }
.lp-meter__track { position: relative; flex: 1; height: 0.55rem; border-radius: 999px; background: var(--lp-surface-2); overflow: hidden; }
.lp-meter__track > span { position: absolute; inset: 0 auto 0 0; background: var(--lp-accent); border-radius: inherit; }
.lp-meter > b { min-width: 2.8rem; text-align: right; font-size: 0.85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.lp-learners__detail .lp-section__title small { display: block; font-size: 0.6em; font-weight: 400; color: var(--lp-muted); }
.lp-pagination { margin-top: 1rem; }

/* ── FAQ (site) ─────────────────────────────────────────── */
.lp-faq { margin: 0 0 1.75rem; }
.lp-faq__item { border: 1px solid var(--lp-border); border-radius: var(--lp-radius-sm); background: var(--lp-surface); margin: 0 0 0.6rem; }
.lp-faq__q { cursor: pointer; padding: 0.9rem 1.1rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.lp-faq__q::-webkit-details-marker { display: none; }
.lp-faq__q::after { content: "+"; color: var(--lp-accent); font-weight: 700; }
.lp-faq__item[open] > .lp-faq__q::after { content: "–"; }
.lp-faq__a { padding: 0 1.1rem 1rem; line-height: 1.6; }
.lp-faq__a > :last-child { margin-bottom: 0; }

/* Learner progress: header tiles */
.lp-stats--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lp-table a { color: var(--lp-accent); }
.lp-stat--line { background: var(--lp-surface); border-width: 2px; }
.lp-stat--text strong { font-size: clamp(0.95rem, 1.5vw, 1.15rem); line-height: 1.25; text-transform: uppercase; letter-spacing: 0.03em; }
@media (max-width: 900px) { .lp-stats--four { grid-template-columns: 1fr 1fr; } .lp-stats--four .lp-stat:last-child { grid-column: auto; } }

/* ── Lesson detail lightbox ─────────────────────────────── */
.lp-modal { width: min(880px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 22px; box-shadow: 0 24px 80px rgba(0,0,0,.25); background: var(--lp-surface, #fff); color: var(--lp-text, inherit); overflow: auto; }
.lp-modal::backdrop { background: rgba(20, 30, 35, .45); backdrop-filter: blur(2px); }
.lp-modal__close { position: sticky; top: 14px; float: right; margin: 14px 14px 0 0; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--lp-surface-2, #eef1f2); font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--lp-accent); z-index: 1; }
.lp-modal__loading { padding: 3rem; text-align: center; color: var(--lp-muted); }
.lp-detail__head { padding: 28px 32px 18px; }
.lp-detail__title { margin: 0.2rem 0 0; font-size: clamp(1.2rem, 2.5vw, 1.6rem); text-transform: uppercase; letter-spacing: 0.02em; color: var(--lp-accent); }
.lp-detail__sum { display: flex; flex-wrap: wrap; gap: 0.6rem 1.8rem; padding: 18px 32px 22px; background: var(--lp-accent-soft); border-block: 1px solid var(--lp-border); }
.lp-detail__bar { flex-basis: 100%; height: 10px; border-radius: 999px; background: var(--lp-surface-2, #e8ecee); overflow: hidden; }
.lp-detail__bar > span { display: block; height: 100%; border-radius: inherit; background: var(--lp-accent); }
.lp-detail__list { list-style: none; margin: 0; padding: 18px 32px 26px; display: grid; gap: 4px; }
.lp-detail__lesson { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; padding: 0.6rem 0.8rem; border-radius: 12px; }
.lp-detail__lesson:hover { background: var(--lp-surface-2, #f3f6f6); }
.lp-detail__mark { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--lp-surface-2, #eef1f2); color: var(--lp-muted); font-weight: 700; }
.lp-detail__lesson.is-done .lp-detail__mark { background: var(--lp-accent-soft); color: var(--lp-accent); }
.lp-detail__ltitle { flex: 1 1 14rem; }
.lp-detail__chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.lp-detail__chip { padding: 0.2rem 0.7rem; border-radius: 999px; background: var(--lp-surface-2, #eef1f2); color: var(--lp-muted); font-size: 0.85rem; white-space: nowrap; }
.lp-detail__chip.is-done { background: var(--lp-accent-soft); color: var(--lp-accent); font-weight: 600; }
.lp-detail__chip.is-part { background: #fdf1df; color: #9a5b00; }
.lp-detail__foot { padding: 0 32px 26px; margin: 0; }
.lp-row__detail { white-space: nowrap; }

/* Course list: one wide card per row */
.lp-grid--rows { grid-template-columns: minmax(0, 1fr); }
.lp-card--wide { flex-direction: row; align-items: flex-start; }
.lp-card--wide .lp-card__media { flex: 0 0 clamp(220px, 34%, 380px); aspect-ratio: 16 / 9; align-self: flex-start; position: relative; margin: 1rem 0 1rem 1rem; border-radius: calc(var(--lp-radius) * 0.8); }
.lp-card--wide .lp-card__media img { width: 100%; height: 100%; object-fit: cover; }
.lp-card--wide .lp-card__body { padding: 1.2rem 1.4rem; }
@media (max-width: 640px) { .lp-card--wide { flex-direction: column; align-items: stretch; } .lp-card--wide .lp-card__media { flex-basis: auto; margin: 0; border-radius: 0; } }

/* ── Learner dashboard ──────────────────────────────────── */
.lp-acc-hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.lp-acc-continue { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin: 0 0 var(--lp-gap); padding: clamp(16px, 2.4vw, 26px); border-radius: calc(var(--lp-radius) * 1.3); border: 2px solid var(--lp-accent-line); background: var(--lp-surface); }
.lp-acc-continue__main { flex: 1 1 20rem; }
.lp-acc-continue__title { margin: 0.2rem 0 0.7rem; font-size: clamp(1.15rem, 2vw, 1.45rem); }
.lp-acc-continue__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.lp-acc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: clamp(10px, 1.6vw, 18px); margin: 0 0 var(--lp-gap); }
.lp-acc-tile { display: flex; gap: 0.9rem; align-items: flex-start; padding: 1.1rem 1.2rem; border-radius: calc(var(--lp-radius) * 1.2); border: 1px solid var(--lp-border); background: var(--lp-surface); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.lp-acc-tile:hover, .lp-acc-tile:focus-visible { border-color: var(--lp-accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.lp-acc-tile__icon { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--lp-accent-soft); font-size: 1.35rem; }
.lp-acc-tile__text strong { display: block; color: var(--lp-accent); font-size: 1.02rem; }
.lp-acc-tile__text span { display: block; margin-top: 0.2rem; color: var(--lp-muted); font-size: 0.88rem; line-height: 1.4; }
.lp-acc-sub { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--lp-muted); margin: 0.5rem 0 0.8rem; }
.lp-acc-tiles--admin .lp-acc-tile { border-style: dashed; }

/* ---------- In-person courses (events) & registration form ---------- */
.lp-event__register { display: grid; gap: var(--lp-gap); align-items: start; scroll-margin-top: 90px; }
.lp-event__register--img { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.lp-event__image img { width: 100%; height: auto; border-radius: var(--lp-radius); display: block; }
.lp-event__form { padding: clamp(18px, 3vw, 32px); }
.lp-event__formtitle { margin-top: 0; }
@media (max-width: 820px) { .lp-event__register--img { grid-template-columns: 1fr; } }

.lp-regform__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.lp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.lp-field--full { grid-column: 1 / -1; }
.lp-field__label { font-weight: 600; font-size: .95em; }
.lp-req { color: #c0392b; font-weight: 700; }
.lp-regform input[type=text], .lp-regform input[type=email], .lp-regform input[type=tel], .lp-regform select, .lp-regform textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--lp-border); border-radius: var(--lp-radius-sm); background: var(--lp-surface); color: var(--lp-text); font: inherit; box-sizing: border-box;
}
.lp-regform input:focus, .lp-regform select:focus, .lp-regform textarea:focus { outline: 2px solid var(--lp-accent-line); border-color: var(--lp-accent); }
.lp-choices { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.lp-check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.lp-check input { accent-color: var(--lp-accent); width: 1.1em; height: 1.1em; }
.lp-field--modes legend { margin-bottom: 4px; }
.lp-field--modes .lp-muted { margin: 0 0 6px; }
.lp-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lp-regform__captcha { margin: 16px 0 0; }
.lp-regform__price { font-weight: 600; margin: 14px 0 0; }
.lp-regform__submit { margin-top: 18px; min-width: 180px; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 560px) { .lp-regform__grid { grid-template-columns: 1fr; } }
.lp-module .lp-regform__grid { grid-template-columns: 1fr; }

.lp-events { display: grid; gap: var(--lp-gap); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.lp-eventcard { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.lp-eventcard__img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.lp-eventcard__body { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lp-eventcard__title { margin: 0; font-size: 1.2em; }
.lp-eventcard__title a { color: inherit; text-decoration: none; }
.lp-eventcard__foot { margin-top: auto; padding-top: 8px; display: flex; gap: 10px; align-items: center; }

.lp-myregs { margin: 0 0 var(--lp-gap); }
.lp-myregs__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lp-myregs__item { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 18px; flex-wrap: wrap; }
.lp-myregs__item form { display: flex; gap: 12px; align-items: center; margin: 0; }
.lp-myregs__title { font-weight: 700; color: var(--lp-text); text-decoration: none; }
.lp-event-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

.lp-modevents__banner { display: flex; align-items: center; gap: 16px; padding: 12px 16px; background: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: var(--lp-radius); }
.lp-modevents__banner img { width: 96px; height: 64px; object-fit: cover; border-radius: var(--lp-radius-sm); }
.lp-modevents__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.lp-modevents__text .lp-eyebrow { margin: 0; }
.lp-modevents__title { font-weight: 700; color: var(--lp-text); text-decoration: none; }
.lp-modevents__form h3 { margin: 4px 0; }
.lp-modevents__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.lp-modevents__item { display: flex; gap: 12px; align-items: flex-start; }
.lp-modevents__item .lp-btn { margin-top: 6px; }
.lp-modevents__thumb img { width: 88px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--lp-radius-sm); display: block; }
@media (max-width: 640px) { .lp-modevents__banner { flex-wrap: wrap; } }
.lp-myregs__item { text-align: left; }
.lp-modevents__form h3 a { color: inherit; text-decoration: none; }

/* Event header: alignment, optional background */
.lp-event__head { --lp-ev-bg: transparent; --lp-ev-fg: inherit; background: var(--lp-ev-bg); color: var(--lp-ev-fg); margin: 0 0 var(--lp-gap); display: flex; flex-direction: column; gap: 10px; }
.lp-event__head--bg { padding: clamp(22px, 4vw, 48px); border-radius: var(--lp-radius); }
.lp-event__head--left { text-align: left; align-items: flex-start; }
.lp-event__head--center { text-align: center; align-items: center; }
.lp-event__head--right { text-align: right; align-items: flex-end; }
.lp-event__head .lp-eyebrow { margin: 0; }
.lp-event__head--bg .lp-eyebrow, .lp-event__head--bg .lp-event__facts dt { color: inherit; opacity: .85; }
.lp-event__title { margin: 0; font-family: var(--lp-heading-font); font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.15; color: inherit; }
.lp-event__cta { margin-top: 4px; }
.lp-event__text { max-width: 760px; }
.lp-event__text > :last-child { margin-bottom: 0; }
.lp-event__facts { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.lp-event__facts > div { display: block; }
.lp-event__facts dt { display: inline; font-weight: 700; color: var(--lp-accent); margin: 0; }
.lp-event__facts dd { display: inline; margin: 0 0 0 4px; }
.lp-event__course { margin: 0; }
.lp-event__head--bg .lp-event__course a { color: inherit; text-decoration: underline; }
.lp-regform__errors { margin: 16px 0 0; padding: 12px 16px; border-radius: var(--lp-radius-sm); background: #fdecea; color: #8a1f17; border: 1px solid #f5c2bd; }
.lp-regform__errors ul { margin: 6px 0 0; padding-left: 18px; }
.lp-field__error { color: #b42318; font-size: .88em; }
.lp-field--invalid input, .lp-field--invalid select, .lp-field--invalid textarea { border-color: #d92d20 !important; }
dialog.lp.lp-modal { margin: auto; padding: 0; max-width: none; background: var(--lp-surface, #fff); }
dialog.lp-modal--fallback { position: fixed; inset: 24px 16px auto; margin: 0 auto; z-index: 9999; -webkit-overflow-scrolling: touch; }
.lp-eventcard__when { margin: 0; font-weight: 700; color: var(--lp-accent); font-size: .95em; }
.lp-eventcard__who { margin: 0; }
.lp-event__text p, .lp-event__text li { font-size: inherit; line-height: inherit; }
.lp-access__origin { align-self: flex-start; margin-top: 4px; box-shadow: none; }
.lp-access__origin--free { background: #e3f4ea; color: #1a6b43; }
.lp-access__origin--legacy { background: #eceff1; color: #4a5560; }
/* My registrations: full width like the tiles, intro image on the left */
.lp .lp-myregs__list { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.lp .lp-myregs__item { margin: 0 !important; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px 20px; padding: 16px 20px; overflow: hidden; text-align: left; }
.lp .lp-myregs__item.has-img { grid-template-columns: 200px 1fr auto; padding: 0 20px 0 0; }
.lp-myregs__img { align-self: stretch; display: block; }
.lp-myregs__img img { width: 100%; height: 100%; min-height: 112px; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.lp-myregs__body { min-width: 0; padding: 14px 0; display: flex; flex-direction: column; gap: 4px; }
.lp-myregs__title { font-size: 1.05rem; }
@media (max-width: 720px) {
  .lp .lp-myregs__item, .lp .lp-myregs__item.has-img { grid-template-columns: 1fr; padding: 0 0 16px; }
  .lp .lp-myregs__item > :not(.lp-myregs__img) { padding-left: 18px; padding-right: 18px; }
  .lp-myregs__body { padding-bottom: 0; }
}
.lp-eventcard__foot { flex-wrap: wrap; }
.lp-eventcard__registered { font-weight: 700; color: var(--lp-success); }
.lp-eventcard__registered::before { content: "✓ "; }
.lp-eventcard__cancel { margin: 0; display: inline; }
.lp-backlink { margin: 0 0 14px; }
.lp-backlink a { display: inline-flex; align-items: center; gap: 6px; font-size: .92rem; font-weight: 600; color: var(--lp-accent); text-decoration: none; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--lp-accent-soft); }
.lp-backlink a:hover { background: color-mix(in srgb, var(--lp-accent) 18%, transparent); }
.lp-backlink svg { width: 1.05em; height: 1.05em; }
.lp-accesses__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.lp-accesses__head .lp-access__manage { margin: 0; }
.lp .lp-backlink a, .lp .lp-backlink a:hover { text-decoration: none !important; }
.lp-viewas-link { color: var(--lp-accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.lp-pe__viewas { margin-left: 10px; font-weight: 600; white-space: nowrap; }
/* My profile (Joomla's profile form with the LearnPath look) */
.lp-profile { display: grid; gap: var(--lp-gap); max-width: 860px; }
.lp-profile__card { padding: clamp(18px, 3vw, 30px); }
.lp-profile__title { margin: 0 0 14px; font-size: 1.2rem; }
.lp-profile__fields .control-group { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 6px 18px; align-items: start; margin: 0 0 14px; }
.lp-profile__fields .control-label { padding-top: 8px; font-weight: 600; }
.lp-profile__fields .controls input:not([type=checkbox]):not([type=radio]), .lp-profile__fields .controls select, .lp-profile__fields .controls textarea { width: 100%; max-width: 520px; }
.lp-profile__fields .form-text, .lp-profile__fields small { color: var(--lp-muted); }
.lp-profile__actions { display: flex; gap: 10px; }
@media (max-width: 640px) { .lp-profile__fields .control-group { grid-template-columns: 1fr; } .lp-profile__fields .control-label { padding-top: 0; } }
/* Speakers · translators line */
.lp-people .lp-label { font-weight: 700; margin-right: 2px; }
.lp-people__sep { opacity: .6; }
/* Topics included (rows) */
.lp-topics__title { margin: 0 0 8px !important; }
.lp .lp-topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.lp-topics__row { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 16px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--lp-border); }
.lp-topics__row:last-child { border-bottom: 0; }
.lp-topics__who { color: var(--lp-muted); }
.lp-topics__time { font-variant-numeric: tabular-nums; color: var(--lp-muted); white-space: nowrap; min-width: 4.5em; text-align: right; }
@media (max-width: 560px) { .lp-topics__row { grid-template-columns: 1fr auto; } .lp-topics__who { grid-column: 1; grid-row: 2; } }
.lp-filterbar.is-loading .lp-search, .lp-pe__find.is-loading { opacity: .65; }
.lp-stage__titlerow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.lp-stage__titlerow .lp-stage__title { margin-bottom: 0; }
.lp-restart { margin: 0; display: inline-flex; }
.lp-stage__titlerow--right .lp-restart { margin-left: auto; }
.lp-restart__btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--lp-border, #ddd); border-radius: 999px; background: transparent; color: var(--lp-muted, #555); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.lp-restart__btn:hover, .lp-restart__btn:focus-visible { color: var(--lp-accent, #5c3633); border-color: currentColor; }
.lp-restart__btn svg { width: 1em; height: 1em; }
.lp-learners__actions { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }

.lp-promo { display: block; width: fit-content; margin-top: 4px; padding: 1px 8px; border-radius: 999px; background: var(--lp-accent-soft, #f3ecea); color: var(--lp-accent, #5c3633); font-size: .8em; font-weight: 600; white-space: nowrap; }

/* Promotion code field (purchase forms) */
.lp-coupon { margin: 12px 0; font-size: .95rem; }
.lp-coupon > summary { cursor: pointer; color: var(--lp-accent, #5c3633); font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.lp-coupon > summary::-webkit-details-marker { display: none; }
.lp-coupon > summary::before { content: "🏷"; }
.lp-coupon__row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.lp-coupon__input { flex: 1 1 180px; min-width: 0; padding: 8px 12px; border: 1px solid var(--lp-border, #ddd); border-radius: var(--lp-radius-sm, 8px); font: inherit; text-transform: uppercase; letter-spacing: .04em; background: var(--lp-surface, #fff); color: var(--lp-text, #222); }
.lp-coupon__input:focus { outline: 2px solid var(--lp-accent-line, var(--lp-accent, #5c3633)); outline-offset: 1px; }
.lp-coupon__msg { margin: 6px 0 0; font-size: .9em; }
.lp-coupon__msg:empty { display: none; }
.lp-coupon__msg.is-ok { color: var(--lp-success, #1a7f4b); font-weight: 600; }
.lp-coupon__msg.is-error { color: #b42318; }
.lp-coupon.is-applied .lp-coupon__input { border-color: var(--lp-success, #1a7f4b); }
.lp-coupon .visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lp-logout { margin: 0; display: inline-flex; }

/* Old shop orders (HikaShop) */
.lp-legacy__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lp-legacy__order details { border: 1px solid var(--lp-border, #ddd); border-radius: var(--lp-radius-sm, 10px); background: var(--lp-surface, #fff); }
.lp-legacy__order summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 16px; cursor: pointer; list-style: none; }
.lp-legacy__order summary::-webkit-details-marker { display: none; }
.lp-legacy__order summary::after { content: "▾"; margin-left: 4px; color: var(--lp-muted, #666); transition: transform .2s; }
.lp-legacy__order details[open] summary::after { transform: rotate(180deg); }
.lp-legacy__num { font-weight: 700; }
.lp-legacy__date { color: var(--lp-muted, #666); }
.lp-legacy__total { margin-left: auto; white-space: nowrap; }
.lp-legacy__order .lp-table-wrap { padding: 0 16px 12px; }
.lp-legacy__items .lp-num { text-align: right; }
.lp-legacy__extra td { color: var(--lp-muted, #666); font-style: italic; }
.lp-legacy__items tfoot th { text-align: left; }

/* Gift (purchase forms) */
.lp-gift { margin: 12px 0; }
.lp-gift__toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; color: var(--lp-accent, #5c3633); }
.lp-gift__toggle input { width: 18px; height: 18px; accent-color: var(--lp-accent, #5c3633); }
.lp-gift__fields { margin-top: 10px; padding: 14px 16px; border: 1px dashed var(--lp-accent-line, var(--lp-accent, #5c3633)); border-radius: var(--lp-radius-sm, 10px); background: var(--lp-accent-soft, #f7f1ef); display: grid; gap: 10px; }
.lp-gift__fields[hidden] { display: none; }
.lp-gift__hint { margin: 0; font-size: .9em; color: var(--lp-muted, #555); }
.lp-gift__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.lp-gift__field { display: grid; gap: 4px; font-size: .92em; }
.lp-gift__field > span { font-weight: 600; }
.lp-gift__field input, .lp-gift__field textarea { width: 100%; box-sizing: border-box; padding: 8px 12px; border: 1px solid var(--lp-border, #ddd); border-radius: var(--lp-radius-sm, 8px); font: inherit; background: var(--lp-surface, #fff); color: var(--lp-text, #222); }
.lp-gift__field small { color: var(--lp-muted, #666); }
.lp-gift__field--date input { max-width: 220px; }
.lp-plan__giftonly { margin-top: 10px; }
.lp-plan__giftonly > summary { cursor: pointer; font-weight: 600; color: var(--lp-accent, #5c3633); }

/* Gift redeem page */
.lp-giftcard { max-width: 760px; padding: 24px; border: 1px solid var(--lp-border, #ddd); border-radius: var(--lp-radius, 14px); background: var(--lp-surface, #fff); box-shadow: var(--lp-shadow, none); display: grid; gap: 12px; }
.lp-giftcard__title { margin: 0; font-family: var(--lp-heading-font, inherit); }
.lp-giftcard__msg { margin: 0; padding: 12px 16px; border-left: 4px solid var(--lp-accent, #5c3633); background: var(--lp-accent-soft, #f7f1ef); font-style: italic; border-radius: 0 8px 8px 0; }
.lp-giftcard__guest { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.lp-giftcard__guest h3 { margin: 0 0 6px; font-size: 1.05rem; }
.lp-giftcard--find { gap: 8px; }
.lp-alert { padding: 12px 16px; border-radius: var(--lp-radius-sm, 8px); background: var(--lp-accent-soft, #f7f1ef); }
.lp-gifts__resend { margin: 4px 0 0; }
.lp-link-btn { background: none; border: 0; padding: 0; color: var(--lp-accent, #5c3633); text-decoration: underline; cursor: pointer; font: inherit; font-size: .9em; }

/* Accesses and old orders use the same table as the payment history */
.lp-accesses .lp-table-wrap { margin-top: 8px; }
.lp-accesses__table .lp-access-row.is-warning td { background: color-mix(in srgb, #f5a623 10%, transparent); }
.lp-access__actions { margin: 6px 0 0; }
.lp-legacy__table .lp-legacy__extra { font-style: italic; font-size: .9em; }
.lp-legacy { margin-top: 28px; }
.lp-history, .lp-gifts { margin-top: 28px; }
.lp-history > .lp-muted:last-child { margin-top: 6px; }

/* Choice of payment method (course shop) and manual payment instructions */
.lp-paymethods { margin: 12px 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lp-paymethods legend { width: 100%; margin-bottom: 6px; font-weight: 600; font-size: .95em; }
.lp-paymethod { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--lp-border, #ddd); border-radius: 999px; cursor: pointer; background: var(--lp-surface, #fff); }
.lp-paymethod:has(input:checked) { border-color: var(--lp-accent, #5c3633); box-shadow: 0 0 0 1px var(--lp-accent, #5c3633) inset; }
.lp-paymethod input { accent-color: var(--lp-accent, #5c3633); }
.lp-pending { padding: 18px 20px; border: 1px solid var(--lp-accent-line, var(--lp-border)); border-radius: var(--lp-radius); background: var(--lp-accent-soft); }
.lp-pending__instructions { margin: 8px 0; padding: 12px 16px; border-left: 4px solid var(--lp-accent); background: var(--lp-surface, #fff); border-radius: 0 8px 8px 0; }
.lp-pending__instructions p { margin: 0 0 6px; }
.lp-pending__instructions p:last-child { margin: 0; }

/* Sharing an access with family */
.lp-share { margin-top: 6px; font-size: .92em; }
.lp-share > summary { cursor: pointer; color: var(--lp-accent, #5c3633); font-weight: 600; }
.lp-share__list { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 4px; }
.lp-share__list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; justify-content: space-between; }
.lp-share__list form { margin: 0; }
.lp-share__form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.lp-share__form input { flex: 1 1 140px; min-width: 0; padding: 6px 10px; border: 1px solid var(--lp-border, #ddd); border-radius: var(--lp-radius-sm, 8px); font: inherit; background: var(--lp-surface, #fff); color: var(--lp-text, #222); }
.lp-share__hint { margin: 4px 0 0; font-size: .85em; }
.lp-access__origin--shared { background: var(--lp-accent-soft, #f3ecea); color: var(--lp-accent, #5c3633); }
