/* Elementor 101 course — landing + lesson pages. Extends app.css (V2 tokens). */

/* Landing */

.course-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  align-items: end;
  gap: 48px;
  padding: 64px 0 72px;
}

.course-hero .lede {
  margin-top: 28px;
}

.course-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.course-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 8px 8px 0 var(--ink);
}

.course-facts > div {
  padding: 20px;
}

.course-facts > div:nth-child(even) {
  border-left: 2px solid var(--ink);
}

.course-facts > div:nth-child(n + 3) {
  border-top: 2px solid var(--ink);
}

.course-facts dd {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.course-list {
  margin-top: 48px;
  padding: 0;
  list-style: none;
}

.course-row h3 a:hover {
  color: var(--rose);
}

.course-row-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.course-pro,
.course-status:not(:empty) {
  display: inline-block;
  padding: 1px 6px;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-weight: 700;
}

.course-pro {
  background: var(--acid);
}

.course-status:not(:empty) {
  margin-left: 6px;
  background: var(--white);
}

.course-status[data-state="done"] {
  background: var(--ink);
  color: var(--white);
}

.course-about {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 40px;
  align-items: start;
}

.course-author {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 28px;
}

.course-author-mark {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--blue);
  color: var(--white);
  box-shadow: 6px 6px 0 var(--ink);
  font-family: var(--display);
  font-size: 44px;
  font-weight: 700;
}

.course-before {
  padding: 28px;
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 8px 8px 0 var(--rose);
}

.course-before ul {
  margin: 0 0 24px;
  padding-left: 1.1em;
}

.course-before li + li {
  margin-top: 8px;
}

.course-disclosure {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* Lesson layout */

.lesson {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding: 40px 0 96px;
}

.lesson-aside {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.lesson-back {
  display: inline-block;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.lesson-back:hover {
  color: var(--rose);
}

.lesson-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
  border: 2px solid var(--ink);
  background: var(--white);
}

.lesson-progress-count {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.lesson-bar {
  grid-column: 1 / -1;
  height: 8px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
}

.lesson-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--acid);
  transition: width 200ms ease;
}

.lesson-toc {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.lesson-toc a {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 6px;
  padding: 8px 10px;
  border: 2px solid transparent;
  line-height: 1.3;
}

.lesson-toc a span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
}

.lesson-toc a:hover {
  border-color: var(--line);
}

.lesson-toc a[aria-current="step"] {
  border-color: var(--ink);
  background: var(--white);
  font-weight: 600;
}

.lesson-toc li.is-done a span {
  color: var(--ink);
}

.lesson-toc li.is-done a span::before {
  content: "✓ ";
}

.lesson-body {
  min-width: 0;
  max-width: 780px;
}

.lesson-hero {
  margin-bottom: 56px;
  padding: 36px;
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 8px 8px 0 var(--ink);
}

.lesson-title {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.lesson-meta li {
  padding: 5px 10px;
  border: 1.5px solid var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.lesson-version {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.lesson-step {
  scroll-margin-top: 24px;
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 2px solid var(--ink);
}

.lesson-step-title {
  display: flex;
  gap: 14px;
  align-items: baseline;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.lesson-step-title span {
  flex: none;
  color: var(--rose);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.lesson-prose {
  margin-top: 20px;
}

.lesson-prose li + li {
  margin-top: 6px;
}

.lesson-prose code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  background: var(--white);
  font-family: var(--mono);
  font-size: 0.85em;
}

.lesson-prose kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 5px;
  border: 1.5px solid var(--ink);
  border-bottom-width: 3px;
  background: var(--white);
  font-family: var(--mono);
  font-size: 0.8em;
  text-align: center;
}

.ui {
  display: inline-block;
  padding: 0 6px;
  border: 1.5px solid var(--ink);
  background: var(--acid);
  font-family: var(--mono);
  font-size: 0.78em;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.lesson-note {
  color: var(--muted);
  font-size: 14px;
}

.click-path {
  counter-reset: click;
  padding-left: 0 !important;
  list-style: none;
}

.click-path > li {
  position: relative;
  padding-left: 42px;
  counter-increment: click;
}

.click-path > li::before {
  content: counter(click);
  position: absolute;
  top: 1px;
  left: 0;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--white);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.mistakes,
.checklist {
  padding-left: 0 !important;
  list-style: none;
}

.mistakes > li,
.checklist > li {
  position: relative;
  padding-left: 32px;
}

.mistakes > li::before,
.checklist > li::before {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--mono);
  font-weight: 700;
}

.mistakes > li::before {
  content: "✕";
  color: var(--rose);
}

.checklist > li::before {
  content: "☐";
  color: var(--blue);
}

.callout {
  margin: 1.4em 0;
  padding: 16px 20px;
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 5px 5px 0 var(--blue);
}

.callout > strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.callout p {
  margin: 0;
}

.callout--warn {
  box-shadow: 5px 5px 0 var(--rose);
}

.callout--warn > strong::before {
  content: "⚠ ";
}

.callout--pro {
  background: var(--acid);
  box-shadow: 5px 5px 0 var(--ink);
}

.lesson-table-wrap {
  margin: 1.2em 0;
  overflow-x: auto;
  border: 2px solid var(--ink);
  background: var(--white);
}

.lesson-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.lesson-table th,
.lesson-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.lesson-table th {
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lesson-table tr:last-child td {
  border-bottom: 0;
}

.step-done {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  background: var(--white);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.step-done::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
}

.step-done[aria-pressed="true"] {
  background: var(--ink);
  color: var(--white);
}

.step-done[aria-pressed="true"]::before {
  border-color: var(--acid);
  background: var(--acid);
}

.step-done:focus-visible,
.quiz-option input:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* Diagrams */

.figure {
  margin: 1.6em 0;
}

.figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pin {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--rose);
  color: var(--white);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

/* Screenshots: pins are placed with --x / --y as percentages of the image. */
.shot {
  position: relative;
  border: 2px solid var(--ink);
  background: var(--ink);
  box-shadow: 8px 8px 0 var(--rose);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot .pin {
  position: absolute;
  top: var(--y);
  left: var(--x);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px var(--white);
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 2px solid var(--ink);
  background: var(--white);
}

.compare-col {
  padding: 18px;
}

.compare-col + .compare-col {
  border-left: 2px solid var(--ink);
}

.compare-col--new {
  background: #fbffe6;
}

.compare-col h4 {
  margin: 0 0 12px !important;
  font-family: var(--mono) !important;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em !important;
}

.compare-col p {
  margin: 12px 0 0;
  font-size: 14px;
}

.tree,
.tree ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 13px;
}

.tree ul {
  margin-left: 10px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
}

.tree li {
  margin: 6px 0 0 !important;
}

.tree--boxed {
  padding: 18px;
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 6px 6px 0 var(--blue);
}

.demo-set {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.demo {
  position: relative;
  display: flex;
  gap: 8px;
  min-height: 130px;
  padding: 34px 12px 12px;
  border: 2px dashed var(--ink);
  background: var(--white);
}

.demo i {
  display: block;
  min-width: 34px;
  min-height: 26px;
  border: 2px solid var(--ink);
  background: var(--acid);
}

.demo--row {
  flex-direction: row;
  align-items: flex-start;
}

.demo--col {
  flex-direction: column;
  align-items: flex-start;
}

.demo--col i {
  width: 60%;
}

.demo--between {
  justify-content: space-between;
}

.demo-label {
  position: absolute;
  top: 8px;
  left: 12px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.cascade,
.token-map {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cascade-step,
.token {
  display: flex;
  flex-direction: column;
  min-width: 130px;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  background: var(--white);
  font-family: var(--mono);
  font-size: 12px;
}

.cascade-step strong,
.token {
  font-weight: 700;
}

.token small,
.cascade-step {
  color: var(--muted);
  font-weight: 500;
}

.cascade-step strong {
  color: var(--ink);
}

.cascade-step--set {
  background: var(--acid);
  color: var(--ink);
}

.token--class {
  background: #e9edff;
}

.token--el {
  background: var(--acid);
}

.cascade-arrow {
  font-family: var(--mono);
  font-weight: 700;
}

.layers {
  display: grid;
  gap: 6px;
}

.layer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-inline: 16px;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  background: var(--white);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.layer small {
  color: var(--muted);
  font-weight: 500;
}

.layer--top {
  margin-inline: 0 32px;
  background: var(--rose);
  color: var(--white);
}

.layer--top small {
  color: rgba(255, 255, 255, 0.8);
}

.layer--base {
  margin-inline: 32px 0;
  background: var(--paper);
}

.site-parts {
  display: grid;
  gap: 6px;
  padding: 6px;
  border: 2px solid var(--ink);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.site-part {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  background: var(--white);
}

.site-part small {
  color: var(--muted);
  font-weight: 500;
}

.site-part--header,
.site-part--footer {
  background: var(--acid);
}

.site-part--body {
  min-height: 120px;
}

/* Quiz */

.lesson-quiz-intro {
  margin: 16px 0 24px;
  color: var(--muted);
}

.quiz-q {
  margin: 0 0 20px;
  padding: 18px 20px;
  border: 2px solid var(--ink);
  background: var(--white);
}

.quiz-q legend {
  padding: 0 6px;
  font-weight: 700;
}

.quiz-q legend span {
  color: var(--rose);
  font-family: var(--mono);
}

.quiz-option {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-top: 8px;
  cursor: pointer;
}

.quiz-option input {
  accent-color: var(--ink);
}

.quiz-why {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.quiz-q.is-correct {
  box-shadow: 5px 5px 0 var(--acid);
}

.quiz-q.is-wrong {
  box-shadow: 5px 5px 0 var(--rose);
}

.quiz-q.is-correct .quiz-why::before {
  content: "Correct — ";
  font-weight: 700;
}

.quiz-q.is-wrong .quiz-why::before {
  content: "Not quite — ";
  color: var(--rose);
  font-weight: 700;
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.quiz-result {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.lesson-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}

.lesson-pager-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.03em;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.lesson-pager-link:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.lesson-pager-link--next {
  grid-column: 2;
  text-align: right;
  background: var(--acid);
}

@media (max-width: 980px) {
  .course-hero,
  .course-about {
    grid-template-columns: 1fr;
  }

  .lesson {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .lesson-aside {
    position: static;
    max-height: none;
  }

  .lesson-toc {
    display: none;
  }
}

@media (max-width: 680px) {
  .course-author {
    grid-template-columns: 1fr;
  }

  .lesson-hero {
    padding: 24px;
  }

  .demo-set,
  .compare,
  .lesson-pager {
    grid-template-columns: 1fr;
  }

  .compare-col + .compare-col {
    border-top: 2px solid var(--ink);
    border-left: 0;
  }

  .lesson-pager-link--next {
    grid-column: 1;
  }
}
