/* ========================================================================== 
   LUT CREATOR CLUB - common cabinet styles and login page
   ========================================================================== */

:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-xs: 2px 2px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --shadow-md: 6px 7px 0 var(--ink);
  --shadow-lg: 10px 12px 0 var(--ink);

  --motion-instant: 120ms;
  --motion-fast: 200ms;
  --motion-base: 320ms;
  --motion-slow: 560ms;
  --ease-standard: cubic-bezier(0.2, 0.72, 0.18, 1);
}

/* ========================================================================== 
   CHECKPOINT TEMPLATE V2
   Контрольный съемочный лист для всех модульных контрольных.
   ========================================================================== */

.module-quiz-page .module-quiz-content {
  width: min(100%, 1240px);
  padding-bottom: clamp(140px, 12vw, 190px);
}

.checkpoint-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: clamp(var(--space-8), 5vw, var(--space-12));
  color: color-mix(in srgb, var(--ink) 58%, transparent);
  font-size: 13px;
  font-weight: 900;
}

.checkpoint-breadcrumbs a {
  color: var(--violet);
}

.checkpoint-hero {
  margin-bottom: clamp(var(--space-12), 7vw, var(--space-20));
}

.checkpoint-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  margin-bottom: var(--space-8);
}

.checkpoint-hero-meta > span {
  padding: 7px 13px 6px;
  background: var(--acid);
  border: 3px solid var(--ink);
  box-shadow: 5px 6px 0 var(--sky);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1.1;
}

.checkpoint-hero-meta > b {
  color: var(--violet);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.checkpoint-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 340px);
  gap: clamp(var(--space-8), 6vw, var(--space-16));
  align-items: center;
}

.checkpoint-hero h1 {
  display: grid;
  min-width: 0;
  justify-items: start;
  gap: 0.12em;
  margin: 0;
  overflow: visible;
  font-family: var(--ff-display);
  font-size: clamp(62px, 8vw, 116px);
  font-weight: 700;
  line-height: 0.88;
}

.checkpoint-hero h1 > span {
  display: inline-block;
  padding: 0.13em 0.16em 0.08em;
  background: var(--violet);
  box-shadow: 0.09em 0.1em 0 var(--pink);
  color: var(--acid);
  transform: rotate(-0.5deg);
}

.checkpoint-hero h1 > strong {
  font: inherit;
}

.checkpoint-hero-layout > p {
  position: relative;
  justify-self: end;
  max-width: 320px;
  padding: 0.22em 0.12em 0.28em;
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: clamp(38px, 4.5vw, 60px);
  line-height: 0.92;
  text-align: center;
  transform: rotate(-3deg);
}

.checkpoint-hero-layout > p::after {
  position: absolute;
  right: 8%;
  bottom: 0.08em;
  left: 36%;
  height: 0.16em;
  background: var(--acid);
  content: "";
  transform: rotate(-2deg);
  z-index: -1;
}

.checkpoint-shell {
  min-width: 0;
}

.checkpoint-intro {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.72fr);
  gap: clamp(var(--space-6), 4vw, var(--space-10));
  padding: clamp(var(--space-6), 4.5vw, var(--space-12));
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: 11px 13px 0 var(--sky);
}

.checkpoint-intro-copy {
  min-width: 0;
}

.checkpoint-stamp {
  width: fit-content;
  margin-bottom: var(--space-5);
  padding: 7px 12px;
  background: var(--pink);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-xs);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.2;
  transform: rotate(-1deg);
}

.checkpoint-intro h2 {
  max-width: 760px;
  margin-bottom: var(--space-6);
  padding-block: 0.08em;
  font-family: var(--ff-display);
  font-size: clamp(54px, 6.4vw, 88px);
  line-height: 0.9;
}

.checkpoint-intro-text {
  max-width: 730px;
  font-size: clamp(17px, 1.7vw, 20px);
  font-weight: 700;
  line-height: 1.55;
}

.checkpoint-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-8);
  padding: 0;
  list-style: none;
}

.checkpoint-facts li {
  display: grid;
  min-width: 0;
  min-height: 88px;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-3);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
}

.checkpoint-facts li:nth-child(1) {
  background: var(--acid);
}

.checkpoint-facts li:nth-child(2) {
  background: var(--pink);
}

.checkpoint-facts li:nth-child(3) {
  background: var(--violet);
  color: var(--white);
}

.checkpoint-facts b {
  font-family: var(--ff-display);
  font-size: 28px;
  line-height: 1;
}

.checkpoint-facts span {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.28;
}

.checkpoint-topics {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: var(--space-4);
  align-self: stretch;
  padding: clamp(var(--space-5), 3vw, var(--space-8));
  overflow: visible;
  background: var(--sky);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 7px 8px 0 var(--acid);
  transform: rotate(0.7deg);
}

.checkpoint-topics-star {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
  transform: rotate(-5deg);
}

.checkpoint-topics-star svg {
  width: 45px;
  height: 45px;
  fill: var(--violet);
  stroke: var(--ink);
  stroke-width: 2;
}

.checkpoint-topics p {
  margin-bottom: var(--space-2);
  color: var(--violet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.checkpoint-topics h3 {
  margin-bottom: var(--space-5);
  font-family: var(--ff-display);
  font-size: clamp(34px, 3.5vw, 48px);
  line-height: 0.95;
}

.checkpoint-topics ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checkpoint-topics li {
  position: relative;
  padding-left: 21px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
}

.checkpoint-topics li::before {
  position: absolute;
  top: 0.45em;
  left: 0;
  width: 10px;
  height: 10px;
  background: var(--acid);
  border: 2px solid var(--ink);
  content: "";
  transform: rotate(45deg);
}

.checkpoint-intro > .checkpoint-button {
  grid-column: 1 / -1;
  justify-self: center;
}

.checkpoint-button {
  display: inline-flex;
  min-width: 0;
  min-height: 60px;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: 13px clamp(var(--space-5), 3vw, var(--space-8));
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  transition: transform var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard), background-color var(--motion-fast) var(--ease-standard);
}

.checkpoint-button--primary {
  width: min(100%, 650px);
  background: var(--acid);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}

.checkpoint-button svg {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.checkpoint-button:disabled {
  opacity: 0.38;
  box-shadow: none;
  cursor: not-allowed;
}

.checkpoint-button:focus-visible,
.checkpoint-back:focus-visible,
.checkpoint-review-toggle:focus-visible,
.checkpoint-question input:focus-visible + span,
.checkpoint-footer-nav a:focus-visible,
.checkpoint-return-topics a:focus-visible,
.checkpoint-review-links a:focus-visible,
.checkpoint-breadcrumbs a:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 4px;
}

.checkpoint-form {
  display: grid;
  min-width: 0;
  gap: clamp(var(--space-6), 4vw, var(--space-10));
}

.checkpoint-progress {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--ink);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 7px 8px 0 var(--pink);
  color: var(--white);
}

.checkpoint-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: center;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.checkpoint-progress-track {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 7px;
}

.checkpoint-progress-track > span {
  position: relative;
  display: grid;
  min-width: 0;
  height: 40px;
  place-items: center;
  overflow: hidden;
  background: var(--cream);
  border: 2px solid var(--white);
  border-radius: 6px;
  color: var(--ink);
  transition: transform var(--motion-fast) var(--ease-standard), background-color var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard);
}

.checkpoint-progress-track > span::before,
.checkpoint-progress-track > span::after {
  position: absolute;
  right: 4px;
  left: 4px;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 4px, transparent 4px 8px);
  content: "";
  opacity: 0.34;
}

.checkpoint-progress-track > span::before {
  top: 4px;
}

.checkpoint-progress-track > span::after {
  bottom: 4px;
}

.checkpoint-progress-track b {
  font-family: var(--ff-display);
  font-size: 17px;
  line-height: 1;
}

.checkpoint-progress-track > span.is-answered {
  background: var(--acid);
  border-color: var(--acid);
}

.checkpoint-progress-track > span.is-current {
  background: var(--violet);
  border-color: var(--acid);
  color: var(--white);
  transform: translateY(-4px);
}

.checkpoint-question-stage {
  min-width: 0;
}

.checkpoint-question {
  min-width: 0;
  margin: 0;
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: 10px 12px 0 var(--sky);
}

.checkpoint-question legend {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-8);
  padding: 0;
}

.checkpoint-question legend > small,
.checkpoint-question-kind {
  width: fit-content;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.checkpoint-question legend > small {
  background: var(--acid);
}

.checkpoint-question-kind {
  background: var(--pink);
  transform: rotate(1deg);
}

.checkpoint-question legend > span:last-child {
  width: 100%;
  max-width: 940px;
  padding-block: 0.08em;
  font-family: var(--ff-display);
  font-size: clamp(36px, 4vw, 54px);
  line-height: 0.98;
}

.checkpoint-options {
  display: grid;
  gap: var(--space-3);
}

.checkpoint-question label {
  display: block;
  cursor: pointer;
}

.checkpoint-question input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.checkpoint-question label > span {
  display: grid;
  min-height: 68px;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
  padding: 10px var(--space-4);
  background: var(--sky);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  transition: transform var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard), background-color var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard);
}

.checkpoint-question label b {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  color: var(--ink);
  font-family: var(--ff-display);
  font-size: 23px;
  line-height: 1;
  transform: rotate(-1deg);
}

.checkpoint-question label i {
  min-width: 0;
  font-size: 16px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.4;
}

.checkpoint-question input:checked + span {
  background: var(--violet);
  box-shadow: 5px 6px 0 var(--pink);
  color: var(--white);
  transform: translate(-2px, -2px);
}

.checkpoint-question input:checked + span b {
  background: var(--acid);
}

.checkpoint-question-actions {
  display: grid;
  justify-items: center;
  gap: var(--space-5);
}

.checkpoint-back,
.checkpoint-review-toggle {
  min-height: 44px;
  padding: 8px 12px;
  color: var(--violet);
  font-size: 13px;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.checkpoint-back:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.checkpoint-result {
  position: relative;
  display: grid;
  min-width: 0;
  gap: clamp(var(--space-8), 5vw, var(--space-12));
}

.checkpoint-result-head {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(210px, 0.34fr) minmax(0, 0.66fr);
  gap: clamp(var(--space-6), 4vw, var(--space-10));
  align-items: center;
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  overflow: hidden;
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: 10px 12px 0 var(--sky);
}

.checkpoint-score {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 220px;
  align-content: center;
  justify-items: center;
  padding: var(--space-5);
  background: var(--pink);
  border: 3px solid var(--ink);
  box-shadow: 8px 9px 0 var(--violet);
  text-align: center;
  transform: rotate(-2deg);
}

.checkpoint-score.is-passed {
  background: var(--acid);
}

.checkpoint-score small,
.checkpoint-score > b {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.checkpoint-score strong {
  display: flex;
  align-items: baseline;
  font-family: var(--ff-display);
  font-size: clamp(78px, 8vw, 112px);
  line-height: 0.86;
}

.checkpoint-score strong i {
  font-size: 0.32em;
  font-style: normal;
}

.checkpoint-result-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.checkpoint-result-copy > p {
  width: fit-content;
  margin-bottom: var(--space-4);
  padding: 6px 10px;
  background: var(--pink);
  border: 2px solid var(--ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.checkpoint-result.is-passed .checkpoint-result-copy > p {
  background: var(--acid);
}

.checkpoint-result-copy h2 {
  max-width: 760px;
  margin-bottom: var(--space-5);
  padding-block: 0.08em;
  font-family: var(--ff-display);
  font-size: clamp(56px, 6vw, 84px);
  line-height: 0.9;
}

.checkpoint-result-copy [data-result-description] {
  max-width: 760px;
  font-size: clamp(16px, 1.7vw, 19px);
  font-weight: 700;
  line-height: 1.55;
}

.checkpoint-result-copy em {
  display: block;
  width: fit-content;
  margin-top: var(--space-6);
  padding: 0.18em 0.08em 0.26em;
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: clamp(34px, 4vw, 52px);
  font-style: normal;
  line-height: 0.92;
  transform: rotate(-2deg);
}

.checkpoint-return-topics {
  padding: clamp(var(--space-5), 3vw, var(--space-8));
  background: var(--sky);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 7px 8px 0 var(--pink);
}

.checkpoint-return-topics > p,
.checkpoint-review > header p {
  margin-bottom: var(--space-2);
  color: var(--violet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.checkpoint-return-topics h3,
.checkpoint-review > header h3 {
  margin-bottom: var(--space-5);
  font-family: var(--ff-display);
  font-size: clamp(38px, 4vw, 56px);
  line-height: 0.95;
}

.checkpoint-return-topics > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.checkpoint-return-topics a {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-4);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  color: var(--ink);
}

.checkpoint-return-topics a > b {
  padding: 6px 8px;
  background: var(--acid);
  border: 2px solid var(--ink);
  font-size: 10px;
  white-space: nowrap;
}

.checkpoint-return-topics a > span {
  min-width: 0;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.3;
}

.checkpoint-return-topics a > strong {
  color: var(--violet);
  font-size: 11px;
}

.checkpoint-result-actions {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
}

.checkpoint-result-actions .checkpoint-button[hidden] {
  display: none !important;
}

.checkpoint-review {
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: 10px 12px 0 var(--pink);
}

.checkpoint-review > header {
  max-width: 760px;
  margin-bottom: var(--space-8);
}

.checkpoint-review > header h3 {
  margin-bottom: var(--space-3);
}

.checkpoint-review > header b {
  font-size: 16px;
  line-height: 1.45;
}

.checkpoint-review > ol {
  display: grid;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.checkpoint-review > ol > li {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--space-5);
  padding: var(--space-5);
  background: var(--white);
  border: 2px solid var(--ink);
  border-left-width: 12px;
  border-radius: var(--radius-card);
}

.checkpoint-review > ol > li.is-correct {
  border-left-color: var(--acid);
}

.checkpoint-review > ol > li.is-incorrect {
  border-left-color: var(--pink);
}

.checkpoint-review-status {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: var(--space-2);
  text-align: center;
}

.checkpoint-review-status svg {
  width: 64px;
  height: 64px;
  padding: 11px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: 50%;
  fill: none;
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(-4deg);
}

.is-incorrect .checkpoint-review-status svg {
  background: var(--pink);
}

.checkpoint-review-status span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.checkpoint-review-card-copy {
  min-width: 0;
}

.checkpoint-review-card-copy > small {
  color: var(--violet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.checkpoint-review-card-copy h4 {
  margin: var(--space-2) 0 var(--space-4);
  font-family: var(--ff-display);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
}

.checkpoint-review-card-copy dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
}

.checkpoint-review-card-copy dl > div {
  padding: var(--space-3);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
}

.checkpoint-review-card-copy dt {
  margin-bottom: 5px;
  color: var(--violet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.checkpoint-review-card-copy dd,
.checkpoint-review-card-copy > p {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.checkpoint-review-card-copy > p {
  max-width: 820px;
}

.checkpoint-review-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.checkpoint-review-links a {
  min-height: 44px;
  padding: 10px 13px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.checkpoint-review-bottom {
  display: grid;
  justify-items: center;
  margin-top: var(--space-8);
}

.checkpoint-review-bottom [hidden] {
  display: none !important;
}

.checkpoint-confetti {
  position: absolute;
  z-index: 4;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.checkpoint-confetti i {
  position: absolute;
  top: -30px;
  left: var(--confetti-left);
  width: 10px;
  height: 18px;
  opacity: 0;
  background: var(--confetti-color);
  border: 1px solid var(--ink);
  animation: checkpoint-confetti-fall var(--confetti-duration) var(--confetti-delay) var(--ease-out) forwards;
}

@keyframes checkpoint-confetti-fall {
  0% { opacity: 0; transform: translate3d(0, -20px, 0) rotate(0); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--confetti-x), 640px, 0) rotate(var(--confetti-rotate)); }
}

.checkpoint-footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: clamp(var(--space-12), 7vw, var(--space-20));
}

.checkpoint-footer-nav a {
  display: grid;
  min-width: 0;
  min-height: 88px;
  align-content: center;
  gap: 5px;
  padding: var(--space-4);
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-align: center;
}

.checkpoint-footer-nav a:nth-child(2) {
  background: var(--sky);
}

.checkpoint-footer-nav a:nth-child(3) {
  background: var(--acid);
}

.checkpoint-footer-nav a[aria-disabled="true"] {
  opacity: 0.38;
  box-shadow: none;
  cursor: not-allowed;
}

.checkpoint-footer-nav small {
  color: var(--violet);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.checkpoint-footer-nav strong {
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.3;
}

@media (hover: hover) and (pointer: fine) {
  .checkpoint-button:not(:disabled):hover,
  .checkpoint-footer-nav a:not([aria-disabled="true"]):hover {
    box-shadow: 2px 3px 0 var(--ink);
    transform: translate(3px, 3px);
  }

  .checkpoint-question label:hover > span {
    background: color-mix(in srgb, var(--sky) 64%, var(--cream));
    transform: translate(-2px, -2px);
  }

  .checkpoint-question label:hover input:checked + span {
    background: var(--violet);
  }

  .checkpoint-return-topics a:hover,
  .checkpoint-review-links a:hover {
    box-shadow: var(--shadow-xs);
    transform: translate(-2px, -2px);
  }
}

@media (max-width: 1120px) {
  .checkpoint-intro {
    grid-template-columns: minmax(0, 1fr);
  }

  .checkpoint-topics {
    transform: none;
  }
}

@media (max-width: 900px) {
  .checkpoint-hero-layout,
  .checkpoint-intro,
  .checkpoint-result-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .checkpoint-hero-layout > p {
    justify-self: start;
    text-align: left;
  }

  .checkpoint-topics {
    transform: none;
  }

  .checkpoint-score {
    width: min(100%, 330px);
    justify-self: center;
  }
}

@media (max-width: 700px) {
  .module-quiz-page .module-quiz-content {
    padding: var(--space-6) var(--space-4) calc(150px + env(safe-area-inset-bottom));
  }

  .checkpoint-breadcrumbs {
    margin-bottom: var(--space-8);
    font-size: 11px;
  }

  .checkpoint-hero {
    margin-bottom: var(--space-12);
  }

  .checkpoint-hero-meta {
    gap: var(--space-3);
    margin-bottom: var(--space-6);
  }

  .checkpoint-hero-meta > span {
    padding: 6px 10px;
    border-width: 2px;
    font-size: 9px;
  }

  .checkpoint-hero-meta > b {
    font-size: 10px;
  }

  .checkpoint-hero-layout {
    gap: var(--space-6);
  }

  .checkpoint-hero h1 {
    font-size: clamp(52px, 15.4vw, 72px);
  }

  .checkpoint-hero-layout > p {
    max-width: 270px;
    font-size: clamp(34px, 10vw, 44px);
  }

  .checkpoint-intro {
    gap: var(--space-6);
    padding: var(--space-5);
    border-width: 3px;
    border-radius: var(--radius-lg);
    box-shadow: 7px 8px 0 var(--sky);
  }

  .checkpoint-stamp {
    max-width: 100%;
    font-size: 9px;
    line-height: 1.35;
  }

  .checkpoint-intro h2 {
    font-size: clamp(45px, 13.6vw, 62px);
  }

  .checkpoint-intro-text {
    font-size: 16px;
  }

  .checkpoint-facts {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2);
    margin-top: var(--space-6);
  }

  .checkpoint-facts li {
    min-height: 62px;
  }

  .checkpoint-topics {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: var(--space-3);
    padding: var(--space-4);
    box-shadow: 5px 6px 0 var(--acid);
  }

  .checkpoint-topics-star {
    width: 50px;
    height: 50px;
  }

  .checkpoint-topics-star svg {
    width: 35px;
    height: 35px;
  }

  .checkpoint-topics h3 {
    font-size: 34px;
  }

  .checkpoint-button {
    min-height: 56px;
    padding: 11px var(--space-4);
    font-size: 13px;
  }

  .checkpoint-progress {
    padding: var(--space-4);
    box-shadow: 5px 6px 0 var(--pink);
  }

  .checkpoint-progress-copy {
    font-size: 10px;
  }

  .checkpoint-progress-track {
    gap: 3px;
  }

  .checkpoint-progress-track > span {
    height: 32px;
    border-width: 1.5px;
  }

  .checkpoint-progress-track b {
    font-size: 13px;
  }

  .checkpoint-question {
    padding: var(--space-5) var(--space-4);
    border-width: 3px;
    border-radius: var(--radius-lg);
    box-shadow: 7px 8px 0 var(--sky);
  }

  .checkpoint-question legend {
    margin-bottom: var(--space-6);
  }

  .checkpoint-question legend > span:last-child {
    font-size: clamp(32px, 9.5vw, 42px);
  }

  .checkpoint-question label > span {
    min-height: 64px;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: var(--space-3);
    padding: 9px 11px;
  }

  .checkpoint-question label b {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .checkpoint-question label i {
    font-size: 14px;
  }

  .checkpoint-question-actions {
    position: sticky;
    z-index: 12;
    bottom: calc(78px + env(safe-area-inset-bottom));
    padding: 8px;
    background: color-mix(in srgb, var(--cream) 94%, transparent);
    border: 2px solid var(--ink);
    border-radius: var(--radius-card);
    backdrop-filter: blur(10px);
  }

  .checkpoint-back {
    min-height: 38px;
    padding-block: 5px;
    font-size: 11px;
  }

  .checkpoint-result-head,
  .checkpoint-review {
    padding: var(--space-5);
    border-width: 3px;
    border-radius: var(--radius-lg);
    box-shadow: 7px 8px 0 var(--sky);
  }

  .checkpoint-score {
    width: 210px;
    min-height: 180px;
  }

  .checkpoint-score strong {
    font-size: 82px;
  }

  .checkpoint-result-copy {
    text-align: center;
  }

  .checkpoint-result-copy > p,
  .checkpoint-result-copy em {
    margin-inline: auto;
  }

  .checkpoint-result-copy h2 {
    font-size: clamp(48px, 14vw, 64px);
  }

  .checkpoint-result-copy em {
    font-size: 38px;
  }

  .checkpoint-return-topics {
    padding: var(--space-5);
    box-shadow: 5px 6px 0 var(--pink);
  }

  .checkpoint-return-topics h3,
  .checkpoint-review > header h3 {
    font-size: clamp(36px, 10vw, 48px);
  }

  .checkpoint-return-topics > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .checkpoint-return-topics a {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .checkpoint-return-topics a > strong {
    grid-column: 2;
  }

  .checkpoint-review > ol > li {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
    padding: var(--space-4);
    border-left-width: 9px;
  }

  .checkpoint-review-status {
    grid-template-columns: 48px auto;
    align-items: center;
    justify-content: start;
  }

  .checkpoint-review-status svg {
    width: 46px;
    height: 46px;
    padding: 8px;
  }

  .checkpoint-review-card-copy dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .checkpoint-footer-nav {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
  }

  .checkpoint-footer-nav a {
    min-height: 70px;
  }
}

@media (max-width: 360px) {
  .module-quiz-page .module-quiz-content {
    padding-inline: 12px;
  }

  .checkpoint-hero h1 {
    font-size: clamp(48px, 14.8vw, 56px);
  }

  .checkpoint-intro,
  .checkpoint-question,
  .checkpoint-result-head,
  .checkpoint-review {
    padding-inline: 14px;
  }

  .checkpoint-intro h2 {
    font-size: 43px;
  }

  .checkpoint-topics {
    grid-template-columns: minmax(0, 1fr);
  }

  .checkpoint-progress-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .checkpoint-progress-track > span {
    height: 28px;
  }

  .checkpoint-progress-track > span::before,
  .checkpoint-progress-track > span::after {
    display: none;
  }

  .checkpoint-question label > span {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    padding-inline: 8px;
  }

  .checkpoint-question label b {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .checkpoint-question label i {
    font-size: 13px;
  }

  .checkpoint-score {
    width: 180px;
    min-height: 164px;
  }

  .checkpoint-score strong {
    font-size: 72px;
  }
}

/* ========================================================================== 
   CHECKPOINT TEMPLATE V3
   Более собранная композиция: компактная шапка во время прохождения,
   кинолента как единственный активный декоративный прием и спокойные ответы.
   ========================================================================== */

.module-quiz-page {
  --checkpoint-surface: color-mix(in srgb, var(--cream) 86%, var(--white));
  --checkpoint-soft: color-mix(in srgb, var(--sky) 24%, var(--white));
}

.module-quiz-page .module-quiz-content {
  width: min(100%, 1180px);
}

.checkpoint-breadcrumbs {
  margin-bottom: 26px;
}

.checkpoint-hero {
  position: relative;
  margin-bottom: clamp(30px, 4vw, 46px);
  padding-bottom: clamp(24px, 3vw, 34px);
  border-bottom: 3px solid var(--ink);
}

.checkpoint-hero-meta {
  margin-bottom: 22px;
}

.checkpoint-hero-layout {
  grid-template-columns: minmax(0, 1fr) minmax(230px, 300px);
  gap: clamp(28px, 5vw, 64px);
  align-items: end;
}

.checkpoint-hero h1 {
  gap: 0.08em;
  font-size: clamp(60px, 7.2vw, 98px);
  line-height: 0.86;
}

.checkpoint-hero h1 > span {
  padding: 0.12em 0.14em 0.07em;
  box-shadow: 0.075em 0.085em 0 var(--pink);
}

.checkpoint-hero h1 > strong {
  font-size: 0.82em;
  letter-spacing: 0.01em;
}

.checkpoint-hero-layout > p {
  max-width: 285px;
  font-size: clamp(36px, 4vw, 52px);
}

.checkpoint-intro {
  grid-template-columns: minmax(0, 1.22fr) minmax(300px, 0.78fr);
  gap: clamp(24px, 3.4vw, 38px);
  padding: clamp(28px, 4vw, 44px);
  background: var(--checkpoint-surface);
  border-width: 3px;
  border-radius: 28px;
  box-shadow: 8px 9px 0 var(--sky);
}

.checkpoint-intro h2 {
  margin-bottom: 20px;
  font-size: clamp(50px, 5.3vw, 72px);
  line-height: 0.92;
}

.checkpoint-intro-text {
  max-width: 690px;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.5;
}

.checkpoint-facts {
  gap: 10px;
  margin-top: 26px;
}

.checkpoint-facts li {
  min-height: 76px;
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 11px;
  border-radius: 14px;
}

.checkpoint-facts b {
  font-size: 24px;
}

.checkpoint-facts span {
  font-size: 12px;
}

.checkpoint-topics {
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  padding: 24px;
  border-radius: 20px;
  box-shadow: 5px 6px 0 var(--acid);
  transform: rotate(0.35deg);
}

.checkpoint-topics-star {
  width: 52px;
  height: 52px;
}

.checkpoint-topics-star svg {
  width: 36px;
  height: 36px;
}

.checkpoint-topics h3 {
  margin-bottom: 16px;
  font-size: clamp(34px, 3vw, 42px);
}

.checkpoint-topics li {
  font-size: 13px;
}

.checkpoint-intro > .checkpoint-button {
  margin-top: 4px;
}

.checkpoint-intro-note {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 2px 0 0;
  padding: 0.16em 0.22em 0.22em;
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 0.96;
  transform: rotate(-1.5deg);
}

.checkpoint-button {
  border-radius: 14px;
}

.checkpoint-button--primary {
  width: min(100%, 520px);
}

/* В рабочем режиме большой постер превращается в компактный титр. */
.module-quiz-page[data-quiz-screen="questions"] .module-quiz-content,
.module-quiz-page[data-quiz-screen="result"] .module-quiz-content {
  padding-top: clamp(24px, 3vw, 38px);
}

.module-quiz-page[data-quiz-screen="questions"] .checkpoint-breadcrumbs,
.module-quiz-page[data-quiz-screen="result"] .checkpoint-breadcrumbs {
  display: none;
}

.module-quiz-page[data-quiz-screen="questions"] .checkpoint-hero,
.module-quiz-page[data-quiz-screen="result"] .checkpoint-hero {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom-width: 2px;
}

.module-quiz-page[data-quiz-screen="questions"] .checkpoint-hero-meta,
.module-quiz-page[data-quiz-screen="result"] .checkpoint-hero-meta {
  display: none;
}

.module-quiz-page[data-quiz-screen="questions"] .checkpoint-hero-layout,
.module-quiz-page[data-quiz-screen="result"] .checkpoint-hero-layout {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.module-quiz-page[data-quiz-screen="questions"] .checkpoint-hero h1,
.module-quiz-page[data-quiz-screen="result"] .checkpoint-hero h1 {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
}

.module-quiz-page[data-quiz-screen="questions"] .checkpoint-hero h1 > span,
.module-quiz-page[data-quiz-screen="result"] .checkpoint-hero h1 > span {
  padding: 7px 10px 5px;
  box-shadow: 4px 4px 0 var(--pink);
  transform: none;
}

.module-quiz-page[data-quiz-screen="questions"] .checkpoint-hero h1 > strong,
.module-quiz-page[data-quiz-screen="result"] .checkpoint-hero h1 > strong {
  font-size: 0.9em;
}

.module-quiz-page[data-quiz-screen="questions"] .checkpoint-hero-layout > p,
.module-quiz-page[data-quiz-screen="result"] .checkpoint-hero-layout > p {
  max-width: 210px;
  font-size: clamp(27px, 3vw, 34px);
  line-height: 0.88;
  transform: rotate(-1.5deg);
}

.checkpoint-form {
  width: min(100%, 1060px);
  gap: 22px;
  margin-inline: auto;
  scroll-margin-top: 88px;
}

.checkpoint-progress {
  grid-template-columns: 158px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 13px 16px;
  border-radius: 18px;
  box-shadow: 5px 6px 0 var(--pink);
}

.checkpoint-progress-copy {
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
  font-size: 10px;
  line-height: 1.2;
}

.checkpoint-progress-copy > span {
  color: var(--acid);
  font-size: 12px;
}

.checkpoint-progress-copy > strong {
  color: color-mix(in srgb, var(--white) 72%, transparent);
  font-size: 9px;
}

.checkpoint-progress-track {
  gap: 5px;
}

.checkpoint-progress-track > span {
  height: 32px;
  border-width: 1.5px;
  border-radius: 5px;
}

.checkpoint-progress-track > span::before,
.checkpoint-progress-track > span::after {
  right: 3px;
  left: 3px;
  height: 2px;
}

.checkpoint-progress-track > span::before {
  top: 3px;
}

.checkpoint-progress-track > span::after {
  bottom: 3px;
}

.checkpoint-progress-track b {
  font-size: 15px;
}

.checkpoint-progress-track > span.is-current {
  transform: translateY(-2px);
}

.checkpoint-question {
  position: relative;
  padding: 0 0 30px;
  overflow: hidden;
  background: var(--checkpoint-surface);
  border-width: 3px;
  border-radius: 28px;
  box-shadow: 8px 9px 0 var(--sky);
  animation: checkpoint-question-enter 360ms var(--ease-standard) both;
}

.checkpoint-question > legend.lesson-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.checkpoint-question-head {
  padding: clamp(24px, 3.3vw, 36px) clamp(24px, 4vw, 42px) 22px;
}

.checkpoint-question-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 16px;
}

.checkpoint-question-tags > small,
.checkpoint-question-kind {
  width: fit-content;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.checkpoint-question-tags > small {
  background: var(--acid);
}

.checkpoint-question-kind {
  background: var(--pink);
  transform: none;
}

.checkpoint-question-head h2 {
  max-width: 900px;
  margin: 0;
  font-family: var(--ff-body);
  font-size: clamp(28px, 3.1vw, 39px);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.13;
  text-wrap: balance;
}

.checkpoint-options {
  gap: 12px;
  padding-inline: clamp(24px, 4vw, 42px);
}

.checkpoint-question label > span {
  min-height: 66px;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 15px;
  padding: 10px 16px 10px 18px;
  background: color-mix(in srgb, var(--white) 72%, var(--cream));
  border-width: 2.5px;
  border-radius: 14px;
  box-shadow: inset 7px 0 0 var(--sky), 2px 3px 0 var(--ink);
}

.checkpoint-question label b {
  width: 40px;
  height: 40px;
  background: var(--checkpoint-soft);
  border-radius: 10px;
  color: var(--violet);
  font-size: 22px;
  transform: none;
}

.checkpoint-question label i {
  font-size: 16px;
  line-height: 1.36;
}

.checkpoint-question input:checked + span {
  background: var(--violet);
  box-shadow: inset 7px 0 0 var(--acid), 4px 5px 0 var(--pink);
  transform: translate(-1px, -1px);
}

.checkpoint-question input:checked + span b {
  background: var(--acid);
  color: var(--ink);
}

.checkpoint-question-actions {
  gap: 14px;
  padding-top: 2px;
}

.checkpoint-back {
  font-size: 12px;
}

.checkpoint-result {
  width: min(100%, 1060px);
  margin-inline: auto;
  scroll-margin-top: 88px;
}

.checkpoint-result-head {
  position: relative;
  grid-template-columns: minmax(210px, 0.3fr) minmax(0, 0.7fr);
  padding: clamp(28px, 4vw, 42px);
  background: var(--checkpoint-surface);
  border-width: 3px;
  border-radius: 28px;
  box-shadow: 8px 9px 0 var(--sky);
}

.checkpoint-score {
  min-height: 200px;
  box-shadow: 6px 7px 0 var(--violet);
  transform: rotate(-1deg);
}

.checkpoint-score strong {
  font-size: clamp(76px, 7vw, 96px);
}

.checkpoint-result-copy h2 {
  font-size: clamp(50px, 5vw, 68px);
  line-height: 0.92;
}

.checkpoint-footer-nav {
  width: min(100%, 1060px);
  margin-inline: auto;
}

@keyframes checkpoint-question-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (hover: hover) and (pointer: fine) {
  .checkpoint-question label:hover > span {
    background: var(--checkpoint-soft);
    box-shadow: inset 7px 0 0 var(--sky), 4px 5px 0 var(--ink);
    transform: translate(-2px, -2px);
  }

  .checkpoint-question label:hover input:checked + span {
    background: var(--violet);
    box-shadow: inset 7px 0 0 var(--acid), 4px 5px 0 var(--pink);
  }
}

@media (max-width: 1120px) {
  .checkpoint-intro {
    grid-template-columns: minmax(0, 1fr);
  }

  .checkpoint-topics {
    transform: none;
  }
}

@media (max-width: 700px) {
  .checkpoint-breadcrumbs {
    margin-bottom: 22px;
  }

  .checkpoint-hero {
    margin-bottom: 30px;
    padding-bottom: 24px;
  }

  .checkpoint-hero-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .checkpoint-hero h1 {
    font-size: clamp(48px, 14vw, 62px);
  }

  .module-quiz-page[data-quiz-screen="intro"] .checkpoint-hero-layout > p {
    justify-self: end;
    max-width: 300px;
    margin-top: 0;
    text-align: right;
  }

  .checkpoint-intro {
    padding: 20px;
    border-radius: 22px;
    box-shadow: 6px 7px 0 var(--sky);
  }

  .checkpoint-intro h2 {
    font-size: clamp(42px, 12.6vw, 56px);
  }

  .checkpoint-intro-note {
    font-size: clamp(27px, 9vw, 34px);
    text-align: center;
  }

  .checkpoint-topics {
    padding: 18px;
  }

  .module-quiz-page[data-quiz-screen="questions"] .module-quiz-content,
  .module-quiz-page[data-quiz-screen="result"] .module-quiz-content {
    padding-top: 18px;
  }

  .module-quiz-page[data-quiz-screen="questions"] .checkpoint-hero,
  .module-quiz-page[data-quiz-screen="result"] .checkpoint-hero {
    margin-bottom: 18px;
    padding-bottom: 14px;
  }

  .module-quiz-page[data-quiz-screen="questions"] .checkpoint-hero-layout > p,
  .module-quiz-page[data-quiz-screen="result"] .checkpoint-hero-layout > p {
    display: none;
  }

  .module-quiz-page[data-quiz-screen="questions"] .checkpoint-hero h1,
  .module-quiz-page[data-quiz-screen="result"] .checkpoint-hero h1 {
    gap: 7px;
    font-size: clamp(24px, 7.5vw, 31px);
  }

  .module-quiz-page[data-quiz-screen="questions"] .checkpoint-hero h1 > span,
  .module-quiz-page[data-quiz-screen="result"] .checkpoint-hero h1 > span {
    padding: 6px 8px 4px;
    box-shadow: 3px 3px 0 var(--pink);
  }

  .checkpoint-form {
    gap: 16px;
    scroll-margin-top: 76px;
  }

  .checkpoint-progress {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border-radius: 15px;
    box-shadow: 4px 5px 0 var(--pink);
  }

  .checkpoint-progress-copy {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }

  .checkpoint-progress-track {
    gap: 3px;
  }

  .checkpoint-progress-track > span {
    height: 28px;
  }

  .checkpoint-progress-track > span::before,
  .checkpoint-progress-track > span::after {
    display: none;
  }

  .checkpoint-progress-track b {
    font-size: 12px;
  }

  .checkpoint-question {
    padding-bottom: 20px;
    border-radius: 21px;
    box-shadow: 6px 7px 0 var(--sky);
  }

  .checkpoint-question-head {
    padding: 20px 16px 16px;
  }

  .checkpoint-question-tags {
    margin-bottom: 13px;
  }

  .checkpoint-question-head h2 {
    font-size: clamp(24px, 7vw, 30px);
    line-height: 1.16;
    text-wrap: pretty;
  }

  .checkpoint-options {
    gap: 10px;
    padding-inline: 16px;
  }

  .checkpoint-question label > span {
    min-height: 62px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 11px;
    padding: 9px 10px 9px 13px;
    box-shadow: inset 5px 0 0 var(--sky), 2px 3px 0 var(--ink);
  }

  .checkpoint-question label b {
    width: 34px;
    height: 34px;
    font-size: 19px;
  }

  .checkpoint-question label i {
    font-size: 16px;
  }

  .checkpoint-question input:checked + span {
    box-shadow: inset 5px 0 0 var(--acid), 3px 4px 0 var(--pink);
  }

  .checkpoint-question-actions {
    position: static;
    gap: 8px;
    padding: 0 8px;
    background: transparent;
    border: 0;
    border-radius: 0;
    backdrop-filter: none;
  }

  .checkpoint-result-head {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px;
    border-radius: 22px;
    box-shadow: 6px 7px 0 var(--sky);
  }

  .checkpoint-result {
    scroll-margin-top: 76px;
  }

  .checkpoint-result-copy h2 {
    font-size: clamp(43px, 12vw, 56px);
  }
}

@media (max-width: 360px) {
  .checkpoint-hero h1 {
    font-size: 46px;
  }

  .module-quiz-page[data-quiz-screen="questions"] .checkpoint-hero h1,
  .module-quiz-page[data-quiz-screen="result"] .checkpoint-hero h1 {
    font-size: 23px;
  }

  .checkpoint-progress {
    padding: 10px;
  }

  .checkpoint-question-head {
    padding-inline: 14px;
  }

  .checkpoint-options {
    padding-inline: 14px;
  }

  .checkpoint-question label i {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .checkpoint-button,
  .checkpoint-progress-track > span,
  .checkpoint-question label > span,
  .checkpoint-footer-nav a,
  .checkpoint-confetti i {
    animation: none !important;
    transition: none !important;
  }

  .checkpoint-confetti {
    display: none;
  }

  .checkpoint-question {
    animation: none !important;
  }
}

.login-page {
  min-width: 320px;
  min-height: 100svh;
  overflow-x: hidden;
  background-color: var(--cream);
  background-image: var(--cream-grid-image);
  background-position: center;
  background-size: var(--cream-grid-size) var(--cream-grid-size);
  color: var(--ink);
}

.login-main {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100svh;
  overflow: clip;
  place-items: center;
  padding-block: max(var(--space-8), env(safe-area-inset-top)) max(var(--space-10), env(safe-area-inset-bottom));
  padding-inline: max(var(--space-4), env(safe-area-inset-left)) max(var(--space-6), env(safe-area-inset-right));
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(100%, 510px);
  padding: var(--space-8);
  overflow: visible;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 9px 10px 0 var(--ink);
  animation: login-card-in var(--motion-slow) var(--ease-out) both;
}

@keyframes login-card-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-card-header {
  display: grid;
  justify-items: center;
  margin-bottom: var(--space-6);
}

.login-logo {
  justify-self: center;
  min-height: 44px;
  padding-block: var(--space-1);
  color: var(--ink);
}

.login-logo:focus-visible {
  border-radius: var(--radius-xs);
}

.login-title-wrap {
  position: relative;
  display: grid;
  width: 100%;
  margin-top: var(--space-6);
  justify-items: center;
  padding-block: 0.14em 0.1em;
  text-align: center;
}

.login-title-wrap h1 {
  font-size: clamp(50px, 6vw, 68px);
  line-height: 0.98;
  text-wrap: balance;
}

.login-title-wrap p {
  position: relative;
  z-index: 1;
  justify-self: end;
  margin-top: -2px;
  margin-right: clamp(4px, 7%, 30px);
  padding: 0.14em 0.18em 0.2em;
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: clamp(32px, 4vw, 42px);
  font-weight: 400;
  line-height: 0.95;
  transform: rotate(-4deg);
  font-synthesis: none;
}

.login-title-wrap p::after {
  position: absolute;
  z-index: -1;
  right: 0.14em;
  bottom: 0.07em;
  width: 58%;
  height: 0.16em;
  background: var(--acid);
  border-radius: var(--radius-pill);
  content: "";
  transform: rotate(1deg);
}

.login-form,
.password-reset-form {
  display: grid;
  gap: var(--space-3);
}

.login-form[hidden],
.password-reset-form[hidden] {
  display: none;
}

.password-reset-intro {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  text-align: center;
}

.password-reset-intro h2 {
  font-size: clamp(36px, 5vw, 46px);
  line-height: 0.98;
}

.password-reset-intro p {
  max-width: 390px;
  margin-inline: auto;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
}

.login-field {
  display: grid;
  gap: var(--space-2);
}

.login-field label {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.login-password-control {
  position: relative;
}

.login-input {
  display: block;
  width: 100%;
  height: 56px;
  padding: 0 var(--space-4);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  outline: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  caret-color: var(--violet);
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.login-input--password {
  padding-right: 64px;
}

.login-input:hover:not(:disabled) {
  background: color-mix(in srgb, var(--white) 58%, var(--cream));
}

.login-input:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.login-input.is-filled:not([aria-invalid="true"]) {
  background: var(--white);
  box-shadow: inset 4px 0 0 var(--violet);
}

.login-input[aria-invalid="true"] {
  background: color-mix(in srgb, var(--pink) 34%, var(--white));
  box-shadow: inset 4px 0 0 var(--pink);
}

.login-input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.login-password-toggle {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid transparent;
  border-radius: var(--radius-xs);
  color: var(--ink);
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    transform var(--motion-instant) var(--ease-standard);
}

.login-password-toggle:hover:not(:disabled) {
  background: var(--acid);
  border-color: var(--ink);
}

.login-password-toggle:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
  background: var(--acid);
  border-color: var(--ink);
}

.login-password-toggle:active:not(:disabled) {
  transform: scale(0.92);
}

.login-password-toggle:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.login-eye {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-eye--hide,
.login-password-toggle[aria-pressed="true"] .login-eye--show {
  display: none;
}

.login-password-toggle[aria-pressed="true"] .login-eye--hide {
  display: block;
}

.login-feedback-slot {
  min-height: 70px;
}

.login-feedback {
  display: grid;
  min-height: 64px;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.login-feedback[hidden] {
  display: none;
}

.login-feedback svg {
  width: 30px;
  height: 30px;
  fill: var(--acid);
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-feedback a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.login-feedback-success-mark,
.login-feedback.is-success .login-feedback-error-mark {
  display: none;
}

.login-feedback.is-success {
  background: var(--acid);
}

.login-feedback.is-success .login-feedback-success-mark {
  display: block;
}

.login-feedback.is-refreshing {
  animation: login-feedback-nudge var(--motion-base) var(--ease-out);
}

@keyframes login-feedback-nudge {
  0% { transform: translateX(0); }
  35% { transform: translateX(5px); }
  70% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

.login-submit {
  position: relative;
  display: inline-grid;
  width: 100%;
  min-height: 58px;
  place-items: center;
  padding: var(--space-3) var(--space-5);
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-family: var(--ff-body);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard),
    opacity var(--motion-fast) var(--ease-standard);
}

.login-submit > span:first-child {
  grid-area: 1 / 1;
}

.login-submit:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 4px;
}

.login-submit:active:not(:disabled) {
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(4px, 5px);
}

.login-submit:disabled {
  opacity: 0.42;
  box-shadow: none;
  cursor: not-allowed;
  transform: translate(5px, 6px);
}

.login-submit-spinner {
  grid-area: 1 / 1;
  width: 22px;
  height: 22px;
  opacity: 0;
  border: 3px solid color-mix(in srgb, var(--ink) 24%, transparent);
  border-top-color: var(--ink);
  border-radius: 50%;
  pointer-events: none;
}

.login-submit.is-loading > span:first-child {
  opacity: 0;
}

.login-submit.is-loading .login-submit-spinner {
  opacity: 1;
  animation: login-spinner 720ms linear infinite;
}

@keyframes login-spinner {
  to { transform: rotate(1turn); }
}

.login-reset-link {
  justify-self: center;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding-inline: var(--space-2);
  color: var(--violet);
  font-size: 15px;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.login-reset-link:hover {
  color: var(--ink);
  text-decoration-color: var(--violet);
}

.login-reset-link:focus-visible {
  border-radius: var(--radius-xs);
}

.password-reset-back {
  justify-self: center;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: var(--space-2);
  padding-inline: var(--space-2);
  color: var(--violet);
  font-size: 15px;
  font-weight: 800;
}

.password-reset-back svg {
  width: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--motion-fast) var(--ease-standard);
}

.password-reset-back:hover svg {
  transform: translateX(-4px);
}

.password-reset-back:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.password-reset-back:focus-visible {
  border-radius: var(--radius-xs);
}

.login-support-note {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 2px dashed var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

.login-support-note a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--violet);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.login-support-note a:hover {
  color: var(--ink);
}

.login-support-note a:focus-visible {
  border-radius: var(--radius-xs);
}

.login-side-word,
.login-doodle {
  position: absolute;
  z-index: 1;
  --float-x: 0px;
  --float-y: 0px;
  pointer-events: none;
  will-change: transform;
  transition: transform var(--motion-instant) linear;
}

.login-side-word {
  left: clamp(34px, 7vw, 132px);
  top: 55%;
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: clamp(132px, 14vw, 218px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.72;
  -webkit-text-stroke: 1.4px currentColor;
  paint-order: stroke fill;
  text-shadow: 7px 10px 0 var(--sky);
  transform: translate3d(var(--float-x), var(--float-y), 0) rotate(-7deg);
  font-synthesis: weight;
}

.login-doodle {
  overflow: visible;
  transform: translate3d(var(--float-x), var(--float-y), 0) rotate(var(--doodle-rotate, 0deg));
}

.login-doodle-shape {
  stroke: none;
}

.login-doodle--spark {
  top: 12%;
  left: max(5vw, 28px);
  width: clamp(54px, 7vw, 96px);
  fill: var(--acid);
  filter: drop-shadow(7px 8px 0 var(--violet));
  --doodle-rotate: -9deg;
}

.login-doodle--heart {
  right: max(5vw, 34px);
  bottom: 12%;
  width: clamp(76px, 9vw, 128px);
  fill: var(--pink);
  filter: drop-shadow(9px 11px 0 var(--violet));
  --doodle-rotate: 8deg;
}

.login-heart-shine {
  fill: none;
  stroke: var(--white);
  stroke-width: 6;
  stroke-linecap: round;
}

@media (hover: hover) and (pointer: fine) {
  .login-submit:hover:not(:disabled) {
    box-shadow: 8px 9px 0 var(--ink);
    transform: translate(-2px, -2px);
  }
}

@media (max-width: 900px) {
  .login-side-word,
  .login-doodle {
    display: none;
  }
}

@media (max-width: 700px) {
  .login-main {
    place-items: center;
    padding-block: max(var(--space-6), env(safe-area-inset-top)) max(var(--space-8), env(safe-area-inset-bottom));
  }

  .login-card {
    width: min(510px, calc(100vw - 40px));
    max-width: calc(100vw - 40px);
    padding: var(--space-6) var(--space-5);
    border-radius: var(--radius-card);
    box-shadow: 7px 8px 0 var(--ink);
  }

  .login-card-header {
    margin-bottom: var(--space-6);
  }

  .login-title-wrap {
    margin-top: var(--space-5);
  }

  .login-title-wrap h1 {
    font-size: clamp(42px, 11vw, 50px);
  }

  .login-title-wrap p {
    justify-self: center;
    margin-right: 0;
    font-size: clamp(29px, 8.3vw, 34px);
  }

  .password-reset-intro h2 {
    font-size: clamp(34px, 10vw, 42px);
  }
}

@media (max-width: 340px) {
  body[data-lesson-id="2-5"] .lesson-template-hero h1.lesson-template-title--short {
    font-size: 40px;
  }
}

@media (max-width: 380px) {
  .login-main {
    padding-left: var(--space-3);
    padding-right: var(--space-5);
  }

  .login-card {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    padding-inline: var(--space-4);
  }

  .login-title-wrap h1 {
    font-size: 41px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-card,
  .login-feedback.is-refreshing,
  .login-submit-spinner {
    animation: none;
  }

  .login-side-word,
  .login-doodle {
    transition: none;
  }

  .login-side-word {
    transform: rotate(-7deg);
  }

  .login-doodle {
    transform: rotate(var(--doodle-rotate, 0deg));
  }
}

/* ==========================================================================
   RESET PASSWORD CONFIRM - one-time link from email
   ========================================================================== */

.reset-confirm-main {
  padding-block: max(var(--space-8), env(safe-area-inset-top)) max(var(--space-8), env(safe-area-inset-bottom));
}

.reset-confirm-card {
  width: min(100%, 550px);
}

.reset-confirm-header {
  margin-bottom: var(--space-4);
}

.reset-confirm-title {
  margin-top: var(--space-5);
}

.reset-confirm-title h1 {
  font-size: clamp(50px, 5.8vw, 66px);
}

.reset-confirm-title p {
  margin-right: clamp(8px, 11%, 48px);
  font-size: clamp(30px, 3.6vw, 39px);
}

.reset-confirm-intro {
  max-width: 450px;
  margin: 0 auto var(--space-5);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

.reset-confirm-form {
  display: grid;
  gap: var(--space-3);
}

.reset-confirm-rules {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: 2px;
}

.reset-confirm-rules li {
  display: inline-flex;
  min-height: 34px;
  gap: 6px;
  align-items: center;
  padding: 5px 9px;
  background: var(--cream);
  border: 1.5px solid color-mix(in srgb, var(--ink) 36%, transparent);
  border-radius: var(--radius-pill);
  color: color-mix(in srgb, var(--ink) 58%, transparent);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}

.reset-confirm-rules svg {
  width: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reset-confirm-rules li path {
  opacity: 0;
}

.reset-confirm-rules li.is-met {
  background: var(--acid);
  border-color: var(--ink);
  color: var(--ink);
}

.reset-confirm-rules li.is-met path {
  opacity: 1;
}

.reset-confirm-feedback-slot {
  min-height: 70px;
}

.reset-confirm-keycard {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: calc(50% + 330px);
  display: grid;
  width: 190px;
  min-height: 230px;
  align-content: center;
  justify-items: center;
  padding: var(--space-5);
  background: var(--violet);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 8px 9px 0 var(--pink);
  color: var(--white);
  text-align: center;
  transform: translate3d(var(--float-x, 0), calc(-50% + var(--float-y, 0px)), 0) rotate(4deg);
  transition: transform var(--motion-instant) linear;
  will-change: transform;
}

.reset-confirm-keycard::before {
  position: absolute;
  top: -17px;
  left: 50%;
  width: 54px;
  height: 30px;
  background: color-mix(in srgb, var(--acid) 76%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 45%, transparent);
  content: "";
  transform: translateX(-50%) rotate(-3deg);
}

.reset-confirm-keycard svg {
  width: 78px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(3px 4px 0 var(--ink));
}

.reset-confirm-keycard svg circle {
  fill: var(--acid);
}

.reset-confirm-keycard strong {
  margin-top: var(--space-3);
  font-family: var(--ff-display);
  font-size: 27px;
  font-weight: 700;
  line-height: 0.95;
}

.reset-confirm-keycard p {
  margin-top: var(--space-2);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.reset-confirm-side-word {
  top: 53%;
}

.reset-confirm-spark {
  top: 10%;
}

.reset-confirm-mobile-note {
  display: none;
}

.reset-confirm-result {
  display: grid;
  justify-items: center;
  padding-block: var(--space-2) var(--space-3);
  text-align: center;
}

.reset-confirm-result[hidden] {
  display: none;
}

.reset-confirm-result-icon {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 7px 8px 0 var(--sky);
  transform: rotate(-4deg);
  animation: reset-confirm-pop var(--motion-slow) var(--ease-out) both;
}

.reset-confirm-result--invalid .reset-confirm-result-icon {
  background: var(--pink);
  box-shadow: 7px 8px 0 var(--violet);
  transform: rotate(4deg);
}

.reset-confirm-result-icon svg {
  width: 78px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reset-confirm-result > p {
  position: relative;
  z-index: 1;
  margin-top: var(--space-5);
  padding: 0 4px;
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: 32px;
  line-height: 0.95;
  transform: rotate(-3deg);
}

.reset-confirm-result > p::after {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 7px;
  background: var(--acid);
  content: "";
}

.reset-confirm-result h2 {
  margin-top: var(--space-2);
  font-family: var(--ff-display);
  font-size: clamp(43px, 5vw, 56px);
  font-weight: 700;
  line-height: 0.94;
}

.reset-confirm-result > span:not(.reset-confirm-result-icon) {
  max-width: 390px;
  margin-top: var(--space-3);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.reset-confirm-result-action {
  margin-top: var(--space-6);
  color: var(--ink);
  text-decoration: none;
}

.reset-confirm-login-link {
  margin-top: var(--space-4);
  text-decoration: none;
}

.reset-confirm-noscript {
  margin-top: var(--space-4);
}

@keyframes reset-confirm-pop {
  from {
    opacity: 0;
    transform: rotate(-4deg) scale(0.72);
  }
  to {
    opacity: 1;
    transform: rotate(-4deg) scale(1);
  }
}

@media (max-width: 1020px) {
  .reset-confirm-keycard {
    display: none;
  }

  .reset-confirm-mobile-note {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    margin-top: var(--space-5);
    padding: var(--space-3);
    background: var(--sky);
    border: 2px dashed var(--ink);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
  }

  .reset-confirm-mobile-note svg {
    width: 30px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

@media (max-width: 700px) {
  .reset-confirm-main {
    place-items: start center;
    padding-top: max(var(--space-5), env(safe-area-inset-top));
  }

  .reset-confirm-card {
    width: min(550px, calc(100vw - 40px));
    max-width: calc(100vw - 40px);
  }

  .reset-confirm-header {
    margin-bottom: var(--space-3);
  }

  .reset-confirm-title {
    margin-top: var(--space-4);
  }

  .reset-confirm-title h1 {
    font-size: clamp(42px, 12vw, 50px);
  }

  .reset-confirm-title p {
    margin-right: 0;
    font-size: 30px;
  }

  .reset-confirm-intro {
    margin-bottom: var(--space-4);
    font-size: 15px;
  }

  .reset-confirm-rules {
    display: grid;
    grid-template-columns: 1fr;
  }

  .reset-confirm-rules li {
    width: 100%;
  }

  .reset-confirm-result-icon {
    width: 96px;
    height: 96px;
  }

  .reset-confirm-result-icon svg {
    width: 66px;
  }

  .reset-confirm-result h2 {
    font-size: 43px;
  }
}

@media (max-width: 380px) {
  .reset-confirm-card {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
  }

  .reset-confirm-title h1 {
    font-size: 41px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .reset-confirm-result-action:hover {
    box-shadow: 8px 9px 0 var(--ink);
    transform: translate(-2px, -2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reset-confirm-result-icon {
    animation: none;
  }

  .reset-confirm-keycard {
    transition: none;
    transform: translateY(-50%) rotate(4deg);
  }
}

/* ==========================================================================
   WELCOME AFTER PAYMENT - branded access receipt
   ========================================================================== */

.welcome-page {
  min-width: 320px;
  min-height: 100svh;
  overflow-x: hidden;
  background-color: var(--cream);
  background-image: var(--cream-grid-image);
  background-position: center;
  background-size: var(--cream-grid-size) var(--cream-grid-size);
  color: var(--ink);
}

.welcome-main {
  width: min(100%, 1260px);
  margin-inline: auto;
  padding:
    max(var(--space-6), env(safe-area-inset-top))
    max(var(--space-6), env(safe-area-inset-right))
    max(var(--space-8), env(safe-area-inset-bottom))
    max(var(--space-6), env(safe-area-inset-left));
}

.welcome-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-5);
  align-items: center;
}

.welcome-logo {
  min-height: 48px;
  color: var(--ink);
}

.welcome-header-note {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 6px var(--space-3);
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.welcome-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.72fr);
  gap: clamp(var(--space-10), 7vw, var(--space-20));
  align-items: center;
  padding-block: clamp(var(--space-12), 7vw, var(--space-24));
}

.welcome-copy {
  position: relative;
  min-width: 0;
}

.welcome-eyebrow {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
  padding: 7px var(--space-3);
  background: var(--violet);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
  color: var(--white);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.welcome-eyebrow svg {
  width: 19px;
  fill: var(--acid);
  stroke: var(--ink);
  stroke-width: 0.8;
}

.welcome-copy h1 {
  display: grid;
  width: fit-content;
  margin-top: var(--space-5);
  font-family: var(--ff-display);
  font-size: clamp(78px, 9vw, 128px);
  font-weight: 700;
  line-height: 0.82;
}

.welcome-copy h1 strong {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin-top: 0.08em;
  padding: 0.12em 0.15em 0.06em;
  background: var(--acid);
  border: 3px solid var(--ink);
  box-shadow: 7px 8px 0 var(--violet);
  transform: rotate(-2deg);
}

.welcome-script {
  position: relative;
  z-index: 2;
  width: fit-content;
  margin: -4px 7% 0 auto;
  padding-inline: 5px;
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: clamp(38px, 4.5vw, 58px);
  line-height: 0.9;
  transform: rotate(-4deg);
}

.welcome-script::after {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: -1px;
  left: 24%;
  height: 9px;
  background: var(--pink);
  content: "";
}

.welcome-lead {
  max-width: 680px;
  margin-top: var(--space-8);
  font-size: clamp(18px, 1.8vw, 23px);
  font-weight: 700;
  line-height: 1.55;
}

.welcome-email {
  display: inline-flex;
  max-width: 100%;
  gap: 5px;
  align-items: center;
  margin-inline: 3px;
  vertical-align: middle;
}

.welcome-email b {
  display: inline-block;
  max-width: min(100%, 440px);
  padding: 5px 9px;
  overflow: hidden;
  background: var(--sky);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-xs);
  font-size: 0.82em;
  line-height: 1.2;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.welcome-email button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.welcome-email button[hidden] {
  display: none;
}

.welcome-email button svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.welcome-email button:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.welcome-actions {
  display: grid;
  width: min(100%, 440px);
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.welcome-login-action {
  color: var(--ink);
  text-decoration: none;
}

.welcome-actions small {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.welcome-copy-status {
  position: absolute;
  bottom: -44px;
  left: 0;
  padding: 7px 10px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-xs);
  font-size: 12px;
  font-weight: 900;
}

.welcome-copy-status[hidden] {
  display: none;
}

.welcome-page [data-payment-ready][hidden],
.welcome-payment-verification[hidden] {
  display: none !important;
}

.welcome-payment-verification {
  max-width: 650px;
  margin: 25px 0 0;
  padding: 15px 17px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 5px 5px 0 var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
}

.welcome-payment-verification.is-error {
  background: #ffd5df;
}

.welcome-receipt {
  position: relative;
  isolation: isolate;
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 12px 14px 0 var(--violet);
  transform: rotate(2deg);
  animation: welcome-receipt-in var(--motion-reveal) var(--ease-out) both;
}

.welcome-receipt::before,
.welcome-receipt::after {
  position: absolute;
  z-index: 2;
  right: -14px;
  width: 25px;
  height: 25px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 50%;
  content: "";
}

.welcome-receipt::before {
  top: 31%;
}

.welcome-receipt::after {
  bottom: 21%;
}

.welcome-receipt-tape {
  position: absolute;
  z-index: 3;
  top: -17px;
  left: 50%;
  width: 92px;
  height: 36px;
  background: color-mix(in srgb, var(--acid) 76%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 48%, transparent);
  transform: translateX(-50%) rotate(-2deg);
}

.welcome-paid-stamp {
  position: absolute;
  z-index: 4;
  top: 22px;
  right: 18px;
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  color: var(--violet);
  transform: rotate(11deg);
  animation: welcome-stamp-in 540ms 260ms var(--ease-out) both;
}

.welcome-paid-stamp svg {
  position: absolute;
  inset: 0;
  width: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.welcome-paid-stamp b {
  margin-top: 44px;
  font-family: var(--ff-display);
  font-size: 20px;
  letter-spacing: 0.03em;
}

.welcome-receipt-head {
  padding-right: 96px;
  padding-bottom: var(--space-5);
  border-bottom: 2px dashed var(--ink);
}

.welcome-receipt-head span,
.welcome-receipt-head strong,
.welcome-receipt-head small {
  display: block;
}

.welcome-receipt-head span {
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: 30px;
  line-height: 0.95;
}

.welcome-receipt-head strong {
  margin-top: 6px;
  font-family: var(--ff-display);
  font-size: 33px;
  line-height: 0.95;
}

.welcome-receipt-head small {
  margin-top: 7px;
  font-size: 10px;
  font-weight: 800;
}

.welcome-receipt-line {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: baseline;
  padding-block: var(--space-5);
  border-bottom: 2px dashed var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.welcome-receipt-line strong {
  font-family: var(--ff-display);
  font-size: 30px;
  white-space: nowrap;
}

.welcome-receipt-steps {
  display: grid;
  gap: var(--space-4);
  padding-block: var(--space-5);
}

.welcome-receipt-steps li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
}

.welcome-receipt-steps li > b {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: var(--ff-display);
  font-size: 23px;
}

.welcome-receipt-steps span strong,
.welcome-receipt-steps span small {
  display: block;
}

.welcome-receipt-steps span strong {
  font-size: 14px;
  font-weight: 900;
}

.welcome-receipt-steps span small {
  margin-top: 3px;
  color: color-mix(in srgb, var(--ink) 63%, transparent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.welcome-receipt-foot {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: center;
  padding-top: var(--space-5);
  border-top: 3px solid var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.welcome-receipt-foot strong {
  padding: 4px 9px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-xs);
  font-family: var(--ff-display);
  font-size: 25px;
}

.welcome-help {
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--sky);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 9px 10px 0 var(--ink);
}

.welcome-help-title {
  display: flex;
  gap: var(--space-5);
  align-items: center;
}

.welcome-help-title > span {
  display: grid;
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  place-items: center;
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: 50%;
  transform: rotate(-4deg);
}

.welcome-help-title svg {
  width: 58px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.welcome-help-title p {
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: 29px;
  line-height: 0.9;
}

.welcome-help-title h2 {
  margin-top: 5px;
  font-family: var(--ff-display);
  font-size: clamp(42px, 5vw, 64px);
  line-height: 0.92;
}

.welcome-help-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: clamp(var(--space-6), 5vw, var(--space-16));
  align-items: center;
  margin-top: var(--space-8);
}

.welcome-help-list {
  display: grid;
  gap: var(--space-3);
}

.welcome-help-list li {
  display: grid;
  min-height: 62px;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  padding: 9px var(--space-3);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.welcome-help-list b {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: var(--ff-display);
  font-size: 21px;
}

.welcome-resend {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 6px 7px 0 var(--violet);
}

.welcome-resend > p {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
}

.welcome-resend-button {
  position: relative;
  display: inline-grid;
  min-height: 54px;
  place-items: center;
  padding: var(--space-3);
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard),
    opacity var(--motion-fast) var(--ease-standard);
}

.welcome-resend-button > span {
  grid-area: 1 / 1;
}

.welcome-resend-button:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.welcome-resend-button:disabled {
  opacity: 0.55;
  box-shadow: none;
  cursor: not-allowed;
}

.welcome-resend-button.is-loading > span:first-child {
  opacity: 0;
}

.welcome-resend-button.is-loading .login-submit-spinner {
  opacity: 1;
  animation: login-spinner 720ms linear infinite;
}

.welcome-resend-feedback {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-3);
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.welcome-resend-feedback[hidden] {
  display: none;
}

.welcome-resend-feedback.is-error {
  background: var(--pink);
}

.welcome-resend-feedback svg {
  width: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.welcome-resend-error-mark,
.welcome-resend-feedback.is-error .welcome-resend-success-mark {
  display: none;
}

.welcome-resend-feedback.is-error .welcome-resend-error-mark {
  display: block;
}

.welcome-resend small {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.welcome-resend a {
  min-height: 44px;
  color: var(--violet);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.welcome-resend a:focus-visible {
  border-radius: var(--radius-xs);
}

.welcome-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4) var(--space-8);
  padding-top: var(--space-10);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.welcome-footer span {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
}

.welcome-footer span:not(:last-child)::after {
  width: 6px;
  height: 6px;
  margin-left: var(--space-6);
  background: var(--violet);
  border: 1px solid var(--ink);
  border-radius: 50%;
  content: "";
}

@keyframes welcome-receipt-in {
  from {
    opacity: 0;
    transform: translateY(24px) rotate(2deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(2deg);
  }
}

@keyframes welcome-stamp-in {
  from {
    opacity: 0;
    transform: rotate(22deg) scale(1.35);
  }
  to {
    opacity: 1;
    transform: rotate(11deg) scale(1);
  }
}

@media (hover: hover) and (pointer: fine) {
  .welcome-email button:hover {
    background: var(--acid);
    transform: rotate(-4deg);
  }

  .welcome-login-action:hover,
  .welcome-resend-button:hover:not(:disabled) {
    box-shadow: 8px 9px 0 var(--ink);
    transform: translate(-2px, -2px);
  }
}

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

  .welcome-copy {
    max-width: 760px;
  }

  .welcome-receipt {
    width: min(100%, 560px);
    justify-self: center;
  }

  .welcome-help-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .welcome-main {
    padding-inline: max(var(--space-4), env(safe-area-inset-left)) max(var(--space-5), env(safe-area-inset-right));
  }

  .welcome-header-note {
    display: none;
  }

  .welcome-hero {
    gap: var(--space-12);
    padding-block: var(--space-10) var(--space-16);
  }

  .welcome-copy h1 {
    font-size: clamp(60px, 19vw, 76px);
  }

  .welcome-copy h1 strong {
    border-width: 2px;
    box-shadow: 5px 6px 0 var(--violet);
  }

  .welcome-script {
    margin-right: 4%;
    font-size: 39px;
  }

  .welcome-lead {
    margin-top: var(--space-6);
    font-size: 17px;
  }

  .welcome-email {
    display: flex;
    width: 100%;
    margin: var(--space-2) 0;
  }

  .welcome-email b {
    flex: 1 1 auto;
    font-size: 14px;
  }

  .welcome-actions {
    width: 100%;
    margin-top: var(--space-6);
  }

  .welcome-receipt {
    width: calc(100% - 6px);
    padding: var(--space-6) var(--space-5);
    border-width: 2px;
    box-shadow: 7px 8px 0 var(--violet);
    transform: none;
  }

  .welcome-receipt::before,
  .welcome-receipt::after {
    display: none;
  }

  .welcome-paid-stamp {
    top: 18px;
    right: 12px;
    width: 86px;
    height: 86px;
  }

  .welcome-paid-stamp b {
    margin-top: 36px;
    font-size: 17px;
  }

  .welcome-receipt-head {
    padding-right: 78px;
  }

  .welcome-receipt-head strong {
    font-size: 28px;
  }

  .welcome-help {
    padding: var(--space-5);
    border-width: 2px;
    border-radius: var(--radius-card);
    box-shadow: 6px 7px 0 var(--ink);
  }

  .welcome-help-title {
    gap: var(--space-3);
  }

  .welcome-help-title > span {
    width: 62px;
    height: 62px;
    border-width: 2px;
  }

  .welcome-help-title svg {
    width: 46px;
  }

  .welcome-help-title p {
    font-size: 24px;
  }

  .welcome-help-title h2 {
    font-size: 42px;
  }

  .welcome-help-grid {
    gap: var(--space-8);
    margin-top: var(--space-6);
  }

  .welcome-help-list li {
    font-size: 13px;
  }

  .welcome-resend {
    padding: var(--space-4);
    border-width: 2px;
    box-shadow: 5px 6px 0 var(--violet);
  }

  .welcome-footer {
    display: grid;
    justify-items: center;
    gap: var(--space-2);
  }

  .welcome-footer span:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 380px) {
  .welcome-main {
    padding-left: var(--space-3);
    padding-right: var(--space-5);
  }

  .welcome-copy h1 {
    font-size: 59px;
  }

  .welcome-paid-stamp {
    width: 78px;
    height: 78px;
  }

  .welcome-receipt-head {
    padding-right: 70px;
  }

  .welcome-help-title h2 {
    font-size: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-receipt,
  .welcome-paid-stamp {
    animation: none;
  }

  .welcome-receipt {
    transform: rotate(2deg);
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 700px) {
  .welcome-receipt {
    transform: none;
  }
}

/* ==========================================================================
   ERROR 404 - lost frame
   ========================================================================== */

.error-page {
  display: grid;
  min-width: 320px;
  min-height: 100svh;
  grid-template-rows: auto 1fr auto;
  overflow-x: hidden;
  background-color: var(--cream);
  background-image: var(--cream-grid-image);
  background-position: center;
  background-size: var(--cream-grid-size) var(--cream-grid-size);
  color: var(--ink);
}

.error-header,
.error-footer {
  width: min(100%, 1320px);
  margin-inline: auto;
  padding-inline: max(var(--space-6), env(safe-area-inset-left)) max(var(--space-6), env(safe-area-inset-right));
}

.error-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-5);
  align-items: center;
  padding-top: max(var(--space-6), env(safe-area-inset-top));
}

.error-logo {
  min-height: 48px;
  color: var(--ink);
}

.error-code-label {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 6px var(--space-3);
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.error-main {
  display: grid;
  place-items: center;
  padding: clamp(var(--space-8), 5vw, var(--space-16)) max(var(--space-6), env(safe-area-inset-right));
}

.error-stage {
  display: grid;
  width: min(100%, 1040px);
  justify-items: center;
  text-align: center;
}

.error-eyebrow {
  display: inline-flex;
  min-height: 40px;
  gap: var(--space-2);
  align-items: center;
  padding: 7px var(--space-3);
  background: var(--violet);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
  color: var(--white);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.error-eyebrow svg {
  width: 20px;
  fill: var(--acid);
  stroke: var(--ink);
  stroke-width: 0.8;
}

.error-film {
  position: relative;
  width: min(100%, 900px);
  margin-top: var(--space-5);
  padding-block: 34px;
  background: var(--ink);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 11px 13px 0 var(--violet);
  transform: rotate(-1deg);
  animation: error-film-in var(--motion-reveal) var(--ease-out) both;
}

.error-film-holes {
  position: absolute;
  right: 18px;
  left: 18px;
  height: 14px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--cream) 0 24px,
    transparent 24px 46px
  );
  border-radius: 3px;
}

.error-film-holes--top {
  top: 10px;
}

.error-film-holes--bottom {
  bottom: 10px;
}

.error-film h1 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  padding-inline: var(--space-4);
  font-family: var(--ff-display);
  font-size: clamp(124px, 16vw, 218px);
  font-weight: 700;
  line-height: 0.78;
}

.error-film h1 span {
  display: grid;
  min-width: 0;
  min-height: 0.92em;
  place-items: center;
  padding: 0.08em 0.06em 0.02em;
  background: var(--white);
  border: 3px solid var(--cream);
  border-radius: var(--radius-xs);
  color: var(--ink);
}

.error-film h1 span:nth-child(2) {
  background: var(--acid);
  border-color: var(--acid);
  transform: rotate(3deg) scale(1.04);
}

.error-film h1 span:nth-child(3) {
  background: var(--sky);
  border-color: var(--sky);
}

.error-script {
  position: relative;
  z-index: 2;
  margin-top: -4px;
  padding: 0 6px;
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: clamp(34px, 4.4vw, 55px);
  line-height: 0.92;
  transform: rotate(-3deg);
}

.error-script::after {
  position: absolute;
  z-index: -1;
  right: 2px;
  bottom: -2px;
  left: 24%;
  height: 9px;
  background: var(--pink);
  content: "";
}

.error-message {
  position: relative;
  display: grid;
  max-width: 790px;
  justify-items: center;
  margin-top: var(--space-6);
}

.error-message h2 {
  font-family: var(--ff-display);
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 700;
  line-height: 0.92;
  text-wrap: balance;
}

.error-message > p {
  max-width: 610px;
  margin-top: var(--space-3);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  text-wrap: balance;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.error-primary-action {
  width: min(100%, 310px);
  color: var(--ink);
  text-decoration: none;
}

.error-secondary-action {
  display: inline-flex;
  min-height: 58px;
  gap: var(--space-2);
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-5);
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.error-secondary-action svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.error-primary-action:focus-visible,
.error-secondary-action:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 4px;
}

.error-arrow {
  position: absolute;
  right: -100px;
  bottom: 10px;
  width: 132px;
  overflow: visible;
  fill: none;
  stroke: var(--violet);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(4deg);
}

.error-footer {
  display: flex;
  justify-content: space-between;
  gap: var(--space-5);
  align-items: center;
  padding-bottom: max(var(--space-6), env(safe-area-inset-bottom));
  color: color-mix(in srgb, var(--ink) 66%, transparent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@keyframes error-film-in {
  from {
    opacity: 0;
    transform: translateY(22px) rotate(-3deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(-1deg);
  }
}

@media (hover: hover) and (pointer: fine) {
  .error-primary-action:hover {
    box-shadow: 8px 9px 0 var(--ink);
    transform: translate(-2px, -2px);
  }

  .error-secondary-action:hover {
    background: var(--sky);
    box-shadow: 7px 8px 0 var(--ink);
    transform: translate(-2px, -2px);
  }
}

@media (max-width: 900px) {
  .error-arrow {
    display: none;
  }
}

@media (max-width: 700px) {
  .error-header,
  .error-footer {
    padding-inline: max(var(--space-4), env(safe-area-inset-left)) max(var(--space-5), env(safe-area-inset-right));
  }

  .error-code-label {
    display: none;
  }

  .error-main {
    padding: var(--space-8) max(var(--space-4), env(safe-area-inset-right)) var(--space-10);
  }

  .error-film {
    margin-top: var(--space-4);
    padding-block: 28px;
    border-width: 2px;
    box-shadow: 7px 8px 0 var(--violet);
    transform: none;
  }

  .error-film-holes {
    right: 10px;
    left: 10px;
    height: 10px;
    background-image: repeating-linear-gradient(
      90deg,
      var(--cream) 0 16px,
      transparent 16px 30px
    );
  }

  .error-film-holes--top {
    top: 8px;
  }

  .error-film-holes--bottom {
    bottom: 8px;
  }

  .error-film h1 {
    gap: 7px;
    padding-inline: 9px;
    font-size: clamp(78px, 28vw, 106px);
  }

  .error-film h1 span {
    border-width: 2px;
  }

  .error-script {
    margin-top: 4px;
    font-size: 35px;
  }

  .error-message {
    margin-top: var(--space-5);
  }

  .error-message h2 {
    font-size: clamp(40px, 12vw, 50px);
  }

  .error-message > p {
    font-size: 15px;
  }

  .error-actions {
    display: grid;
    width: 100%;
  }

  .error-primary-action,
  .error-secondary-action {
    width: 100%;
  }

  .error-footer {
    display: grid;
    justify-content: center;
    gap: 6px;
    text-align: center;
  }
}

@media (max-width: 380px) {
  .error-header,
  .error-footer {
    padding-left: var(--space-3);
    padding-right: var(--space-5);
  }

  .error-main {
    padding-right: var(--space-5);
    padding-left: var(--space-3);
  }

  .error-film h1 {
    font-size: 78px;
  }

  .error-message h2 {
    font-size: 39px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .error-film {
    animation: none;
  }
}

/* ==========================================================================
   ERROR 500 - frozen editing screen
   ========================================================================== */

.server-error-main {
  padding-top: clamp(var(--space-6), 3.5vw, var(--space-10));
  padding-bottom: clamp(var(--space-8), 4vw, var(--space-12));
}

.server-error-label {
  background: var(--acid);
}

.server-error-eyebrow {
  background: var(--pink);
  color: var(--ink);
}

.server-error-eyebrow svg {
  fill: var(--violet);
}

.server-error-visual {
  position: relative;
  width: min(100%, 870px);
  margin-top: var(--space-5);
}

.server-error-monitor {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 11px 13px 0 var(--pink);
  transform: rotate(0.6deg);
  animation: server-monitor-in var(--motion-reveal) var(--ease-out) both;
}

.server-monitor-bar {
  display: grid;
  min-height: 42px;
  grid-template-columns: repeat(3, 12px) 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px var(--space-4);
  background: var(--white);
  border-bottom: 3px solid var(--ink);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.server-monitor-bar > span {
  width: 12px;
  height: 12px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.server-monitor-bar > span:nth-child(2) {
  background: var(--acid);
}

.server-monitor-bar > span:nth-child(3) {
  background: var(--sky);
}

.server-monitor-bar b {
  justify-self: center;
}

.server-monitor-bar em {
  padding: 4px 8px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 9px;
  font-style: normal;
}

.server-monitor-screen {
  display: grid;
  min-height: 250px;
  grid-template-columns: minmax(0, 1.35fr) minmax(190px, 0.65fr);
  background:
    linear-gradient(color-mix(in srgb, var(--white) 8%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--white) 8%, transparent) 1px, transparent 1px),
    var(--violet);
  background-size: 30px 30px;
}

.server-monitor-code {
  position: relative;
  display: grid;
  place-content: center;
  padding: var(--space-4);
  border-right: 3px solid var(--ink);
}

.server-monitor-code h1 {
  color: var(--white);
  font-family: var(--ff-display);
  font-size: clamp(150px, 17vw, 220px);
  font-weight: 700;
  line-height: 0.72;
  letter-spacing: 0.02em;
  text-shadow: 8px 9px 0 var(--ink);
}

.server-monitor-note {
  position: absolute;
  z-index: 2;
  top: 20px;
  left: 7%;
  padding: 3px 10px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-xs);
  font-family: var(--ff-script);
  font-size: 28px;
  line-height: 1;
  transform: rotate(-5deg);
}

.server-monitor-status {
  display: inline-flex;
  justify-self: center;
  gap: 8px;
  align-items: center;
  margin-top: var(--space-4);
  padding: 7px 12px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.server-monitor-status i {
  width: 9px;
  height: 9px;
  background: var(--pink);
  border: 1px solid var(--ink);
  border-radius: 50%;
  animation: server-status-pulse 1s ease-in-out infinite alternate;
}

.server-monitor-warning {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--sky);
}

.server-monitor-warning svg {
  width: min(100%, 130px);
  overflow: visible;
  fill: var(--acid);
  stroke: var(--ink);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(6px 7px 0 var(--ink));
  transform: rotate(2deg);
}

.server-monitor-warning span {
  padding: 4px 9px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.server-timeline {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 7px var(--space-3);
  padding: 13px var(--space-4) var(--space-4);
  background: var(--ink);
}

.server-timeline-tools {
  display: flex;
  grid-row: 1 / 3;
  gap: 6px;
  align-items: flex-start;
  padding-top: 4px;
}

.server-timeline-tools span {
  width: 14px;
  height: 14px;
  background: var(--cream);
  border-radius: 2px;
}

.server-timeline-track {
  position: relative;
  display: flex;
  height: 21px;
  gap: 5px;
  align-items: stretch;
}

.server-timeline-track i {
  display: block;
  flex: 1 1 auto;
  background: var(--violet);
  border-radius: 2px;
}

.server-timeline-track i:nth-child(2) {
  background: var(--pink);
}

.server-timeline-track i:nth-child(3) {
  background: var(--sky);
}

.server-timeline-track b {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 61%;
  width: 3px;
  background: var(--acid);
  box-shadow: 0 -5px 0 2px var(--acid);
}

.server-timeline-track--short {
  width: 76%;
}

.server-timeline-track--short i:first-child {
  background: var(--sky);
}

.server-error-cable {
  position: absolute;
  right: -106px;
  bottom: -92px;
  width: 180px;
  overflow: visible;
  fill: var(--pink);
  stroke: var(--ink);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(6deg);
}

.server-error-script {
  margin-top: 9px;
}

.server-error-message {
  margin-top: var(--space-5);
}

.server-retry-action {
  position: relative;
  min-width: 248px;
  cursor: pointer;
}

.server-retry-action .login-submit-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  opacity: 0;
  transform: translate(-50%, -50%);
}

.server-retry-action.is-loading > svg,
.server-retry-action.is-loading [data-retry-label] {
  opacity: 0;
}

.server-retry-action.is-loading .login-submit-spinner {
  opacity: 1;
}

.server-retry-action:disabled {
  cursor: wait;
}

.server-error-support {
  margin-top: var(--space-4);
  padding: 6px 12px;
  background: color-mix(in srgb, var(--acid) 55%, var(--cream));
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 900;
}

@keyframes server-monitor-in {
  from {
    opacity: 0;
    transform: translateY(22px) rotate(2.5deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0.6deg);
  }
}

@keyframes server-status-pulse {
  to {
    background: var(--acid);
    transform: scale(1.25);
  }
}

@media (hover: hover) and (pointer: fine) {
  .server-retry-action:hover:not(:disabled) {
    background: var(--pink);
  }
}

@media (max-width: 1100px) {
  .server-error-cable {
    display: none;
  }
}

@media (max-width: 700px) {
  .server-error-main {
    padding-top: var(--space-6);
  }

  .server-error-visual {
    margin-top: var(--space-4);
  }

  .server-error-monitor {
    border-width: 2px;
    box-shadow: 7px 8px 0 var(--pink);
    transform: none;
  }

  .server-monitor-bar {
    min-height: 36px;
    grid-template-columns: repeat(3, 10px) 1fr;
    gap: 6px;
    padding: 6px var(--space-3);
    border-bottom-width: 2px;
  }

  .server-monitor-bar > span {
    width: 10px;
    height: 10px;
  }

  .server-monitor-bar b {
    justify-self: end;
  }

  .server-monitor-bar em {
    display: none;
  }

  .server-monitor-screen {
    min-height: 184px;
    grid-template-columns: minmax(0, 1.45fr) minmax(92px, 0.55fr);
  }

  .server-monitor-code {
    border-right-width: 2px;
  }

  .server-monitor-code h1 {
    font-size: clamp(96px, 31vw, 126px);
    text-shadow: 5px 6px 0 var(--ink);
  }

  .server-monitor-note {
    top: 12px;
    left: 5%;
    font-size: 23px;
  }

  .server-monitor-status {
    max-width: 190px;
    margin-top: var(--space-3);
    font-size: 7px;
  }

  .server-monitor-warning {
    gap: var(--space-2);
    padding: var(--space-2);
  }

  .server-monitor-warning svg {
    width: 76px;
    stroke-width: 5;
    filter: drop-shadow(4px 5px 0 var(--ink));
  }

  .server-monitor-warning span {
    font-size: 7px;
  }

  .server-timeline {
    grid-template-columns: 42px 1fr;
    gap: 6px 8px;
    padding: 10px;
  }

  .server-timeline-tools {
    gap: 4px;
  }

  .server-timeline-tools span {
    width: 10px;
    height: 10px;
  }

  .server-timeline-track {
    height: 15px;
  }

  .server-error-script {
    margin-top: 7px;
  }

  .server-error-message {
    margin-top: var(--space-4);
  }

  .server-retry-action {
    min-width: 0;
  }

  .server-error-support {
    font-size: 10px;
  }
}

@media (max-width: 380px) {
  .server-monitor-screen {
    grid-template-columns: minmax(0, 1fr) 82px;
  }

  .server-monitor-code h1 {
    font-size: 94px;
  }

  .server-monitor-status {
    padding-inline: 7px;
    font-size: 6px;
  }

  .server-monitor-warning svg {
    width: 64px;
  }

  .server-monitor-warning span {
    padding-inline: 5px;
  }

  .server-timeline {
    grid-template-columns: 36px 1fr;
  }

  .server-error-support {
    border-radius: var(--radius-sm);
  }
}

@media (prefers-reduced-motion: reduce) {
  .server-error-monitor,
  .server-monitor-status i {
    animation: none;
  }

  .server-error-monitor {
    transform: none;
  }
}

/* ==========================================================================
   LESSON TEMPLATE - guided path, video, notes book, quiz and assignment
   ========================================================================== */

.lesson-page {
  --lesson-stagebar-height: 116px;
}

.lesson-workspace {
  position: relative;
  min-width: 0;
  max-width: 100%;
}

.lesson-stagebar {
  position: fixed;
  z-index: 18;
  top: 0;
  right: 0;
  left: var(--course-sidebar-width);
  display: grid;
  min-height: var(--lesson-stagebar-height);
  grid-template-columns: minmax(220px, 0.7fr) minmax(520px, 1.3fr);
  gap: var(--space-8);
  align-items: center;
  padding: var(--space-4) clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--white);
  border-bottom: 2px solid var(--ink);
  box-shadow: 0 5px 0 var(--cream);
  transition: left var(--motion-base) var(--ease-standard);
}

.lesson-stagebar-copy {
  min-width: 0;
}

.lesson-stagebar-copy span,
.lesson-stagebar-copy strong {
  display: block;
}

.lesson-stagebar-copy span {
  width: fit-content;
  margin-bottom: 8px;
  padding: 4px 8px 3px;
  background: var(--acid);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-xs);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: rotate(-1.5deg);
}

.lesson-stagebar-copy strong {
  position: relative;
  z-index: 0;
  width: fit-content;
  overflow: hidden;
  padding: 0 4px 2px 0;
  font-size: clamp(15px, 1.4vw, 20px);
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-stagebar-copy strong::after {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 1px;
  left: 18%;
  height: 7px;
  background: var(--pink);
  content: "";
  transform: rotate(-1deg);
}

.lesson-stage-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  padding: 10px 14px 8px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 4px 5px 0 var(--sky);
}

.lesson-stage-progress::before {
  position: absolute;
  z-index: 0;
  top: 28px;
  right: 12.5%;
  left: 12.5%;
  height: 3px;
  background: var(--ink);
  content: "";
}

.lesson-stage-progress li {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: color-mix(in srgb, var(--ink) 42%, transparent);
  text-align: center;
}

.lesson-stage-progress li > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.lesson-stage-progress li > b {
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
}

.lesson-stage-progress li.is-complete,
.lesson-stage-progress li.is-current {
  color: var(--ink);
}

.lesson-stage-progress li.is-complete > span {
  background: var(--acid);
}

.lesson-stage-progress li.is-current > span {
  background: var(--violet);
  box-shadow: 3px 4px 0 var(--pink);
  color: var(--white);
  transform: translateY(-2px);
}

.lesson-content {
  width: min(100%, 1440px);
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
  padding: calc(var(--lesson-stagebar-height) + var(--space-12)) clamp(var(--space-6), 4vw, var(--space-12)) 120px;
}

.lesson-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 7px;
  align-items: center;
  /* Ссылки внутри сами занимают 44px по высоте, поэтому внешний отступ
     уменьшен на ту же величину: строка стала выше, а разметка не разъехалась. */
  margin-bottom: calc(var(--space-8) - 14px);
  color: color-mix(in srgb, var(--ink) 60%, transparent);
  font-size: 12px;
  font-weight: 800;
}

.lesson-breadcrumbs a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--violet);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}

.lesson-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-6);
  align-items: end;
  margin-bottom: var(--space-16);
}

.lesson-kicker {
  width: fit-content;
  margin-bottom: var(--space-3);
  padding: 7px var(--space-3);
  background: var(--violet);
  border-radius: var(--radius-pill);
  color: var(--white);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.lesson-hero h1 {
  max-width: 820px;
  padding-block: 0.12em;
  font-size: clamp(48px, 6vw, 78px);
  line-height: 0.92;
  text-wrap: balance;
}

.lesson-hero-title {
  display: grid;
  justify-items: start;
  gap: 0.08em;
  overflow: visible;
  isolation: isolate;
}

.lesson-hero-title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12em;
  align-items: center;
  overflow: visible;
}

.lesson-hero-title-line--welcome {
  line-height: 0.88;
}

.lesson-hero-title-line--club {
  font-size: 0.78em;
  line-height: 0.88;
  transform: translateX(0.12em);
}

.lesson-hero-title-sticker {
  position: relative;
  z-index: 0;
  display: inline-block;
  padding: 0.08em 0.16em 0.045em;
  white-space: nowrap;
}

.lesson-hero-title-sticker--welcome {
  background: var(--violet);
  box-shadow: 0.08em 0.09em 0 var(--pink);
  color: var(--acid);
  transform: rotate(0.8deg) skewX(-1deg);
}

.lesson-hero-title-sticker--lut {
  background: var(--acid);
  box-shadow: 0.07em 0.08em 0 var(--pink);
  color: var(--ink);
  transform: rotate(-1.5deg);
}

.lesson-hero-title-sticker--club {
  background: var(--sky);
  box-shadow: 0.07em 0.08em 0 var(--acid);
  color: var(--violet);
  transform: rotate(0.8deg) skewX(-0.8deg);
}

.lesson-hero-note {
  max-width: 240px;
  padding: 0.14em 0.18em 0.2em;
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: clamp(30px, 3vw, 42px);
  line-height: 0.95;
  text-align: right;
  transform: rotate(-3deg);
}

.lesson-stage {
  min-width: 0;
  max-width: 100%;
  scroll-margin-top: calc(var(--lesson-stagebar-height) + var(--space-6));
}

.lesson-stage[hidden] {
  display: none;
}

.lesson-stage + .lesson-stage {
  margin-top: clamp(var(--space-16), 7vw, 112px);
}

.lesson-status[hidden],
.lesson-no-assignment[hidden],
.lesson-quiz-complete[hidden],
.lesson-quiz-question[hidden] {
  display: none;
}

.lesson-section-heading {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  margin-bottom: var(--space-8);
}

.lesson-section-heading > span {
  display: grid;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  place-items: center;
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  font-family: var(--ff-display);
  font-size: 28px;
  font-weight: 700;
}

.lesson-section-heading p {
  margin-bottom: 2px;
  color: var(--violet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lesson-section-heading h2 {
  padding-block: 0.08em;
  font-size: clamp(40px, 5vw, 60px);
  line-height: 0.94;
}

.lesson-section-title--video {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12em;
  align-items: center;
  overflow: visible;
}

.lesson-section-title--video > span {
  position: relative;
  z-index: 0;
  display: inline-block;
}

.lesson-section-title--video > span::after {
  position: absolute;
  z-index: -1;
  right: -0.02em;
  bottom: 0.04em;
  left: 0.26em;
  height: 0.17em;
  background: var(--pink);
  content: "";
  transform: rotate(-1.5deg);
}

.lesson-section-title--video > strong {
  display: inline-block;
  padding: 0.08em 0.17em 0.045em;
  background: var(--violet);
  box-shadow: 0.08em 0.09em 0 var(--pink);
  color: var(--acid);
  font-family: inherit;
  font-weight: inherit;
  line-height: 0.86;
  transform: rotate(1deg);
}

.lesson-video-layout {
  display: grid;
  grid-template-columns: minmax(280px, 370px) minmax(0, 1fr);
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}

.lesson-video-frame {
  width: min(100%, 370px);
  padding: 10px;
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: 28px;
  box-shadow: 9px 11px 0 var(--ink), 15px 18px 0 var(--pink);
}

.lesson-video-player {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 18px;
  aspect-ratio: 9 / 16;
}

.lesson-video-mount {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
}

.lesson-video-mount:empty {
  display: none;
}

.lesson-video-player iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  max-width: none;
  height: 100% !important;
  background: var(--ink);
  border: 0;
  border-radius: 15px;
}

.lesson-video-player.is-ready .lesson-video-placeholder {
  display: none;
}

.lesson-video-player.is-loading .lesson-video-play {
  opacity: 0.45;
  pointer-events: none;
}

.lesson-video-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background-color: var(--ink);
  background-image:
    radial-gradient(circle at 20% 16%, color-mix(in srgb, var(--violet) 60%, transparent), transparent 32%),
    radial-gradient(circle at 80% 80%, color-mix(in srgb, var(--pink) 48%, transparent), transparent 33%),
    var(--noise-img);
  background-size: auto, auto, 170px 170px;
  color: var(--white);
  text-align: center;
}

.lesson-video-placeholder::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--ink) 76%, transparent));
  content: "";
}

.lesson-video-label {
  position: absolute;
  z-index: 1;
  top: var(--space-4);
  left: var(--space-4);
  padding: 6px 10px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lesson-video-placeholder > p {
  position: absolute;
  z-index: 1;
  right: var(--space-5);
  bottom: 58px;
  left: var(--space-5);
  font-size: 14px;
  font-weight: 800;
}

.lesson-video-play {
  position: relative;
  z-index: 2;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 6px 7px 0 var(--acid);
  color: var(--ink);
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.lesson-video-play svg {
  width: 54px;
  height: 54px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.5;
}

.lesson-video-fake-controls {
  position: absolute;
  z-index: 1;
  right: var(--space-4);
  bottom: var(--space-4);
  left: var(--space-4);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
}

.lesson-video-fake-controls::before {
  height: 7px;
  overflow: hidden;
  background: var(--cream);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-pill);
  content: "";
}

.lesson-video-fake-controls > span {
  position: absolute;
  bottom: 2px;
  left: 2px;
  width: var(--video-progress, 0%);
  max-width: calc(100% - 97px);
  height: 4px;
  background: var(--acid);
  border-radius: var(--radius-pill);
  transition: width var(--motion-slow) var(--ease-standard);
}

.lesson-video-fake-controls b {
  font-size: 10px;
  font-weight: 900;
}

.lesson-takeaways {
  position: relative;
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.lesson-tape {
  position: absolute;
  top: -15px;
  right: 12%;
  width: 116px;
  height: 30px;
  background: var(--sky);
  transform: rotate(2deg);
}

.lesson-takeaways > p:first-of-type,
.lesson-book-heading p,
.lesson-materials-copy > span {
  margin-bottom: var(--space-2);
  color: var(--violet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.lesson-takeaways h3 {
  margin-bottom: var(--space-6);
  font-family: var(--ff-display);
  font-size: clamp(36px, 4vw, 50px);
  line-height: 0.95;
}

.lesson-takeaways ul {
  display: grid;
  gap: var(--space-3);
}

.lesson-takeaways li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.lesson-takeaways li b {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 11px;
}

.lesson-takeaways .lesson-takeaways-note {
  margin-top: var(--space-5);
  color: var(--ink);
  font-family: var(--ff-script);
  font-size: 27px;
  line-height: 1;
  transform: rotate(-2deg);
}

.lesson-primary-action,
.lesson-secondary-action {
  min-height: 60px;
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    opacity var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.lesson-primary-action {
  display: grid;
  width: min(100%, 620px);
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: var(--space-4);
  align-items: center;
  margin: var(--space-10) auto 0;
  padding: var(--space-3) var(--space-5);
  background: var(--acid);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}

.lesson-primary-action svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lesson-stage-complete-action .lesson-action-icon {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  justify-self: end;
  place-items: center;
}

.lesson-stage-complete-action .lesson-action-icon::before {
  position: absolute;
  inset: 1px;
  background: var(--violet);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: 2px 2px 0 var(--pink);
  content: "";
  opacity: 0;
  transform: scale(0.55) rotate(-10deg);
  transition:
    opacity var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.lesson-stage-complete-action .lesson-action-arrow,
.lesson-stage-complete-action .lesson-action-check {
  position: absolute;
  inset: 0;
  transition:
    opacity var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.lesson-stage-complete-action .lesson-action-check {
  z-index: 1;
  opacity: 0;
  stroke: var(--white);
  stroke-width: 3.2;
  transform: scale(0.55) rotate(-8deg);
}

.lesson-stage-complete-action.is-complete .lesson-action-icon::before,
.lesson-stage-complete-action.is-complete .lesson-action-check {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.lesson-stage-complete-action.is-complete .lesson-action-arrow {
  opacity: 0;
  transform: translateX(8px) scale(0.75);
}

.lesson-primary-action:disabled {
  opacity: 0.38;
  box-shadow: none;
  cursor: not-allowed;
}

.lesson-book {
  position: relative;
  padding: clamp(var(--space-5), 4vw, var(--space-8));
  background: var(--violet);
  border: 3px solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: 10px 12px 0 var(--ink);
  color: var(--ink);
}

.lesson-book:focus-visible {
  outline: 3px solid var(--acid);
  outline-offset: 5px;
}

.lesson-book-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  color: var(--white);
}

.lesson-book-heading p {
  color: var(--acid);
}

.lesson-book-heading h3 {
  padding-block: 0.08em;
  font-family: var(--ff-display);
  font-size: clamp(36px, 4vw, 52px);
  line-height: 0.95;
}

.lesson-book-heading > span {
  padding: 0.1em 0.18em 0.2em;
  color: var(--acid);
  font-family: var(--ff-script);
  font-size: 32px;
  line-height: 0.95;
  transform: rotate(-3deg);
}

.lesson-book-shell {
  position: relative;
  isolation: isolate;
  perspective: 2400px;
}

.lesson-book-shadow {
  position: absolute;
  z-index: -1;
  right: 2%;
  bottom: -18px;
  left: 2%;
  height: 48px;
  opacity: 0.25;
  background: var(--ink);
  border-radius: 50%;
  filter: blur(14px);
}

.lesson-book-pages {
  position: relative;
  display: grid;
  min-height: 480px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  overflow: hidden;
  background: var(--ink);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
}

.lesson-book-page {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  align-content: start;
  gap: var(--space-4);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  background-color: var(--cream);
  background-image: var(--cream-grid-image);
  background-size: 64px 64px;
}

.lesson-book-page--cover {
  background-color: var(--acid);
  background-image: none;
}

.lesson-book-page--cream {
  background-color: var(--cream);
}

.lesson-book-page--sky {
  background-color: var(--sky);
  background-image: none;
}

.lesson-book-page--violet {
  background: var(--violet);
  color: var(--white);
}

.lesson-book-page-number {
  justify-self: end;
  color: color-mix(in srgb, currentColor 48%, transparent);
  font-family: var(--ff-display);
  font-size: 18px;
  line-height: 1;
}

.lesson-book-page-kicker {
  width: fit-content;
  padding: 6px 10px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lesson-book-page h4 {
  max-width: 410px;
  padding-block: 0.08em;
  font-family: var(--ff-display);
  font-size: clamp(34px, 3.3vw, 48px);
  line-height: 0.95;
}

.lesson-book-page > p:not(.lesson-book-page-number) {
  max-width: 440px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.48;
}

.lesson-book-page mark {
  width: fit-content;
  max-width: 430px;
  padding: var(--space-3) var(--space-4);
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  transform: rotate(-1deg);
}

.lesson-book-page ul {
  display: grid;
  gap: var(--space-2);
}

.lesson-book-page li {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  font-size: 16px;
  font-weight: 800;
}

.lesson-book-page li::before {
  display: block;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: 50%;
  content: "";
}

.lesson-book-fact {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  width: fit-content;
  padding: var(--space-3) var(--space-4);
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
}

.lesson-book-fact b {
  font-family: var(--ff-display);
  font-size: 58px;
  line-height: 0.8;
}

.lesson-book-fact span {
  max-width: 150px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.lesson-book-check {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  color: var(--ink);
}

.lesson-book-check span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 34px;
  font-weight: 900;
}

.lesson-book-check b {
  font-size: 17px;
  font-weight: 900;
}

.lesson-book-spine {
  position: absolute;
  z-index: 4;
  top: 3px;
  bottom: 3px;
  left: 50%;
  width: 18px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ink) 24%, transparent), transparent);
  transform: translateX(-50%);
  pointer-events: none;
}

.is-lesson-book-enhanced .lesson-book-pages::before,
.is-lesson-book-enhanced .lesson-book-pages::after {
  grid-column: 1;
  grid-row: 1;
  content: "";
}

.is-lesson-book-enhanced .lesson-book-pages::before {
  z-index: 0;
  background-color: var(--cream);
  background-image: var(--cream-grid-image);
  background-size: 64px 64px;
}

.is-lesson-book-enhanced .lesson-book-pages::after {
  z-index: 1;
  width: 70%;
  height: 62%;
  place-self: center;
  background:
    linear-gradient(var(--ink), var(--ink)) 50% 20% / 72% 3px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 50% 36% / 52% 3px no-repeat,
    linear-gradient(var(--pink), var(--pink)) 50% 66% / 68% 56px no-repeat;
  opacity: 0.16;
  transform: rotate(-2deg);
}

.is-lesson-book-enhanced .lesson-book-page {
  z-index: 2;
  grid-column: 2;
  grid-row: 1;
  opacity: 0;
  pointer-events: none;
  transform: rotateY(8deg) translateX(16px);
  transform-origin: left center;
  transition:
    opacity var(--motion-base) var(--ease-standard),
    transform var(--motion-page, 720ms) var(--ease-standard);
}

.is-lesson-book-enhanced .lesson-book-page.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: rotateY(0) translateX(0);
}

.is-lesson-book-enhanced .lesson-book-pages.is-turning .lesson-book-page.is-visible {
  animation: lesson-book-page-in 520ms var(--ease-standard) both;
}

@keyframes lesson-book-page-in {
  from { opacity: 0; transform: rotateY(28deg) translateX(30px); }
  to { opacity: 1; transform: rotateY(0) translateX(0); }
}

.lesson-book-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  margin-top: var(--space-6);
  color: var(--white);
}

.lesson-book-controls button {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: var(--shadow-xs);
  color: var(--ink);
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    opacity var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.lesson-book-controls button:disabled {
  opacity: 0.35;
  box-shadow: none;
}

.lesson-book-controls button svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lesson-book-controls > span {
  display: grid;
  min-width: 98px;
  grid-template-columns: auto auto;
  justify-content: center;
  align-items: baseline;
  column-gap: 5px;
  font-size: 18px;
  font-style: normal;
}

.lesson-book-controls small {
  grid-column: 1 / -1;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.lesson-book-controls b {
  color: var(--acid);
  font-family: var(--ff-display);
  font-size: 30px;
  line-height: 1;
}

.lesson-book-controls i {
  font-style: normal;
  font-weight: 900;
}

.lesson-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lesson-materials {
  display: grid;
  grid-template-columns: minmax(210px, 0.65fr) minmax(0, 1.35fr);
  gap: var(--space-6);
  align-items: center;
  margin-top: var(--space-10);
  padding: var(--space-6);
  background: var(--sky);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.lesson-materials-copy h3 {
  margin-bottom: var(--space-2);
  font-family: var(--ff-display);
  font-size: 36px;
  line-height: 0.95;
}

.lesson-materials-copy p {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.lesson-material-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.lesson-material-links a {
  display: grid;
  min-height: 62px;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-3);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.lesson-material-links a svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--violet);
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lesson-action-hint {
  margin-top: var(--space-4);
  color: color-mix(in srgb, var(--ink) 60%, transparent);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.lesson-action-hint.is-ready {
  color: var(--violet);
}

.lesson-action-hint.is-error {
  width: fit-content;
  margin-inline: auto;
  padding: 8px 12px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  color: var(--ink);
}

.lesson-quiz {
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: 10px 12px 0 var(--sky);
}

.lesson-quiz-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 2px dashed var(--ink);
}

.lesson-quiz-topline > span {
  color: var(--violet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.lesson-quiz-topline > b {
  font-size: 16px;
  font-weight: 900;
}

.lesson-quiz-topline i {
  color: var(--violet);
  font-style: normal;
}

.lesson-quiz-question {
  padding: var(--space-5);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
}

.lesson-quiz-question + .lesson-quiz-question {
  margin-top: var(--space-5);
}

.is-lesson-enhanced .lesson-quiz-question:not(.is-active) {
  display: none;
}

.lesson-quiz-question > p {
  margin-bottom: var(--space-2);
  color: var(--violet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lesson-quiz-question h3 {
  max-width: 760px;
  margin-bottom: var(--space-6);
  font-family: var(--ff-display);
  font-size: clamp(34px, 4.2vw, 50px);
  line-height: 0.98;
}

.lesson-quiz-options {
  display: grid;
  gap: var(--space-3);
}

.lesson-quiz-options button {
  min-height: 58px;
  padding: var(--space-3) var(--space-4);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  text-align: left;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.lesson-quiz-options button.is-wrong {
  background: var(--pink);
  box-shadow: var(--shadow-xs);
}

.lesson-quiz-options button.is-correct {
  background: var(--acid);
  box-shadow: var(--shadow-xs);
}

.lesson-quiz-feedback {
  display: none;
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.lesson-quiz-feedback.is-visible {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.lesson-quiz-feedback.is-error {
  background: var(--pink);
}

.lesson-quiz-feedback.is-success {
  background: var(--acid);
}

.lesson-quiz-feedback button {
  min-width: 134px;
  min-height: 44px;
  padding: 8px 12px;
  background: var(--violet);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.lesson-quiz-complete {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-6);
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.lesson-quiz-complete > span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: 50%;
  font-size: 52px;
  font-weight: 900;
}

.lesson-quiz-complete p {
  margin-bottom: 2px;
  color: var(--violet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lesson-quiz-complete h3 {
  margin-bottom: var(--space-2);
  font-family: var(--ff-display);
  font-size: clamp(38px, 5vw, 56px);
  line-height: 0.95;
}

.lesson-quiz-complete b {
  font-size: 15px;
  font-weight: 800;
}

.lesson-assignment-card {
  position: relative;
  overflow: visible;
  padding: clamp(var(--space-6), 5vw, var(--space-12));
  background: var(--violet);
  border: 3px solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: 10px 12px 0 var(--ink);
  color: var(--white);
}

.lesson-assignment-tape {
  position: absolute;
  top: -15px;
  left: 14%;
  width: 126px;
  height: 31px;
  background: var(--pink);
  transform: rotate(-2deg);
}

.lesson-assignment-number {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  color: var(--acid);
  font-family: var(--ff-display);
  font-size: 74px;
  line-height: 0.8;
}

.lesson-assignment-intro {
  max-width: 760px;
  padding-right: 90px;
}

.lesson-assignment-intro p {
  margin-bottom: var(--space-2);
  color: var(--acid);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.lesson-assignment-intro h3 {
  padding-block: 0.08em;
  font-family: var(--ff-display);
  font-size: clamp(42px, 5.2vw, 64px);
  line-height: 0.94;
}

.lesson-assignment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.lesson-assignment-grid article {
  padding: var(--space-5);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  color: var(--ink);
}

.lesson-assignment-grid article > span {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--violet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.lesson-assignment-grid article > p {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
}

.lesson-assignment-grid .lesson-assignment-criteria {
  grid-column: 1 / -1;
  background: var(--pink);
}

.lesson-assignment-criteria ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.lesson-assignment-criteria li {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.lesson-assignment-criteria li::before {
  position: absolute;
  top: 1px;
  left: 0;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  background: var(--acid);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  content: "✓";
  font-size: 10px;
  font-weight: 900;
}

.lesson-assignment-actions {
  display: grid;
  grid-template-columns: minmax(210px, 0.75fr) minmax(0, 1.25fr);
  gap: var(--space-4);
  align-items: center;
  margin-top: var(--space-8);
}

.lesson-assignment-actions .lesson-primary-action {
  width: 100%;
  margin: 0;
}

.lesson-secondary-action {
  display: grid;
  min-height: 60px;
  place-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--cream);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}

.lesson-status {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: var(--space-6);
  align-items: center;
  margin-top: var(--space-10);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  border: 3px solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.lesson-status--waiting {
  background: var(--sky);
}

.lesson-status--revision {
  background: var(--pink);
}

.lesson-status--accepted {
  background: var(--acid);
}

.lesson-hourglass {
  display: grid;
  width: 100px;
  height: 112px;
  place-items: center;
  animation: none;
}

.lesson-status > img,
.lesson-status-check {
  width: 104px;
  height: 104px;
  object-fit: cover;
  object-position: 50% 42%;
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.lesson-status > img {
  background: var(--cream);
}

.lesson-status-check {
  display: grid;
  place-items: center;
  background: var(--violet);
  color: var(--white);
  font-size: 58px;
  font-weight: 900;
}

.lesson-status p {
  margin-bottom: var(--space-2);
  color: var(--violet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lesson-status h3 {
  margin-bottom: var(--space-2);
  font-family: var(--ff-display);
  font-size: clamp(40px, 5vw, 58px);
  line-height: 0.95;
}

.lesson-status b,
.lesson-status blockquote {
  display: block;
  max-width: 700px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
}

.lesson-status--waiting div > span {
  display: block;
  width: fit-content;
  margin-top: var(--space-4);
  padding: 0.08em 0.15em 0.18em;
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: 31px;
  line-height: 1;
  transform: rotate(-2deg);
}

.lesson-status button,
.lesson-status a {
  display: inline-grid;
  min-height: 52px;
  place-items: center;
  margin-top: var(--space-4);
  padding: 10px var(--space-4);
  background: var(--violet);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  color: var(--white);
  font-size: 13px;
  font-weight: 900;
}

.lesson-no-assignment {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--space-5);
  align-items: center;
  margin-top: var(--space-12);
  padding: var(--space-8);
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.lesson-no-assignment > span {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: 50%;
  font-size: 50px;
  font-weight: 900;
}

.lesson-no-assignment p {
  color: var(--violet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lesson-no-assignment h2 {
  font-size: clamp(40px, 5vw, 60px);
  line-height: 0.95;
}

.lesson-no-assignment a {
  display: inline-block;
  margin-top: var(--space-3);
  color: var(--violet);
  font-size: 14px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.lesson-footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-20);
  padding-top: var(--space-8);
  border-top: 3px dashed var(--ink);
}

.lesson-footer-link {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.lesson-footer-link--map {
  background: var(--sky);
}

.lesson-footer-link--next {
  background: var(--acid);
}

.lesson-footer-link.is-locked {
  opacity: 0.38;
  box-shadow: none;
  pointer-events: none;
}

.lesson-footer-link svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) and (pointer: fine) {
  .lesson-breadcrumbs a:hover {
    text-decoration-color: currentColor;
  }

  .lesson-video-play:hover,
  .lesson-primary-action:not(:disabled):hover,
  .lesson-secondary-action:hover,
  .lesson-book-controls button:not(:disabled):hover,
  .lesson-material-links a:hover,
  .lesson-footer-link:not(.is-locked):hover {
    box-shadow: var(--shadow-xs);
    transform: translate(3px, 3px);
  }

  .lesson-quiz-options button:hover {
    background: var(--sky);
    box-shadow: var(--shadow-xs);
    transform: translateX(3px);
  }
}

.lesson-video-play:active,
.lesson-primary-action:not(:disabled):active,
.lesson-secondary-action:active,
.lesson-book-controls button:not(:disabled):active,
.lesson-material-links a:active,
.lesson-quiz-options button:active,
.lesson-footer-link:not(.is-locked):active {
  box-shadow: none;
  transform: translate(3px, 3px);
}

.lesson-primary-action:focus-visible,
.lesson-secondary-action:focus-visible,
.lesson-video-play:focus-visible,
.lesson-book-controls button:focus-visible,
.lesson-material-links a:focus-visible,
.lesson-quiz-options button:focus-visible,
.lesson-quiz-feedback button:focus-visible,
.lesson-status button:focus-visible,
.lesson-status a:focus-visible,
.lesson-footer-link:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 4px;
}

@media (max-width: 1120px) and (min-width: 901px) {
  .lesson-stagebar {
    grid-template-columns: minmax(140px, 0.45fr) minmax(0, 1.55fr);
    gap: var(--space-4);
    padding-inline: var(--space-5);
  }

  .lesson-content {
    padding-inline: var(--space-6);
  }

  .lesson-video-layout {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: var(--space-8);
  }
}

@media (max-width: 1024px) and (min-width: 901px) {
  .lesson-hero,
  .lesson-video-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .lesson-hero-note {
    justify-self: end;
  }

  .lesson-video-frame {
    justify-self: center;
  }

  .lesson-book-pages {
    min-height: 500px;
    grid-template-columns: minmax(0, 1fr);
  }

  .is-lesson-book-enhanced .lesson-book-pages::before,
  .is-lesson-book-enhanced .lesson-book-pages::after,
  .lesson-book-spine {
    display: none;
  }

  .is-lesson-book-enhanced .lesson-book-page {
    grid-column: 1;
  }
}

@media (max-width: 900px) {
  .lesson-page {
    --lesson-mobile-topbar-height: 66px;
    --lesson-stagebar-height: 108px;
  }

  .lesson-page .lesson-mobile-topbar {
    position: fixed;
    z-index: 45;
    top: 0;
    right: 0;
    left: 0;
  }

  .lesson-stagebar {
    z-index: 40;
    top: var(--lesson-mobile-topbar-height);
    right: 0;
    left: 0;
    min-height: var(--lesson-stagebar-height);
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 9px var(--space-4) 10px;
    box-shadow: 0 4px 0 var(--cream);
    transition: none;
  }

  .lesson-stagebar-copy {
    display: flex;
    min-width: 0;
    align-items: baseline;
    gap: var(--space-2);
  }

  .lesson-stagebar-copy span {
    flex: 0 0 auto;
    margin: 0;
    padding: 3px 6px 2px;
    font-size: 9px;
  }

  .lesson-stagebar-copy strong {
    font-size: 13px;
  }

  .lesson-stage-progress li > span {
    width: 30px;
    height: 30px;
    font-size: 10px;
  }

  .lesson-stage-progress::before {
    top: 19px;
  }

  .lesson-stage-progress {
    padding: 4px 8px 6px;
    border-radius: var(--radius-sm);
    box-shadow: 3px 3px 0 var(--sky);
  }

  .lesson-stage-progress li > b {
    font-size: 8px;
  }

  .lesson-content {
    padding: calc(var(--lesson-mobile-topbar-height) + var(--lesson-stagebar-height) + var(--space-10)) var(--space-4) calc(136px + env(safe-area-inset-bottom));
  }

  .lesson-stage {
    scroll-margin-top: calc(var(--lesson-mobile-topbar-height) + var(--lesson-stagebar-height) + var(--space-6));
  }

  .lesson-breadcrumbs {
    margin-bottom: var(--space-6);
  }

  .lesson-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-12);
  }

  .lesson-hero-note {
    justify-self: end;
    max-width: 260px;
    font-size: 32px;
  }

  .lesson-video-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .lesson-video-frame {
    justify-self: center;
  }

  .lesson-takeaways {
    max-width: 680px;
  }

  .lesson-materials {
    grid-template-columns: minmax(0, 1fr);
  }

  .lesson-assignment-criteria ul {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .lesson-book-pages {
    min-height: 500px;
    grid-template-columns: minmax(0, 1fr);
  }

  .is-lesson-book-enhanced .lesson-book-pages::before,
  .is-lesson-book-enhanced .lesson-book-pages::after,
  .lesson-book-spine {
    display: none;
  }

  .is-lesson-book-enhanced .lesson-book-page {
    grid-column: 1;
  }

  .lesson-material-links,
  .lesson-assignment-grid,
  .lesson-assignment-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .lesson-assignment-grid .lesson-assignment-criteria {
    grid-column: 1;
  }

  .lesson-status {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: var(--space-4);
  }

  .lesson-status > img,
  .lesson-status-check {
    width: 82px;
    height: 82px;
  }

  .lesson-hourglass {
    width: 82px;
    height: 96px;
  }

  .lesson-footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lesson-footer-link--map {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

@media (max-width: 560px) {
  .lesson-page {
    --lesson-stagebar-height: 104px;
  }

  .lesson-stagebar {
    padding-inline: var(--space-3);
  }

  .lesson-content {
    padding-right: var(--space-3);
    padding-left: var(--space-3);
  }

  .lesson-breadcrumbs {
    font-size: 10px;
  }

  .lesson-kicker {
    font-size: 9px;
  }

  .lesson-hero h1 {
    font-size: clamp(44px, 13vw, 56px);
  }

  .lesson-hero-title {
    gap: 0.12em;
  }

  .lesson-hero-title-line--welcome,
  .lesson-hero-title-line--club {
    gap: 0.1em;
  }

  .lesson-hero-title-line--club {
    font-size: 0.68em;
    transform: none;
  }

  .lesson-hero-note {
    font-size: 29px;
  }

  .lesson-section-heading {
    gap: var(--space-3);
    margin-bottom: var(--space-6);
  }

  .lesson-section-heading > span {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    border-width: 2px;
    font-size: 23px;
  }

  .lesson-section-heading h2 {
    font-size: clamp(35px, 10.8vw, 46px);
  }

  .lesson-video-frame {
    width: min(100%, 320px);
    padding: 7px;
    border-width: 2px;
    border-radius: 24px;
    box-shadow: 7px 8px 0 var(--ink), 11px 13px 0 var(--pink);
  }

  .lesson-video-player {
    border-width: 2px;
    border-radius: 16px;
  }

  .lesson-video-player iframe {
    border-radius: 13px;
  }

  .lesson-video-play {
    width: 74px;
    height: 74px;
  }

  .lesson-takeaways,
  .lesson-quiz,
  .lesson-assignment-card,
  .lesson-status,
  .lesson-no-assignment {
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    box-shadow: 7px 8px 0 var(--ink);
  }

  .lesson-takeaways li {
    grid-template-columns: 38px minmax(0, 1fr);
    font-size: 13px;
  }

  .lesson-takeaways li b {
    width: 34px;
    height: 34px;
  }

  .lesson-primary-action {
    min-height: 58px;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: var(--space-2);
    padding-inline: var(--space-3);
    font-size: 13px;
  }

  .lesson-primary-action svg {
    width: 32px;
    height: 32px;
  }

  .lesson-stage-complete-action .lesson-action-icon {
    width: 32px;
    height: 32px;
  }

  .lesson-book {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    box-shadow: 7px 8px 0 var(--ink);
  }

  .lesson-book-heading > span {
    display: none;
  }

  .lesson-book-pages {
    min-height: 490px;
  }

  .lesson-book-page {
    padding: var(--space-5);
  }

  .lesson-book-page h4 {
    font-size: clamp(32px, 10vw, 42px);
  }

  .lesson-book-page > p:not(.lesson-book-page-number) {
    font-size: 16px;
  }

  .lesson-materials {
    padding: var(--space-5);
  }

  .lesson-material-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .lesson-quiz-question {
    padding: var(--space-4);
  }

  .lesson-quiz-question h3 {
    font-size: clamp(32px, 10vw, 42px);
  }

  .lesson-quiz-feedback.is-visible {
    align-items: stretch;
    flex-direction: column;
  }

  .lesson-quiz-complete {
    grid-template-columns: 70px minmax(0, 1fr);
    padding: var(--space-4);
  }

  .lesson-quiz-complete > span {
    width: 64px;
    height: 64px;
    font-size: 40px;
  }

  .lesson-assignment-number {
    top: var(--space-5);
    right: var(--space-5);
    font-size: 54px;
  }

  .lesson-assignment-intro {
    padding-right: 62px;
  }

  .lesson-assignment-intro h3 {
    font-size: clamp(38px, 11vw, 50px);
  }

  .lesson-status {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  .lesson-status--waiting div > span {
    font-size: 27px;
  }

  .lesson-no-assignment {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .lesson-no-assignment > span {
    width: 64px;
    height: 64px;
    font-size: 40px;
  }

  .lesson-footer-nav {
    gap: var(--space-3);
    margin-top: var(--space-16);
  }

  .lesson-footer-link {
    padding-inline: var(--space-2);
    font-size: 11px;
  }

  .lesson-footer-link svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 360px) {
  .lesson-stagebar-copy strong {
    font-size: 11px;
  }

  .lesson-stage-progress li > b {
    font-size: 7px;
  }

  .lesson-content {
    padding-right: 10px;
    padding-left: 10px;
  }

  .lesson-video-frame {
    width: min(100%, 292px);
  }

  .lesson-book-page {
    padding: var(--space-4);
  }

  .lesson-book-fact b {
    font-size: 50px;
  }

  .lesson-assignment-card,
  .lesson-takeaways,
  .lesson-quiz,
  .lesson-status {
    padding-inline: var(--space-4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lesson-stagebar,
  .lesson-stage-progress li > span,
  .lesson-video-play,
  .lesson-video-fake-controls > span,
  .lesson-primary-action,
  .lesson-action-icon::before,
  .lesson-action-arrow,
  .lesson-action-check,
  .lesson-secondary-action,
  .lesson-book-page,
  .lesson-book-controls button,
  .lesson-material-links a,
  .lesson-quiz-options button,
  .lesson-footer-link {
    transition: none;
  }

  .is-lesson-book-enhanced .lesson-book-pages.is-turning .lesson-book-page.is-visible {
    animation: none;
  }
}

/* ========================================================================== 
   COURSE DASHBOARD - stage 1: app shell, navigation, welcome and next step
   ========================================================================== */

.course-root,
.course-page {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
}

.course-page {
  --course-sidebar-width: 286px;
  min-width: 0;
  min-height: 100svh;
  touch-action: pan-y pinch-zoom;
  background-color: var(--cream);
  background-image: var(--cream-grid-image);
  background-size: var(--cream-grid-size) var(--cream-grid-size);
  color: var(--ink);
}

.course-skip-link {
  position: fixed;
  z-index: 100;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-sm);
  font-weight: 900;
  transform: translateY(calc(-100% - 30px));
  transition: transform var(--motion-fast) var(--ease-standard);
}

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

.course-app {
  display: grid;
  width: 100%;
  max-width: none;
  min-height: 100svh;
  grid-template-columns: var(--course-sidebar-width) minmax(0, 1fr);
  margin-inline: 0;
  background: var(--cream);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent);
  transition: grid-template-columns var(--motion-base) var(--ease-standard);
}

.course-sidebar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  display: flex;
  width: var(--course-sidebar-width);
  height: 100svh;
  min-height: 620px;
  flex-direction: column;
  padding: var(--space-5);
  overflow-y: auto;
  background: var(--sky);
  border-right: 3px solid var(--ink);
  color: var(--ink);
  isolation: isolate;
  transition: width var(--motion-base) var(--ease-standard);
}

.course-sidebar::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.035;
  background-image: var(--noise-img);
  background-size: 180px 180px;
  content: "";
  pointer-events: none;
}

.course-sidebar::after {
  display: none;
}

.course-sidebar-brand {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  padding: var(--space-4);
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}

.course-logo {
  justify-self: start;
  min-height: 48px;
  color: var(--ink);
}

.course-logo .site-logo-badge {
  background: var(--acid);
}

.course-sidebar-brand > p {
  color: color-mix(in srgb, var(--ink) 68%, transparent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.course-sidebar-toggle {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  align-self: end;
  margin: calc(var(--space-5) * -1) 1px var(--space-5) 0;
  background: var(--violet);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: var(--shadow-xs);
  color: var(--white);
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-base) var(--ease-standard);
}

.course-sidebar-toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course-nav {
  display: grid;
  gap: var(--space-2);
}

.course-nav-link {
  display: grid;
  min-height: 52px;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  padding: 10px var(--space-3);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.course-nav-link svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course-nav-art {
  display: grid;
  width: 36px;
  height: 36px;
  overflow: visible;
  place-items: center;
}

.course-nav-art img {
  width: 43px;
  height: 43px;
  max-width: none;
  object-fit: contain;
  transition: transform var(--motion-fast) var(--ease-standard);
}

.course-nav-link--home {
  background: var(--white);
}

.course-nav-link--course {
  background: var(--pink);
}

.course-nav-link--materials {
  background: color-mix(in srgb, var(--sky) 42%, var(--white));
}

.course-nav-link--journal {
  background: color-mix(in srgb, var(--pink) 42%, var(--white));
}

.course-nav-link.is-active {
  background: var(--acid);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

.course-nav-link.is-active .course-nav-art img {
  transform: rotate(-4deg) scale(1.08);
}

.course-nav-link:focus-visible {
  outline-color: var(--violet);
  outline-offset: 3px;
}

.course-sidebar-bottom {
  display: grid;
  gap: var(--space-5);
  margin-top: auto;
  padding-top: var(--space-6);
}

.course-quick-links {
  display: grid;
  gap: var(--space-2);
  padding-top: var(--space-5);
  border-top: 2px solid var(--ink);
}

.course-quick-link {
  display: grid;
  width: 100%;
  min-height: 48px;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.course-quick-link-art {
  display: grid;
  width: 40px;
  height: 40px;
  overflow: visible;
  place-items: center;
}

.course-quick-link-art img {
  width: 47px;
  height: 47px;
  max-width: none;
  object-fit: contain;
  transition: transform var(--motion-fast) var(--ease-standard);
}

.course-quick-link--chat {
  background: var(--violet);
  color: var(--white);
}

.course-quick-link--katrina {
  background: var(--acid);
  color: var(--ink);
}

.course-quick-link-icon,
.course-katrina-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  overflow: hidden;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.course-katrina-avatar {
  width: 38px;
  height: 38px;
}

.course-quick-link-icon {
  background: var(--sky);
  color: var(--ink);
}

.course-quick-link-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course-katrina-avatar {
  background: var(--pink);
}

.course-katrina-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  transform: scale(1.75);
}

.course-profile-link {
  display: grid;
  min-height: 64px;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  gap: var(--space-3);
  align-items: center;
  padding: 8px 10px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.course-profile-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.course-profile-icon svg,
.course-profile-arrow {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course-profile-link small,
.course-profile-link strong {
  display: block;
}

.course-profile-link small {
  margin-bottom: 2px;
  color: color-mix(in srgb, var(--ink) 66%, transparent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.course-profile-link strong {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
}

.course-profile-arrow {
  width: 22px;
  padding: 3px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 50%;
  transition: transform var(--motion-fast) var(--ease-standard);
}

.course-nav-backdrop {
  display: none;
}

.course-mobile-nav {
  display: none;
}

.course-page.is-course-sidebar-collapsed {
  --course-sidebar-width: 92px;
}

.is-course-sidebar-collapsed .course-sidebar {
  padding-inline: 14px;
}

.is-course-sidebar-collapsed .course-sidebar-brand {
  justify-items: center;
  padding: 10px;
}

.is-course-sidebar-collapsed .course-logo {
  justify-self: center;
}

.is-course-sidebar-collapsed .course-logo .site-logo-wordmark,
.is-course-sidebar-collapsed .course-sidebar-brand > p,
.is-course-sidebar-collapsed .course-nav-link > span:not(.course-nav-art),
.is-course-sidebar-collapsed .course-quick-link-copy,
.is-course-sidebar-collapsed .course-profile-link > span:not(.course-profile-icon),
.is-course-sidebar-collapsed .course-profile-arrow {
  display: none;
}

.is-course-sidebar-collapsed .course-sidebar-toggle {
  align-self: center;
  margin-right: 0;
  transform: rotate(180deg);
}

.is-course-sidebar-collapsed .course-nav-link,
.is-course-sidebar-collapsed .course-quick-link,
.is-course-sidebar-collapsed .course-profile-link {
  width: 58px;
  grid-template-columns: 1fr;
  justify-items: center;
  padding-inline: 8px;
}

.is-course-sidebar-collapsed .course-nav-link {
  min-height: 54px;
}

.is-course-sidebar-collapsed .course-sidebar-bottom {
  gap: var(--space-4);
}

.is-course-sidebar-collapsed .course-quick-links {
  justify-items: center;
}

.is-course-sidebar-collapsed .course-quick-link,
.is-course-sidebar-collapsed .course-profile-link {
  min-height: 54px;
}

.course-workspace {
  grid-column: 2;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background-color: var(--cream);
  background-image: var(--cream-grid-image);
  background-position: center top;
  background-size: var(--cream-grid-size) var(--cream-grid-size);
}

.course-topbar {
  position: sticky;
  z-index: 15;
  top: 0;
  display: none;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) clamp(var(--space-6), 4vw, var(--space-12));
  background: color-mix(in srgb, var(--white) 94%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--ink) 15%, transparent);
  backdrop-filter: blur(10px);
}

.course-mobile-logo,
.course-topbar-balance {
  display: none;
}

.course-menu-button {
  display: none;
  width: 48px;
  height: 48px;
  place-items: center;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-xs);
}

.course-menu-button svg {
  width: 27px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.course-topbar-title {
  display: grid;
  gap: 1px;
}

.course-topbar-title span {
  color: var(--violet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.course-topbar-title strong {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}

.course-topbar-profile {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 10px 6px 7px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
  font-size: 13px;
  font-weight: 900;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.course-topbar-profile svg {
  width: 30px;
  height: 30px;
  padding: 4px;
  background: var(--pink);
  border-radius: 50%;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: round;
}

.course-content {
  width: min(100%, 1180px);
  max-width: 100%;
  margin-inline: auto;
  padding: clamp(var(--space-10), 5vw, 64px) clamp(var(--space-6), 4vw, var(--space-12)) 96px;
}

.course-welcome {
  position: relative;
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--sky);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 10px 12px 0 var(--ink);
  isolation: isolate;
}

.course-welcome-tape {
  position: absolute;
  z-index: 2;
  top: -15px;
  left: 11%;
  width: clamp(86px, 12vw, 132px);
  height: 31px;
  background: var(--acid);
  opacity: 0.9;
  transform: rotate(-2deg);
}

.course-welcome-tape::before {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: var(--noise-img);
  background-size: 130px 130px;
  content: "";
}

.course-welcome-spark {
  position: absolute;
  z-index: -1;
  top: clamp(24px, 4vw, 54px);
  right: clamp(20px, 4vw, 52px);
  width: clamp(54px, 7vw, 82px);
  fill: var(--pink);
  transform: rotate(8deg);
}

.course-welcome-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-8);
  align-items: start;
}

.course-welcome-copy {
  min-width: 0;
}

.course-eyebrow {
  width: fit-content;
  margin-bottom: var(--space-3);
  padding: 7px var(--space-3);
  background: var(--violet);
  border-radius: var(--radius-pill);
  color: var(--white);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.course-welcome h1 {
  max-width: 780px;
  padding-block: 0.1em 0.12em;
  font-size: clamp(54px, 6vw, 76px);
  line-height: 0.94;
  text-wrap: balance;
}

.course-motivation {
  width: fit-content;
  max-width: 620px;
  margin-top: var(--space-3);
  padding: 0.15em 0.22em 0.24em;
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: clamp(30px, 3.5vw, 46px);
  line-height: 0.96;
  transform: rotate(-2deg);
}

.course-motivation[hidden] {
  display: none;
}

.course-student-avatar {
  width: clamp(88px, 10vw, 116px);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 7px 8px 0 var(--pink);
  aspect-ratio: 1;
  transform: rotate(3deg);
}

.course-avatar-stack {
  display: grid;
  width: clamp(112px, 12vw, 136px);
  justify-items: center;
}

.course-avatar-status {
  position: relative;
  z-index: 2;
  display: grid;
  width: max-content;
  max-width: 140px;
  gap: 2px;
  margin-top: -5px;
  padding: 7px 13px 8px;
  background: var(--violet);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: 3px 4px 0 var(--sky);
  color: var(--white);
  text-align: center;
  transform: rotate(-2deg);
}

.course-avatar-status small,
.course-avatar-status strong {
  display: block;
}

.course-avatar-status small {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.09em;
  line-height: 1.1;
  text-transform: uppercase;
}

.course-avatar-status strong {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.course-student-avatar.ph-photo {
  background-size: 42px 42px, cover;
}

.course-student-avatar.ph::after {
  right: 6px;
  bottom: 7px;
  left: 6px;
  max-width: none;
  padding: 3px 5px;
  font-family: var(--ff-body);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.course-continue {
  display: grid;
  min-height: 108px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-5);
  align-items: center;
  margin-top: clamp(var(--space-8), 5vw, var(--space-12));
  padding: var(--space-5) var(--space-6);
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 8px 9px 0 var(--ink);
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.course-continue-copy {
  display: grid;
  gap: var(--space-2);
}

.course-continue small {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.course-continue strong {
  font-size: clamp(19px, 2.25vw, 28px);
  font-weight: 900;
  line-height: 1.15;
}

.course-continue strong b {
  font: inherit;
}

.course-continue-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  background: var(--violet);
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--white);
  transition: transform var(--motion-fast) var(--ease-standard);
}

.course-continue-icon svg {
  width: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course-lesson-progress {
  margin-top: var(--space-8);
  padding: var(--space-5);
  background: var(--pink);
  border: 2px dashed var(--ink);
  border-radius: var(--radius-card);
}

.course-lesson-progress-head,
.course-total-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
}

.course-lesson-progress-head p,
.course-total-progress-head p {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.course-lesson-progress-head strong,
.course-total-progress-head strong {
  color: var(--violet);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.course-lesson-progress-bar,
.course-total-progress-bar {
  position: relative;
  height: 16px;
  margin-top: var(--space-3);
  overflow: hidden;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
}

.course-lesson-progress-bar > span,
.course-total-progress-bar > span {
  display: block;
  width: var(--lesson-progress, 0%);
  height: 100%;
  background: var(--violet);
  border-right: 2px solid var(--ink);
  transition: width var(--motion-slow) var(--ease-standard);
}

.course-lesson-progress-bar[aria-valuenow="0"] > span,
.course-total-progress-bar[aria-valuenow="0"] > span {
  border-right: 0;
}

.course-lesson-milestones {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.course-lesson-milestones::before {
  position: absolute;
  z-index: 0;
  top: 15px;
  right: 12.5%;
  left: 12.5%;
  height: 3px;
  background: var(--ink);
  content: "";
}

.course-lesson-milestones li {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: color-mix(in srgb, var(--ink) 45%, transparent);
  text-align: center;
}

.course-lesson-milestones li > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.course-lesson-milestones li > p {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

.course-lesson-milestones li.is-current,
.course-lesson-milestones li.is-complete {
  color: var(--ink);
}

.course-lesson-milestones li.is-current > span {
  background: var(--acid);
  box-shadow: var(--shadow-xs);
}

.course-lesson-milestones li.is-complete > span {
  background: var(--violet);
  color: var(--white);
}

.course-growth {
  position: relative;
  margin-top: clamp(var(--space-12), 6vw, 72px);
  padding: 0 0 clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--sky);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 10px 12px 0 var(--violet);
}

.course-growth::before {
  position: absolute;
  top: -15px;
  right: 12%;
  width: clamp(90px, 11vw, 126px);
  height: 30px;
  background: var(--acid);
  content: "";
  opacity: 0.92;
  transform: rotate(2deg);
}

.course-growth-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-8);
  align-items: start;
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--pink);
  border-bottom: 3px solid var(--ink);
  border-radius: calc(var(--radius-lg) - 3px) calc(var(--radius-lg) - 3px) 0 0;
  color: var(--ink);
}

.course-growth-kicker {
  margin-bottom: var(--space-2);
  color: var(--violet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.course-growth h2 {
  max-width: 700px;
  font-size: clamp(42px, 5.4vw, 64px);
  line-height: 0.94;
  text-wrap: balance;
}

.course-growth-copy {
  margin-top: var(--space-3);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.course-current-level {
  display: grid;
  min-width: 174px;
  gap: 5px;
  padding: var(--space-4);
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  transform: rotate(2deg);
}

.course-current-level span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.course-current-level strong {
  font-family: var(--ff-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 0.95;
}

.course-total-progress {
  margin: var(--space-8) clamp(var(--space-6), 4vw, var(--space-10)) 0;
  padding: var(--space-5);
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
}

.course-total-progress-bar > span {
  width: var(--course-progress, 0%);
}

.course-levels-wrap {
  --course-level-progress: 0%;
  position: relative;
  margin: var(--space-10) clamp(var(--space-6), 4vw, var(--space-10)) 0;
}

.course-level-track {
  position: absolute;
  z-index: 0;
  top: 22px;
  right: 7.14%;
  left: 7.14%;
  height: 8px;
  overflow: hidden;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
}

.course-level-track > span {
  display: block;
  width: var(--course-level-progress);
  height: 100%;
  background: var(--violet);
  transition: width var(--motion-slow) var(--ease-standard);
}

.course-levels {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-2);
}

.course-levels li {
  display: grid;
  justify-items: center;
  gap: 7px;
  text-align: center;
}

.course-level-node {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
  font-size: 15px;
  font-weight: 900;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.course-levels strong {
  min-height: 30px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
}

.course-levels small {
  max-width: 112px;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.course-levels li.is-complete .course-level-node {
  background: var(--acid);
  color: var(--ink);
}

.course-levels li.is-current .course-level-node {
  background: var(--violet);
  box-shadow: 4px 5px 0 var(--sky);
  color: var(--white);
  transform: translateY(-3px) scale(1.08);
}

.course-levels li.is-current strong,
.course-levels li.is-current small {
  color: var(--violet);
}

.course-levels li.is-locked strong,
.course-levels li.is-locked small {
  opacity: 0.52;
}

#course-map {
  scroll-margin-top: 100px;
}

@media (hover: hover) and (pointer: fine) {
  .course-nav-link:not(.is-active):hover {
    box-shadow: var(--shadow-xs);
    transform: translateX(3px);
  }

  .course-sidebar-toggle:hover {
    background: var(--acid);
    color: var(--ink);
    box-shadow: none;
  }

  .course-quick-link:hover {
    box-shadow: var(--shadow-xs);
    transform: translateX(3px);
  }

  .course-quick-link:hover .course-quick-link-art img {
    transform: rotate(-4deg) scale(1.08);
  }

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

  .course-profile-link:hover .course-profile-arrow {
    transform: translateX(3px);
  }

  .course-topbar-profile:hover {
    background: var(--sky);
    box-shadow: none;
    transform: translate(2px, 2px);
  }

  .course-continue:hover {
    box-shadow: 4px 5px 0 var(--ink);
    transform: translate(4px, 4px);
  }

  .course-continue:hover .course-continue-icon {
    transform: translateX(5px) rotate(-4deg);
  }
}

.course-nav-link:active,
.course-quick-link:active,
.course-profile-link:active,
.course-topbar-profile:active,
.course-continue:active {
  transform: translate(3px, 3px);
}

@media (max-width: 900px) {
  .course-app {
    display: block;
    min-height: 100svh;
    box-shadow: none;
  }

  .course-sidebar {
    position: relative;
    left: auto;
    width: 100%;
    height: auto;
    min-height: auto;
    border-right: 0;
    border-bottom: 3px solid var(--ink);
  }

  .is-course-nav-enhanced .course-sidebar {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    width: min(320px, calc(100vw - 54px));
    height: 100svh;
    min-height: 0;
    border-right: 3px solid var(--ink);
    border-bottom: 0;
    box-shadow: 12px 0 0 color-mix(in srgb, var(--ink) 18%, transparent);
    transform: translateX(calc(-100% - 18px));
    visibility: hidden;
    transition:
      transform var(--motion-base) var(--ease-standard),
      visibility 0s linear var(--motion-base);
  }

  .is-course-nav-enhanced.is-course-nav-open {
    overflow: hidden;
  }

  .is-course-nav-enhanced.is-course-nav-open .course-sidebar {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
  }

  .is-course-nav-enhanced .course-nav-backdrop {
    position: fixed;
    z-index: 35;
    inset: 0;
    display: block;
    opacity: 0;
    background: color-mix(in srgb, var(--ink) 48%, transparent);
    pointer-events: none;
    transition: opacity var(--motion-base) var(--ease-standard);
  }

  .is-course-nav-enhanced.is-course-nav-open .course-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .course-topbar {
    display: grid;
    min-height: 72px;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    padding: 10px var(--space-4);
  }

  .is-course-nav-enhanced .course-menu-button {
    display: grid;
  }

  .course-mobile-logo {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    justify-self: center;
    color: var(--ink);
  }

  .course-mobile-logo .site-logo-badge {
    background: var(--acid);
  }

  .course-topbar-balance {
    display: block;
    width: 48px;
    height: 48px;
  }

  .course-content {
    padding: var(--space-8) var(--space-4) 72px;
  }
}

@media (max-width: 560px) {
  .course-welcome {
    padding: var(--space-6) var(--space-5);
    border-radius: var(--radius-card);
    box-shadow: 7px 8px 0 var(--ink);
  }

  .course-welcome-tape {
    top: -12px;
    left: 12%;
    height: 25px;
  }

  .course-welcome-spark {
    top: 26px;
    right: 18px;
    width: 48px;
  }

  .course-welcome-head {
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: var(--space-3);
  }

  .course-eyebrow {
    max-width: calc(100% - 12px);
    font-size: 9px;
  }

  .course-welcome h1 {
    font-size: clamp(44px, 13vw, 54px);
  }

  .course-motivation {
    font-size: clamp(29px, 9vw, 36px);
  }

  .course-student-avatar {
    width: 72px;
    border-width: 2px;
    box-shadow: 5px 6px 0 var(--pink);
  }

  .course-student-avatar.ph-photo {
    background-size: 30px 30px, cover;
  }

  .course-student-avatar.ph::after {
    right: 4px;
    bottom: 5px;
    left: 4px;
    font-size: 7px;
  }

  .course-continue {
    min-height: 96px;
    gap: var(--space-3);
    margin-top: var(--space-10);
    padding: var(--space-4);
    box-shadow: 6px 7px 0 var(--ink);
  }

  .course-continue small {
    font-size: 9px;
  }

  .course-continue strong {
    font-size: clamp(16px, 4.7vw, 19px);
  }

  .course-continue-icon {
    width: 48px;
    height: 48px;
  }

  .course-continue-icon svg {
    width: 31px;
  }

  .course-lesson-progress {
    padding: var(--space-4);
  }

  .course-lesson-progress-head p,
  .course-total-progress-head p {
    font-size: 12px;
  }

  .course-lesson-milestones {
    gap: 3px;
  }

  .course-lesson-milestones li > p {
    font-size: 9px;
  }

  .course-growth {
    padding: var(--space-6) var(--space-5);
    border-radius: var(--radius-card);
    box-shadow: 7px 8px 0 var(--violet);
  }

  .course-growth-head {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .course-growth h2 {
    font-size: clamp(40px, 12vw, 50px);
  }

  .course-growth-copy {
    font-size: 14px;
  }

  .course-current-level {
    width: 100%;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    transform: none;
  }

  .course-current-level strong {
    justify-self: end;
    font-size: 28px;
  }

  .course-total-progress {
    margin-top: var(--space-6);
    padding: var(--space-4);
  }

  .course-levels-wrap {
    margin-top: var(--space-8);
  }

  .course-level-track {
    top: 24px;
    right: auto;
    bottom: 24px;
    left: 20px;
    width: 8px;
    height: auto;
  }

  .course-level-track > span {
    width: 100%;
    height: var(--course-level-progress);
    transition: height var(--motion-slow) var(--ease-standard);
  }

  .course-levels {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .course-levels li {
    grid-template-columns: 44px minmax(88px, 0.7fr) minmax(0, 1fr);
    gap: var(--space-3);
    align-items: center;
    justify-items: start;
    text-align: left;
  }

  .course-level-node {
    width: 44px;
    height: 44px;
  }

  .course-levels strong {
    min-height: 0;
    font-size: 13px;
  }

  .course-levels small {
    max-width: none;
    font-size: 10px;
  }

  .course-levels li.is-current .course-level-node {
    transform: translateX(3px) scale(1.06);
  }
}

@media (max-width: 360px) {
  .course-content {
    padding-inline: var(--space-3);
  }

  .course-welcome {
    padding-inline: var(--space-4);
  }

  .course-welcome-head {
    grid-template-columns: minmax(0, 1fr) 62px;
  }

  .course-student-avatar {
    width: 62px;
  }

  .course-continue {
    grid-template-columns: minmax(0, 1fr) 42px;
    padding-inline: var(--space-3);
  }

  .course-continue-icon {
    width: 42px;
    height: 42px;
  }

  .course-mobile-logo .site-logo-wordmark {
    display: none;
  }

  .course-growth {
    padding-inline: var(--space-4);
  }

  .course-levels li {
    grid-template-columns: 44px 86px minmax(0, 1fr);
  }
}

/* Mobile app shell. The primary navigation stays visible without JavaScript. */
@media (max-width: 900px) {
  .course-sidebar,
  .is-course-nav-enhanced .course-sidebar,
  .course-nav-backdrop,
  .is-course-nav-enhanced .course-nav-backdrop {
    display: none;
  }

  .course-topbar {
    display: flex;
    min-height: 66px;
    justify-content: center;
    padding: 8px var(--space-4);
    background: var(--acid);
    border-bottom-color: var(--ink);
  }

  .course-menu-button,
  .course-topbar-balance {
    display: none;
  }

  .course-mobile-logo {
    min-height: 44px;
  }

  .course-content {
    padding-bottom: calc(136px + env(safe-area-inset-bottom));
  }

  .course-mobile-nav {
    position: fixed;
    z-index: 50;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    min-height: calc(116px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: 34px 68px;
    gap: 5px 3px;
    align-items: stretch;
    padding: 6px max(5px, env(safe-area-inset-right)) calc(3px + env(safe-area-inset-bottom)) max(5px, env(safe-area-inset-left));
    background: var(--sky);
    border-top: 2px solid var(--ink);
    box-shadow: 0 -8px 24px color-mix(in srgb, var(--ink) 11%, transparent);
  }

  .course-mobile-nav-link {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 0;
    justify-items: center;
    align-content: center;
    gap: 3px;
    padding: 2px 1px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-size: clamp(8px, 2.35vw, 10px);
    font-weight: 900;
    line-height: 1;
    text-align: center;
    transition:
      color var(--motion-fast) var(--ease-standard),
      transform var(--motion-fast) var(--ease-standard);
  }

  .course-mobile-nav-link svg {
    width: 38px;
    height: 38px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition:
      box-shadow var(--motion-fast) var(--ease-standard),
      transform var(--motion-fast) var(--ease-standard);
  }

  .course-mobile-nav-link--home {
    grid-row: 2;
    grid-column: 1;
  }

  .course-mobile-nav-link--course {
    grid-row: 2;
    grid-column: 2;
  }

  .course-mobile-nav-link--materials {
    grid-row: 2;
    grid-column: 3;
  }

  .course-mobile-nav-link--journal {
    grid-row: 2;
    grid-column: 4;
  }

  .course-mobile-nav-link--profile {
    grid-row: 2;
    grid-column: 5;
  }

  .course-mobile-nav-link--chat {
    grid-row: 1;
    grid-column: 1 / span 2;
    grid-template-columns: 32px auto;
    grid-auto-flow: column;
    justify-content: center;
    align-items: center;
    gap: 7px;
    padding: 2px 8px;
    background: transparent;
    border: 0;
    color: var(--ink);
  }

  .course-mobile-chat-art {
    display: grid;
    width: 32px;
    height: 32px;
    overflow: visible;
    place-items: center;
  }

  .course-mobile-chat-art img {
    width: 38px;
    height: 38px;
    max-width: none;
    object-fit: contain;
  }

  .course-mobile-nav-link--katrina {
    grid-row: 1;
    grid-column: 3 / span 3;
    grid-template-columns: 34px auto;
    grid-auto-flow: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 2px 10px;
    background: transparent;
    border: 0;
    color: var(--ink);
  }

  .course-mobile-contact-avatar {
    display: grid;
    width: 34px;
    height: 34px;
    overflow: hidden;
    place-items: center;
    background: var(--pink);
    border: 2px solid var(--ink);
    border-radius: 50%;
  }

  .course-mobile-contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 42%;
    transform: scale(1.7);
  }

  .course-mobile-nav-art {
    display: grid;
    width: 42px;
    height: 42px;
    overflow: visible;
    place-items: center;
  }

  .course-mobile-nav-art img {
    width: 47px;
    height: 47px;
    max-width: none;
    object-fit: contain;
    transition: transform var(--motion-fast) var(--ease-standard);
  }

  .course-mobile-nav-label {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .course-mobile-nav-link--chat .course-mobile-nav-label,
  .course-mobile-nav-link--katrina .course-mobile-nav-label {
    width: auto;
    font-size: 10px;
    letter-spacing: 0.01em;
  }

  .course-mobile-nav-link.is-active {
    color: var(--ink);
    transform: translateY(-4px);
  }

  .course-mobile-nav-link.is-active svg {
    background: transparent;
    box-shadow: none;
    color: var(--ink);
    transform: rotate(-3deg);
  }

  .course-mobile-nav-link.is-active .course-mobile-nav-art img {
    filter: drop-shadow(3px 3px 0 var(--violet));
    transform: rotate(-5deg) scale(1.1);
  }

  .course-mobile-nav-link.is-active .course-mobile-nav-label {
    color: var(--violet);
  }
}

@media (max-width: 560px) {
  .course-welcome-head {
    grid-template-columns: minmax(0, 1fr) 96px;
  }

  .course-avatar-stack {
    width: 96px;
  }

  .course-avatar-status {
    max-width: 100px;
    padding: 6px 9px 7px;
  }

  .course-avatar-status small {
    font-size: 7px;
  }

  .course-avatar-status strong {
    font-size: 10px;
  }

  .course-growth {
    padding: 0 0 var(--space-6);
    box-shadow: 7px 8px 0 var(--violet);
  }

  .course-growth-head {
    padding: var(--space-6) var(--space-5);
    border-radius: calc(var(--radius-card) - 3px) calc(var(--radius-card) - 3px) 0 0;
  }

  .course-total-progress {
    margin: var(--space-6) var(--space-5) 0;
  }

  .course-levels-wrap {
    margin: var(--space-8) var(--space-5) 0;
  }
}

@media (max-width: 360px) {
  .course-welcome-head {
    grid-template-columns: minmax(0, 1fr) 84px;
  }

  .course-avatar-stack {
    width: 84px;
  }

  .course-avatar-status {
    max-width: 90px;
    padding-inline: 7px;
  }

  .course-growth {
    padding-inline: 0;
  }

  .course-growth-head,
  .course-total-progress,
  .course-levels-wrap {
    margin-inline: var(--space-4);
  }

  .course-growth-head {
    margin-inline: 0;
  }

  .course-mobile-nav-link {
    font-size: 8px;
  }

  .course-mobile-nav-link svg {
    width: 36px;
    height: 36px;
    padding: 0;
  }


  .course-mobile-nav-art {
    width: 39px;
    height: 39px;
  }

  .course-mobile-nav-art img {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .course-app,
  .course-sidebar,
  .course-skip-link,
  .course-sidebar-toggle,
  .course-nav-link,
  .course-quick-link,
  .course-profile-link,
  .course-profile-arrow,
  .course-topbar-profile,
  .course-continue,
  .course-continue-icon,
  .course-lesson-progress-bar > span,
  .course-total-progress-bar > span,
  .course-level-track > span,
  .course-level-node,
  .course-mobile-nav-link,
  .course-mobile-nav-link svg,
  .course-nav-art img,
  .course-quick-link-art img,
  .course-mobile-nav-art img,
  .is-course-nav-enhanced .course-sidebar,
  .is-course-nav-enhanced .course-nav-backdrop {
    transition: none;
  }
}

/* ========================================================================== 
   COURSE HOME - open notebook canvas
   Large color fields are removed so the grid becomes the main surface.
   ========================================================================== */

.course-page .course-welcome,
.course-page .course-growth {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.course-page .course-welcome {
  padding: var(--space-3) 0 0;
}

.course-page .course-welcome h1 {
  display: flex;
  max-width: none;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.04em 0.16em;
  font-size: clamp(72px, 7.5vw, 112px);
  letter-spacing: -0.018em;
  line-height: 0.82;
}

.course-page .course-welcome-greeting {
  display: block;
}

.course-page .course-welcome-name {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0.08em 0.08em 0.2em;
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: 0.72em;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.88;
  text-shadow: 3px 4px 0 var(--pink);
  text-transform: none;
  transform: rotate(-3deg);
}

.course-page .course-welcome-name::after {
  position: absolute;
  z-index: -1;
  right: -0.02em;
  bottom: 0.14em;
  left: 0.02em;
  height: 0.09em;
  background: var(--acid);
  border-radius: var(--radius-pill);
  content: "";
  transform: rotate(-2deg);
}

.course-page .course-continue {
  width: min(100%, 860px);
  margin-top: clamp(var(--space-8), 4vw, var(--space-10));
}

.course-page .course-lesson-progress {
  position: relative;
  width: min(100%, 980px);
  margin-top: clamp(var(--space-10), 5vw, var(--space-12));
  padding: 0 0 0 var(--space-6);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.course-page .course-lesson-progress::before,
.course-page .course-total-progress::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 7px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: none;
  content: "";
}

.course-page .course-lesson-progress-head p,
.course-page .course-total-progress-head p {
  width: fit-content;
  padding: 7px 12px 8px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.course-page .course-lesson-progress-head p {
  background: var(--pink);
}

.course-page .course-total-progress-head p {
  background: var(--sky);
}

.course-page .course-lesson-progress-head strong,
.course-page .course-total-progress-head strong {
  font-family: var(--ff-display);
  font-size: 34px;
  font-weight: 700;
}

.course-page .course-lesson-progress-bar,
.course-page .course-total-progress-bar {
  height: 18px;
  margin-top: var(--space-4);
  box-shadow: 3px 4px 0 var(--sky);
}

.course-page .course-growth {
  margin-top: clamp(72px, 8vw, 112px);
  padding: clamp(var(--space-8), 4vw, var(--space-10)) 0 0;
}

.course-page .course-growth::before {
  display: block;
  top: 0;
  right: auto;
  left: 0;
  width: 64px;
  height: 8px;
  opacity: 1;
  background: var(--violet);
  border-radius: var(--radius-pill);
  box-shadow: 80px 0 0 var(--pink), 160px 0 0 var(--acid);
  transform: none;
}

.course-page .course-growth-head {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.course-page .course-growth h2 {
  display: flex;
  max-width: 860px;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.08em 0.16em;
  font-size: clamp(54px, 6vw, 82px);
  letter-spacing: -0.015em;
  line-height: 0.82;
}

.course-page .course-growth h2 > span:first-child {
  display: inline-block;
}

.course-page .course-growth-title-accent {
  display: inline-block;
  padding: 0.08em 0.14em 0.12em;
  background: var(--pink);
  border: 3px solid var(--ink);
  box-shadow: 7px 8px 0 var(--sky);
  transform: rotate(-0.8deg);
}

.course-page .course-growth-copy {
  margin-top: var(--space-5);
}

.course-page .course-total-progress {
  position: relative;
  margin: var(--space-8) 0 0;
  padding: 0 0 0 var(--space-6);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.course-page .course-total-progress::before {
  background: var(--acid);
  box-shadow: none;
}

.course-page .course-levels-wrap {
  margin: var(--space-10) 0 0;
}

.course-page .course-level-track {
  box-shadow: 0 4px 0 var(--pink);
}

.course-page .course-level-node {
  box-shadow: 3px 4px 0 var(--pink);
}

.course-page .course-levels li:nth-child(even) .course-level-node {
  box-shadow: 3px 4px 0 var(--sky);
}

.course-page .course-levels li.is-current .course-level-node {
  box-shadow: 5px 6px 0 var(--sky);
}

@media (max-width: 560px) {
  .course-page .course-welcome {
    padding: 0;
  }

  .course-page .course-welcome h1 {
    display: grid;
    gap: 0;
    font-size: clamp(54px, 15vw, 66px);
  }

  .course-page .course-welcome-name {
    width: fit-content;
    margin-left: 0.28em;
    font-size: 0.78em;
  }

  .course-page .course-continue {
    margin-top: var(--space-8);
  }

  .course-page .course-lesson-progress {
    margin-top: var(--space-10);
    padding-left: var(--space-5);
  }

  .course-page .course-lesson-progress::before,
  .course-page .course-total-progress::before {
    width: 5px;
    box-shadow: none;
  }

  .course-page .course-lesson-progress-head p,
  .course-page .course-total-progress-head p {
    padding: 6px 10px 7px;
    font-size: 10px;
  }

  .course-page .course-lesson-progress-head strong,
  .course-page .course-total-progress-head strong {
    font-size: 28px;
  }

  .course-page .course-growth {
    margin-top: 64px;
    padding: var(--space-8) 0 0;
  }

  .course-page .course-growth::before {
    width: 52px;
    height: 7px;
    box-shadow: 66px 0 0 var(--pink), 132px 0 0 var(--acid);
  }

  .course-page .course-growth-head,
  .course-page .course-total-progress,
  .course-page .course-levels-wrap {
    margin-right: 0;
    margin-left: 0;
  }

  .course-page .course-growth-head {
    padding: 0;
  }

  .course-page .course-growth h2 {
    display: block;
    font-size: clamp(48px, 14vw, 58px);
  }

  .course-page .course-growth-title-accent {
    width: fit-content;
    margin-top: 0.16em;
    padding-right: 0.12em;
    padding-left: 0.12em;
    box-shadow: 6px 7px 0 var(--sky);
  }

  .course-page .course-total-progress {
    padding-left: var(--space-5);
  }

  .course-page .course-total-progress::before {
    box-shadow: none;
  }

  .course-page .course-current-level {
    width: min(100%, 250px);
  }
}

/* Lesson 1.1 content components. */

.lesson-book-inline-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.lesson-book-inline-links a {
  display: grid;
  min-height: 52px;
  place-items: center;
  padding: 8px 10px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.lesson-book-inline-links a:nth-child(2) {
  background: var(--cream);
}

.lesson-motivation-note {
  display: grid;
  width: min(100%, 760px);
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
  margin: var(--space-8) auto 0;
  padding: var(--space-4) var(--space-5);
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 6px 7px 0 var(--sky);
  transform: rotate(-0.5deg);
}

.lesson-motivation-note > span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--violet);
  font-size: 30px;
}

.lesson-motivation-note p {
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 0.98;
}

.lesson-quiz-complete button {
  min-height: 48px;
  margin-top: var(--space-4);
  padding: 9px var(--space-4);
  background: var(--violet);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.lesson-assignment-description {
  max-width: 820px;
  margin-top: var(--space-5);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

.lesson-assignment-goal-note {
  display: grid;
  max-width: 820px;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-5);
  padding: var(--space-3) var(--space-4);
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 5px 6px 0 var(--sky);
  color: var(--ink);
  transform: rotate(-0.35deg);
}

.lesson-assignment-goal-note > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--violet);
  font-size: 25px;
}

.lesson-assignment-goal-note p {
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: clamp(23px, 2.7vw, 31px);
  line-height: 0.98;
}

.lesson-assignment-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.lesson-assignment-checklist label:last-child {
  grid-column: 1 / -1;
  background: var(--pink);
}

.lesson-assignment-checklist label {
  position: relative;
  display: grid;
  min-height: 62px;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.lesson-assignment-checklist input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.lesson-assignment-checklist label > span {
  position: relative;
  display: block;
  width: 32px;
  height: 32px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 9px;
}

.lesson-assignment-checklist input:checked + span {
  background: var(--acid);
  box-shadow: 3px 4px 0 var(--pink);
}

.lesson-assignment-checklist input:checked + span::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  content: "✓";
  font-size: 20px;
  font-weight: 900;
}

.lesson-assignment-checklist input:focus-visible + span {
  outline: 3px solid var(--acid);
  outline-offset: 3px;
}

.lesson-assignment-checklist label:has(input:checked) {
  background: var(--sky);
  box-shadow: var(--shadow-xs);
}

.lesson-assignment-checklist b {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
}

.lesson-assignment-example {
  width: fit-content;
  max-width: 820px;
  margin-top: var(--space-5);
  padding: 0.08em 0.18em 0.18em;
  color: var(--acid);
  font-family: var(--ff-script);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 0.98;
  transform: rotate(-1.5deg);
}

.lesson-assignment-quicklinks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-7);
}

.lesson-assignment-quicklinks .lesson-secondary-action {
  min-height: 54px;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-xs);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.lesson-secondary-action--profile {
  background: var(--sky);
}

.lesson-secondary-action--chat {
  background: var(--acid);
}

.lesson-secondary-action--kate {
  background: var(--pink);
}

.lesson-assignment-actions--submit {
  grid-template-columns: minmax(0, 1fr);
  margin-top: var(--space-5);
}

.lesson-assignment-microcopy {
  margin-top: var(--space-4);
  color: color-mix(in srgb, var(--white) 78%, transparent);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.lesson-footer-link > span {
  display: grid;
  gap: 2px;
}

.lesson-footer-link small {
  font-size: 9px;
  font-weight: 800;
  line-height: 1.15;
}

@media (hover: hover) and (pointer: fine) {
  .lesson-book-inline-links a:hover,
  .lesson-quiz-complete button:hover,
  .lesson-assignment-checklist label:hover {
    box-shadow: var(--shadow-xs);
    transform: translate(2px, 2px);
  }
}

@media (max-width: 700px) {
  .lesson-book-inline-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .lesson-motivation-note {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: var(--space-3);
    padding: var(--space-4);
  }

  .lesson-motivation-note > span {
    width: 46px;
    height: 46px;
    font-size: 24px;
  }

  .lesson-assignment-description {
    font-size: 15px;
  }

  .lesson-assignment-goal-note {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: var(--space-3);
  }

  .lesson-assignment-goal-note > span {
    width: 40px;
    height: 40px;
    font-size: 21px;
  }

  .lesson-assignment-goal-note p {
    font-size: 23px;
  }

  .lesson-assignment-quicklinks {
    grid-template-columns: minmax(0, 1fr);
  }

  .lesson-assignment-checklist label {
    grid-template-columns: 30px minmax(0, 1fr);
    padding-inline: var(--space-3);
  }

  .lesson-assignment-checklist {
    grid-template-columns: minmax(0, 1fr);
  }

  .lesson-assignment-checklist label:last-child {
    grid-column: auto;
  }

  .lesson-assignment-checklist label > span {
    width: 28px;
    height: 28px;
  }

  .lesson-assignment-checklist b {
    font-size: 13px;
  }
}

/* Lesson 1.1 notes: the same physical book language as the landing page. */

.lesson-section-heading--display {
  gap: clamp(var(--space-4), 2.2vw, var(--space-6));
  align-items: end;
}

.lesson-section-heading--display > span {
  width: 76px;
  height: 76px;
  flex-basis: 76px;
  font-size: 34px;
  transform: rotate(-3deg);
}

.lesson-section-heading--display > div {
  min-width: 0;
}

.lesson-section-heading--display p {
  margin: 0 0 7px 0.12em;
  font-size: clamp(10px, 1vw, 13px);
}

.lesson-section-heading--display .lesson-section-title--notes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.13em;
  align-items: center;
  padding: 0;
  overflow: visible;
  font-size: clamp(48px, 6.2vw, 76px);
  line-height: 0.86;
}

.lesson-section-title--notes > span {
  position: relative;
  z-index: 0;
  display: inline-block;
}

.lesson-section-title--notes > span::after {
  position: absolute;
  z-index: -1;
  right: -0.02em;
  bottom: 0.03em;
  left: 0.2em;
  height: 0.17em;
  background: var(--pink);
  content: "";
  transform: rotate(-1.8deg);
}

.lesson-section-title--notes > strong {
  display: inline-block;
  padding: 0.08em 0.17em 0.045em;
  background: var(--sky);
  box-shadow: 0.08em 0.09em 0 var(--acid);
  color: var(--violet);
  font-family: inherit;
  font-weight: inherit;
  line-height: 0.86;
  transform: rotate(-0.8deg);
}

.lesson-notes-flipbook {
  position: relative;
  width: 100%;
  margin-top: clamp(var(--space-6), 4vw, var(--space-10));
  container-name: lesson-book;
  container-type: inline-size;
}

.lesson-notes-flipbook:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 8px;
  border-radius: var(--radius-xl);
}

.lesson-flipbook-stage {
  width: 100%;
}

.lesson-flipbook-book {
  width: 100%;
  aspect-ratio: 1.76;
}

.lesson-flipbook-bookplate {
  inset: 0;
  gap: clamp(16px, 2vw, 30px);
  padding: clamp(30px, 4.2vw, 62px);
  background: transparent;
  border: 0;
  box-shadow: none;
  transform: none;
}

.lesson-flipbook-bookplate::before {
  display: none;
}

.lesson-flipbook-bookplate .bonus-bookplate-copy {
  max-width: 100%;
}

.lesson-flipbook-bookplate .bonus-bookplate-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.lesson-flipbook-bookplate .bonus-bookplate-copy > strong {
  max-width: 440px;
}

.lesson-flipbook-page-content {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.1vw, 16px);
  align-items: flex-start;
  padding: clamp(24px, 2.4vw, 38px) clamp(25px, 2.7vw, 43px) clamp(25px, 2.7vw, 42px);
  overflow: hidden;
}

.lesson-flipbook-page-content .bonus-page-number {
  flex: 0 0 auto;
  align-self: flex-end;
}

.lesson-flipbook-kicker {
  display: inline-block;
  flex: 0 0 auto;
  padding: 6px 11px 5px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font-size: clamp(9px, 0.95vw, 12px);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(-1deg);
}

.lesson-flipbook-page-content h4 {
  position: relative;
  z-index: 1;
  max-width: 96%;
  padding-block: 0.04em;
  color: inherit;
  font-family: var(--ff-display);
  font-size: clamp(34px, 3.65vw, 50px);
  font-weight: 400;
  line-height: 0.91;
  text-wrap: balance;
}

.lesson-flipbook-page-content h4::after {
  display: block;
  width: 78px;
  height: 6px;
  margin-top: 10px;
  background: var(--violet);
  border: 2px solid var(--ink);
  content: "";
  transform: rotate(-2deg);
}

.lesson-flipbook-page-content.bonus-page-content--violet h4 {
  color: var(--white);
}

.lesson-flipbook-page-content.bonus-page-content--violet h4::after,
.lesson-flipbook-page-content.bonus-page-content--sky h4::after {
  background: var(--acid);
}

.lesson-flipbook-page-content > p {
  max-width: 94%;
  color: inherit;
  font-size: clamp(14px, 1.25vw, 17px);
  font-weight: 700;
  line-height: 1.42;
}

.lesson-flipbook-page-content ul {
  display: grid;
  gap: clamp(6px, 0.7vw, 10px);
  width: 100%;
}

.lesson-flipbook-page-content li {
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: inherit;
  font-size: clamp(12.5px, 1.14vw, 15px);
  font-weight: 800;
  line-height: 1.3;
}

.lesson-flipbook-page-content li::before {
  width: 12px;
  height: 12px;
  margin-top: 3px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 50%;
  content: "";
}

.lesson-flipbook-page-content > mark {
  width: fit-content;
  max-width: 100%;
  margin-top: auto;
  padding: clamp(9px, 1vw, 13px) clamp(11px, 1.25vw, 16px);
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  font-size: clamp(11.5px, 1.08vw, 14px);
  font-weight: 900;
  line-height: 1.3;
  transform: rotate(-0.7deg);
}

.lesson-flipbook-page-content.bonus-page-content--violet > mark {
  background: var(--acid);
}

.lesson-flipbook-page-content .lesson-book-inline-links {
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.lesson-flipbook-page-content .lesson-book-inline-links a {
  min-height: 44px;
  padding: 7px 9px;
  font-size: clamp(10px, 1vw, 13px);
}

.lesson-flipbook-page-content .lesson-book-inline-links a:nth-child(2) {
  background: var(--pink);
}

.lesson-flipbook-page-content > .lesson-flipbook-caption {
  position: relative;
  width: auto;
  margin-top: auto;
  padding: 0 0 0.38em;
  color: var(--acid);
  font-family: var(--ff-script);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 400;
  line-height: 0.98;
  transform: rotate(-1.2deg);
}

.lesson-flipbook-caption::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--pink);
  content: "";
  transform: rotate(-1deg);
}

.lesson-flipbook-page-content .lesson-book-check {
  width: 100%;
  grid-template-columns: 52px minmax(0, 1fr);
  margin-top: auto;
  padding: 13px;
  background: color-mix(in srgb, var(--acid) 82%, var(--white));
}

.lesson-flipbook-page-content .lesson-book-check span {
  width: 50px;
  height: 50px;
  font-size: 30px;
}

.lesson-flipbook-controls {
  margin-top: clamp(28px, 4vw, 46px);
}

.lesson-flipbook-controls .bonus-book-arrow:first-child {
  background: var(--acid);
}

.lesson-flipbook-controls .bonus-book-arrow:last-child {
  background: var(--sky);
}

.lesson-flipbook-controls .bonus-book-counter small {
  color: var(--ink);
}

.lesson-flipbook-book.is-grabbing,
.lesson-flipbook-book.is-grabbing * {
  cursor: grabbing !important;
}

@media (min-width: 701px) {
  .lesson-flipbook-page-content {
    gap: 6px;
    padding: 17px 20px 19px;
  }

  .lesson-flipbook-page-content h4 {
    font-size: clamp(29px, 3vw, 38px);
  }

  .lesson-flipbook-page-content h4::after {
    width: 60px;
    height: 5px;
    margin-top: 6px;
  }

  .lesson-flipbook-page-content > p,
  .lesson-flipbook-page-content li {
    font-size: 12px;
    line-height: 1.25;
  }

  .lesson-flipbook-page-content ul {
    gap: 4px;
  }

  .lesson-flipbook-page-content > mark {
    padding: 7px 9px;
    font-size: 10.5px;
    line-height: 1.22;
  }

  .lesson-flipbook-page-content .lesson-book-inline-links {
    gap: 5px;
  }

  .lesson-flipbook-page-content .lesson-book-inline-links a {
    min-height: 36px;
    padding: 5px 7px;
    font-size: 10px;
  }

  .lesson-flipbook-page-content > .lesson-flipbook-caption {
    font-size: 18px;
  }

  .lesson-flipbook-page-content .lesson-book-check {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 9px;
  }

  .lesson-flipbook-page-content .lesson-book-check span {
    width: 42px;
    height: 42px;
    font-size: 25px;
  }
}

@container lesson-book (min-width: 820px) {
  .lesson-flipbook-page-content {
    gap: clamp(7px, 0.8cqi, 11px);
    padding: clamp(21px, 2.2cqi, 30px) clamp(23px, 2.5cqi, 34px) clamp(23px, 2.5cqi, 34px);
  }

  .lesson-flipbook-page-content h4 {
    font-size: clamp(36px, 4cqi, 44px);
  }

  .lesson-flipbook-page-content h4::after {
    width: clamp(64px, 7cqi, 88px);
    height: 6px;
    margin-top: 8px;
  }

  .lesson-flipbook-page-content > p {
    font-size: clamp(13px, 1.25cqi, 16px);
    line-height: 1.34;
  }

  .lesson-flipbook-page-content ul {
    gap: clamp(5px, 0.55cqi, 8px);
  }

  .lesson-flipbook-page-content li {
    font-size: clamp(12px, 1.1cqi, 14px);
    line-height: 1.28;
  }

  .lesson-flipbook-page-content > mark {
    padding: clamp(8px, 0.85cqi, 12px) clamp(10px, 1.05cqi, 15px);
    font-size: clamp(11px, 1.05cqi, 14px);
    line-height: 1.25;
  }

  .lesson-flipbook-page-content .lesson-book-inline-links {
    gap: clamp(6px, 0.6cqi, 9px);
  }

  .lesson-flipbook-page-content .lesson-book-inline-links a {
    min-height: clamp(38px, 3.6cqi, 46px);
    font-size: clamp(10.5px, 1cqi, 13px);
  }

  .lesson-flipbook-page-content > .lesson-flipbook-caption {
    font-size: clamp(20px, 2cqi, 27px);
  }

  .lesson-flipbook-page-content .lesson-book-check {
    grid-template-columns: clamp(46px, 4.5cqi, 56px) minmax(0, 1fr);
    padding: clamp(10px, 1.1cqi, 14px);
  }

  .lesson-flipbook-page-content .lesson-book-check span {
    width: clamp(44px, 4.3cqi, 54px);
    height: clamp(44px, 4.3cqi, 54px);
    font-size: clamp(26px, 2.6cqi, 32px);
  }
}

@container lesson-book (min-width: 1100px) {
  .lesson-flipbook-kicker {
    font-size: 14px;
  }

  .lesson-flipbook-page-content h4 {
    font-size: clamp(52px, 4.5cqi, 60px);
  }

  .lesson-flipbook-page-content > p {
    font-size: clamp(18px, 1.45cqi, 20px);
  }

  .lesson-flipbook-page-content li {
    font-size: clamp(16px, 1.3cqi, 18px);
  }

  .lesson-flipbook-page-content > mark {
    font-size: clamp(14px, 1.2cqi, 16px);
  }

  .lesson-flipbook-page-content .lesson-book-inline-links a {
    font-size: clamp(13px, 1.1cqi, 15px);
  }

  .lesson-flipbook-page-content > .lesson-flipbook-caption {
    font-size: clamp(28px, 2.35cqi, 32px);
  }
}

@media (min-width: 901px) and (max-width: 949px) {
  .lesson-flipbook-book {
    aspect-ratio: 1.2;
  }
}

@media (min-width: 950px) and (max-width: 999px) {
  .lesson-flipbook-book {
    aspect-ratio: 1.38;
  }
}

@media (min-width: 1000px) and (max-width: 1023px) {
  .lesson-flipbook-book {
    aspect-ratio: 1.5;
  }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .lesson-flipbook-book {
    aspect-ratio: 1.58;
  }
}

@media (max-width: 700px) {
  .lesson-section-heading--display {
    gap: var(--space-3);
    align-items: center;
  }

  .lesson-section-heading--display > span {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    font-size: 27px;
    box-shadow: 5px 6px 0 var(--ink);
  }

  .lesson-section-heading--display p {
    margin-bottom: 5px;
    font-size: 9px;
  }

  .lesson-section-heading--display .lesson-section-title--notes {
    display: grid;
    justify-items: start;
    gap: 0.06em;
    font-size: clamp(43px, 13vw, 58px);
  }

  .lesson-section-title--notes > strong {
    box-shadow: 0.09em 0.1em 0 var(--acid);
  }

  .lesson-notes-flipbook {
    margin-top: var(--space-7);
  }

  .lesson-flipbook-stage {
    width: 100%;
    margin-left: 0;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-book {
    display: block;
    width: 100%;
    aspect-ratio: 1.18;
    margin-inline: auto;
    perspective: 1500px;
  }

  .lesson-notes-flipbook.is-mobile-book .bonus-book-cover {
    inset: 1.5% 0 0.5%;
    border-width: 2px;
    border-radius: 11px 11px 16px 16px;
    box-shadow: 7px 8px 0 var(--ink), inset 0 0 0 3px rgba(142, 216, 255, 0.72);
  }

  .lesson-notes-flipbook.is-mobile-book .bonus-book-pages {
    inset: 4.1% 3% 4.8%;
    overflow: visible;
    border-radius: 8px 8px 11px 11px;
    perspective: 1200px;
    touch-action: pan-y;
  }

  .lesson-notes-flipbook.is-mobile-book .bonus-book-base--left,
  .lesson-notes-flipbook.is-mobile-book .bonus-book-spine,
  .lesson-notes-flipbook.is-mobile-book .bonus-book-hit {
    display: block;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-sheet {
    display: block;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page {
    display: block;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    border-width: 1.5px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  .lesson-notes-flipbook.is-mobile-book .bonus-page-front {
    border-radius: 2px 8px 10px 2px;
    box-shadow: inset 8px 0 10px rgba(19, 19, 19, 0.1);
    transform: none;
  }

  .lesson-notes-flipbook.is-mobile-book .bonus-page-back {
    border-radius: 8px 2px 2px 10px;
    box-shadow: inset -8px 0 10px rgba(19, 19, 19, 0.1);
    transform: rotateY(180deg);
  }

  .lesson-notes-flipbook.is-mobile-book .bonus-book-base--right {
    top: 0;
    right: 0;
    left: auto;
    width: 50%;
    height: 100%;
    border-radius: 2px 8px 10px 2px;
    box-shadow: inset 8px 0 10px rgba(19, 19, 19, 0.1);
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content {
    gap: 4px;
    padding: 9px 8px 10px;
    box-shadow: inset 0 0 0 4px rgba(249, 245, 236, 0.27);
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-kicker {
    padding: 2.5px 4.5px;
    border-width: 1px;
    box-shadow: 1.5px 1.5px 0 var(--ink);
    font-size: clamp(6.2px, 1.9vw, 7.6px);
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content h4 {
    max-width: 100%;
    font-size: clamp(14.8px, 4.9vw, 20px);
    line-height: 0.94;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content h4::after {
    width: 29px;
    height: 2.5px;
    margin-top: 3.5px;
    border-width: 0.8px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content > p {
    font-size: clamp(7.3px, 2.36vw, 9.6px);
    line-height: 1.24;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content ul {
    gap: 2.5px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content li {
    grid-template-columns: 6.5px minmax(0, 1fr);
    gap: 3.5px;
    font-size: clamp(6.3px, 2.08vw, 8.6px);
    line-height: 1.18;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content li::before {
    width: 5.5px;
    height: 5.5px;
    margin-top: 1px;
    border-width: 0.8px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content > mark {
    padding: 3.5px 4.5px;
    border-width: 1px;
    border-radius: 4px;
    box-shadow: 1.5px 1.5px 0 var(--ink);
    font-size: clamp(6.3px, 2vw, 8.2px);
    line-height: 1.16;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-book-inline-links {
    gap: 3px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-book-inline-links a {
    min-height: 19px;
    padding: 2.5px 3px;
    border-width: 1px;
    border-radius: 4px;
    box-shadow: 1.5px 1.5px 0 var(--ink);
    font-size: clamp(5.9px, 1.9vw, 7.6px);
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-caption {
    padding-bottom: 0.25em;
    font-size: clamp(9.2px, 3vw, 12px);
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-caption::after {
    height: 1px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-book-check {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 5px;
    padding: 4px;
    border-width: 1px;
    border-radius: 6px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-book-check span {
    width: 20px;
    height: 20px;
    border-width: 1px;
    font-size: 12px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-book-check b {
    font-size: clamp(7px, 2.1vw, 8.4px);
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-bookplate {
    inset: 0;
    gap: 6px;
    padding: 11px 10px 10px;
    border: 0;
    box-shadow: none;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-bookplate .bonus-bookplate-copy > span {
    margin-bottom: 5px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-bookplate .bonus-bookplate-copy > strong {
    font-size: clamp(17px, 5.2vw, 22px);
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-bookplate .bonus-bookplate-copy p {
    max-width: 145px;
    margin-top: 7px;
    font-size: clamp(7.5px, 2.25vw, 9.5px);
    line-height: 1.25;
  }

  .lesson-flipbook-controls {
    display: flex;
    margin-top: 26px;
  }

  .lesson-flipbook-controls .bonus-book-arrow {
    width: 64px;
    height: 42px;
  }

  .lesson-flipbook-controls .bonus-book-arrow svg {
    width: 36px;
  }
}

@media (max-width: 380px) {
  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-book {
    aspect-ratio: 1.12;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content {
    gap: 3px;
    padding: 8px 7px 9px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content h4 {
    font-size: 14.5px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content > p {
    font-size: 7px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content li {
    font-size: 6px;
  }
}

/* На телефоне конспект становится одной полноценной читаемой страницей. */
@media (max-width: 700px) {
  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-book {
    height: clamp(480px, 132vw, 560px);
    aspect-ratio: auto;
  }

  .lesson-notes-flipbook.is-mobile-book .bonus-book-cover {
    inset: 1% 0 0.5%;
    border-radius: 14px 14px 20px 20px;
    box-shadow: 8px 9px 0 var(--ink), inset 0 0 0 4px color-mix(in srgb, var(--sky) 76%, transparent);
  }

  .lesson-notes-flipbook.is-mobile-book .bonus-book-pages {
    inset: 3.3% 4% 4.2%;
    overflow: hidden;
    border-radius: 10px 10px 14px 14px;
    perspective: 1400px;
  }

  .lesson-notes-flipbook.is-mobile-book .bonus-book-base--left,
  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-sheet {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    transform: none !important;
    transition: none !important;
    will-change: auto;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    border-width: 2px;
    border-radius: 8px 12px 14px 8px;
    box-shadow: inset 14px 0 18px color-mix(in srgb, var(--ink) 10%, transparent);
    pointer-events: none;
    transform: none;
    transition: opacity var(--motion-fast) var(--ease-standard);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .lesson-notes-flipbook.is-mobile-book .bonus-page-back {
    transform: none;
  }

  .lesson-notes-flipbook.is-mobile-book .bonus-book-spine {
    display: none;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-endpaper {
    display: none;
  }

  .lesson-notes-flipbook.is-mobile-book .bonus-book-hit {
    z-index: 120;
    display: block;
    width: 24%;
    transform: translateZ(30px);
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content {
    gap: 12px;
    padding: 24px 22px 26px;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: inset 0 0 0 6px color-mix(in srgb, var(--cream) 28%, transparent);
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-kicker {
    padding: 5px 9px 4px;
    border-width: 1.5px;
    box-shadow: 2px 2px 0 var(--ink);
    font-size: 10px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content h4 {
    max-width: 100%;
    font-size: clamp(34px, 10.5vw, 44px);
    line-height: 0.94;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content h4::after {
    width: 62px;
    height: 5px;
    margin-top: 8px;
    border-width: 1.5px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content > p,
  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content li {
    font-size: 16px;
    line-height: 1.45;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content ul {
    gap: 8px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content li {
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 8px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content li::before {
    width: 11px;
    height: 11px;
    margin-top: 6px;
    border-width: 1.5px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content > mark {
    padding: 9px 11px;
    border-width: 1.5px;
    border-radius: var(--radius-xs);
    box-shadow: 3px 3px 0 var(--ink);
    font-size: 14px;
    line-height: 1.35;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-book-check {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    border-width: 2px;
    border-radius: var(--radius-sm);
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-book-check span {
    width: 44px;
    height: 44px;
    border-width: 1.5px;
    font-size: 25px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-book-check b {
    font-size: 14px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-bookplate {
    gap: 14px;
    padding: 26px 24px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-bookplate .bonus-bookplate-copy > span {
    margin-bottom: 10px;
    font-size: 11px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-bookplate .bonus-bookplate-copy > strong {
    font-size: clamp(38px, 12vw, 50px);
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-bookplate .bonus-bookplate-copy p {
    max-width: 100%;
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.4;
  }

  .lesson-flipbook-controls {
    margin-top: 30px;
  }

  .lesson-flipbook-controls .bonus-book-arrow {
    width: 66px;
    height: 46px;
  }
}

/* Канонический разворот конспекта: светлая тетрадная бумага и живые акценты. */
.lesson-flipbook-page-content {
  --book-accent: var(--pink);
  --book-accent-shadow: var(--sky);
  gap: clamp(12px, 1.15vw, 18px);
  padding: clamp(28px, 2.8vw, 42px) clamp(30px, 3vw, 46px) clamp(72px, 5.2vw, 86px);
  overflow: hidden;
  background-color: var(--book-paper);
  background-image: var(--book-grid-image);
  background-size: var(--book-grid-size) var(--book-grid-size);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pink) 32%, transparent);
  color: var(--ink);
}

.lesson-flipbook-page-content--01 {
  --book-accent: var(--violet);
  --book-accent-shadow: var(--pink);
}

.lesson-flipbook-page-content--02 {
  --book-accent: var(--sky);
  --book-accent-shadow: var(--acid);
}

.lesson-flipbook-page-content--03 {
  --book-accent: var(--acid);
  --book-accent-shadow: var(--sky);
}

.lesson-flipbook-page-content--04 {
  --book-accent: var(--pink);
  --book-accent-shadow: var(--violet);
}

.lesson-flipbook-page-content--05 {
  --book-accent: var(--violet);
  --book-accent-shadow: var(--pink);
}

.lesson-flipbook-page-content .bonus-page-number {
  position: absolute;
  top: auto;
  bottom: clamp(18px, 1.8vw, 26px);
  align-self: auto;
  color: var(--violet);
}

.lesson-flipbook-page-content .bonus-page-number--left {
  right: auto;
  left: clamp(24px, 2.7vw, 40px);
}

.lesson-flipbook-page-content .bonus-page-number--right {
  right: clamp(24px, 2.7vw, 40px);
  left: auto;
}

.lesson-flipbook-kicker {
  padding: 7px 14px 5px;
  background: color-mix(in srgb, var(--pink) 78%, var(--white));
  border-radius: 3px;
  box-shadow: 3px 3px 0 var(--book-accent-shadow);
  font-family: var(--ff-script);
  font-size: clamp(21px, 2cqi, 27px);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.82;
  text-transform: none;
  transform: rotate(-1.15deg);
}

.lesson-flipbook-page-content h4.lesson-book-page-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12em 0.13em;
  align-items: baseline;
  max-width: 100%;
  padding: 0;
  color: var(--ink);
  font-size: clamp(34px, 3.55cqi, 48px);
  line-height: 0.96;
  text-wrap: wrap;
}

.lesson-flipbook-page-content h4.lesson-book-page-title::after {
  display: none;
}

.lesson-book-title-part {
  display: inline-block;
  min-width: 0;
  line-height: 0.92;
}

.lesson-book-title-break {
  flex-basis: 100%;
  width: 0;
  height: 0;
}

.lesson-book-title-connector {
  font-size: 0.78em;
}

.lesson-book-title-accent {
  padding: 0.1em 0.14em 0.075em;
  border: 2px solid var(--ink);
  line-height: 0.82;
  transform: rotate(-0.8deg);
  transform-origin: center;
}

.lesson-book-title-accent--acid {
  background: var(--acid);
  box-shadow: 0.09em 0.1em 0 var(--sky);
  color: var(--violet);
}

.lesson-book-title-accent--violet {
  background: var(--violet);
  box-shadow: 0.09em 0.1em 0 var(--pink);
  color: var(--acid);
}

.lesson-book-title-accent--sky {
  background: var(--sky);
  box-shadow: 0.09em 0.1em 0 var(--acid);
  color: var(--violet);
  transform: rotate(0.8deg);
}

.lesson-book-title-accent--pink {
  background: var(--pink);
  box-shadow: 0.09em 0.1em 0 var(--sky);
  color: var(--ink);
  transform: rotate(-1.1deg);
}

.lesson-flipbook-page-content.bonus-page-content--violet h4,
.lesson-flipbook-page-content.bonus-page-content--violet li {
  color: var(--ink);
}

.lesson-flipbook-page-content > p {
  max-width: 100%;
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: clamp(24px, 2.25cqi, 30px);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.08;
}

.lesson-flipbook-page-content > p::first-letter {
  color: inherit;
  font-weight: inherit;
}

.lesson-flipbook-page-content.bonus-page-content--violet > p {
  color: var(--violet);
}

.lesson-flipbook-page-content li::before {
  background: var(--book-accent);
  border-radius: 2px;
  transform: rotate(-7deg);
}

.lesson-flipbook-page-content > mark {
  background: color-mix(in srgb, var(--book-accent) 76%, var(--white));
  box-shadow: 4px 4px 0 var(--book-accent-shadow);
}

.lesson-flipbook-page-content.bonus-page-content--violet > mark {
  background: color-mix(in srgb, var(--pink) 76%, var(--white));
}

.lesson-flipbook-page-content > .lesson-flipbook-caption {
  color: var(--violet);
}

.lesson-flipbook-page-content .lesson-book-check {
  background: color-mix(in srgb, var(--acid) 66%, var(--book-paper));
  box-shadow: 4px 4px 0 var(--sky);
}

@media (min-width: 1100px) {
  .lesson-flipbook-page-content h4.lesson-book-page-title {
    font-size: clamp(43px, 3.75cqi, 54px);
  }

  .lesson-flipbook-page-content > p {
    font-size: clamp(30px, 2.7cqi, 34px);
  }
}

@media (max-width: 700px) {
  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content {
    gap: 14px;
    padding: 28px 22px 68px;
    background-color: var(--book-paper);
    background-image: var(--book-grid-image);
    background-size: var(--book-grid-size) var(--book-grid-size);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pink) 38%, transparent);
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-kicker {
    padding: 6px 11px 4px;
    box-shadow: 3px 3px 0 var(--book-accent-shadow);
    font-size: 22px;
    line-height: 0.82;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content h4.lesson-book-page-title {
    gap: 0.13em 0.14em;
    font-size: clamp(31px, 9.5vw, 41px);
    line-height: 0.97;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-book-title-accent {
    border-width: 1.5px;
    box-shadow: 4px 4px 0 var(--book-accent-shadow);
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content > p {
    max-width: 100%;
    color: var(--violet);
    font-size: clamp(26px, 7.4vw, 30px);
    line-height: 1.08;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content li {
    font-size: 16px;
    line-height: 1.5;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content .bonus-page-number {
    bottom: 17px;
    font-size: 25px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content .bonus-page-number--left {
    right: auto;
    left: 20px;
  }

  .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content .bonus-page-number--right {
    right: 20px;
    left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lesson-flipbook-sheet,
  .lesson-flipbook-page {
    transition: none !important;
    animation: none !important;
  }
}

/* Lesson 1.1 final polish: quiz board, assignment brief and review status. */

.lesson-section-heading--quiz,
.lesson-section-heading--assignment {
  gap: clamp(var(--space-4), 2.2vw, var(--space-6));
  align-items: end;
}

.lesson-section-heading--quiz > span,
.lesson-section-heading--assignment > span {
  width: 76px;
  height: 76px;
  flex-basis: 76px;
  font-size: 34px;
  transform: rotate(-3deg);
}

.lesson-section-heading--quiz > div,
.lesson-section-heading--assignment > div {
  min-width: 0;
}

.lesson-section-heading--quiz p,
.lesson-section-heading--assignment p {
  margin: 0 0 7px 0.12em;
  font-size: clamp(10px, 1vw, 13px);
}

.lesson-section-title--quiz,
.lesson-section-title--assignment {
  display: flex;
  flex-wrap: wrap;
  gap: 0.13em;
  align-items: center;
  overflow: visible;
  font-size: clamp(48px, 6.2vw, 76px);
  line-height: 0.86;
}

.lesson-section-title--quiz > span,
.lesson-section-title--assignment > span {
  position: relative;
  z-index: 0;
  display: inline-block;
}

.lesson-section-title--quiz > span::after,
.lesson-section-title--assignment > span::after {
  position: absolute;
  z-index: -1;
  right: -0.03em;
  bottom: 0.03em;
  left: 0.18em;
  height: 0.17em;
  background: var(--pink);
  content: "";
  transform: rotate(-1.7deg);
}

.lesson-section-title--quiz > strong,
.lesson-section-title--assignment > strong {
  display: inline-block;
  padding: 0.08em 0.17em 0.045em;
  font-family: inherit;
  font-weight: inherit;
  line-height: 0.86;
  transform: rotate(-0.8deg);
}

.lesson-section-title--quiz > strong {
  background: var(--violet);
  box-shadow: 0.08em 0.09em 0 var(--pink);
  color: var(--acid);
}

.lesson-section-title--assignment > span::after {
  background: var(--sky);
}

.lesson-section-title--assignment > strong {
  background: var(--acid);
  box-shadow: 0.08em 0.09em 0 var(--pink);
  color: var(--ink);
}

.lesson-quiz {
  --reactive-x: 0px;
  --reactive-y: 0px;
  position: relative;
  isolation: isolate;
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  overflow: hidden;
  background: var(--sky);
  box-shadow: 10px 12px 0 var(--ink);
}

.lesson-quiz::before {
  position: absolute;
  z-index: -1;
  inset: 12px;
  border: 2px solid color-mix(in srgb, var(--white) 60%, transparent);
  border-radius: calc(var(--radius-xl) - 8px);
  content: "";
  pointer-events: none;
}

.lesson-quiz-doodle {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 38px;
  width: 34px;
  height: 34px;
  fill: var(--acid);
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  transform: translate3d(var(--reactive-x), var(--reactive-y), 0) rotate(7deg);
  transition: transform var(--motion-base) var(--ease-standard);
  pointer-events: none;
}

.lesson-quiz-topline {
  position: relative;
  z-index: 1;
  min-height: 58px;
  margin: 0;
  padding: 14px var(--space-5);
  background: var(--violet);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: none;
}

.lesson-quiz-topline > span {
  color: var(--white);
  font-family: var(--ff-body);
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}

.lesson-quiz-map {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: var(--space-6) var(--space-6) var(--space-8);
}

.lesson-quiz-map::before {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: 15%;
  left: 15%;
  height: 3px;
  background: var(--ink);
  content: "";
  transform: translateY(-50%);
}

.lesson-quiz-map > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-self: center;
  place-items: center;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: var(--shadow-xs);
  font-family: var(--ff-display);
  font-size: 20px;
  line-height: 1;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.lesson-quiz-map > span.is-current {
  background: var(--violet);
  color: var(--white);
  transform: translateY(-3px) rotate(-3deg);
}

.lesson-quiz-map > span.is-complete {
  background: var(--acid);
}

.lesson-quiz-question {
  position: relative;
  z-index: 1;
  padding: clamp(var(--space-5), 3vw, var(--space-8));
  overflow: hidden;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 7px 8px 0 var(--pink);
}

.lesson-quiz-question::after {
  position: absolute;
  top: 24px;
  right: 26px;
  width: 56px;
  height: 12px;
  background: var(--acid);
  content: "";
  opacity: 0.82;
  transform: rotate(3deg);
}

.lesson-quiz-question > p {
  width: fit-content;
  margin-bottom: var(--space-3);
  padding: 5px 10px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
  color: var(--ink);
}

.lesson-quiz-question h3 {
  position: relative;
  z-index: 0;
  width: fit-content;
  max-width: calc(100% - 68px);
  margin-bottom: var(--space-8);
  font-size: clamp(40px, 5vw, 60px);
}

.lesson-quiz-question h3::after {
  position: absolute;
  z-index: -1;
  right: -0.04em;
  bottom: 0.02em;
  left: 0.22em;
  height: 0.18em;
  background: var(--sky);
  content: "";
  transform: rotate(-1deg);
}

.lesson-quiz-options {
  counter-reset: lesson-answer;
  gap: var(--space-3);
}

.lesson-quiz-options button {
  counter-increment: lesson-answer;
  display: grid;
  min-height: 64px;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  background: var(--white);
  box-shadow: 3px 4px 0 color-mix(in srgb, var(--ink) 18%, transparent);
}

.lesson-quiz-options button::before {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 50%;
  content: counter(lesson-answer, upper-alpha);
  font-family: var(--ff-display);
  font-size: 18px;
  line-height: 1;
}

.lesson-quiz-options button.is-wrong::before {
  background: var(--white);
}

.lesson-quiz-options button.is-correct::before {
  background: var(--violet);
  color: var(--white);
  content: "✓";
}

.lesson-quiz-feedback {
  box-shadow: var(--shadow-xs);
}

.lesson-quiz-complete {
  position: relative;
  z-index: 1;
  overflow: hidden;
  box-shadow: 7px 8px 0 var(--pink);
}

.lesson-quiz-complete > * {
  position: relative;
  z-index: 1;
}

.lesson-assignment-card {
  --reactive-x: 0px;
  --reactive-y: 0px;
  isolation: isolate;
  background-color: var(--violet);
  background-image:
    linear-gradient(color-mix(in srgb, var(--white) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--white) 7%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
}

.lesson-assignment-card::before {
  position: absolute;
  z-index: -1;
  inset: 14px;
  border: 2px solid color-mix(in srgb, var(--white) 22%, transparent);
  border-radius: calc(var(--radius-xl) - 9px);
  content: "";
  pointer-events: none;
}

.lesson-assignment-tape {
  z-index: 3;
  transform: translate3d(var(--reactive-x), var(--reactive-y), 0) rotate(-2deg);
  transition: transform var(--motion-base) var(--ease-standard);
}

.lesson-assignment-number {
  z-index: 2;
  display: grid;
  width: 90px;
  height: 82px;
  place-items: center;
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 6px 7px 0 var(--pink);
  color: var(--ink);
  font-size: 58px;
  transform: translate3d(var(--reactive-x), var(--reactive-y), 0) rotate(2deg);
  transition: transform var(--motion-base) var(--ease-standard);
}

.lesson-assignment-intro {
  position: relative;
  z-index: 1;
  max-width: min(850px, calc(100% - 92px));
  padding: clamp(var(--space-5), 3vw, var(--space-8));
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 7px 8px 0 var(--sky);
  color: var(--ink);
  transform: rotate(-0.35deg);
}

.lesson-assignment-intro p {
  color: var(--violet);
}

.lesson-assignment-intro h3 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.08em;
  align-items: center;
  color: var(--ink);
}

.lesson-assignment-intro h3 > span {
  position: relative;
  z-index: 0;
}

.lesson-assignment-intro h3 > span::after {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0.03em;
  left: 0.18em;
  height: 0.18em;
  background: var(--pink);
  content: "";
  transform: rotate(-1deg);
}

.lesson-assignment-intro h3 > strong {
  display: grid;
  width: 0.86em;
  height: 0.86em;
  place-items: center;
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 4px 4px 0 var(--violet);
  color: var(--violet);
  font-family: inherit;
  font-weight: inherit;
  line-height: 1;
  transform: rotate(6deg);
}

.lesson-assignment-description,
.lesson-assignment-goal-note,
.lesson-assignment-checklist,
.lesson-assignment-example,
.lesson-assignment-response,
.lesson-assignment-quicklinks,
.lesson-assignment-actions,
.lesson-assignment-microcopy {
  position: relative;
  z-index: 1;
}

.lesson-assignment-description {
  max-width: 880px;
  margin-top: var(--space-8);
  color: var(--white);
  font-size: 18px;
}

.lesson-assignment-goal-note {
  margin-top: var(--space-6);
}

.lesson-assignment-checklist label {
  min-height: 70px;
  box-shadow: 3px 4px 0 color-mix(in srgb, var(--ink) 25%, transparent);
}

.lesson-assignment-checklist label:has(input:checked) {
  background: var(--acid);
  box-shadow: var(--shadow-xs);
}

.lesson-assignment-checklist input:checked + span {
  background: var(--violet);
  color: var(--white);
}

.lesson-assignment-response {
  display: grid;
  max-width: 880px;
  gap: var(--space-4);
  margin-top: var(--space-6);
  padding: clamp(var(--space-4), 2.5vw, var(--space-6));
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 7px 8px 0 var(--sky);
  color: var(--ink);
  transform: rotate(0.18deg);
}

.lesson-assignment-field {
  display: grid;
  gap: var(--space-2);
}

.lesson-assignment-field > span {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  justify-content: space-between;
}

.lesson-assignment-field b {
  font-size: 14px;
  font-weight: 900;
}

.lesson-assignment-field small {
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lesson-assignment-field small i {
  font-style: inherit;
}

.lesson-assignment-field textarea,
.lesson-assignment-field input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font: 700 16px/1.45 var(--ff-body);
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.lesson-assignment-field textarea {
  min-height: 132px;
  resize: vertical;
}

.lesson-assignment-field textarea::placeholder,
.lesson-assignment-field input::placeholder {
  color: color-mix(in srgb, var(--ink) 42%, transparent);
  opacity: 1;
}

.lesson-assignment-field textarea:focus-visible,
.lesson-assignment-field input:focus-visible {
  outline: 3px solid var(--acid);
  outline-offset: 2px;
  box-shadow: 4px 5px 0 var(--pink);
  transform: translate(-1px, -1px);
}

.lesson-assignment-field-hint,
.lesson-assignment-error {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.lesson-assignment-field-hint {
  color: color-mix(in srgb, var(--ink) 70%, transparent);
}

.lesson-assignment-error {
  padding: var(--space-3);
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  color: var(--ink);
}

.lesson-assignment-error[hidden] {
  display: none;
}

.lesson-assignment-quicklinks .lesson-secondary-action {
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.lesson-status--waiting {
  position: relative;
  isolation: isolate;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: var(--space-8);
  overflow: visible;
  background: var(--sky);
}

.lesson-status--waiting::before {
  position: absolute;
  z-index: 3;
  top: -15px;
  right: 12%;
  width: 122px;
  height: 30px;
  background: var(--acid);
  content: "";
  opacity: 0.9;
  transform: rotate(2deg);
}

.lesson-hourglass {
  --reactive-x: 0px;
  --reactive-y: 0px;
  position: relative;
  z-index: 1;
  display: grid;
  width: 126px;
  height: 142px;
  place-items: center;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 6px 7px 0 var(--pink);
  animation: none;
  transform: translate3d(var(--reactive-x), var(--reactive-y), 0) rotate(-2deg);
  transition: transform var(--motion-base) var(--ease-standard);
}

.lesson-status--waiting .lesson-status-copy {
  position: relative;
  z-index: 1;
  padding: clamp(var(--space-5), 3vw, var(--space-8));
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 6px 7px 0 var(--pink);
}

.lesson-status--waiting .lesson-status-copy > p {
  width: fit-content;
  margin-bottom: var(--space-3);
  padding: 5px 10px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
  color: var(--ink);
}

.lesson-status--waiting h3 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12em;
  align-items: center;
  margin-bottom: var(--space-4);
}

.lesson-status--waiting h3 > strong {
  display: inline-block;
  padding: 0.08em 0.16em 0.04em;
  background: var(--violet);
  box-shadow: 5px 6px 0 var(--acid);
  color: var(--white);
  font-family: inherit;
  font-weight: inherit;
  line-height: 0.92;
  transform: rotate(-1deg);
}

.lesson-waiting-progress {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: var(--space-4);
}

.lesson-waiting-progress i {
  display: block;
  width: 12px;
  height: 12px;
  background: var(--violet);
  border: 2px solid var(--ink);
  border-radius: 50%;
  animation: lesson-waiting-dot 1.4s var(--ease-standard) infinite;
}

.lesson-waiting-progress i:nth-child(2) { animation-delay: 140ms; }
.lesson-waiting-progress i:nth-child(3) { animation-delay: 280ms; }

@keyframes lesson-waiting-dot {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.lesson-status--waiting .lesson-status-copy > span {
  margin-top: var(--space-4);
  color: var(--violet);
}

.lesson-motion-piece {
  will-change: transform, opacity;
}

@media (hover: hover) and (pointer: fine) {
  .lesson-quiz-options button:not(:disabled):hover {
    background: var(--acid);
    box-shadow: var(--shadow-xs);
    transform: translate(3px, -2px);
  }

  .lesson-quiz-options button:not(:disabled):hover::before {
    background: var(--pink);
    transform: rotate(-5deg);
  }

  .lesson-assignment-quicklinks .lesson-secondary-action:hover {
    box-shadow: none;
    transform: translate(3px, 3px) rotate(-0.4deg);
  }
}

@media (max-width: 700px) {
  .lesson-section-heading--quiz,
  .lesson-section-heading--assignment {
    gap: var(--space-3);
    align-items: center;
  }

  .lesson-section-heading--quiz > span,
  .lesson-section-heading--assignment > span {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    font-size: 27px;
    box-shadow: 5px 6px 0 var(--ink);
  }

  .lesson-section-title--quiz,
  .lesson-section-title--assignment {
    display: grid;
    justify-items: start;
    gap: 0.06em;
    font-size: clamp(42px, 13vw, 56px);
  }

  .lesson-quiz {
    padding: var(--space-4);
    padding-top: 42px;
  }

  .lesson-quiz::before {
    inset: 8px;
  }

  .lesson-quiz-doodle {
    top: 6px;
    right: 18px;
    width: 28px;
    height: 28px;
  }

  .lesson-quiz-topline {
    min-height: 52px;
    padding: 12px var(--space-3);
  }

  .lesson-quiz-topline > span {
    font-size: 16px;
  }

  .lesson-quiz-map {
    margin: var(--space-5) var(--space-2) var(--space-6);
  }

  .lesson-quiz-map > span {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .lesson-quiz-question {
    padding: var(--space-4);
  }

  .lesson-quiz-question::after {
    top: 18px;
    right: 16px;
    width: 38px;
    height: 9px;
  }

  .lesson-quiz-question h3 {
    max-width: calc(100% - 36px);
    margin-bottom: var(--space-6);
    font-size: clamp(34px, 11vw, 44px);
  }

  .lesson-quiz-options button {
    min-height: 60px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: var(--space-2);
    padding: 10px;
    font-size: 13px;
  }

  .lesson-quiz-options button::before {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .lesson-quiz-feedback.is-visible {
    display: grid;
    justify-items: stretch;
  }

  .lesson-quiz-feedback button {
    width: 100%;
  }

  .lesson-quiz-complete {
    grid-template-columns: 66px minmax(0, 1fr);
    gap: var(--space-3);
    padding: var(--space-4);
  }

  .lesson-quiz-complete > span {
    width: 62px;
    height: 62px;
    font-size: 38px;
  }

  .lesson-assignment-card {
    padding: var(--space-5);
    background-size: 48px 48px;
  }

  .lesson-assignment-card::before {
    inset: 9px;
  }

  .lesson-assignment-number {
    top: var(--space-5);
    right: var(--space-5);
    width: 64px;
    height: 58px;
    font-size: 40px;
    box-shadow: 4px 5px 0 var(--pink);
  }

  .lesson-assignment-intro {
    max-width: calc(100% - 48px);
    padding: var(--space-4);
  }

  .lesson-assignment-intro h3 {
    font-size: clamp(38px, 11vw, 50px);
  }

  .lesson-assignment-description {
    margin-top: var(--space-6);
    font-size: 15px;
  }

  .lesson-assignment-checklist label {
    min-height: 64px;
  }

  .lesson-assignment-response {
    padding: var(--space-4);
    transform: none;
  }

  .lesson-assignment-field > span {
    align-items: start;
  }

  .lesson-assignment-field textarea {
    min-height: 146px;
  }

  .lesson-status--waiting {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: var(--space-5);
    padding: var(--space-5);
  }

  .lesson-hourglass {
    width: 106px;
    height: 118px;
  }

  .lesson-hourglass svg {
    width: 72px;
    height: 90px;
  }

  .lesson-status--waiting .lesson-status-copy {
    width: 100%;
    padding: var(--space-4);
  }

  .lesson-status--waiting h3 {
    font-size: clamp(38px, 12vw, 52px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lesson-quiz-doodle,
  .lesson-assignment-tape,
  .lesson-assignment-number,
  .lesson-waiting-progress i {
    animation: none !important;
    transform: none !important;
    transition: none !important;
  }

}

/* ==========================================================================
   MODULE QUIZ
   Final module checkpoint. Answers stay neutral until the final review.
   ========================================================================== */

.module-quiz-page {
  min-width: 0;
}

.module-quiz-page [hidden] {
  display: none !important;
}

.module-quiz-workspace {
  min-width: 0;
}

.module-quiz-content {
  width: min(100%, 1280px);
  min-width: 0;
  margin-inline: auto;
  padding: clamp(var(--space-8), 5vw, 72px) clamp(var(--space-5), 4vw, var(--space-12)) 120px;
}

.module-quiz-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: clamp(var(--space-8), 5vw, var(--space-12));
  color: color-mix(in srgb, var(--ink) 58%, transparent);
  font-size: 13px;
  font-weight: 900;
}

.module-quiz-breadcrumbs a {
  color: var(--violet);
}

.module-quiz-breadcrumbs a:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.module-quiz-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 330px);
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: end;
  margin-bottom: clamp(var(--space-10), 6vw, var(--space-20));
}

.module-quiz-hero-copy > p {
  width: fit-content;
  margin-bottom: var(--space-3);
  padding: 7px 13px;
  background: var(--violet);
  border-radius: var(--radius-pill);
  color: var(--white);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.module-quiz-hero h1 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12em;
  align-items: center;
  max-width: 850px;
  margin: 0;
  overflow: visible;
  font-family: var(--ff-display);
  font-size: clamp(68px, 8vw, 118px);
  font-weight: 700;
  line-height: 0.84;
}

.module-quiz-hero h1 > span {
  position: relative;
  z-index: 0;
}

.module-quiz-hero h1 > span::after {
  position: absolute;
  z-index: -1;
  right: -0.02em;
  bottom: 0.04em;
  left: 0.14em;
  height: 0.16em;
  background: var(--pink);
  content: "";
  transform: rotate(-1.4deg);
}

.module-quiz-hero h1 > strong {
  display: inline-block;
  padding: 0.08em 0.15em 0.04em;
  background: var(--violet);
  box-shadow: 0.08em 0.09em 0 var(--sky);
  color: var(--acid);
  font: inherit;
  line-height: 0.84;
  transform: rotate(-0.7deg);
}

.module-quiz-hero-copy > b {
  display: block;
  margin-top: var(--space-6);
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 400;
  line-height: 0.95;
}

.module-quiz-lock-note {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-5);
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transform: rotate(1.6deg);
}

.module-quiz-lock-note > span {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.module-quiz-lock-note svg,
.module-quiz-gate-icon svg {
  width: 42px;
  height: 48px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.module-quiz-lock-note small,
.module-quiz-lock-note strong {
  display: block;
}

.module-quiz-lock-note small {
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.module-quiz-lock-note strong {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
}

.module-quiz-shell {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  overflow: hidden;
  background: var(--sky);
  border: 4px solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: 12px 14px 0 var(--ink);
  isolation: isolate;
}

.module-quiz-shell::before {
  position: absolute;
  z-index: -1;
  inset: 14px;
  border: 2px solid color-mix(in srgb, var(--white) 72%, transparent);
  border-radius: calc(var(--radius-xl) - 8px);
  content: "";
  pointer-events: none;
}

.module-quiz-intro {
  display: grid;
  gap: clamp(var(--space-6), 4vw, var(--space-10));
}

.module-quiz-intro-card {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: clamp(var(--space-6), 4vw, var(--space-10));
  align-items: center;
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 7px 8px 0 var(--pink);
}

.module-quiz-intro-number {
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 7px 8px 0 var(--violet);
  font-family: var(--ff-display);
  font-size: 86px;
  line-height: 1;
  transform: rotate(-3deg);
}

.module-quiz-intro-card p {
  margin-bottom: var(--space-2);
  color: var(--violet);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.module-quiz-intro-card h2 {
  margin-bottom: var(--space-4);
  font-family: var(--ff-display);
  font-size: clamp(54px, 7vw, 88px);
  line-height: 0.9;
}

.module-quiz-intro-card b {
  display: block;
  max-width: 680px;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.45;
}

.module-quiz-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.module-quiz-rules article {
  display: grid;
  min-width: 0;
  min-height: 116px;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-4);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
}

.module-quiz-rules strong {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: var(--ff-display);
  font-size: 24px;
}

.module-quiz-rules article:nth-child(2) strong {
  background: var(--acid);
}

.module-quiz-rules article:nth-child(3) strong {
  background: var(--violet);
  color: var(--white);
}

.module-quiz-rules span {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
}

.module-quiz-primary,
.module-quiz-secondary {
  display: inline-flex;
  min-width: 0;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: 12px var(--space-6);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}

.module-quiz-primary {
  width: min(100%, 620px);
  margin-inline: auto;
  background: var(--acid);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}

.module-quiz-secondary {
  background: var(--cream);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

.module-quiz-primary svg,
.module-quiz-secondary svg {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.module-quiz-primary:disabled,
.module-quiz-secondary:disabled {
  opacity: 0.38;
  box-shadow: none;
  cursor: not-allowed;
}

.module-quiz-primary:focus-visible,
.module-quiz-secondary:focus-visible,
.module-quiz-question input:focus-visible + span {
  outline: 3px solid var(--violet);
  outline-offset: 4px;
}

.module-quiz-form {
  display: grid;
  gap: clamp(var(--space-6), 4vw, var(--space-10));
}

.module-quiz-progress {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--violet);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 6px 7px 0 var(--pink);
  color: var(--white);
}

.module-quiz-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: baseline;
}

.module-quiz-progress span,
.module-quiz-progress strong {
  font-size: 13px;
  font-weight: 900;
}

.module-quiz-progress span {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-quiz-progress-track {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
}

.module-quiz-progress-track > span {
  height: 14px;
  background: color-mix(in srgb, var(--cream) 55%, transparent);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.module-quiz-progress-track > span.is-answered {
  background: var(--acid);
}

.module-quiz-progress-track > span.is-current {
  background: var(--pink);
  transform: translateY(-3px);
}

.module-quiz-question-stack {
  min-width: 0;
}

.module-quiz-question {
  min-width: 0;
  margin: 0;
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 7px 8px 0 var(--pink);
}

.module-quiz-question + .module-quiz-question {
  margin-top: var(--space-6);
}

.module-quiz-question legend {
  display: grid;
  width: 100%;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding: 0;
}

.module-quiz-question legend small {
  width: fit-content;
  padding: 6px 11px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.module-quiz-question legend > span {
  max-width: 920px;
  font-family: var(--ff-display);
  font-size: clamp(42px, 5vw, 68px);
  line-height: 0.96;
}

.module-quiz-question label {
  display: block;
  cursor: pointer;
}

.module-quiz-question label + label {
  margin-top: var(--space-3);
}

.module-quiz-question input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.module-quiz-question label > span {
  display: grid;
  min-height: 64px;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  padding: 9px var(--space-4);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 0 0 0 var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.module-quiz-question label b {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: var(--ff-display);
  font-size: 20px;
}

.module-quiz-question input:checked + span {
  background: var(--violet);
  box-shadow: var(--shadow-xs);
  color: var(--white);
  transform: translate(-2px, -2px);
}

.module-quiz-question input:checked + span b {
  background: var(--acid);
  color: var(--ink);
}

.module-quiz-actions {
  display: grid;
  grid-template-columns: minmax(180px, 0.38fr) minmax(260px, 0.62fr);
  gap: var(--space-4);
}

.module-quiz-actions .module-quiz-primary,
.module-quiz-actions .module-quiz-secondary {
  width: 100%;
  margin: 0;
}

.module-quiz-result {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(var(--space-6), 4vw, var(--space-10));
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  overflow: hidden;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 7px 8px 0 var(--pink);
}

.module-quiz-result-score {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 220px;
  align-content: center;
  justify-items: center;
  padding: var(--space-5);
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 8px 9px 0 var(--violet);
  text-align: center;
  transform: rotate(-3deg);
}

.module-quiz-result-score small {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.module-quiz-result-score strong {
  display: flex;
  align-items: baseline;
  font-family: var(--ff-display);
  font-size: 94px;
  line-height: 0.86;
}

.module-quiz-result-score strong i {
  font-size: 42px;
  font-style: normal;
}

.module-quiz-result-score > b {
  color: var(--violet);
  font-size: 18px;
  font-weight: 900;
}

.module-quiz-result-copy {
  position: relative;
  z-index: 2;
  align-self: center;
}

.module-quiz-result-copy p {
  width: fit-content;
  margin-bottom: var(--space-3);
  padding: 6px 11px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.module-quiz-result-copy h2 {
  max-width: 820px;
  margin-bottom: var(--space-4);
  font-family: var(--ff-display);
  font-size: clamp(60px, 7vw, 96px);
  line-height: 0.88;
}

.module-quiz-result-copy h2 span {
  display: inline-grid;
  min-width: 0.78em;
  place-items: center;
  padding: 0.02em 0.09em;
  background: var(--violet);
  box-shadow: 0.07em 0.08em 0 var(--sky);
  color: var(--acid);
  transform: rotate(-2deg);
}

.module-quiz-result-copy b {
  display: block;
  max-width: 700px;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.45;
}

.module-quiz-mistakes,
.module-quiz-review-lessons,
.module-quiz-gate,
.module-quiz-result-actions {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
}

.module-quiz-mistakes,
.module-quiz-review-lessons {
  padding-top: var(--space-8);
  border-top: 3px dashed var(--ink);
}

.module-quiz-mistakes h3,
.module-quiz-review-lessons h3 {
  margin-bottom: var(--space-4);
  font-family: var(--ff-display);
  font-size: clamp(36px, 4vw, 52px);
  line-height: 0.95;
}

.module-quiz-mistakes ol {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: module-mistake;
}

.module-quiz-mistakes li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  counter-increment: module-mistake;
}

.module-quiz-mistakes li::before {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 50%;
  content: counter(module-mistake);
  font-family: var(--ff-display);
  font-size: 22px;
}

.module-quiz-mistakes li > div {
  display: grid;
  gap: 5px;
}

.module-quiz-mistakes li strong {
  font-size: 16px;
  line-height: 1.35;
}

.module-quiz-mistakes li span {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.module-quiz-review-lessons > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.module-quiz-review-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-4);
  background: var(--sky);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  color: var(--ink);
}

.module-quiz-review-card > span {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: var(--ff-display);
  font-size: 20px;
}

.module-quiz-review-card div {
  min-width: 0;
}

.module-quiz-review-card strong,
.module-quiz-review-card small {
  display: block;
}

.module-quiz-review-card strong {
  font-size: 14px;
  line-height: 1.3;
}

.module-quiz-review-card small {
  margin-top: 4px;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  font-size: 11px;
  font-weight: 800;
}

.module-quiz-review-card b {
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.module-quiz-gate {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-5);
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
}

.module-quiz-gate.is-unlocked {
  background: var(--acid);
}

.module-quiz-gate-icon {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.module-quiz-gate small,
.module-quiz-gate strong,
.module-quiz-gate p {
  display: block;
}

.module-quiz-gate small {
  margin-bottom: 3px;
  color: var(--violet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.module-quiz-gate strong {
  margin-bottom: 4px;
  font-size: 20px;
  font-weight: 900;
}

.module-quiz-gate p {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.module-quiz-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.module-quiz-result-actions .module-quiz-primary,
.module-quiz-result-actions .module-quiz-secondary {
  width: auto;
  min-width: 220px;
  flex: 1 1 240px;
  margin: 0;
}

.module-quiz-result.is-passed [data-retry-module-quiz] {
  display: none;
}

.module-quiz-confetti {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.module-quiz-confetti i {
  --confetti-x: 0px;
  --confetti-rotate: 0deg;
  --confetti-width: 10px;
  --confetti-height: 18px;
  position: absolute;
  top: -26px;
  left: var(--confetti-left);
  width: var(--confetti-width);
  height: var(--confetti-height);
  opacity: 0;
  background: var(--confetti-color);
  border: 1px solid var(--ink);
  border-radius: 2px;
  transform: translate3d(0, -20px, 0) rotate(0);
  animation: module-quiz-confetti-fall var(--confetti-duration) var(--confetti-delay) var(--ease-out) forwards;
}

@keyframes module-quiz-confetti-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -20px, 0) rotate(0);
  }
  10% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--confetti-x), 620px, 0) rotate(var(--confetti-rotate));
  }
}

@media (hover: hover) and (pointer: fine) {
  .module-quiz-primary:not(:disabled):hover,
  .module-quiz-secondary:not(:disabled):hover {
    box-shadow: 2px 3px 0 var(--ink);
    transform: translate(3px, 3px);
  }

  .module-quiz-question label:hover > span {
    background: color-mix(in srgb, var(--sky) 56%, var(--white));
    box-shadow: var(--shadow-xs);
    transform: translate(-2px, -2px);
  }

  .module-quiz-question label:hover input:checked + span {
    background: var(--violet);
  }

  .module-quiz-review-card:hover {
    box-shadow: var(--shadow-xs);
    transform: translate(-2px, -2px);
  }
}

@media (max-width: 900px) {
  .module-quiz-content {
    padding-top: var(--space-8);
  }

  .module-quiz-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .module-quiz-lock-note {
    width: min(100%, 480px);
    transform: none;
  }
}

@media (max-width: 700px) {
  .module-quiz-content {
    padding: var(--space-6) var(--space-4) calc(136px + env(safe-area-inset-bottom));
  }

  .module-quiz-breadcrumbs {
    margin-bottom: var(--space-8);
    font-size: 11px;
  }

  .module-quiz-hero {
    gap: var(--space-8);
    margin-bottom: var(--space-10);
  }

  .module-quiz-hero-copy > p {
    font-size: 9px;
  }

  .module-quiz-hero h1 {
    display: grid;
    justify-items: start;
    gap: 0.13em;
    font-size: clamp(56px, 17vw, 70px);
  }

  .module-quiz-hero-copy > b {
    max-width: 280px;
    margin-top: var(--space-5);
    font-size: clamp(32px, 10vw, 42px);
  }

  .module-quiz-lock-note {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: var(--space-4);
    box-shadow: 5px 6px 0 var(--ink);
  }

  .module-quiz-lock-note > span {
    width: 54px;
    height: 54px;
  }

  .module-quiz-lock-note svg {
    width: 35px;
    height: 40px;
  }

  .module-quiz-lock-note strong {
    font-size: 14px;
  }

  .module-quiz-shell {
    padding: var(--space-4);
    border-width: 3px;
    border-radius: var(--radius-lg);
    box-shadow: 7px 8px 0 var(--ink);
  }

  .module-quiz-shell::before {
    inset: 8px;
    border-radius: calc(var(--radius-lg) - 5px);
  }

  .module-quiz-intro {
    gap: var(--space-5);
  }

  .module-quiz-intro-card {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    gap: var(--space-5);
    padding: var(--space-5);
    box-shadow: 5px 6px 0 var(--pink);
  }

  .module-quiz-intro-number {
    width: 96px;
    height: 96px;
    box-shadow: 5px 6px 0 var(--violet);
    font-size: 58px;
  }

  .module-quiz-intro-card h2 {
    font-size: clamp(48px, 15vw, 62px);
  }

  .module-quiz-intro-card b {
    font-size: 15px;
  }

  .module-quiz-rules {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
  }

  .module-quiz-rules article {
    min-height: 82px;
  }

  .module-quiz-primary,
  .module-quiz-secondary {
    min-height: 54px;
    padding: 10px var(--space-4);
    font-size: 13px;
  }

  .module-quiz-progress {
    gap: var(--space-3);
    padding: var(--space-4);
    box-shadow: 5px 6px 0 var(--pink);
  }

  .module-quiz-progress span,
  .module-quiz-progress strong {
    font-size: 10px;
  }

  .module-quiz-progress-track {
    gap: 3px;
  }

  .module-quiz-progress-track > span {
    height: 10px;
    border-width: 1.5px;
  }

  .module-quiz-question {
    padding: var(--space-5) var(--space-4);
    box-shadow: 5px 6px 0 var(--pink);
  }

  .module-quiz-question legend {
    margin-bottom: var(--space-5);
  }

  .module-quiz-question legend > span {
    font-size: clamp(36px, 11vw, 46px);
  }

  .module-quiz-question label > span {
    min-height: 60px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: var(--space-2);
    padding: 9px 10px;
    font-size: 13px;
  }

  .module-quiz-question label b {
    width: 32px;
    height: 32px;
    font-size: 17px;
  }

  .module-quiz-actions {
    position: sticky;
    z-index: 10;
    bottom: calc(80px + env(safe-area-inset-bottom));
    grid-template-columns: 0.38fr 0.62fr;
    gap: var(--space-2);
    margin-inline: -4px;
    padding: 8px 4px;
    background: color-mix(in srgb, var(--sky) 92%, transparent);
    border-radius: var(--radius-card);
    backdrop-filter: blur(8px);
  }

  .module-quiz-actions .module-quiz-primary,
  .module-quiz-actions .module-quiz-secondary {
    min-width: 0;
    padding-inline: 9px;
  }

  .module-quiz-actions svg {
    width: 26px;
    height: 26px;
  }

  .module-quiz-result {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
    padding: var(--space-5);
    box-shadow: 5px 6px 0 var(--pink);
  }

  .module-quiz-result-score {
    width: 170px;
    min-height: 170px;
    justify-self: center;
  }

  .module-quiz-result-score strong {
    font-size: 72px;
  }

  .module-quiz-result-score strong i {
    font-size: 32px;
  }

  .module-quiz-result-copy {
    text-align: center;
  }

  .module-quiz-result-copy p {
    margin-inline: auto;
  }

  .module-quiz-result-copy h2 {
    font-size: clamp(52px, 15vw, 68px);
  }

  .module-quiz-mistakes,
  .module-quiz-review-lessons,
  .module-quiz-gate,
  .module-quiz-result-actions {
    grid-column: 1;
  }

  .module-quiz-mistakes li {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: var(--space-3);
  }

  .module-quiz-mistakes li::before {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .module-quiz-mistakes li strong {
    font-size: 14px;
  }

  .module-quiz-mistakes li span {
    font-size: 12px;
  }

  .module-quiz-review-lessons > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .module-quiz-review-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .module-quiz-review-card > span {
    width: 42px;
    height: 42px;
    font-size: 17px;
  }

  .module-quiz-review-card b {
    grid-column: 2;
    justify-self: start;
  }

  .module-quiz-gate {
    grid-template-columns: 60px minmax(0, 1fr);
    padding: var(--space-4);
  }

  .module-quiz-gate-icon {
    width: 58px;
    height: 58px;
  }

  .module-quiz-gate-icon svg {
    width: 34px;
    height: 40px;
  }

  .module-quiz-gate strong {
    font-size: 17px;
  }

  .module-quiz-result-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .module-quiz-result-actions .module-quiz-primary,
  .module-quiz-result-actions .module-quiz-secondary {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 360px) {
  .module-quiz-content {
    padding-inline: 12px;
  }

  .module-quiz-shell {
    padding: 13px;
  }

  .module-quiz-progress > div:first-child {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .module-quiz-question {
    padding-inline: 13px;
  }

  .module-quiz-question legend > span {
    font-size: 36px;
  }

  .module-quiz-question label > span {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .module-quiz-primary,
  .module-quiz-secondary,
  .module-quiz-progress-track > span,
  .module-quiz-question label > span,
  .module-quiz-confetti i {
    animation: none !important;
    transition: none !important;
  }

  .module-quiz-confetti {
    display: none;
  }
}

/* ==========================================================================
   COURSE HOME - current lesson ticket
   ========================================================================== */

.course-now-lesson {
  display: grid;
  width: min(100%, 820px);
  min-width: 0;
  min-height: 76px;
  grid-template-columns: auto minmax(0, 1fr) 42px;
  gap: var(--space-4);
  align-items: center;
  margin-top: clamp(var(--space-6), 3vw, var(--space-8));
  padding: 10px 12px 10px 10px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 5px 6px 0 var(--sky);
  color: var(--ink);
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.course-now-lesson-label {
  display: grid;
  min-height: 52px;
  place-items: center;
  padding: 8px 13px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: calc(var(--radius-card) - 6px);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.course-now-lesson-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.course-now-lesson-copy small {
  color: var(--violet);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.course-now-lesson-copy strong {
  overflow-wrap: anywhere;
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 900;
  line-height: 1.25;
}

.course-now-lesson-copy b {
  color: var(--violet);
}

.course-now-lesson > svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--motion-fast) var(--ease-standard);
}

@media (hover: hover) and (pointer: fine) {
  .course-now-lesson:hover {
    box-shadow: 2px 3px 0 var(--ink);
    transform: translate(3px, 3px);
  }

  .course-now-lesson:hover > svg {
    transform: translateX(4px);
  }
}

/* ==========================================================================
   PROGRAM PAGE
   The open module behaves like a physical course folder.
   ========================================================================== */

.program-page [hidden] {
  display: none !important;
}

.program-workspace,
.program-content,
.program-map,
.program-module,
.program-module-body {
  min-width: 0;
}

.program-content {
  width: min(100%, 1280px);
  margin-inline: auto;
  padding: clamp(var(--space-8), 5vw, 72px) clamp(var(--space-5), 4vw, var(--space-12)) 128px;
}

.program-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: clamp(var(--space-10), 5vw, var(--space-16));
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  font-size: 12px;
  font-weight: 900;
}

.program-breadcrumbs a {
  color: var(--violet);
}

.program-breadcrumbs a:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.program-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(var(--space-8), 6vw, var(--space-20));
  align-items: end;
}

.program-hero-copy > p:first-child {
  width: fit-content;
  margin-bottom: var(--space-3);
  padding: 7px 13px;
  background: var(--violet);
  border-radius: var(--radius-pill);
  color: var(--white);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.program-hero h1 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12em;
  align-items: center;
  overflow: visible;
  font-family: var(--ff-display);
  font-size: clamp(76px, 10vw, 132px);
  line-height: 0.82;
}

.program-hero h1 > span {
  position: relative;
}

.program-hero h1 > span::after {
  position: absolute;
  z-index: -1;
  right: -0.07em;
  bottom: 0.02em;
  left: 0.03em;
  height: 0.19em;
  background: var(--pink);
  content: "";
  transform: rotate(-1.5deg);
}

.program-hero h1 > strong {
  padding: 0.07em 0.14em 0.04em;
  background: var(--violet);
  box-shadow: 0.08em 0.09em 0 var(--sky);
  color: var(--acid);
  font: inherit;
  transform: rotate(-1deg);
}

.program-motivation {
  position: relative;
  display: inline-block;
  width: fit-content;
  max-width: min(100%, 620px);
  margin-top: var(--space-4);
  padding: 0.08em 0.18em 0.2em;
  color: var(--ink);
  font-family: var(--ff-script);
  font-size: clamp(34px, 3.8vw, 52px);
  font-weight: 400;
  line-height: 1;
  text-wrap: balance;
  transform: rotate(-1deg);
}

.program-motivation::after {
  position: absolute;
  z-index: -1;
  right: 0.03em;
  bottom: 0.08em;
  left: 0;
  height: 0.22em;
  background: var(--pink);
  content: "";
  transform: rotate(-1deg);
}

.program-page.is-program-visible .program-motivation {
  animation: program-motivation-in var(--motion-slow) var(--ease-out) both;
}

.program-current-ticket {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 3px var(--space-4);
  padding: var(--space-5);
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 8px 9px 0 var(--sky);
  color: var(--ink);
  transform: rotate(2deg);
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.program-current-ticket::before {
  position: absolute;
  top: -16px;
  right: 20%;
  width: 86px;
  height: 27px;
  background: var(--pink);
  content: "";
  opacity: 0.88;
  transform: rotate(-4deg);
}

.program-current-ticket small,
.program-current-ticket strong,
.program-current-ticket > span {
  grid-column: 1;
}

.program-current-ticket small {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.program-current-ticket strong {
  font-family: var(--ff-display);
  font-size: clamp(36px, 4vw, 50px);
  line-height: 0.95;
}

.program-current-ticket strong b {
  color: var(--violet);
}

.program-current-ticket > span {
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
}

.program-current-ticket svg {
  width: 42px;
  height: 42px;
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.program-summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(360px, 1fr);
  gap: clamp(var(--space-6), 4vw, var(--space-12));
  align-items: center;
  margin-top: clamp(var(--space-12), 7vw, 88px);
  padding: clamp(var(--space-6), 3vw, var(--space-8));
  overflow: hidden;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 8px 9px 0 var(--sky);
}

.program-summary::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 10px;
  background: var(--violet);
  content: "";
}

.program-summary-copy {
  display: grid;
  min-width: 0;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: var(--space-5);
  align-items: center;
}

.program-summary-icon {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 5px 6px 0 var(--acid);
  transform: rotate(-2deg);
}

.program-summary-icon svg {
  width: 80px;
  height: 80px;
  fill: none;
  overflow: visible;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.program-journey-step {
  fill: var(--acid);
  transform-box: fill-box;
  transform-origin: center;
}

.program-journey-step--two,
.program-journey-step--four {
  fill: var(--cream);
}

.program-journey-step--two {
  animation: program-journey-step-two 6.4s var(--ease-standard) infinite;
}

.program-journey-step--three {
  animation: program-journey-step-three 6.4s var(--ease-standard) infinite;
}

.program-journey-step--four {
  animation: program-journey-step-four 6.4s var(--ease-standard) infinite;
}

.program-journey-girl {
  transform-origin: center;
  animation: program-journey-climb 6.4s var(--ease-standard) infinite;
}

.program-journey-hair {
  fill: var(--ink);
}

.program-journey-ponytail {
  fill: var(--ink);
  stroke-width: 2;
}

.program-journey-face {
  fill: var(--cream);
  stroke-width: 2.5;
}

.program-journey-shirt {
  fill: var(--violet);
}

.program-journey-skirt {
  fill: var(--sky);
}

.program-journey-arm,
.program-journey-leg {
  fill: none;
  stroke-width: 3.2;
}

.program-journey-leg {
  transform-box: fill-box;
  transform-origin: top center;
}

.program-journey-leg--front {
  animation: program-journey-leg-front 800ms var(--ease-standard) infinite alternate;
}

.program-journey-leg--back {
  animation: program-journey-leg-back 800ms var(--ease-standard) infinite alternate;
}

.program-journey-spark {
  fill: var(--acid);
  stroke: var(--ink);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: program-journey-spark 6.4s var(--ease-out) infinite;
}

.program-summary-copy small {
  display: block;
  margin-bottom: 4px;
  color: var(--violet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.program-summary-copy strong {
  display: block;
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 900;
  line-height: 1.35;
}

.program-summary-progress {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2) var(--space-4);
  align-items: end;
}

.program-summary-progress > span {
  grid-column: 2;
  grid-row: 1;
  color: var(--ink);
  font-family: var(--ff-display);
  font-size: clamp(38px, 4vw, 54px);
  font-weight: 700;
  line-height: 0.8;
  text-align: right;
}

.program-summary-progress > div {
  position: relative;
  height: 28px;
  grid-column: 1 / -1;
  grid-row: 2;
  overflow: hidden;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-pill);
}

.program-summary-progress i {
  position: absolute;
  z-index: 1;
  inset: 0 auto 0 0;
  display: block;
  width: var(--program-progress, 0%);
  min-width: 0;
  background: var(--violet);
  border-right: 3px solid var(--ink);
  transition: width var(--motion-slow) var(--ease-standard);
}

.program-summary-milestones {
  position: absolute;
  z-index: 2;
  inset: 0 8px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  pointer-events: none;
}

.program-summary-milestones b {
  display: block;
  width: 8px;
  height: 8px;
  justify-self: center;
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.program-summary-milestones b.is-reached {
  background: var(--acid);
}

.program-summary-milestones b.is-current {
  transform: scale(1.65);
}

.program-summary-progress [aria-valuenow="0"] i {
  border-right: 0;
}

.program-map {
  margin-top: clamp(var(--space-16), 9vw, 120px);
}

@keyframes program-journey-step-two {
  0%, 14%, 96%, 100% { opacity: 0; transform: translateY(8px); }
  21%, 90% { opacity: 1; transform: translateY(0); }
}

@keyframes program-journey-step-three {
  0%, 35%, 96%, 100% { opacity: 0; transform: translateY(8px); }
  42%, 90% { opacity: 1; transform: translateY(0); }
}

@keyframes program-journey-step-four {
  0%, 56%, 96%, 100% { opacity: 0; transform: translateY(8px); }
  63%, 90% { opacity: 1; transform: translateY(0); }
}

@keyframes program-journey-climb {
  0%, 12% { opacity: 1; transform: translate(0, 0); }
  20%, 31% { opacity: 1; transform: translate(23px, -17px); }
  41%, 52% { opacity: 1; transform: translate(46px, -34px); }
  62%, 84% { opacity: 1; transform: translate(69px, -51px); }
  92%, 100% { opacity: 0; transform: translate(72px, -55px); }
}

@keyframes program-journey-leg-front {
  from { transform: rotate(5deg); }
  to { transform: rotate(-6deg); }
}

@keyframes program-journey-leg-back {
  from { transform: rotate(-5deg); }
  to { transform: rotate(6deg); }
}

@keyframes program-journey-spark {
  0%, 60%, 94%, 100% { opacity: 0; transform: scale(0.35) rotate(-18deg); }
  68%, 84% { opacity: 1; transform: scale(1) rotate(0); }
}

.program-map-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  gap: var(--space-8);
  align-items: end;
  margin-bottom: clamp(var(--space-8), 5vw, var(--space-12));
}

.program-map-head p {
  margin-bottom: var(--space-2);
  color: var(--violet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.program-map-head h2 {
  font-family: var(--ff-display);
  font-size: clamp(58px, 7vw, 92px);
  line-height: 0.88;
}

.program-map-head h2 span {
  position: relative;
}

.program-map-head h2 span::after {
  position: absolute;
  z-index: -1;
  right: -0.05em;
  bottom: 0.01em;
  left: 0;
  height: 0.2em;
  background: var(--pink);
  content: "";
}

.program-map-head > b {
  max-width: 390px;
  padding: var(--space-4);
  background: var(--sky);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 5px 6px 0 var(--pink);
  font-size: 13px;
  line-height: 1.45;
  transform: rotate(1deg);
}

.program-module {
  position: relative;
  padding-top: 38px;
}

.program-module::before {
  position: absolute;
  z-index: 0;
  top: 0;
  left: clamp(var(--space-5), 5vw, var(--space-12));
  width: min(44%, 390px);
  height: 76px;
  background: var(--pink);
  border: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  content: "";
  transform: skewX(-9deg);
}

.program-module-head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: clamp(var(--space-5), 4vw, var(--space-10));
  align-items: center;
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--violet);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  color: var(--white);
}

.program-module-number {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  align-content: center;
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 5px 6px 0 var(--pink);
  color: var(--ink);
  transform: rotate(-4deg);
}

.program-module-number small {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.program-module-number strong {
  font-family: var(--ff-display);
  font-size: 46px;
  line-height: 0.9;
}

.program-module-title p {
  margin-bottom: 4px;
  color: var(--acid);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.program-module-title h3 {
  margin-bottom: var(--space-2);
  font-family: var(--ff-display);
  font-size: clamp(50px, 6vw, 74px);
  line-height: 0.88;
}

.program-module-title span {
  display: block;
  max-width: 720px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.program-module-status {
  display: grid;
  min-width: 150px;
  gap: 4px;
  padding: var(--space-4);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transform: rotate(2deg);
}

.program-module-status small {
  color: var(--violet);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.program-module-status strong {
  font-size: 15px;
  font-weight: 900;
}

.program-module-body {
  position: relative;
  z-index: 1;
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--cream);
  border: 3px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: 10px 12px 0 var(--sky);
}

.program-lessons {
  position: relative;
  display: grid;
  gap: var(--space-4);
}

.program-lessons::before {
  position: absolute;
  z-index: 0;
  top: 38px;
  bottom: 38px;
  left: 38px;
  width: 4px;
  background: var(--ink);
  content: "";
}

.program-lessons li {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.program-lesson {
  display: grid;
  min-width: 0;
  min-height: 78px;
  grid-template-columns: 76px minmax(0, 1fr) 54px;
  gap: var(--space-4);
  align-items: center;
  padding: 11px var(--space-4) 11px 0;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  color: var(--ink);
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    opacity var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.program-lesson-number {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  justify-self: center;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: var(--ff-display);
  font-size: 25px;
  line-height: 1;
}

.program-lesson-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.program-lesson-copy strong {
  overflow-wrap: anywhere;
  font-size: clamp(14px, 1.7vw, 17px);
  font-weight: 900;
  line-height: 1.3;
}

.program-lesson-copy small {
  color: color-mix(in srgb, var(--ink) 58%, transparent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.program-lesson-state {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  justify-self: end;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.program-state-icon {
  display: none;
  width: 28px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.program-lesson.is-complete {
  background: var(--white);
}

.program-lesson.is-complete .program-lesson-number,
.program-lesson.is-complete .program-lesson-state {
  background: var(--acid);
}

.program-lesson.is-complete .program-state-icon--check {
  display: block;
}

.program-lesson.is-current {
  background: var(--acid);
  box-shadow: 6px 7px 0 var(--ink);
  transform: translate(-2px, -2px);
}

.program-lesson.is-current .program-lesson-number {
  background: var(--violet);
  color: var(--white);
}

.program-lesson.is-current .program-lesson-state {
  background: var(--violet);
  color: var(--white);
}

.program-lesson.is-current .program-state-icon--arrow {
  display: block;
}

.program-lesson.is-current .program-lesson-copy small {
  color: var(--violet);
}

.program-lesson.is-waiting {
  background: var(--sky);
}

.program-lesson.is-waiting .program-lesson-state {
  background: var(--acid);
}

.program-lesson.is-waiting .program-state-icon--hourglass {
  display: grid;
  animation: none;
}

.program-lesson.is-revision {
  background: var(--pink);
  box-shadow: 5px 6px 0 var(--sky);
}

.program-lesson.is-revision .program-lesson-state {
  background: var(--acid);
}

.program-lesson.is-revision .program-state-icon--arrow {
  display: block;
}

.program-lesson.is-locked {
  background: color-mix(in srgb, var(--cream) 82%, var(--white));
  border-style: dashed;
  color: color-mix(in srgb, var(--ink) 52%, var(--cream));
  cursor: not-allowed;
  opacity: 0.68;
}

.program-lesson.is-locked .program-lesson-number,
.program-lesson.is-locked .program-lesson-state {
  background: color-mix(in srgb, var(--cream) 78%, var(--sky));
}

.program-lesson.is-locked .program-state-icon--lock {
  display: block;
}

.program-lesson--quiz {
  margin-top: var(--space-4);
  border-width: 3px;
}

.program-lesson--quiz.is-current {
  background: var(--violet);
  color: var(--white);
}

.program-lesson--quiz.is-current .program-lesson-number,
.program-lesson--quiz.is-current .program-lesson-state {
  background: var(--acid);
  color: var(--ink);
}

.program-lesson--quiz.is-current .program-lesson-copy small {
  color: var(--acid);
}

.program-next-module {
  display: grid;
  min-width: 0;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: var(--space-5);
  align-items: center;
  margin-top: clamp(var(--space-10), 6vw, var(--space-16));
  padding: clamp(var(--space-5), 3vw, var(--space-8));
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 8px 9px 0 var(--ink);
}

.program-next-module.is-locked {
  background: color-mix(in srgb, var(--pink) 62%, var(--cream));
  color: color-mix(in srgb, var(--ink) 62%, var(--cream));
}

.program-next-module.is-unlocked {
  background: var(--acid);
}

.program-next-module-lock {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.program-next-module.is-unlocked .program-next-module-lock {
  background: var(--sky);
}

.program-next-module-lock svg {
  width: 40px;
  height: 46px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.program-next-module small {
  color: var(--violet);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.program-next-module h3 {
  margin: 3px 0 5px;
  font-family: var(--ff-display);
  font-size: clamp(36px, 4vw, 52px);
  line-height: 0.94;
}

.program-next-module p {
  max-width: 720px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.program-next-module > strong {
  max-width: 190px;
  padding: 10px 13px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.is-program-ready:not(.is-program-visible) .program-lesson,
.is-program-ready:not(.is-program-visible) .program-next-module {
  opacity: 0;
  transform: translateY(20px);
}

.is-program-visible .program-lesson,
.is-program-visible .program-next-module {
  transition-delay: calc(var(--program-row-index, 0) * 55ms);
}

@media (hover: hover) and (pointer: fine) {
  .program-current-ticket:hover {
    box-shadow: 3px 4px 0 var(--ink);
    transform: translate(4px, 4px) rotate(0);
  }

  .program-lesson:not(.is-locked):hover {
    box-shadow: 3px 4px 0 var(--ink);
    transform: translate(2px, 2px);
  }
}

@media (max-width: 900px) {
  .program-content {
    padding-top: var(--space-8);
    padding-bottom: calc(124px + env(safe-area-inset-bottom));
  }

  .program-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-10);
  }

  .program-current-ticket {
    width: min(100%, 520px);
    transform: none;
  }

  .program-map-head {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .course-now-lesson {
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: var(--space-3);
    padding: var(--space-3);
  }

  .course-now-lesson-label {
    width: fit-content;
    min-height: 0;
    grid-column: 1;
    padding: 5px 9px;
  }

  .course-now-lesson-copy {
    grid-column: 1;
  }

  .course-now-lesson > svg {
    width: 32px;
    height: 32px;
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .program-content {
    padding: var(--space-6) var(--space-4) calc(136px + env(safe-area-inset-bottom));
  }

  .program-breadcrumbs {
    margin-bottom: var(--space-8);
    font-size: 10px;
  }

  .program-hero h1 {
    display: grid;
    justify-items: start;
    gap: 0.13em;
    font-size: clamp(66px, 22vw, 88px);
  }

  .program-motivation {
    max-width: 100%;
    font-size: clamp(32px, 9.8vw, 40px);
  }

  .program-current-ticket {
    grid-template-columns: minmax(0, 1fr) 36px;
    padding: var(--space-4);
    box-shadow: 5px 6px 0 var(--ink);
  }

  .program-current-ticket strong {
    font-size: 36px;
  }

  .program-current-ticket > span {
    font-size: 12px;
  }

  .program-current-ticket svg {
    width: 34px;
    height: 34px;
  }

  .program-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
    margin-top: var(--space-12);
    padding: var(--space-5);
    padding-left: var(--space-6);
    border-width: 2px;
    border-radius: var(--radius-card);
    box-shadow: 6px 7px 0 var(--sky);
  }

  .program-summary-progress {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .program-summary-copy {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: var(--space-4);
  }

  .program-summary-icon {
    width: 74px;
    height: 74px;
  }

  .program-summary-icon svg {
    width: 68px;
    height: 68px;
  }

  .program-map {
    margin-top: var(--space-16);
  }

  .program-map-head h2 {
    font-size: clamp(56px, 17vw, 72px);
  }

  .program-map-head > b {
    font-size: 12px;
  }

  .program-module {
    padding-top: 30px;
  }

  .program-module::before {
    left: var(--space-4);
    width: 62%;
    height: 58px;
  }

  .program-module-head {
    grid-template-columns: 66px minmax(0, 1fr);
    gap: var(--space-4);
    padding: var(--space-5) var(--space-4);
    border-radius: var(--radius-card) var(--radius-card) 0 0;
  }

  .program-module-number {
    width: 64px;
    height: 64px;
    border-width: 2px;
    box-shadow: 4px 5px 0 var(--pink);
  }

  .program-module-number strong {
    font-size: 34px;
  }

  .program-module-title h3 {
    font-size: 48px;
  }

  .program-module-title span {
    grid-column: 1 / -1;
    font-size: 12px;
  }

  .program-module-status {
    min-width: 0;
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    transform: none;
  }

  .program-module-status strong {
    justify-self: end;
  }

  .program-module-body {
    padding: var(--space-4);
    border-radius: 0 0 var(--radius-card) var(--radius-card);
    box-shadow: 6px 7px 0 var(--sky);
  }

  .program-lessons {
    gap: var(--space-3);
  }

  .program-lessons::before {
    top: 32px;
    bottom: 32px;
    left: 30px;
    width: 3px;
  }

  .program-lesson {
    min-height: 68px;
    grid-template-columns: 58px minmax(0, 1fr) 38px;
    gap: 9px;
    padding: 8px 9px 8px 0;
  }

  .program-lesson-number {
    width: 50px;
    height: 50px;
    font-size: 21px;
  }

  .program-lesson-copy strong {
    font-size: 12px;
  }

  .program-lesson-copy small {
    font-size: 8px;
  }

  .program-lesson-state {
    width: 36px;
    height: 36px;
  }

  .program-state-icon {
    width: 22px;
    height: 24px;
  }

  .program-next-module {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: var(--space-4);
    padding: var(--space-4);
    border-radius: var(--radius-card);
    box-shadow: 5px 6px 0 var(--ink);
  }

  .program-next-module-lock {
    width: 56px;
    height: 56px;
  }

  .program-next-module-lock svg {
    width: 32px;
    height: 38px;
  }

  .program-next-module h3 {
    font-size: 38px;
  }

  .program-next-module p {
    font-size: 11px;
  }

  .program-next-module > strong {
    width: 100%;
    max-width: none;
    grid-column: 1 / -1;
  }
}

@media (max-width: 360px) {
  .program-content {
    padding-inline: 12px;
  }

  .program-module-head,
  .program-module-body {
    padding-inline: 12px;
  }

  .program-lesson {
    grid-template-columns: 54px minmax(0, 1fr) 34px;
    gap: 6px;
  }

  .program-lesson-number {
    width: 46px;
    height: 46px;
  }

  .program-lesson-copy strong {
    font-size: 11px;
  }

  .program-lesson-state {
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .course-now-lesson,
  .course-now-lesson > svg,
  .program-current-ticket,
  .program-summary-progress i,
  .program-lesson,
  .program-next-module,
  .program-state-icon--hourglass {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   PROGRAM PAGE 2.0
   Полная программа из семи физических папок.
   ========================================================================== */

.program-current-panel {
  display: grid;
  min-width: 0;
  gap: var(--space-4);
}

.program-current-stage {
  display: grid;
  min-width: 0;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  padding: 10px 12px;
  background: var(--sky);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 4px 5px 0 var(--pink);
  color: var(--ink);
}

.program-current-stage-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
}

.program-current-stage-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.program-current-stage > span:not(.program-current-stage-icon) {
  min-width: 0;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
}

.program-current-stage strong {
  flex: none;
  padding: 6px 10px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.program-summary-copy > div > span {
  display: block;
  margin-top: 5px;
  color: color-mix(in srgb, var(--ink) 68%, transparent);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.program-modules {
  display: grid;
  gap: clamp(var(--space-8), 5vw, var(--space-12));
}

.program-no-script {
  padding: var(--space-5);
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  font-weight: 900;
}

.program-module {
  scroll-margin-top: 24px;
}

.program-module::before {
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    opacity var(--motion-fast) var(--ease-standard);
}

.program-module-head {
  width: 100%;
  grid-template-columns: 92px minmax(0, 1fr) minmax(158px, 190px) 48px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.program-module-head:focus-visible {
  outline: 4px solid var(--acid);
  outline-offset: 4px;
}

.program-module.is-collapsed .program-module-head {
  border-radius: var(--radius-lg);
  box-shadow: 7px 8px 0 var(--ink);
}

.program-module.is-active .program-module-head {
  background: var(--violet);
  color: var(--white);
}

.program-module.is-active::before {
  background: var(--pink);
}

.program-module.is-complete .program-module-head {
  background: var(--cream);
  box-shadow: inset 10px 0 0 var(--acid);
  color: var(--ink);
}

.program-module.is-complete::before {
  background: var(--acid);
}

.program-module.is-complete .program-module-title p {
  color: var(--violet);
}

.program-module.is-complete .program-module-status {
  background: var(--acid);
}

.program-module.is-locked .program-module-head {
  background: color-mix(in srgb, var(--pink) 64%, var(--cream));
  color: color-mix(in srgb, var(--ink) 67%, var(--cream));
}

.program-module.is-locked::before {
  background: color-mix(in srgb, var(--pink) 58%, var(--cream));
  opacity: 0.75;
}

.program-module.is-locked .program-module-number {
  background: var(--cream);
  box-shadow: none;
  opacity: 0.74;
}

.program-module.is-locked .program-module-title p {
  color: color-mix(in srgb, var(--violet) 60%, var(--cream));
}

.program-module.is-locked .program-module-status {
  box-shadow: none;
  opacity: 0.76;
}

.program-module-status {
  position: relative;
  min-width: 0;
  padding: 13px;
}

.program-module-status > span {
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.program-module-status > i {
  position: relative;
  display: block;
  height: 7px;
  overflow: hidden;
  margin-top: 6px;
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-pill);
}

.program-module-status > i::after {
  display: block;
  width: var(--module-progress, 0%);
  height: 100%;
  background: var(--violet);
  content: "";
}

.program-module.is-active .program-module-status > i::after {
  background: var(--violet);
}

.program-module.is-complete .program-module-status > i::after {
  background: var(--ink);
}

.program-module-toggle-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  justify-self: end;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: 3px 4px 0 var(--ink);
  color: var(--ink);
  transition: transform var(--motion-fast) var(--ease-standard);
}

.program-module-toggle-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.program-module.is-open .program-module-toggle-icon {
  transform: rotate(180deg);
}

.program-module-body:not([hidden]) {
  animation: program-folder-open var(--motion-base) var(--ease-out) both;
}

.program-module-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3) var(--space-6);
  align-items: center;
  margin-bottom: var(--space-6);
  padding: var(--space-4);
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
}

.program-module-details p {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.program-module-details small {
  color: var(--violet);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.program-module-details strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.35;
}

.program-module-details > span,
.program-module-details > b {
  padding: 8px 11px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.program-module-details > b {
  grid-column: 1 / -1;
  background: var(--acid);
  text-transform: uppercase;
}

.program-lesson-copy > span {
  color: color-mix(in srgb, var(--ink) 66%, transparent);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
}

.program-lesson.is-current {
  background: var(--sky);
}

.program-lesson.is-current .program-lesson-copy small {
  color: var(--violet);
}

.program-lesson.is-revision .program-state-icon--arrow {
  display: none;
}

.program-lesson.is-revision .program-state-icon--alert {
  display: block;
}

.program-lesson-number--quiz svg {
  width: 38px;
  height: 42px;
  fill: var(--pink);
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.program-lesson--quiz {
  min-height: 90px;
}

.program-lesson--quiz.is-current {
  background: var(--violet);
  color: var(--white);
}

.program-lesson--quiz.is-current .program-lesson-copy > span {
  color: var(--white);
}

.program-lesson--quiz.is-complete {
  background: var(--acid);
}

.program-lesson.is-newly-opened {
  z-index: 4;
  animation: program-new-unlock 680ms var(--ease-out) both;
}

.program-unlock-confetti {
  position: absolute;
  z-index: 6;
  inset: -20px;
  overflow: hidden;
  pointer-events: none;
}

.program-unlock-confetti i {
  --confetti-x: -110px;
  position: absolute;
  top: 42%;
  left: 50%;
  width: 11px;
  height: 7px;
  background: var(--pink);
  border: 1px solid var(--ink);
  transform: rotate(var(--confetti-rotate, 0deg));
  animation: program-confetti-pop 900ms var(--ease-out) both;
}

.program-unlock-confetti i:nth-child(2) {
  --confetti-rotate: 48deg;
  --confetti-x: -68px;
  background: var(--acid);
  animation-delay: 40ms;
}

.program-unlock-confetti i:nth-child(3) {
  --confetti-rotate: -32deg;
  --confetti-x: -28px;
  background: var(--sky);
  animation-delay: 70ms;
}

.program-unlock-confetti i:nth-child(4) {
  --confetti-rotate: 74deg;
  --confetti-x: 30px;
  background: var(--violet);
  animation-delay: 100ms;
}

.program-unlock-confetti i:nth-child(5) {
  --confetti-rotate: -67deg;
  --confetti-x: 72px;
  background: var(--acid);
  animation-delay: 130ms;
}

.program-unlock-confetti i:nth-child(6) {
  --confetti-rotate: 22deg;
  --confetti-x: 110px;
  background: var(--pink);
  animation-delay: 160ms;
}

.program-waiting {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: var(--space-5);
  align-items: center;
  margin-top: var(--space-12);
  padding: var(--space-6);
  background: var(--sky);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 7px 8px 0 var(--ink);
}

.program-waiting-icon {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 36px;
}

.program-waiting-icon .lut-hourglass {
  width: 52px;
}

.program-waiting small {
  color: var(--violet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.program-waiting h3 {
  margin: 3px 0 5px;
  font-family: var(--ff-display);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.95;
}

.program-waiting p {
  max-width: 700px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.program-waiting > a {
  min-width: 160px;
  padding: 14px 16px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 4px 5px 0 var(--ink);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.program-materials-note {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 3px dashed var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.program-materials-note a {
  flex: none;
  padding: 12px 14px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 4px 5px 0 var(--sky);
  color: var(--violet);
  font-weight: 900;
}

.program-materials-note a:focus-visible,
.program-waiting > a:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 4px;
}

@keyframes program-folder-open {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes program-motivation-in {
  from {
    opacity: 0;
    transform: translateY(8px) rotate(-1deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(-1deg);
  }
}

@keyframes program-new-unlock {
  0% {
    transform: translateY(0) scale(1);
  }
  46% {
    transform: translateY(-12px) scale(1.018);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes program-confetti-pop {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(var(--confetti-rotate));
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--confetti-x), -70px)
      rotate(calc(var(--confetti-rotate) + 120deg));
  }
}

@media (hover: hover) and (pointer: fine) {
  .program-module-head:hover .program-module-toggle-icon {
    box-shadow: 1px 2px 0 var(--ink);
    transform: translate(2px, 2px);
  }

  .program-module.is-open .program-module-head:hover .program-module-toggle-icon {
    transform: translate(2px, 2px) rotate(180deg);
  }

  .program-materials-note a:hover,
  .program-waiting > a:hover {
    box-shadow: 1px 2px 0 var(--ink);
    transform: translate(3px, 3px);
  }
}

@media (max-width: 900px) {
  .program-module-head {
    grid-template-columns: 74px minmax(0, 1fr) 44px;
  }

  .program-module-status {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .program-module-status strong {
    justify-self: end;
  }

  .program-module-status > span,
  .program-module-status > i {
    grid-column: 1 / -1;
  }

  .program-module-toggle-icon {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 700px) {
  .program-current-panel {
    gap: var(--space-3);
  }

  .program-current-stage {
    gap: var(--space-2);
  }

  .program-current-stage > span:not(.program-current-stage-icon),
  .program-current-stage strong {
    font-size: 10px;
  }

  .program-current-stage {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .program-modules {
    gap: var(--space-8);
  }

  .program-module {
    padding-top: 24px;
  }

  .program-module-head {
    grid-template-columns: 60px minmax(0, 1fr) 40px;
    gap: var(--space-3);
  }

  .program-module-number {
    width: 58px;
    height: 58px;
  }

  .program-module-number strong {
    font-size: 31px;
  }

  .program-module-title h3 {
    font-size: clamp(38px, 12vw, 48px);
  }

  .program-module-title span {
    font-size: 12px;
    line-height: 1.4;
  }

  .program-module-toggle-icon {
    width: 38px;
    height: 38px;
  }

  .program-module-toggle-icon svg {
    width: 23px;
    height: 23px;
  }

  .program-module-status {
    padding: 11px;
  }

  .program-module-details {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--space-3);
  }

  .program-module-details > span,
  .program-module-details > b {
    width: 100%;
  }

  .program-lesson-copy strong {
    font-size: 14px;
  }

  .program-lesson-copy > span {
    font-size: 9px;
  }

  .program-lesson-copy small {
    font-size: 8px;
    line-height: 1.25;
  }

  .program-lesson--quiz {
    min-height: 78px;
  }

  .program-lesson-number--quiz svg {
    width: 31px;
    height: 36px;
  }

  .program-waiting {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: var(--space-4);
    padding: var(--space-4);
  }

  .program-waiting-icon {
    width: 56px;
    height: 56px;
    font-size: 27px;
  }

  .program-waiting h3 {
    font-size: 42px;
  }

  .program-waiting p {
    font-size: 13px;
  }

  .program-waiting > a {
    width: 100%;
    grid-column: 1 / -1;
  }

  .program-materials-note {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .program-materials-note a {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 360px) {
  .program-module-head {
    grid-template-columns: 54px minmax(0, 1fr) 36px;
    gap: 8px;
  }

  .program-module-number {
    width: 52px;
    height: 52px;
  }

  .program-module-title h3 {
    font-size: 36px;
  }

  .program-module-toggle-icon {
    width: 34px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .program-module-head,
  .program-module-toggle-icon,
  .program-module-body,
  .program-motivation,
  .program-summary-milestones b,
  .program-journey-step,
  .program-journey-girl,
  .program-journey-leg,
  .program-journey-spark,
  .program-lesson.is-newly-opened,
  .program-unlock-confetti,
  .program-unlock-confetti i {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   PROGRAM MAP REFINEMENT
   Единая папка курса, чистые карточки уроков и рабочая полка материалов.
   ========================================================================== */

.program-map-head h2 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1em;
  align-items: center;
}

.program-map-head h2 strong {
  display: inline-block;
  padding: 0.08em 0.14em 0.04em;
  background: var(--violet);
  box-shadow: 0.09em 0.1em 0 var(--sky);
  color: var(--acid);
  font: inherit;
  line-height: 0.84;
  transform: rotate(-0.7deg);
}

.program-map-head > b {
  position: relative;
  overflow: hidden;
  padding: 18px 20px 18px 23px;
  box-shadow: 5px 6px 0 var(--pink);
  transform: none;
}

.program-map-head > b::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 7px;
  background: var(--acid);
  content: "";
}

.program-modules {
  gap: clamp(42px, 5.5vw, 68px);
}

.program-module {
  --folder-shift-x: 0px;
  --folder-shift-y: 0px;
  --module-accent: var(--pink);
  --module-shadow: var(--violet);
  --module-base: color-mix(in srgb, var(--module-shadow) 6%, var(--cream));
  --module-paper: color-mix(in srgb, var(--module-accent) 20%, var(--module-base));
  --folder-surface: color-mix(in srgb, var(--module-accent) 26%, var(--module-base));
  --folder-tab: color-mix(in srgb, var(--module-accent) 74%, var(--cream));
  position: relative;
  z-index: 0;
  isolation: isolate;
  padding-top: 34px;
}

.program-module[data-program-module="1"] {
  --module-accent: var(--sky);
  --module-shadow: var(--pink);
}

.program-module[data-program-module="2"] {
  --module-accent: var(--pink);
  --module-shadow: var(--violet);
}

.program-module[data-program-module="3"] {
  --module-accent: var(--violet);
  --module-shadow: var(--sky);
}

.program-module[data-program-module="4"] {
  --module-accent: var(--acid);
  --module-shadow: var(--pink);
}

.program-module[data-program-module="5"] {
  --module-accent: var(--sky);
  --module-shadow: var(--acid);
}

.program-module[data-program-module="6"] {
  --module-accent: var(--pink);
  --module-shadow: var(--sky);
}

.program-module[data-program-module="7"] {
  --module-accent: var(--violet);
  --module-shadow: var(--acid);
}

.program-module,
.program-module.is-open {
  background: transparent;
}

.program-module::before {
  z-index: 1;
  top: 0;
  left: clamp(24px, 5vw, 58px);
  width: min(36%, 320px);
  height: 60px;
  background: var(--folder-tab);
  border: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: 22px 22px 7px 7px;
  opacity: 1;
  transform: translate(
    var(--folder-shift-x),
    calc(var(--folder-shift-y) - 1px)
  );
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-out);
}

.program-module::after {
  position: absolute;
  z-index: -1;
  top: 34px;
  right: -8px;
  bottom: -9px;
  left: 8px;
  background: var(--ink);
  border-radius: 24px;
  content: "";
}

.program-module.is-active {
  --folder-surface: color-mix(in srgb, var(--module-accent) 44%, var(--module-base));
  --folder-tab: color-mix(in srgb, var(--module-accent) 88%, var(--white));
}

.program-module.is-complete {
  --folder-surface: color-mix(in srgb, var(--module-accent) 18%, var(--module-base));
  --folder-tab: color-mix(in srgb, var(--module-accent) 68%, var(--white));
}

.program-module.is-locked {
  --folder-surface: color-mix(in srgb, var(--module-accent) 10%, var(--module-base));
  --folder-tab: color-mix(in srgb, var(--module-accent) 30%, var(--cream));
}

.program-module.is-active::before,
.program-module.is-complete::before,
.program-module.is-locked::before {
  background: var(--folder-tab);
  opacity: 1;
}

.program-module-head,
.program-module.is-collapsed .program-module-head,
.program-module.is-active .program-module-head,
.program-module.is-complete .program-module-head,
.program-module.is-locked .program-module-head {
  position: relative;
  z-index: 3;
  padding: clamp(22px, 3.2vw, 34px);
  background: var(--folder-surface);
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: none;
  color: var(--ink);
  transform: none;
}

.program-module.is-open .program-module-head {
  border-radius: 24px 24px 17px 17px;
  box-shadow: inset 8px 0 0 var(--module-shadow);
}

.program-module.is-complete .program-module-head {
  box-shadow: inset 8px 0 0 var(--module-accent);
}

.program-module-number,
.program-module.is-locked .program-module-number {
  width: 78px;
  height: 78px;
  background: color-mix(in srgb, var(--module-accent) 18%, var(--white));
  border-radius: 20px;
  box-shadow: 4px 5px 0 var(--module-shadow);
  color: var(--ink);
  opacity: 1;
  transform: rotate(-2deg);
  transition: transform var(--motion-fast) var(--ease-out);
}

.program-module.is-active .program-module-number {
  background: var(--violet);
  color: var(--white);
}

.program-module.is-complete .program-module-number {
  background: var(--white);
  box-shadow: 4px 5px 0 var(--module-accent);
}

.program-module-number strong {
  font-size: 41px;
}

.program-module-title p,
.program-module.is-active .program-module-title p,
.program-module.is-complete .program-module-title p,
.program-module.is-locked .program-module-title p {
  color: var(--violet);
  opacity: 1;
}

.program-module-title h3 {
  color: var(--ink);
  font-size: clamp(48px, 5.7vw, 70px);
}

.program-module-title > span,
.program-module.is-active .program-module-title > span,
.program-module.is-locked .program-module-title > span {
  color: color-mix(in srgb, var(--ink) 76%, transparent);
}

.program-module-status,
.program-module.is-locked .program-module-status {
  padding: 13px 14px;
  background: var(--white);
  border-radius: 15px;
  box-shadow: 4px 5px 0 var(--module-accent);
  color: var(--ink);
  opacity: 1;
  transform: translate(var(--folder-shift-x), var(--folder-shift-y));
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-out);
}

.program-module.is-complete .program-module-status {
  background: var(--white);
  box-shadow: 4px 5px 0 var(--module-accent);
}

.program-module.is-active .program-module-status {
  background: var(--violet);
  box-shadow: 4px 5px 0 var(--module-accent);
  color: var(--white);
}

.program-module.is-active .program-module-status small,
.program-module.is-active .program-module-status span {
  color: color-mix(in srgb, var(--white) 78%, transparent);
}

.program-module-status > i {
  background: var(--cream);
}

.program-module-status > i::after,
.program-module.is-active .program-module-status > i::after {
  background: var(--acid);
}

.program-module-toggle-icon {
  box-shadow: 3px 4px 0 var(--ink);
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-out);
}

.program-module-body {
  z-index: 2;
  margin-top: -15px;
  padding-top: calc(clamp(var(--space-6), 4vw, var(--space-10)) + 15px);
  background: var(--white);
  border: 3px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 24px 24px;
  box-shadow: none;
}

.program-module-body:not([hidden]) {
  transform-origin: top center;
  animation: program-folder-sheet-open var(--motion-base) var(--ease-out) both;
}

.program-module-details {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 18px 25px;
  background: color-mix(in srgb, var(--module-accent) 16%, var(--white));
  border-radius: 17px;
  box-shadow: 4px 5px 0 var(--module-accent);
}

.program-module-details::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 8px;
  background: var(--module-shadow);
  content: "";
}

.program-module-details > span,
.program-module-details > b {
  background: color-mix(in srgb, var(--module-accent) 52%, var(--white));
}

.program-module-details > b {
  margin-left: -7px;
}

.program-lessons {
  gap: 13px;
}

.program-lessons::before {
  display: none;
  content: none;
}

.program-lesson {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 82px;
  grid-template-columns: 64px minmax(0, 1fr) 46px;
  gap: 14px;
  padding: 10px 14px 10px 16px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 17px;
  box-shadow: 3px 4px 0 color-mix(in srgb, var(--module-accent) 62%, var(--cream));
  transform: none;
}

.program-lesson::before {
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 0;
  width: 7px;
  background: var(--module-accent);
  content: "";
}

.program-lesson-number {
  width: 58px;
  height: 58px;
  background: var(--module-paper);
  border-radius: 15px;
  font-size: 24px;
}

.program-lesson-state {
  width: 42px;
  height: 42px;
  background: var(--module-paper);
  border-radius: 14px;
}

.program-lesson.is-complete {
  background: var(--white);
  box-shadow: 3px 4px 0 var(--module-accent);
}

.program-module .program-lesson.is-complete .program-lesson-number {
  background: var(--module-paper);
}

.program-module .program-lesson.is-complete .program-lesson-state {
  background: var(--white);
  box-shadow: 3px 3px 0 var(--module-accent);
}

.program-module .program-lesson.is-complete .program-state-icon--check {
  color: var(--violet);
}

.program-lesson.is-current,
.program-lesson--quiz.is-current {
  background: var(--violet);
  box-shadow: inset 7px 0 0 var(--acid), 4px 5px 0 var(--ink);
  color: var(--white);
  transform: none;
}

.program-lesson.is-current::before,
.program-lesson--quiz.is-current::before {
  background: var(--acid);
}

.program-lesson.is-current .program-lesson-number,
.program-lesson.is-current .program-lesson-state {
  background: var(--acid);
  color: var(--ink);
}

.program-lesson.is-current .program-lesson-copy small,
.program-lesson--quiz.is-current .program-lesson-copy small {
  color: var(--acid);
}

.program-lesson--quiz.is-current .program-lesson-copy > span {
  color: color-mix(in srgb, var(--white) 78%, transparent);
}

.program-lesson.is-waiting {
  box-shadow: 3px 4px 0 var(--pink);
}

.program-lesson.is-revision {
  box-shadow: 3px 4px 0 var(--sky);
}

.program-lesson.is-locked {
  background: color-mix(in srgb, var(--cream) 74%, var(--white));
  border-style: solid;
  box-shadow: none;
  color: color-mix(in srgb, var(--ink) 56%, var(--cream));
  opacity: 0.66;
}

.program-lesson.is-locked::before {
  background: color-mix(in srgb, var(--module-accent) 38%, var(--cream));
}

.program-lesson.is-locked .program-lesson-number,
.program-lesson.is-locked .program-lesson-state {
  background: var(--white);
  border-color: color-mix(in srgb, var(--ink) 64%, var(--cream));
}

.program-lesson--quiz {
  min-height: 96px;
  margin-top: 24px;
  padding-left: 14px;
  background: color-mix(in srgb, var(--module-accent) 14%, var(--cream));
  border: 3px solid var(--ink);
  border-left-width: 8px;
  border-radius: 17px;
  box-shadow: 6px 7px 0 var(--module-shadow);
}

.program-lesson--quiz::before {
  display: none;
}

.program-lesson-number--quiz {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1px;
  background: var(--ink);
  color: var(--white);
  transform: rotate(-2deg);
}

.program-lesson-number--quiz small {
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.program-lesson-number--quiz strong {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.95;
}

.program-module .program-lesson--quiz.is-complete {
  background: color-mix(in srgb, var(--module-accent) 14%, var(--cream));
}

.program-module .program-lesson--quiz.is-complete .program-lesson-number--quiz {
  background: var(--ink);
  color: var(--white);
}

.program-module .program-lesson--quiz.is-locked .program-lesson-number--quiz {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.program-module .program-lesson--quiz.is-current .program-lesson-number--quiz {
  background: var(--acid);
  color: var(--ink);
}

.program-materials-note {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: var(--space-10);
  padding: 18px 20px;
  background: var(--sky);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 6px 7px 0 var(--pink);
  font-size: 13px;
  font-weight: 800;
}

.program-materials-note-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: rotate(-2deg);
}

.program-materials-note-icon img {
  width: 67px;
  height: 67px;
  max-width: none;
  object-fit: contain;
}

.program-materials-note p {
  min-width: 0;
  line-height: 1.45;
}

.program-materials-note a {
  padding: 13px 16px;
  background: var(--acid);
  box-shadow: 4px 5px 0 var(--ink);
  color: var(--ink);
  text-align: center;
}

@keyframes program-folder-sheet-open {
  from {
    opacity: 0;
    transform: translateY(-14px) scaleY(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

@media (hover: hover) and (pointer: fine) {
  .program-module:hover::before {
    transform: translate(
      var(--folder-shift-x),
      calc(var(--folder-shift-y) - 5px)
    );
  }

  .program-module-head:hover .program-module-toggle-icon {
    box-shadow: 2px 2px 0 var(--ink);
    transform: translateY(-2px);
  }

  .program-module.is-open .program-module-head:hover .program-module-toggle-icon {
    transform: translateY(-2px) rotate(180deg);
  }

  .program-lesson:not(.is-locked):hover {
    box-shadow: 2px 3px 0 var(--ink);
    transform: translateX(3px);
  }

  .program-lesson.is-current:hover,
  .program-lesson--quiz.is-current:hover {
    box-shadow: inset 7px 0 0 var(--violet), 3px 4px 0 var(--ink);
  }

  .program-materials-note a:hover {
    box-shadow: 2px 3px 0 var(--ink);
    transform: translate(2px, 2px);
  }
}

@media (max-width: 900px) {
  .program-module-head,
  .program-module.is-collapsed .program-module-head,
  .program-module.is-active .program-module-head,
  .program-module.is-complete .program-module-head,
  .program-module.is-locked .program-module-head {
    grid-template-columns: 74px minmax(0, 1fr) 44px;
  }

  .program-module-status {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 700px) {
  .program-map-head h2 {
    display: grid;
    justify-items: start;
    gap: 7px;
  }

  .program-map-head h2 strong {
    box-shadow: 7px 8px 0 var(--sky);
  }

  .program-map-head > b {
    padding: 15px 16px 15px 20px;
  }

  .program-modules {
    gap: 34px;
  }

  .program-module {
    padding-top: 25px;
  }

  .program-module::before {
    left: 16px;
    width: 58%;
    height: 50px;
    border-radius: 17px 17px 6px 6px;
  }

  .program-module::after {
    top: 25px;
    right: -6px;
    bottom: -7px;
    left: 6px;
    border-radius: 20px;
  }

  .program-module-head,
  .program-module.is-collapsed .program-module-head,
  .program-module.is-active .program-module-head,
  .program-module.is-complete .program-module-head,
  .program-module.is-locked .program-module-head {
    grid-template-columns: 58px minmax(0, 1fr) 38px;
    gap: 12px;
    padding: 18px 14px;
    border-radius: 20px;
  }

  .program-module.is-open .program-module-head {
    border-radius: 20px 20px 14px 14px;
    box-shadow: inset 6px 0 0 var(--module-shadow);
  }

  .program-module-number,
  .program-module.is-locked .program-module-number {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    box-shadow: 3px 4px 0 var(--module-shadow);
  }

  .program-module-number strong {
    font-size: 31px;
  }

  .program-module-title h3 {
    font-size: clamp(36px, 11.5vw, 46px);
  }

  .program-module-title > span {
    font-size: 11px;
    line-height: 1.35;
  }

  .program-module-status,
  .program-module.is-locked .program-module-status {
    padding: 11px 12px;
  }

  .program-module-body {
    margin-top: -12px;
    padding: 28px 14px 16px;
    border-radius: 0 0 20px 20px;
  }

  .program-module-details {
    padding: 15px 14px 15px 21px;
  }

  .program-module-details > span,
  .program-module-details > b {
    width: 100%;
  }

  .program-lesson {
    min-height: 72px;
    grid-template-columns: 50px minmax(0, 1fr) 38px;
    gap: 10px;
    padding: 9px 10px 9px 13px;
    border-radius: 15px;
  }

  .program-lesson-number {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    font-size: 21px;
  }

  .program-lesson-state {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .program-lesson--quiz {
    min-height: 80px;
    margin-top: 19px;
    padding-left: 10px;
    border-left-width: 6px;
    box-shadow: 4px 5px 0 var(--module-shadow);
  }

  .program-lesson-number--quiz small {
    font-size: 7px;
  }

  .program-lesson-number--quiz strong {
    font-size: 21px;
  }

  .program-state-icon {
    width: 23px;
    height: 25px;
  }

  .program-materials-note {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
    border-radius: 19px;
    box-shadow: 5px 6px 0 var(--pink);
  }

  .program-materials-note-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }

  .program-materials-note-icon img {
    width: 59px;
    height: 59px;
  }

  .program-materials-note a {
    width: 100%;
    grid-column: 1 / -1;
  }
}

@media (max-width: 360px) {
  .program-module-head,
  .program-module.is-collapsed .program-module-head,
  .program-module.is-active .program-module-head,
  .program-module.is-complete .program-module-head,
  .program-module.is-locked .program-module-head {
    grid-template-columns: 52px minmax(0, 1fr) 34px;
    gap: 9px;
    padding-inline: 11px;
  }

  .program-module-number,
  .program-module.is-locked .program-module-number {
    width: 50px;
    height: 50px;
  }

  .program-module-title h3 {
    font-size: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .program-module::before,
  .program-module-number,
  .program-module-status,
  .program-module-body,
  .program-lesson,
  .program-materials-note a {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   COURSE COMPLETION CELEBRATION
   Одноразовый экран-праздник после завершения всей программы.
   ========================================================================== */

.program-page.is-celebration-open {
  overflow: hidden;
}

.program-celebration[hidden] {
  display: none;
}

.program-celebration {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: grid;
  overflow: hidden;
  padding: clamp(20px, 4vw, 52px);
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-base) var(--ease-standard);
}

.program-celebration.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.program-celebration.is-closing {
  opacity: 0;
  pointer-events: none;
}

.program-celebration-backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  backdrop-filter: blur(7px);
  cursor: pointer;
}

.program-celebration-effects {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.program-celebration-card {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(720px, 100%);
  max-height: calc(100dvh - clamp(40px, 8vw, 104px));
  overflow: auto;
  gap: 16px;
  justify-items: center;
  padding: clamp(34px, 5vw, 58px);
  background: var(--acid);
  border: 4px solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow:
    11px 13px 0 var(--ink),
    -14px -12px 0 var(--pink),
    15px -13px 0 var(--sky);
  color: var(--ink);
  opacity: 0;
  text-align: center;
  transform: translateY(28px) scale(0.94) rotate(-1deg);
  transition:
    opacity var(--motion-slow) var(--ease-out),
    transform var(--motion-slow) var(--ease-out);
}

.program-celebration.is-visible .program-celebration-card {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(0);
}

.program-celebration.is-closing .program-celebration-card {
  opacity: 0;
  transform: translateY(12px) scale(0.98);
}

.program-celebration-close {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: 3px 4px 0 var(--ink);
  color: var(--ink);
  cursor: pointer;
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.program-celebration-close svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}

.program-celebration-close:focus-visible {
  outline: 4px solid var(--violet);
  outline-offset: 4px;
}

.program-celebration-icon {
  display: grid;
  width: 104px;
  height: 104px;
  margin-top: -2px;
  place-items: center;
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: 28px;
  box-shadow: 7px 8px 0 var(--sky);
  transform: rotate(-3deg);
  animation: program-celebration-mark 900ms var(--ease-out) 260ms both;
}

.program-celebration-icon svg {
  width: 82px;
  height: 82px;
  fill: var(--white);
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.program-celebration-icon svg path:nth-of-type(2) {
  fill: var(--acid);
}

.program-celebration-card > small {
  margin-top: 4px;
  color: var(--violet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.program-celebration-card h2 {
  display: grid;
  gap: 5px;
  justify-items: center;
  font-family: var(--ff-display);
  font-size: clamp(62px, 8vw, 96px);
  line-height: 0.84;
}

.program-celebration-card h2 span,
.program-celebration-card h2 strong {
  display: block;
  font: inherit;
}

.program-celebration-card h2 strong {
  width: max-content;
  max-width: 100%;
  padding: 0.1em 0.17em 0.06em;
  background: var(--violet);
  box-shadow: 6px 7px 0 var(--white);
  color: var(--white);
  transform: rotate(-1deg);
}

.program-celebration-card > p {
  max-width: 570px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
}

.program-celebration-rewards {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.program-celebration-rewards span {
  display: flex;
  min-width: 0;
  min-height: 58px;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 12px 15px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 4px 5px 0 var(--pink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.program-celebration-rewards span:nth-child(2) {
  box-shadow: 4px 5px 0 var(--sky);
}

.program-celebration-rewards svg {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  padding: 3px;
  background: var(--acid);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.program-celebration-firework {
  --firework-end: -88px;
  --firework-far: -108px;
  position: absolute;
  top: var(--firework-y);
  left: var(--firework-x);
  width: 10px;
  height: 10px;
}

.program-celebration-firework i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 22px;
  background: var(--firework-color);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-pill);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--firework-angle)) translateY(-8px) scaleY(0.35);
  animation: program-celebration-firework 1.9s var(--ease-out) var(--firework-delay) 2 both;
}

.program-celebration-confetti {
  position: absolute;
  top: -28px;
  left: var(--confetti-x);
  width: var(--confetti-width);
  height: var(--confetti-height);
  background: var(--confetti-color);
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  opacity: 0;
  transform: translate3d(0, -30px, 0) rotate(var(--confetti-rotate));
  animation: program-celebration-confetti var(--confetti-duration) linear var(--confetti-delay) 1 both;
}

.program-celebration-confetti:nth-of-type(3n) {
  border-radius: 50%;
}

.program-celebration-confetti:nth-of-type(4n) {
  height: 7px;
}

@keyframes program-celebration-mark {
  0% {
    opacity: 0;
    transform: scale(0.4) rotate(-15deg);
  }
  58% {
    opacity: 1;
    transform: scale(1.08) rotate(3deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(-3deg);
  }
}

@keyframes program-celebration-firework {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--firework-angle)) translateY(-8px) scaleY(0.35);
  }
  16% {
    opacity: 1;
  }
  68% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--firework-angle)) translateY(var(--firework-end)) scaleY(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--firework-angle)) translateY(var(--firework-far)) scaleY(0.25);
  }
}

@keyframes program-celebration-confetti {
  0% {
    opacity: 0;
    transform: translate3d(0, -30px, 0) rotate(var(--confetti-rotate));
  }
  9% {
    opacity: 1;
  }
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--confetti-drift), 110vh, 0) rotate(calc(var(--confetti-rotate) + 720deg));
  }
}

@media (hover: hover) and (pointer: fine) {
  .program-celebration-close:hover {
    box-shadow: 1px 2px 0 var(--ink);
    transform: translate(2px, 2px) rotate(5deg);
  }
}

@media (max-width: 700px) {
  .program-celebration {
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  }

  .program-celebration-backdrop {
    backdrop-filter: blur(4px);
  }

  .program-celebration-card {
    max-height: calc(100dvh - 36px - env(safe-area-inset-bottom));
    gap: 12px;
    padding: 30px 18px 22px;
    border-width: 3px;
    border-radius: var(--radius-lg);
    box-shadow:
      7px 8px 0 var(--ink),
      -7px -7px 0 var(--pink),
      8px -8px 0 var(--sky);
  }

  .program-celebration-close {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
  }

  .program-celebration-icon {
    width: 82px;
    height: 82px;
    border-radius: 23px;
    box-shadow: 5px 6px 0 var(--sky);
  }

  .program-celebration-icon svg {
    width: 66px;
    height: 66px;
  }

  .program-celebration-card h2 {
    font-size: clamp(52px, 17vw, 68px);
  }

  .program-celebration-card h2 strong {
    box-shadow: 4px 5px 0 var(--white);
  }

  .program-celebration-card > p {
    font-size: 13px;
  }

  .program-celebration-rewards {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  .program-celebration-rewards span {
    min-height: 50px;
    padding: 10px 12px;
  }

  .program-celebration-firework {
    --firework-end: -58px;
    --firework-far: -72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .program-celebration,
  .program-celebration-card,
  .program-celebration-close,
  .program-celebration-icon {
    animation: none !important;
    transition: none !important;
  }

  .program-celebration-card,
  .program-celebration.is-visible .program-celebration-card {
    opacity: 1;
    transform: none;
  }

  .program-celebration-effects {
    display: none;
  }
}

/* ==========================================================================
   STUDENT PROFILE - shared avatar and profile page
   ========================================================================== */

[data-profile-avatar] {
  overflow: hidden;
  background: var(--profile-avatar-color, var(--pink));
  color: var(--ink);
}

[data-profile-avatar] img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-initial {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  font-family: var(--ff-display);
  font-size: 0.58em;
  font-weight: 700;
  line-height: 1;
}

.course-profile-icon {
  font-size: 38px;
}

.course-profile-link.is-active {
  background: var(--acid);
}

.course-topbar {
  display: flex;
  justify-content: flex-end;
}

.course-topbar-avatar,
.course-mobile-avatar {
  display: grid;
  overflow: hidden;
  place-items: center;
  background: var(--profile-avatar-color, var(--pink));
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.course-topbar-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  font-size: 27px;
}

.course-topbar-profile.is-active {
  background: var(--acid);
}

.course-mobile-avatar {
  width: 39px;
  height: 39px;
  padding: 0;
  font-size: 32px;
}

.course-mobile-nav-link.is-active .course-mobile-avatar {
  background: var(--acid);
  box-shadow: 3px 4px 0 var(--violet);
  transform: rotate(-3deg);
}

.profile-content {
  width: min(100%, 1260px);
  margin-inline: auto;
  padding: clamp(var(--space-8), 4vw, var(--space-16)) clamp(var(--space-6), 4vw, var(--space-12)) 112px;
}

.profile-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-8);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.profile-breadcrumbs a {
  color: var(--violet);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.profile-hero {
  display: flex;
  justify-content: space-between;
  gap: var(--space-8);
  align-items: center;
  margin-bottom: clamp(var(--space-10), 5vw, var(--space-16));
}

.profile-kicker,
.profile-hero-note {
  width: fit-content;
  color: var(--violet);
  font-family: var(--ff-script);
  font-weight: 400;
  line-height: 0.95;
}

.profile-kicker {
  margin-left: var(--space-4);
  font-size: clamp(28px, 3vw, 40px);
  transform: rotate(-2deg);
}

.profile-hero h1 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12em;
  align-items: center;
  padding-block: 0.08em 0.12em;
  font-size: clamp(58px, 7vw, 94px);
  line-height: 0.86;
}

.profile-hero h1 span,
.profile-hero h1 strong {
  display: inline-block;
}

.profile-hero h1 strong {
  padding: 0.05em 0.12em 0.09em;
  background: var(--pink);
  border: 3px solid var(--ink);
  box-shadow: 7px 8px 0 var(--sky);
  transform: rotate(-1deg);
}

.profile-hero-note {
  margin-top: var(--space-3);
  margin-left: clamp(42px, 8vw, 110px);
  font-size: clamp(25px, 3vw, 36px);
  transform: rotate(1.5deg);
}

.profile-private-stamp {
  display: flex;
  flex: 0 0 auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-transform: uppercase;
  transform: rotate(2deg);
}

.profile-private-stamp svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: clamp(var(--space-8), 4vw, var(--space-12));
  align-items: start;
}

.profile-side {
  display: grid;
  gap: var(--space-8);
}

.profile-photo-card,
.profile-progress-card,
.profile-form-card,
.profile-security,
.profile-privacy-note {
  position: relative;
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
}

.profile-photo-card {
  padding: var(--space-8) var(--space-6) var(--space-6);
  background: var(--violet);
  box-shadow: 9px 10px 0 var(--ink);
  color: var(--white);
  isolation: isolate;
}

.profile-photo-card::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.045;
  background-image: var(--noise-img);
  background-size: 180px 180px;
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.profile-photo-tape {
  position: absolute;
  z-index: 3;
  top: -14px;
  left: 50%;
  width: 96px;
  height: 29px;
  opacity: 0.9;
  background: var(--acid);
  border: 2px solid var(--ink);
  transform: translateX(-50%) rotate(-3deg);
}

.profile-card-label {
  display: inline-flex;
  width: fit-content;
  gap: 8px;
  align-items: center;
  margin-bottom: var(--space-4);
  padding: 7px 13px 7px 9px;
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: var(--radius-xs);
  box-shadow: 5px 5px 0 var(--sky);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.1;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.profile-card-label svg {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  overflow: visible;
  stroke: var(--ink);
  stroke-width: 0.8;
}

.profile-card-label path {
  fill: var(--acid);
}

.profile-card-label circle {
  fill: var(--violet);
}

.profile-photo-card h2,
.profile-progress-card h2,
.profile-section-heading h2,
.profile-security-heading h2,
.profile-privacy-note h2,
.profile-dialog h2 {
  font-family: var(--ff-display);
  font-weight: 700;
  line-height: 0.96;
}

.profile-photo-card h2 {
  margin-bottom: var(--space-6);
  font-size: clamp(38px, 4vw, 48px);
}

.profile-avatar-dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  padding: var(--space-5) var(--space-3) var(--space-4);
  background: color-mix(in srgb, var(--white) 10%, transparent);
  border: 2px dashed var(--white);
  border-radius: var(--radius-lg);
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.profile-avatar-dropzone.is-dragging {
  background: color-mix(in srgb, var(--acid) 25%, transparent);
  transform: scale(1.015);
}

.profile-avatar-preview {
  display: grid;
  width: min(184px, 65vw);
  overflow: hidden;
  place-items: center;
  background: var(--profile-avatar-color, var(--pink));
  border: 4px solid var(--ink);
  border-radius: 50%;
  box-shadow: 7px 8px 0 var(--pink);
  color: var(--ink);
  font-size: 160px;
  aspect-ratio: 1;
}

.profile-avatar-doodle {
  position: absolute;
  right: -2px;
  bottom: 47px;
  width: 100px;
  fill: none;
  filter: drop-shadow(2px 3px 0 var(--pink));
  stroke: var(--acid);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.profile-avatar-dropzone > p {
  margin-top: var(--space-4);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
}

.profile-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: center;
  margin-top: var(--space-5);
}

.profile-upload-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-4);
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.profile-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.profile-upload-button:focus-within {
  outline: 3px solid var(--acid);
  outline-offset: 4px;
}

.profile-remove-button {
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  color: var(--white);
  font-size: 13px;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.profile-upload-rules {
  margin-top: var(--space-4);
  color: color-mix(in srgb, var(--white) 78%, transparent);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

.profile-avatar-feedback {
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--sky);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.profile-avatar-feedback.is-error {
  background: var(--pink);
}

.profile-live-card {
  display: grid;
  gap: 2px;
  margin-top: var(--space-6);
  padding: var(--space-4);
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transform: rotate(-1deg);
}

.profile-live-card small {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-live-card strong {
  font-family: var(--ff-display);
  font-size: 32px;
  line-height: 1;
}

.profile-live-card p {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.profile-live-card p.is-empty {
  opacity: 0.58;
}

.profile-progress-card {
  padding: var(--space-6);
  background: var(--sky);
  box-shadow: 7px 8px 0 var(--pink);
}

.profile-progress-heading {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: start;
}

.profile-progress-heading p,
.profile-security-heading p {
  margin-bottom: var(--space-2);
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: 27px;
  font-weight: 400;
  line-height: 0.95;
  transform: rotate(-2deg);
}

.profile-progress-heading h2 {
  font-size: 38px;
}

.profile-progress-heading svg {
  width: 58px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--violet);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-progress-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.profile-progress-list > div {
  display: grid;
  min-width: 0;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-2);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  text-align: center;
}

.profile-progress-list dt {
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.profile-progress-list dd {
  order: -1;
  font-family: var(--ff-display);
  font-size: 38px;
  font-weight: 700;
  line-height: 0.9;
}

.profile-form {
  display: grid;
  gap: var(--space-8);
}

.profile-form-card {
  padding: clamp(var(--space-6), 3vw, var(--space-8));
  background: var(--white);
  box-shadow: 8px 9px 0 var(--ink);
}

.profile-form-card--socials {
  background: var(--white);
}

.profile-section-heading {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  margin-bottom: var(--space-6);
}

.profile-section-heading > span {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: var(--shadow-xs);
  font-family: var(--ff-display);
  font-size: 28px;
  line-height: 1;
}

.profile-form-card--socials .profile-section-heading > span {
  background: var(--sky);
}

.profile-section-heading p {
  margin-bottom: 3px;
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: 25px;
  font-weight: 400;
  line-height: 0.9;
}

.profile-section-heading h2 {
  font-size: clamp(40px, 4vw, 52px);
}

.profile-section-intro {
  max-width: 600px;
  margin: calc(var(--space-2) * -1) 0 var(--space-6);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.profile-field {
  position: relative;
  display: grid;
  min-width: 0;
  gap: var(--space-2);
}

.profile-field--wide {
  grid-column: 1 / -1;
}

.profile-field > span:first-child {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.profile-field > small {
  margin-top: -4px;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.profile-field input,
.profile-field textarea,
.profile-social-field input {
  width: 100%;
  min-width: 0;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 16px;
  font-weight: 700;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.profile-field input,
.profile-social-field input {
  height: 52px;
  padding: 0 var(--space-4);
}

.profile-field textarea {
  min-height: 88px;
  padding: var(--space-3) var(--space-4) var(--space-6);
  line-height: 1.45;
  resize: vertical;
}

.profile-field input::placeholder,
.profile-field textarea::placeholder,
.profile-social-field input::placeholder {
  color: color-mix(in srgb, var(--ink) 38%, transparent);
}

.profile-field input:focus,
.profile-field textarea:focus,
.profile-social-field input:focus {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
  background: var(--white);
  box-shadow: var(--shadow-xs);
}

.profile-field input[aria-invalid="true"] {
  background: var(--pink);
}

.profile-field > b {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-2);
  padding: 3px 6px;
  background: var(--white);
  border-radius: var(--radius-xs);
  font-size: 10px;
  font-weight: 900;
}

.profile-social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.profile-social-field {
  --social-card-shadow: var(--pink);
  --social-card-surface: color-mix(in srgb, var(--sky) 34%, var(--white));

  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  background: var(--social-card-surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 4px 5px 0 var(--social-card-shadow);
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.profile-social-field:nth-child(even) {
  --social-card-shadow: var(--sky);
  --social-card-surface: color-mix(in srgb, var(--pink) 28%, var(--white));
}

.profile-social-icon {
  display: grid;
  width: 44px;
  height: 44px;
  overflow: hidden;
  place-items: center;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--acid);
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.profile-social-icon svg {
  width: 29px;
  height: 29px;
  fill: currentColor;
}

.profile-social-icon--telegram {
  color: #26a5e4;
}

.profile-social-icon--instagram {
  color: #ff0069;
}

.profile-social-icon--tiktok {
  color: #000;
}

.profile-social-icon--youtube {
  color: #f00;
}

.profile-social-icon--vk {
  color: #0077ff;
}

.profile-social-icon--max svg {
  width: 31px;
  height: 31px;
}

.profile-social-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.profile-social-copy b {
  font-size: 14px;
  font-weight: 900;
}

.profile-social-copy small {
  color: color-mix(in srgb, var(--ink) 58%, transparent);
  font-size: 10px;
  font-weight: 700;
}

.profile-social-field input {
  height: 46px;
  grid-column: 1 / -1;
  background: var(--white);
}

.profile-save-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-5);
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 7px 8px 0 var(--sky);
}

.profile-save-row > p {
  max-width: 300px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.profile-save-button,
.profile-security-button,
.profile-logout-button,
.profile-dialog-primary,
.profile-dialog-secondary {
  min-height: 52px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 900;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.profile-save-button {
  display: inline-grid;
  min-width: 270px;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4);
  background: var(--acid);
  box-shadow: var(--shadow-sm);
}

.profile-save-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--sky);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  box-shadow: 3px 3px 0 var(--violet);
  transform: rotate(-2deg);
}

.profile-save-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-save-loading {
  display: none;
}

.profile-save-button.is-loading {
  opacity: 0.72;
  box-shadow: none;
}

.profile-save-button.is-loading .profile-save-default {
  display: none;
}

.profile-save-button.is-loading .profile-save-loading {
  display: inline;
}

.profile-security {
  margin-top: clamp(var(--space-12), 7vw, var(--space-20));
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--sky);
  box-shadow: 9px 10px 0 var(--ink);
}

.profile-security-heading {
  display: flex;
  justify-content: space-between;
  gap: var(--space-6);
  align-items: end;
  padding-bottom: var(--space-5);
  border-bottom: 3px solid var(--ink);
}

.profile-security-heading h2 {
  font-size: clamp(48px, 6vw, 72px);
}

.profile-security-mark {
  width: clamp(104px, 9vw, 132px);
  height: clamp(104px, 9vw, 132px);
  flex: 0 0 auto;
  filter: drop-shadow(7px 8px 0 var(--pink));
  transform: rotate(1.5deg);
  transition: transform var(--motion-fast) var(--ease-standard);
}

.profile-security-mark picture,
.profile-security-mark img,
.profile-sessions-icon picture,
.profile-sessions-icon img,
.profile-privacy-icon picture,
.profile-privacy-icon img {
  display: block;
  width: 100%;
  height: 100%;
}

.profile-security-mark img,
.profile-sessions-icon img,
.profile-privacy-icon img {
  object-fit: contain;
}

.profile-security-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.profile-password-form,
.profile-sessions-card {
  padding: var(--space-6);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
}

.profile-password-form {
  box-shadow: 6px 6px 0 var(--violet);
}

.profile-password-form h3,
.profile-sessions-card h3 {
  margin-bottom: var(--space-5);
  font-family: var(--ff-display);
  font-size: 30px;
  line-height: 1;
}

.profile-password-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.profile-password-control {
  position: relative;
  display: block;
}

.profile-password-control input {
  padding-right: 52px;
}

.profile-password-control button {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius-xs);
}

.profile-password-control button svg {
  width: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.profile-password-error {
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.profile-security-button {
  margin-top: var(--space-5);
  padding: 0 var(--space-5);
  background: var(--acid);
  box-shadow: var(--shadow-sm);
}

.profile-sessions-card {
  display: grid;
  grid-template-columns: clamp(84px, 8vw, 112px) minmax(0, 1fr);
  gap: var(--space-4);
  align-content: start;
  background: var(--cream);
  box-shadow: 6px 6px 0 var(--pink);
}

.profile-sessions-icon {
  width: clamp(84px, 8vw, 112px);
  height: clamp(84px, 8vw, 112px);
  align-self: start;
  filter: drop-shadow(6px 7px 0 var(--acid));
  transform: rotate(-2deg);
  transition: transform var(--motion-fast) var(--ease-standard);
}

.profile-sessions-card h3 {
  margin-bottom: var(--space-2);
}

.profile-sessions-card p {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.profile-logout-button {
  grid-column: 1 / -1;
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: var(--pink);
  box-shadow: var(--shadow-sm);
}

.profile-privacy-note {
  display: grid;
  grid-template-columns: clamp(118px, 11vw, 156px) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: center;
  margin-top: var(--space-10);
  padding: var(--space-6);
  background: var(--violet);
  box-shadow: 8px 9px 0 var(--pink);
  color: var(--white);
}

.profile-privacy-icon {
  width: clamp(118px, 11vw, 156px);
  height: clamp(118px, 11vw, 156px);
  filter: drop-shadow(7px 8px 0 var(--sky));
  transform: rotate(-2deg);
  transition: transform var(--motion-fast) var(--ease-standard);
}

.profile-privacy-note p {
  margin-bottom: var(--space-2);
  color: var(--acid);
  font-family: var(--ff-script);
  font-size: 27px;
  line-height: 0.9;
}

.profile-privacy-note h2 {
  font-size: clamp(30px, 4vw, 44px);
}

.profile-privacy-note span {
  display: block;
  max-width: 780px;
  margin-top: var(--space-3);
  color: color-mix(in srgb, var(--white) 82%, transparent);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.profile-dialog {
  width: min(calc(100% - 32px), 580px);
  max-height: calc(100svh - 32px);
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  color: var(--ink);
}

.profile-dialog::backdrop {
  background: color-mix(in srgb, var(--ink) 58%, transparent);
  backdrop-filter: blur(3px);
}

.profile-dialog-card {
  position: relative;
  max-height: calc(100svh - 32px);
  padding: var(--space-8);
  overflow-y: auto;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 9px 10px 0 var(--ink);
}

.profile-dialog-card--small {
  max-width: 500px;
  margin-inline: auto;
  text-align: center;
}

.profile-dialog-close {
  position: absolute;
  z-index: 2;
  top: var(--space-3);
  right: var(--space-3);
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.profile-dialog-close svg {
  width: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
}

.profile-dialog-kicker {
  width: fit-content;
  margin-bottom: var(--space-2);
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: 28px;
  line-height: 0.9;
  transform: rotate(-2deg);
}

.profile-dialog h2 {
  padding-right: 48px;
  font-size: clamp(44px, 7vw, 60px);
}

.profile-dialog-intro,
.profile-dialog-card--small > p {
  margin-top: var(--space-3);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.profile-crop-frame {
  position: relative;
  width: min(100%, 320px);
  margin: var(--space-6) auto var(--space-4);
  overflow: hidden;
  background: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 7px 8px 0 var(--pink);
  aspect-ratio: 1;
}

.profile-crop-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.profile-crop-frame canvas.is-dragging {
  cursor: grabbing;
}

.profile-crop-frame canvas:focus-visible {
  outline: 5px solid var(--acid);
  outline-offset: -8px;
}

.profile-crop-frame > span {
  position: absolute;
  inset: 0;
  border: 8px solid color-mix(in srgb, var(--white) 38%, transparent);
  border-radius: 50%;
  pointer-events: none;
}

.profile-crop-zoom {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  gap: var(--space-3);
  align-items: center;
}

.profile-crop-zoom svg {
  width: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.profile-crop-zoom input {
  width: 100%;
  accent-color: var(--violet);
}

.profile-dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.profile-dialog-primary,
.profile-dialog-secondary {
  padding: var(--space-2) var(--space-4);
}

.profile-dialog-primary {
  background: var(--acid);
  box-shadow: var(--shadow-sm);
}

.profile-dialog-secondary {
  background: var(--white);
  box-shadow: var(--shadow-xs);
}

.profile-logout-dialog-icon {
  display: grid;
  width: 70px;
  height: 70px;
  margin: 0 auto var(--space-5);
  place-items: center;
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  font-family: var(--ff-display);
  font-size: 48px;
}

.profile-dialog-card--small h2 {
  padding-right: 0;
}

.profile-toast {
  position: fixed;
  z-index: 100;
  right: max(var(--space-6), env(safe-area-inset-right));
  bottom: max(var(--space-6), env(safe-area-inset-bottom));
  display: grid;
  width: min(calc(100% - 32px), 420px);
  grid-template-columns: 48px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  opacity: 0;
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  transform: translateY(18px);
  transition:
    opacity var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.profile-toast.is-error {
  background: var(--pink);
}

.profile-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.profile-toast svg {
  width: 48px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-toast-error,
.profile-toast.is-error .profile-toast-check {
  display: none;
}

.profile-toast.is-error .profile-toast-error {
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .profile-upload-button:hover,
  .profile-save-button:hover,
  .profile-security-button:hover,
  .profile-dialog-primary:hover {
    box-shadow: 2px 2px 0 var(--ink);
    transform: translate(2px, 2px);
  }

  .profile-social-field:hover {
    background: var(--white);
    box-shadow: 2px 2px 0 var(--social-card-shadow);
    transform: translate(2px, 3px);
  }

  .profile-social-field:hover .profile-social-icon {
    box-shadow: 1px 1px 0 var(--pink);
    transform: translate(2px, 2px) rotate(-3deg);
  }

  .profile-sessions-card:hover .profile-sessions-icon {
    transform: translateY(-3px) rotate(1deg);
  }

  .profile-security-heading:hover .profile-security-mark {
    transform: translateY(-3px) rotate(-1deg);
  }

  .profile-privacy-note:hover .profile-privacy-icon {
    transform: translateY(-3px) rotate(1deg);
  }

  .profile-logout-button:hover,
  .profile-dialog-secondary:hover {
    background: var(--pink);
    box-shadow: none;
    transform: translate(2px, 2px);
  }

  .profile-password-control button:hover,
  .profile-dialog-close:hover {
    background: var(--acid);
  }
}

.profile-upload-button:active,
.profile-save-button:active,
.profile-security-button:active,
.profile-logout-button:active,
.profile-dialog-primary:active,
.profile-dialog-secondary:active {
  transform: translate(3px, 3px);
}

.profile-save-button:focus-visible,
.profile-security-button:focus-visible,
.profile-logout-button:focus-visible,
.profile-remove-button:focus-visible,
.profile-password-control button:focus-visible,
.profile-dialog button:focus-visible,
.profile-breadcrumbs a:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

@media (max-width: 1120px) {
  .profile-layout {
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    gap: var(--space-8);
  }

  .profile-social-grid,
  .profile-password-fields {
    grid-template-columns: 1fr;
  }

  .profile-security-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  }
}

@media (max-width: 900px) {
  .course-topbar {
    position: sticky;
    display: flex;
    justify-content: center;
  }

  .course-topbar-profile {
    position: absolute;
    right: var(--space-4);
    min-width: 44px;
    padding: 4px;
  }

  .course-topbar-profile-copy {
    display: none;
  }

  .profile-content {
    padding: var(--space-8) var(--space-4) calc(136px + env(safe-area-inset-bottom));
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-side {
    grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
    align-items: start;
  }

  .profile-security-grid {
    grid-template-columns: 1fr;
  }

  .profile-toast {
    bottom: calc(128px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 700px) {
  .profile-breadcrumbs {
    margin-bottom: var(--space-6);
  }

  .profile-hero {
    display: grid;
    gap: var(--space-5);
    margin-bottom: var(--space-10);
  }

  .profile-hero h1 {
    font-size: clamp(54px, 15vw, 70px);
  }

  .profile-hero-note {
    margin-left: var(--space-6);
  }

  .profile-private-stamp {
    justify-self: end;
  }

  .profile-side {
    grid-template-columns: 1fr;
  }

  .profile-photo-card {
    width: min(100%, 440px);
    justify-self: center;
  }

  .profile-fields,
  .profile-social-grid {
    grid-template-columns: 1fr;
  }

  .profile-save-row {
    display: grid;
  }

  .profile-save-row > p {
    max-width: none;
  }

  .profile-save-button {
    width: 100%;
  }

  .profile-security {
    padding: var(--space-6);
  }

  .profile-password-fields {
    grid-template-columns: 1fr;
  }

  .profile-privacy-note {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: var(--space-4);
  }

  .profile-privacy-icon {
    width: 108px;
    height: 108px;
  }
}

@media (max-width: 560px) {
  .course-topbar-profile {
    right: var(--space-3);
  }

  .course-topbar-avatar {
    width: 34px;
    height: 34px;
  }

  .profile-content {
    padding-inline: var(--space-4);
    padding-top: var(--space-6);
  }

  .profile-kicker {
    margin-left: var(--space-2);
    font-size: 27px;
  }

  .profile-hero h1 {
    gap: 0.06em;
    font-size: clamp(50px, 15vw, 62px);
  }

  .profile-hero h1 strong {
    border-width: 2px;
    box-shadow: 5px 6px 0 var(--sky);
  }

  .profile-hero-note {
    margin-left: var(--space-3);
    font-size: 25px;
  }

  .profile-private-stamp {
    justify-self: start;
    transform: rotate(-1deg);
  }

  .profile-photo-card,
  .profile-progress-card,
  .profile-form-card,
  .profile-security,
  .profile-privacy-note {
    border-width: 2px;
    border-radius: var(--radius-card);
  }

  .profile-photo-card {
    padding: var(--space-8) var(--space-5) var(--space-5);
    box-shadow: 7px 8px 0 var(--ink);
  }

  .profile-avatar-preview {
    width: min(170px, 58vw);
    border-width: 3px;
    font-size: 145px;
  }

  .profile-avatar-doodle {
    right: -7px;
    bottom: 50px;
    width: 88px;
  }

  .profile-progress-card,
  .profile-form-card {
    padding: var(--space-5);
  }

  .profile-progress-heading h2 {
    font-size: 34px;
  }

  .profile-progress-list dd {
    font-size: 34px;
  }

  .profile-progress-list dt {
    font-size: 8px;
  }

  .profile-section-heading {
    gap: var(--space-3);
  }

  .profile-section-heading > span {
    width: 46px;
    height: 46px;
    font-size: 25px;
  }

  .profile-section-heading h2 {
    font-size: 40px;
  }

  .profile-section-heading p {
    font-size: 23px;
  }

  .profile-social-field {
    padding: var(--space-3);
  }

  .profile-save-row {
    padding: var(--space-4);
    border-width: 2px;
    box-shadow: 5px 6px 0 var(--sky);
  }

  .profile-security {
    margin-top: var(--space-16);
    padding: var(--space-5);
    box-shadow: 7px 8px 0 var(--ink);
  }

  .profile-security-heading h2 {
    font-size: 44px;
  }

  .profile-security-mark {
    width: 82px;
    height: 82px;
    filter: drop-shadow(5px 6px 0 var(--pink));
  }

  .profile-password-form,
  .profile-sessions-card {
    padding: var(--space-4);
  }

  .profile-privacy-note {
    grid-template-columns: 1fr;
    padding: var(--space-5);
    box-shadow: 6px 7px 0 var(--pink);
  }

  .profile-privacy-note h2 {
    font-size: 32px;
  }

  .profile-privacy-icon {
    width: 116px;
    height: 116px;
    filter: drop-shadow(5px 6px 0 var(--sky));
  }

  .profile-sessions-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .profile-sessions-icon {
    width: 82px;
    height: 82px;
    filter: drop-shadow(4px 5px 0 var(--acid));
  }

  .profile-dialog-card {
    padding: var(--space-6) var(--space-5);
    border-radius: var(--radius-card);
    box-shadow: 6px 7px 0 var(--ink);
  }

  .profile-dialog h2 {
    font-size: 46px;
  }

  .profile-crop-frame {
    width: min(100%, 284px);
  }

  .profile-dialog-actions {
    grid-template-columns: 1fr;
  }

  .profile-dialog-primary {
    order: -1;
  }

  .profile-toast {
    right: var(--space-4);
    left: var(--space-4);
    width: auto;
  }
}

@media (max-width: 360px) {
  .profile-content {
    padding-inline: var(--space-3);
  }

  .profile-hero h1 {
    font-size: 50px;
  }

  .profile-photo-card,
  .profile-form-card,
  .profile-progress-card,
  .profile-security {
    padding-inline: var(--space-4);
  }

  .profile-progress-list {
    gap: 4px;
  }

  .profile-progress-list > div {
    padding-inline: 4px;
  }

  .profile-dialog {
    width: calc(100% - 24px);
  }

  .profile-crop-frame {
    width: min(100%, 252px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-avatar-dropzone,
  .profile-upload-button,
  .profile-save-button,
  .profile-security-button,
  .profile-logout-button,
  .profile-dialog button,
  .profile-toast,
  .profile-social-icon,
  .profile-social-field,
  .profile-sessions-icon,
  .profile-security-mark,
  .profile-privacy-icon,
  .course-topbar-avatar,
  .course-mobile-avatar {
    transition: none !important;
  }
}

/* Direct file preview feedback for routes that are not built yet. */

.local-navigation-toast {
  position: fixed;
  z-index: 130;
  right: max(var(--space-5), env(safe-area-inset-right));
  bottom: max(var(--space-5), env(safe-area-inset-bottom));
  display: grid;
  width: min(calc(100% - 32px), 430px);
  grid-template-columns: 42px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  opacity: 0;
  background: var(--sky);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
  pointer-events: none;
  transform: translateY(18px);
  transition:
    opacity var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.local-navigation-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.local-navigation-toast svg {
  width: 42px;
  fill: var(--acid);
  stroke: var(--ink);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 900px) {
  .local-navigation-toast {
    right: var(--space-4);
    bottom: calc(128px + env(safe-area-inset-bottom));
    left: var(--space-4);
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .local-navigation-toast {
    transition: none;
  }
}

/* ==========================================================================
   Stage 16. Unified student cabinet pages and system states
   ========================================================================== */

.course-topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lesson-page .course-topbar {
  z-index: 19;
}

.lesson-page .lesson-stagebar {
  top: 80px;
}

.course-notification-link,
.course-logout-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 11px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}

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

.course-notification-link.is-read {
  background: var(--white);
}

.course-notification-icon {
  position: relative;
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
}

.course-notification-icon svg,
.course-logout-button svg {
  width: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course-notification-icon i {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.course-notification-link.is-read .course-notification-icon i {
  display: none;
}

.course-notifications-dialog {
  width: min(calc(100% - 24px), 680px);
}

.course-notifications-dialog-card {
  display: grid;
  max-height: min(82vh, 760px);
  justify-items: stretch;
  padding: clamp(28px, 5vw, 44px);
  overflow: hidden;
}

.course-notifications-dialog-card > p,
.course-notifications-dialog-card > h2 {
  text-align: center;
}

.course-notifications-dialog-card > p {
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: 24px;
}

.course-notifications-dialog-card > h2 {
  margin-top: 4px;
  font-family: var(--ff-display);
  font-size: clamp(38px, 7vw, 58px);
  line-height: 0.92;
}

.course-notifications-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding: 3px 6px 8px 3px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--violet) var(--cream);
}

.course-notification-item {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: 3px 3px 0 var(--ink);
}

.course-notification-item.is-unread {
  background: color-mix(in srgb, var(--acid) 56%, var(--white));
}

.course-notification-item summary {
  display: grid;
  min-height: 64px;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
}

.course-notification-item summary::-webkit-details-marker {
  display: none;
}

.course-notification-item-mark {
  width: 11px;
  height: 11px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.course-notification-item.is-read .course-notification-item-mark {
  background: var(--cream);
}

.course-notification-item summary > span:nth-child(2) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.course-notification-item summary b {
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-notification-item summary small,
.course-notification-item summary em {
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.course-notification-item summary em {
  padding: 5px 8px;
  background: var(--pink);
  border: 1px solid var(--ink);
  border-radius: var(--radius-pill);
}

.course-notification-item.is-read summary em {
  background: var(--cream);
  color: color-mix(in srgb, var(--ink) 62%, transparent);
}

.course-notification-item-body {
  display: grid;
  gap: 14px;
  padding: 0 14px 16px 38px;
  border-top: 1px dashed color-mix(in srgb, var(--ink) 34%, transparent);
}

.course-notification-item-body p {
  padding-top: 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.course-notification-item-body a {
  width: fit-content;
  min-height: 44px;
  padding: 11px 16px;
  background: var(--sky);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
}

.course-notification-link:focus-visible,
.course-logout-button:focus-visible,
.course-shell-dialog :is(a, button):focus-visible,
.course-system-banner button:focus-visible {
  outline: 4px solid var(--violet);
  outline-offset: 3px;
}

@media (hover: hover) {
  .course-notification-link:hover,
  .course-logout-button:hover {
    box-shadow: 4px 5px 0 var(--ink);
    transform: translate(-1px, -1px);
  }
}

.course-quick-link--materials .course-quick-link-icon {
  background: var(--sky);
}

.course-shell-dialog {
  width: min(calc(100% - 32px), 520px);
  max-width: none;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--ink);
  overflow: visible;
}

.course-shell-dialog::backdrop {
  background: color-mix(in srgb, var(--ink) 54%, transparent);
  backdrop-filter: blur(5px);
}

.course-shell-dialog-card {
  position: relative;
  display: grid;
  justify-items: center;
  padding: clamp(32px, 7vw, 56px);
  background: var(--cream);
  background-image: var(--cream-grid-image);
  background-size: var(--cream-grid-size) var(--cream-grid-size);
  border: 3px solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: 10px 12px 0 var(--ink);
  text-align: center;
}

.course-shell-dialog-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 42px;
  height: 42px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 26px;
  font-weight: 900;
  cursor: pointer;
}

.course-shell-dialog-doodle {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  margin-bottom: 16px;
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 5px 6px 0 var(--ink);
  font-size: 34px;
}

.course-shell-dialog-card > p {
  color: var(--violet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.course-shell-dialog-card h2 {
  margin: 6px 0 18px;
  font-family: var(--ff-display);
  font-size: clamp(48px, 10vw, 76px);
  font-weight: 700;
  line-height: 0.92;
}

.course-session-copy {
  max-width: 360px;
  margin: -4px 0 20px;
  font-size: 14px;
  line-height: 1.45;
}

.course-shell-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.course-shell-dialog-actions :is(a, button) {
  min-height: 48px;
  padding: 12px 18px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 4px 5px 0 var(--ink);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.course-shell-dialog-actions button {
  background: var(--white);
}

.course-system-banner {
  position: fixed;
  z-index: 120;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: min(calc(100% - 32px), 560px);
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  opacity: 0;
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 7px 8px 0 var(--ink);
  pointer-events: none;
  transform: translateY(18px);
  transition:
    opacity var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.course-system-banner[hidden] {
  display: none;
}

.course-system-banner.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.course-system-banner > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 26px;
  font-weight: 900;
}

.course-system-banner strong {
  display: block;
  font-family: var(--ff-display);
  font-size: 28px;
  line-height: 1;
  text-transform: uppercase;
}

.course-system-banner p {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.course-system-banner button {
  min-height: 44px;
  padding: 9px 12px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.course-loading-state,
.course-friendly-error {
  display: grid;
  min-height: 420px;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 40px 20px;
  text-align: center;
}

.course-loading-state > span,
.course-friendly-error-doodle {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 6px 7px 0 var(--ink);
  font-size: 38px;
  font-weight: 900;
}

.course-loading-state p {
  font-size: 14px;
  font-weight: 900;
}

.course-friendly-error > p {
  color: var(--violet);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.course-friendly-error h1 {
  font-family: var(--ff-display);
  font-size: clamp(58px, 9vw, 108px);
  line-height: 0.88;
}

.course-friendly-error b {
  max-width: 520px;
  font-size: 15px;
  line-height: 1.5;
}

.course-friendly-error a {
  margin-top: 8px;
  padding: 14px 18px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 4px 5px 0 var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.lesson-template-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 310px);
  gap: clamp(30px, 5vw, 76px);
  align-items: center;
  margin-bottom: clamp(52px, 7vw, 92px);
  padding: clamp(10px, 2vw, 24px) 0 clamp(30px, 4vw, 54px);
  overflow: visible;
  color: var(--ink);
}

.lesson-module-opening {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: clamp(22px, 3vw, 34px);
  margin: 0 0 clamp(48px, 6vw, 78px);
  padding: clamp(26px, 4vw, 48px);
  overflow: hidden;
  background: var(--violet);
  border: 3px solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: 9px 10px 0 var(--pink);
  color: var(--white);
}

.lesson-module-opening::before {
  position: absolute;
  z-index: -1;
  top: -58px;
  right: -46px;
  width: 210px;
  height: 210px;
  border: 28px solid color-mix(in srgb, var(--sky) 30%, transparent);
  border-radius: 50%;
  content: "";
}

.lesson-module-opening-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 310px);
  gap: var(--space-6);
  align-items: end;
}

.lesson-module-opening-head > div > span {
  display: inline-flex;
  margin-bottom: var(--space-3);
  padding: 7px 12px 6px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: 4px 4px 0 var(--pink);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(-1deg);
}

.lesson-module-opening h2 {
  max-width: 850px;
  font-family: var(--ff-display);
  font-size: clamp(58px, 7vw, 98px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 0.88;
}

.lesson-module-opening-head > p {
  justify-self: end;
  color: var(--acid);
  font-family: var(--ff-script);
  font-size: clamp(35px, 4vw, 52px);
  line-height: 0.9;
  text-align: right;
  transform: rotate(-2deg);
}

.lesson-module-opening-copy {
  max-width: 760px;
  font-size: clamp(16px, 1.7vw, 20px);
  font-weight: 700;
  line-height: 1.5;
}

.lesson-module-opening ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 2px solid color-mix(in srgb, var(--white) 62%, transparent);
  border-left: 2px solid color-mix(in srgb, var(--white) 62%, transparent);
}

.lesson-module-opening li {
  display: grid;
  min-height: 82px;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-right: 2px solid color-mix(in srgb, var(--white) 62%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--white) 62%, transparent);
}

.lesson-module-opening li:first-child {
  background: var(--acid);
  color: var(--ink);
}

.lesson-module-opening li b {
  font-family: var(--ff-display);
  font-size: 28px;
  line-height: 1;
}

.lesson-module-opening li span {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.lesson-module-opening > strong {
  width: fit-content;
  max-width: 100%;
  padding: 10px 14px;
  background: var(--pink);
  border: 2px solid var(--ink);
  box-shadow: 4px 5px 0 var(--acid);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  transform: rotate(-0.5deg);
}

.lesson-book-masthead {
  position: relative;
  z-index: 3;
  display: grid;
  width: min(100% - 32px, 760px);
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: center;
  margin: 0 auto -22px;
  padding: 14px 18px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 6px 7px 0 var(--pink);
  transform: rotate(-0.6deg);
}

.lesson-book-masthead > span {
  color: var(--violet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.lesson-book-masthead h3 {
  font-family: var(--ff-display);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 0.92;
  text-align: center;
}

.lesson-book-masthead p {
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: 30px;
  line-height: 0.9;
  transform: rotate(-3deg);
}

.lesson-stage-transition {
  position: relative;
  width: fit-content;
  margin: var(--space-5) 6% 0 auto;
  padding: 0 0.2em 0.12em;
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 0.9;
  transform: rotate(-2deg);
}

.lesson-stage-transition::after {
  position: absolute;
  right: -0.1em;
  bottom: 0;
  left: 0;
  z-index: -1;
  height: 0.16em;
  background: var(--acid);
  content: "";
  transform: rotate(-1deg);
}

.lesson-stage-transition--notes {
  margin-right: auto;
  margin-left: 7%;
  transform: rotate(1deg);
}

.lesson-flipbook-page-content .bonus-page-number small {
  margin-left: 3px;
  font-family: var(--ff-body);
  font-size: 0.3em;
  font-weight: 900;
  letter-spacing: 0;
}

.lesson-page[data-lesson-id="2-1"] .lesson-flipbook-page-content > p:not(.lesson-flipbook-caption),
.lesson-page[data-lesson-id="2-3"] .lesson-flipbook-page-content > p:not(.lesson-flipbook-caption) {
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: clamp(14px, 1.25cqi, 17px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.48;
}


/* Lesson 2.3: instructional paragraphs stay readable; script is for short notes. */
.lesson-page[data-lesson-id="2-3"] .lesson-flipbook-page-content > p:not(.lesson-flipbook-caption),
.lesson-page[data-lesson-id="2-3"] .lesson-flipbook-page-content--05 > .lesson-flipbook-caption {
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: clamp(16px, 1.25cqi, 18px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.48;
}

.lesson-template-hero::after {
  content: none;
}

.lesson-template-heading {
  min-width: 0;
}

.lesson-template-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  margin-bottom: clamp(18px, 2vw, 26px);
}

.lesson-template-hero .lesson-kicker {
  position: relative;
  margin: 0;
  padding: 0 0 4px;
  background: transparent;
  border-radius: 0;
  color: var(--violet);
}

.lesson-template-hero .lesson-kicker::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  height: 5px;
  background: var(--pink);
  content: "";
  transform: rotate(-1.4deg);
}

.lesson-template-number {
  display: inline-flex;
  margin: 0;
  padding: 6px 11px 5px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: 3px;
  box-shadow: 4px 4px 0 var(--sky);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  transform: rotate(-1.2deg);
}

.lesson-template-hero h1 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15em 0.13em;
  align-items: baseline;
  max-width: 940px;
  padding-block: 0.12em;
  color: var(--ink);
  font-family: var(--ff-display);
  font-weight: 700;
  line-height: 0.94;
  overflow-wrap: normal;
  text-transform: uppercase;
}

.lesson-template-hero h1.lesson-template-title--short {
  font-size: clamp(62px, 7.7vw, 118px);
}

.lesson-template-hero h1.lesson-template-title--medium {
  font-size: clamp(54px, 6.2vw, 92px);
}

.lesson-template-hero h1.lesson-template-title--long {
  font-size: clamp(46px, 5vw, 76px);
}

.lesson-template-title-part {
  min-width: 0;
  max-width: 100%;
  line-height: 0.94;
}

.lesson-template-title-before,
.lesson-template-title-after {
  overflow-wrap: break-word;
  text-wrap: balance;
}

.lesson-template-title-accent {
  display: inline-block;
  padding: 0.1em 0.12em 0.06em;
  line-height: 0.86;
  overflow-wrap: break-word;
}

.lesson-template-title-accent--acid {
  background: var(--acid);
  box-shadow: 0.07em 0.08em 0 var(--sky);
  color: var(--violet);
}

.lesson-template-title-accent--violet {
  background: var(--violet);
  box-shadow: 0.07em 0.08em 0 var(--pink);
  color: var(--acid);
  transform: rotate(-0.7deg);
}

.lesson-template-title-accent--sky {
  background: var(--sky);
  box-shadow: 0.07em 0.08em 0 var(--acid);
  color: var(--violet);
}

.lesson-template-title-break {
  flex-basis: 100%;
  width: 0;
  height: 0;
}

.lesson-template-title-connector {
  font-size: 0.68em;
}

.lesson-template-title-after--tilt {
  display: inline-block;
  color: var(--ink);
  transform: rotate(-1.4deg);
  transform-origin: left center;
}

.lesson-template-title-after--tilt.lesson-template-title-accent--sky {
  color: var(--violet);
}

.lesson-template-hero .lesson-hero-note {
  position: relative;
  z-index: 0;
  width: fit-content;
  max-width: 290px;
  margin: 0;
  padding: 0.12em 0.14em 0.2em;
  color: var(--violet);
  justify-self: end;
  text-align: left;
  transform: rotate(-2deg);
}

.lesson-template-hero .lesson-hero-note::after {
  content: none;
}

.lesson-template-hero .lesson-hero-note > .lesson-hero-note-underline {
  text-decoration-color: var(--acid);
  text-decoration-line: underline;
  text-decoration-skip-ink: none;
  text-decoration-thickness: 0.14em;
  text-underline-offset: 0.08em;
}

.lesson-video-error {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: none;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
  background: var(--pink);
  color: var(--ink);
  text-align: center;
}

.lesson-video-player.is-error .lesson-video-error {
  display: grid;
}

.lesson-video-player.is-error :is(.lesson-video-placeholder, .lesson-video-mount) {
  visibility: hidden;
}

.lesson-video-error > span {
  font-size: 42px;
  font-weight: 900;
}

.lesson-video-error h3 {
  font-family: var(--ff-display);
  font-size: clamp(36px, 5vw, 58px);
  line-height: 0.9;
}

.lesson-video-error p {
  max-width: 330px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.lesson-video-error button,
.lesson-waiting-actions a {
  min-height: 42px;
  padding: 10px 13px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  box-shadow: 3px 4px 0 var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.lesson-material-links a > span {
  display: grid;
  gap: 2px;
  text-align: left;
}

.lesson-material-links a small {
  font-size: 9px;
  font-weight: 800;
  opacity: 0.7;
}

.lesson-waiting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: stretch;
  margin-top: 22px;
}

.lesson-status--waiting .lesson-waiting-actions a {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding: 11px 18px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  box-shadow: 4px 5px 0 var(--pink);
  color: var(--ink);
  font-size: clamp(12px, 1.05vw, 14px);
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.25;
  text-align: center;
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}

.lesson-status--waiting .lesson-waiting-actions a:last-child {
  background: var(--white);
  box-shadow: 4px 5px 0 var(--sky);
  color: var(--violet);
}

.lesson-status--waiting .lesson-waiting-actions a:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 4px;
}

.lesson-status--waiting .lesson-waiting-actions a:active {
  box-shadow: 1px 2px 0 var(--pink);
  transform: translate(3px, 3px);
}

@media (hover: hover) and (pointer: fine) {
  .lesson-status--waiting .lesson-waiting-actions a:hover {
    background: var(--pink);
    box-shadow: 6px 7px 0 var(--sky);
    transform: translate(-2px, -2px);
  }

  .lesson-status--waiting .lesson-waiting-actions a:last-child:hover {
    background: var(--sky);
    box-shadow: 6px 7px 0 var(--pink);
    color: var(--ink);
  }
}

@media (max-width: 700px) {
  .lesson-waiting-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .lesson-status--waiting .lesson-waiting-actions a {
    width: 100%;
    min-height: 54px;
    font-size: 13px;
  }
}

.program-waiting-actions {
  display: grid;
  min-width: 190px;
  gap: 10px;
}

.program-waiting-actions a {
  padding: 12px 14px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 4px 5px 0 var(--ink);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.program-waiting-actions a:last-child {
  background: var(--white);
}

/* Единые песочные часы внутри карточек урока. Вращается только компонент. */
.lesson-hourglass > .lut-hourglass {
  width: 88px;
}

.lesson-hourglass .lut-hourglass__svg {
  width: 100%;
  height: auto;
  animation: none;
  fill: initial;
  stroke: initial;
  stroke-width: initial;
}

@media (max-width: 700px) {
  .lesson-hourglass > .lut-hourglass {
    width: 74px;
  }

  .program-waiting-icon .lut-hourglass {
    width: 42px;
  }
}

/* Materials library */

.course-materials-content {
  width: 100%;
  min-height: 100vh;
  margin-inline: 0;
  padding: clamp(30px, 5vw, 72px) clamp(20px, 2vw, 32px) 120px;
}

.course-materials-breadcrumbs,
.module-quiz-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 28px;
  font-size: 12px;
  font-weight: 900;
}

.course-materials-breadcrumbs a,
.module-quiz-breadcrumbs a {
  color: var(--violet);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.course-materials-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 460px);
  gap: clamp(28px, 5vw, 84px);
  align-items: center;
  min-height: clamp(390px, 35vw, 520px);
  margin-bottom: clamp(48px, 5vw, 72px);
  padding: clamp(18px, 2.8vw, 42px) clamp(4px, 2vw, 30px);
  overflow: visible;
}

.course-materials-hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.course-materials-hero-copy > p {
  width: fit-content;
  margin: 0 0 8px 0.14em;
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: clamp(30px, 3.3vw, 48px);
  font-weight: 400;
  line-height: 1;
  transform: rotate(-2deg);
}

.course-materials-hero h1 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.08em 0.14em;
  align-items: center;
  margin: 0 0 clamp(20px, 2.5vw, 30px);
  overflow: visible;
  font-family: var(--ff-display);
  font-size: clamp(82px, 8.2vw, 136px);
  font-weight: 700;
  line-height: 0.86;
}

.course-materials-title-main,
.course-materials-title-accent {
  display: inline-block;
}

.course-materials-title-main {
  color: var(--ink);
}

.course-materials-hero h1 .course-materials-title-accent {
  position: relative;
  z-index: 1;
  padding: 0.07em 0.14em 0.09em;
  background: var(--sky);
  border: 3px solid var(--ink);
  box-shadow: 0.08em 0.09em 0 var(--pink);
  color: var(--violet);
  font: inherit;
  font-size: 0.72em;
  line-height: 0.86;
  transform: rotate(-1deg);
}

.course-materials-hero-copy > b {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 660px;
  padding: 0 0.12em 0.28em;
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.5;
  text-wrap: balance;
}

.course-materials-hero-copy > b::after {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0.1em;
  left: 0;
  height: 0.35em;
  background: var(--acid);
  content: "";
  transform: rotate(-1deg);
}

.course-materials-hero-art {
  position: relative;
  display: grid;
  width: min(100%, 440px);
  justify-items: center;
  justify-self: center;
  margin: 0;
  transform: rotate(1.5deg);
  transition: transform var(--motion-base) var(--ease-out);
}

.course-materials-hero-art picture,
.course-materials-hero-art img {
  display: block;
  width: 100%;
  height: auto;
}

.course-materials-hero-art img {
  filter: drop-shadow(11px 13px 0 var(--pink));
}

.course-materials-hero-art figcaption {
  position: absolute;
  z-index: 3;
  right: 2%;
  bottom: 4%;
  display: flex;
  min-height: 58px;
  gap: 9px;
  align-items: center;
  padding: 8px 15px 8px 12px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: 5px 6px 0 var(--sky);
  color: var(--ink);
  transform: rotate(3deg);
}

.course-materials-hero-art figcaption strong {
  font-family: var(--ff-display);
  font-size: 38px;
  font-weight: 700;
  line-height: 0.8;
}

.course-materials-hero-art figcaption span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

@media (hover: hover) and (pointer: fine) {
  .course-materials-hero-art:hover {
    transform: translateY(-7px) rotate(-0.5deg);
  }
}

.course-materials-library {
  display: grid;
  gap: 22px;
}

.course-material-module {
  overflow: hidden;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 7px 8px 0 var(--ink);
}

.course-material-module > header {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 48px;
  gap: 18px;
  align-items: center;
  min-height: 106px;
  padding: 20px 24px;
  background: var(--acid);
  border-bottom: 3px solid var(--ink);
}

.course-material-module.is-locked > header {
  background: color-mix(in srgb, var(--cream) 86%, var(--ink));
}

.course-material-module > header > span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  background: var(--ink);
  border-radius: 50%;
  color: var(--white);
  font-family: var(--ff-display);
  font-size: 34px;
}

.course-material-module header small {
  color: var(--violet);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.course-material-module header h2 {
  margin-top: 2px;
  font-family: var(--ff-display);
  font-size: clamp(40px, 5vw, 58px);
  line-height: 0.9;
  text-transform: uppercase;
}

.course-material-module > header > i {
  justify-self: end;
  font-size: 34px;
  font-style: normal;
  font-weight: 900;
}

.course-material-files {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
}

.course-material-file {
  display: grid;
  min-height: 92px;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  color: var(--ink);
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.course-material-file.is-locked {
  opacity: 0.68;
  background: color-mix(in srgb, var(--cream) 88%, var(--ink));
}

.course-material-file-type {
  display: grid;
  width: 50px;
  height: 58px;
  place-items: center;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 7px;
  font-size: 10px;
  font-weight: 900;
  transform: rotate(-3deg);
}

.course-material-file div {
  display: grid;
  gap: 4px;
}

.course-material-file strong {
  font-size: 14px;
  line-height: 1.3;
}

.course-material-file small {
  color: color-mix(in srgb, var(--ink) 66%, transparent);
  font-size: 10px;
  font-weight: 800;
}

.course-material-file > b {
  color: var(--violet);
  font-size: 10px;
  white-space: nowrap;
}

.course-material-lock {
  display: grid;
  width: 38px;
  place-items: center;
}

.course-material-lock svg {
  width: 28px;
  fill: var(--cream);
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linejoin: round;
}

@media (hover: hover) {
  .course-material-file[href]:hover {
    background: var(--sky);
    transform: translateY(-2px) rotate(-0.4deg);
  }
}

@media (max-width: 900px) {
  .lesson-page .lesson-stagebar {
    top: 72px;
  }

  .course-topbar-actions {
    position: absolute;
    left: var(--space-4);
  }

  .course-notification-link,
  .course-logout-button {
    width: 44px;
    padding: 5px;
  }

  .course-notifications-dialog-card {
    max-height: 88vh;
    padding: 34px 14px 18px;
  }

  .course-notifications-dialog-card > h2 {
    padding-inline: 24px;
    font-size: 38px;
  }

  .course-notification-item summary {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  .course-notification-item summary em {
    grid-column: 2;
    width: fit-content;
  }

  .course-notification-item-body {
    padding-left: 36px;
  }

  .course-notification-link b,
  .course-logout-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .course-system-banner {
    right: 16px;
    bottom: calc(128px + env(safe-area-inset-bottom));
  }

  .lesson-template-hero,
  .course-materials-hero {
    grid-template-columns: 1fr;
  }

  .lesson-template-hero .lesson-hero-note {
    justify-self: start;
  }

  .lesson-module-opening-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .lesson-module-opening-head > p {
    justify-self: start;
    text-align: left;
  }

  .lesson-module-opening ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .course-materials-hero-art {
    width: min(100%, 390px);
    justify-self: center;
  }

  .course-material-files {
    grid-template-columns: 1fr;
  }

  .program-waiting-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
}

@media (max-width: 560px) {
  .course-topbar-actions {
    left: 10px;
    gap: 5px;
  }

  /* На узком экране кнопки сжимались до 40px. Палец меньше 44px не попадает
     уверенно, а это выход из аккаунта и переход в профиль. */
  .course-notification-link,
  .course-logout-button {
    width: 44px;
    min-height: 44px;
  }

  .course-topbar-profile {
    right: 10px;
    min-width: 44px;
    min-height: 44px;
  }

  .course-topbar-avatar {
    width: 28px;
    height: 28px;
  }

  .course-system-banner {
    right: 12px;
    left: 12px;
    width: auto;
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .course-system-banner > span {
    width: 38px;
    height: 38px;
  }

  .course-system-banner button {
    grid-column: 1 / -1;
  }

  .course-shell-dialog-card {
    padding: 40px 20px 28px;
    border-radius: var(--radius-lg);
    box-shadow: 6px 7px 0 var(--ink);
  }

  .lesson-template-hero {
    gap: 24px;
    margin-bottom: 48px;
    padding: 10px 0 30px;
  }

  .lesson-module-opening {
    gap: 22px;
    margin-bottom: 46px;
    padding: 24px 18px;
    border-radius: var(--radius-lg);
    box-shadow: 7px 8px 0 var(--pink);
  }

  .lesson-module-opening h2 {
    font-size: clamp(53px, 16vw, 68px);
  }

  .lesson-module-opening-head > p {
    font-size: clamp(34px, 11vw, 44px);
  }

  .lesson-module-opening-copy {
    font-size: 15px;
  }

  .lesson-module-opening ol {
    grid-template-columns: minmax(0, 1fr);
  }

  .lesson-module-opening li {
    min-height: 66px;
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .lesson-module-opening li b {
    font-size: 25px;
  }

  .lesson-module-opening > strong {
    font-size: 12px;
  }

  .lesson-book-masthead {
    width: calc(100% - 16px);
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    margin-bottom: -14px;
    padding: 12px;
  }

  .lesson-book-masthead > span {
    grid-column: 1 / -1;
  }

  .lesson-book-masthead h3 {
    font-size: clamp(28px, 9vw, 36px);
    text-align: left;
  }

  .lesson-book-masthead p {
    font-size: 26px;
  }

  .lesson-stage-transition {
    margin-right: 2%;
    font-size: 30px;
  }

  .lesson-stage-transition--notes {
    margin-right: auto;
    margin-left: 2%;
  }

  .lesson-template-hero h1 {
    gap: 0.18em 0.12em;
    line-height: 0.96;
  }

  .lesson-template-hero h1.lesson-template-title--short {
    font-size: clamp(50px, 15vw, 68px);
  }

  .lesson-template-hero h1.lesson-template-title--medium {
    font-size: clamp(43px, 12.5vw, 58px);
  }

  .lesson-template-hero h1.lesson-template-title--long {
    font-size: clamp(37px, 10.8vw, 50px);
  }

  .lesson-template-title-accent {
    padding: 0.11em 0.12em 0.07em;
  }

  .lesson-template-meta {
    gap: 10px 14px;
    margin-bottom: 18px;
  }

  .lesson-template-hero .lesson-hero-note {
    max-width: min(280px, 88vw);
    font-size: clamp(30px, 10vw, 38px);
  }

  .course-materials-content {
    padding: 26px 14px calc(136px + env(safe-area-inset-bottom));
  }

  .course-materials-hero {
    gap: 30px;
    min-height: 0;
    margin-bottom: 38px;
    padding: 20px 2px 12px;
  }

  .course-materials-hero h1 {
    gap: 0.1em;
    margin-bottom: 22px;
    font-size: clamp(58px, 17vw, 76px);
  }

  .course-materials-hero h1 .course-materials-title-accent {
    padding-inline: 0.1em;
    border-width: 2px;
    box-shadow: 5px 6px 0 var(--pink);
    font-size: 0.7em;
  }

  .course-materials-hero-copy > p {
    margin-left: 0;
    font-size: clamp(29px, 9vw, 38px);
  }

  .course-materials-hero-copy > b {
    font-size: 15px;
  }

  .course-materials-hero-art {
    width: min(88vw, 310px);
  }

  .course-materials-hero-art img {
    filter: drop-shadow(7px 8px 0 var(--pink));
  }

  .course-materials-hero-art figcaption {
    right: 0;
    min-height: 52px;
    padding: 7px 12px 7px 10px;
    border-width: 2px;
    box-shadow: 4px 5px 0 var(--sky);
  }

  .course-materials-hero-art figcaption strong {
    font-size: 32px;
  }

  .course-material-module {
    border-radius: var(--radius-card);
    box-shadow: 5px 6px 0 var(--ink);
  }

  .course-material-module > header {
    grid-template-columns: 48px minmax(0, 1fr) 30px;
    gap: 12px;
    min-height: 88px;
    padding: 15px;
  }

  .course-material-module > header > span {
    width: 46px;
    height: 46px;
    font-size: 28px;
  }

  .course-material-module header h2 {
    font-size: 38px;
  }

  .course-material-files {
    gap: 10px;
    padding: 12px;
  }

  .course-material-file {
    grid-template-columns: 44px minmax(0, 1fr) 28px;
    gap: 10px;
    min-height: 82px;
    padding: 11px;
  }

  .course-material-file-type {
    width: 42px;
    height: 50px;
  }

  .course-material-file > b {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .program-waiting-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .course-notification-link,
  .course-notification-item,
  .course-notification-item-body a,
  .course-logout-button,
  .course-system-banner,
  .course-material-file,
  .course-materials-hero-art {
    transition: none !important;
  }
}

/* ==========================================================================
   Student rhythm, journal, lesson help and module feedback
   ========================================================================== */

.course-daily-row {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: clamp(18px, 3vw, 30px);
  margin-top: clamp(48px, 6vw, 76px);
}

.course-streak-card,
.course-journal-preview {
  display: grid;
  min-height: 176px;
  align-items: center;
  padding: clamp(22px, 3.5vw, 34px);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  color: var(--ink);
}

.course-streak-card {
  grid-template-columns: 178px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 34px);
  background: var(--acid);
  box-shadow: 8px 9px 0 var(--violet);
}

.course-streak-calendar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 5px 6px 0 var(--ink);
  transform: rotate(-2deg);
}

.course-streak-calendar span {
  padding: 7px 4px;
  background: var(--pink);
  border-bottom: 2px solid var(--ink);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
}

.course-streak-calendar span + span,
.course-streak-calendar i + i {
  border-left: 2px solid var(--ink);
}

.course-streak-calendar i {
  display: grid;
  min-height: 62px;
  place-items: center;
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: 40px;
  font-style: normal;
}

.course-streak-card p,
.course-journal-preview small {
  color: var(--violet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.course-streak-card h2 {
  margin: 4px 0 7px;
  font-family: var(--ff-display);
  font-size: clamp(46px, 5vw, 68px);
  font-weight: 700;
  line-height: 0.86;
}

.course-streak-card h2 span {
  display: inline-grid;
  min-width: 0.9em;
  place-items: center;
  color: var(--violet);
  font-size: 1.22em;
}

.course-streak-card h2 b {
  font: inherit;
}

.course-streak-card > div:last-child > strong {
  display: block;
  max-width: 470px;
  font-size: 12px;
  line-height: 1.4;
}

.course-journal-preview {
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 20px;
  background: var(--sky);
  box-shadow: 8px 9px 0 var(--pink);
  transition:
    transform var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.course-journal-preview-icon {
  display: grid;
  width: 76px;
  height: 90px;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: rotate(3deg);
}

.course-journal-preview-icon img {
  width: 94px;
  height: 94px;
  max-width: none;
  object-fit: contain;
}

.course-journal-preview > span:last-child {
  display: grid;
  gap: 7px;
}

.course-journal-preview strong {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.15;
}

.course-journal-preview b {
  color: var(--violet);
  font-size: 12px;
}

.course-quick-link--journal .course-quick-link-icon {
  background: var(--pink);
}

@media (hover: hover) {
  .course-journal-preview:hover {
    box-shadow: 11px 12px 0 var(--pink);
    transform: translate(-2px, -2px) rotate(-0.3deg);
  }
}

/* Personal journal */

.course-journal-content {
  width: min(100%, 1180px);
  min-height: 100vh;
  margin-inline: auto;
  padding: clamp(30px, 5vw, 72px) clamp(20px, 5vw, 64px) 120px;
}

.course-journal-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 12px;
  font-weight: 900;
}

.course-journal-breadcrumbs a {
  color: var(--violet);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.course-journal-hero {
  position: relative;
  display: grid;
  width: min(calc(100vw - var(--course-sidebar-width) - 54px), 1740px);
  grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.78fr);
  gap: clamp(34px, 4vw, 78px);
  align-items: center;
  min-height: 470px;
  margin-bottom: clamp(42px, 6vw, 72px);
  margin-left: 50%;
  padding: clamp(18px, 3vw, 38px) clamp(14px, 3.5vw, 74px) clamp(26px, 4vw, 48px);
  transform: translateX(-50%);
}

.course-journal-intro {
  position: relative;
  z-index: 2;
}

.course-journal-intro > p {
  width: fit-content;
  margin-bottom: 8px;
  color: var(--violet);
  font-family: var(--ff-script);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 400;
  line-height: 1;
  transform: rotate(-2deg);
}

.course-journal-hero h1 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12em;
  align-items: center;
  margin: 0 0 24px;
  font-family: var(--ff-display);
  font-size: clamp(82px, 8.5vw, 128px);
  font-weight: 700;
  line-height: 0.84;
}

.course-journal-title-main {
  color: var(--ink);
}

.course-journal-hero h1 .course-journal-title-accent {
  display: inline-block;
  padding: 0.07em 0.16em 0.1em;
  color: var(--violet);
  background: var(--sky);
  border: 3px solid var(--ink);
  box-shadow: 8px 9px 0 var(--pink);
  font-family: var(--ff-display);
  font-size: 0.67em;
  font-weight: 700;
  line-height: 0.84;
  transform: rotate(-1.2deg);
  transform-origin: center;
}

.course-journal-intro > b {
  display: block;
  width: 100%;
  max-width: 590px;
  font-size: clamp(16px, 1.55vw, 19px);
  line-height: 1.55;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.course-journal-visual {
  display: grid;
  justify-items: center;
  align-content: center;
  min-width: 0;
}

.course-journal-cover {
  position: relative;
  width: min(100%, 380px);
  transform: rotate(1.6deg);
  transform-origin: center;
  transition: transform 0.35s var(--ease-out);
}

.course-journal-cover img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(12px 14px 0 rgba(142, 216, 255, 0.82));
}

@media (hover: hover) {
  .course-journal-cover:hover {
    transform: translateY(-5px) rotate(-0.4deg);
  }
}

.course-journal-count {
  position: absolute;
  z-index: 2;
  top: 61%;
  left: 47%;
  display: grid;
  justify-items: center;
  color: var(--ink);
  line-height: 1;
  transform: translate(-50%, -50%) rotate(-1.5deg);
}

.course-journal-count strong {
  font-family: var(--ff-display);
  font-size: clamp(70px, 7vw, 94px);
  font-weight: 700;
  line-height: 0.78;
}

.course-journal-count span {
  position: relative;
  margin-top: 12px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.course-journal-privacy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  width: min(100%, 380px);
  gap: 12px;
  align-items: start;
  margin-top: -2px;
  padding: 16px 4px 0;
  border-top: 2px solid var(--ink);
  font-size: 13px;
  line-height: 1.45;
  transform: rotate(-0.5deg);
}

.course-journal-privacy > span {
  color: var(--violet);
  font-size: 25px;
  line-height: 1;
  transform: rotate(-8deg);
}

.course-journal-privacy strong {
  background: linear-gradient(transparent 58%, var(--pink) 58% 91%, transparent 91%);
}

.course-journal-privacy p {
  text-wrap: balance;
}

.course-journal-modules {
  position: relative;
  width: min(calc(100vw - var(--course-sidebar-width) - 54px), 1740px);
  margin-top: clamp(54px, 7vw, 88px);
  margin-left: 50%;
  padding: 0 0 104px;
  overflow: visible;
  transform: translateX(-50%);
}

.course-journal-notebook {
  position: relative;
  min-width: 0;
  outline: none;
}

.course-journal-tabs {
  position: relative;
  z-index: 4;
  display: grid;
  width: calc(100% - 72px);
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  align-items: end;
  margin: 0 auto -4px;
  padding-inline: 10px;
}

.course-journal-tab {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 76px;
  align-content: center;
  gap: 3px;
  padding: 10px 9px 15px;
  overflow: hidden;
  background: var(--acid);
  border: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: 14px 14px 3px 3px;
  box-shadow: none;
  color: var(--ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transform: translateY(7px) rotate(-0.35deg);
  transform-origin: center bottom;
  transition:
    transform var(--motion-fast) var(--ease-standard),
    opacity var(--motion-fast) var(--ease-standard);
}

.course-journal-tab::after {
  position: absolute;
  right: 11px;
  bottom: 7px;
  left: 11px;
  height: 3px;
  background: color-mix(in srgb, currentColor 24%, transparent);
  border-radius: var(--radius-pill);
  content: "";
}

.course-journal-tab--tone-1 {
  background: var(--pink);
}

.course-journal-tab--tone-2 {
  background: var(--sky);
}

.course-journal-tab--tone-3 {
  background: var(--violet);
  color: var(--white);
}

.course-journal-tab.is-before,
.course-journal-tab.is-after {
  opacity: 0.8;
}

.course-journal-tab.is-current {
  z-index: 2;
  opacity: 1;
  transform: translateY(0) rotate(0deg);
}

.course-journal-tab small {
  position: relative;
  z-index: 1;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.course-journal-tab > strong {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  font-family: var(--ff-display);
  font-size: clamp(15px, 1.35vw, 21px);
  font-weight: 700;
  line-height: 0.94;
  text-transform: uppercase;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.course-journal-tab > span {
  position: relative;
  z-index: 1;
  font-size: 8px;
  font-weight: 800;
}

.course-journal-tab > span i {
  font-style: normal;
}

.course-journal-tab:focus-visible {
  outline: 4px solid var(--violet);
  outline-offset: 4px;
}

@media (hover: hover) {
  .course-journal-tab:hover {
    opacity: 1;
    transform: translateY(2px) rotate(0deg);
  }
}

.course-journal-book-stage {
  position: relative;
  z-index: 2;
}

.course-journal-book {
  position: relative;
  isolation: isolate;
  width: 100%;
}

.course-journal-book-cover {
  position: relative;
  min-width: 0;
  padding: 12px;
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: none;
}

.course-journal-module-panel[hidden],
.course-journal-spread[hidden] {
  display: none !important;
}

.course-journal-spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
  min-height: 548px;
  transform-origin: center;
}

.course-journal-spread.is-turning-forward {
  animation: journal-spread-forward 360ms var(--ease-standard) both;
}

.course-journal-spread.is-turning-back {
  animation: journal-spread-back 360ms var(--ease-standard) both;
}

@keyframes journal-spread-forward {
  from { opacity: 0.42; transform: translateX(14px) rotateY(-2deg); }
  to { opacity: 1; transform: translateX(0) rotateY(0); }
}

@keyframes journal-spread-back {
  from { opacity: 0.42; transform: translateX(-14px) rotateY(2deg); }
  to { opacity: 1; transform: translateX(0) rotateY(0); }
}

.course-journal-paper {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 19px 19px 78px;
  background-color: var(--book-paper);
  background-image: var(--book-grid-image);
  background-size: var(--book-grid-size) var(--book-grid-size);
  border: 2px solid var(--ink);
  box-shadow: inset 0 0 20px color-mix(in srgb, var(--pink) 14%, transparent);
}

.course-journal-paper--left {
  border-radius: 16px 3px 3px 16px;
  transform: perspective(1800px) rotateY(0.7deg);
  transform-origin: right center;
}

.course-journal-paper--right {
  border-radius: 3px 16px 16px 3px;
  transform: perspective(1800px) rotateY(-0.7deg);
  transform-origin: left center;
}

.course-journal-book-spine {
  position: relative;
  z-index: 3;
  margin-inline: -2px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--violet) 78%, var(--ink)), var(--violet) 26%, color-mix(in srgb, var(--violet) 38%, var(--white)) 50%, var(--violet) 74%, color-mix(in srgb, var(--violet) 78%, var(--ink)));
  border-block: 2px solid var(--ink);
  box-shadow: inset 1px 0 color-mix(in srgb, var(--white) 40%, transparent), inset -1px 0 color-mix(in srgb, var(--ink) 28%, transparent);
}

.course-journal-paper-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
  padding-bottom: 8px;
  border-bottom: 2px solid color-mix(in srgb, var(--pink) 72%, var(--ink));
}

.course-journal-paper-heading small {
  flex: 0 0 auto;
  color: var(--violet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.course-journal-paper-heading strong {
  overflow: hidden;
  font-family: var(--ff-script);
  font-size: clamp(23px, 2vw, 29px);
  font-weight: 400;
  line-height: 1;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-journal-paper-notes {
  display: grid;
  min-height: 0;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.course-journal-lesson {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(78px, 1fr);
  align-content: stretch;
  padding: 10px 0 0;
  background: transparent;
  border-top: 2px solid color-mix(in srgb, var(--sky) 74%, var(--ink));
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.course-journal-paper-notes > .course-journal-lesson:first-child {
  padding-top: 0;
  border-top: 0;
}

.course-journal-lesson.is-note-saved {
  transform: translateY(-2px) rotate(-0.25deg);
}

.course-journal-lesson.has-unsaved-note {
  background: color-mix(in srgb, var(--pink) 11%, transparent);
}

.course-journal-lesson-heading {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.course-journal-lesson-heading > span {
  display: grid;
  width: 40px;
  min-height: 38px;
  place-items: center;
  padding: 5px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  box-shadow: 2px 2px 0 var(--pink);
  color: var(--ink);
  font-family: var(--ff-display);
  font-size: 21px;
  line-height: 1;
  transform: rotate(-1.5deg);
}

.course-journal-lesson header small {
  color: var(--violet);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.course-journal-lesson header h3 {
  margin-top: 2px;
  font-size: clamp(12px, 1.05vw, 14px);
  line-height: 1.25;
  text-wrap: pretty;
}

.course-journal-open-lesson {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 4px;
  padding: 6px 9px;
  background: var(--sky);
  border: 2px solid var(--ink);
  border-radius: 9px;
  box-shadow: 3px 3px 0 var(--pink);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transform: rotate(-0.5deg);
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.course-journal-open-lesson svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--violet);
}

.course-journal-open-lesson:focus-visible,
.course-journal-save-note:focus-visible {
  outline: 4px solid var(--violet);
  outline-offset: 3px;
}

.course-journal-note-field {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
}

.course-journal-note-status {
  position: absolute;
  z-index: 2;
  bottom: 12px;
  left: 12px;
  max-width: calc(100% - 132px);
  overflow: hidden;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  font-size: 8px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-journal-save-note {
  position: absolute;
  z-index: 3;
  right: 9px;
  bottom: 9px;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: 9px;
  box-shadow: 3px 3px 0 var(--pink);
  color: var(--ink);
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
  transform: rotate(0.5deg);
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.course-journal-save-note svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--violet);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course-journal-lesson textarea,
.lesson-help-card textarea,
.module-feedback textarea {
  width: 100%;
  resize: vertical;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.course-journal-lesson textarea {
  min-height: 78px;
  height: 100%;
  padding: 10px 11px 50px;
  resize: none;
  background: color-mix(in srgb, var(--white) 88%, transparent);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--sky);
  font-size: 12px;
  font-weight: 700;
}

.course-journal-lesson textarea:focus-visible,
.lesson-help-card textarea:focus-visible,
.module-feedback textarea:focus-visible {
  outline: 4px solid var(--violet);
  outline-offset: 3px;
}

.course-journal-save-note:disabled {
  opacity: 0.48;
  box-shadow: none;
  cursor: wait;
}

@media (hover: hover) {
  .course-journal-open-lesson:hover {
    background: var(--acid);
    box-shadow: 1px 1px 0 var(--pink);
    transform: translate(2px, 2px) rotate(0deg);
  }

  .course-journal-save-note:hover {
    background: var(--sky);
    box-shadow: 1px 1px 0 var(--pink);
    transform: translate(2px, 2px) rotate(0deg);
  }
}

.course-journal-empty-slot {
  position: relative;
  min-height: 176px;
}

.course-journal-empty-slot::before {
  position: absolute;
  right: 8%;
  top: 32%;
  left: 8%;
  height: 2px;
  background: color-mix(in srgb, var(--pink) 68%, transparent);
  content: "";
  transform: rotate(-1deg);
}

.course-journal-page-number {
  position: absolute;
  bottom: 18px;
  color: var(--violet);
  font-family: var(--ff-display);
  font-size: 24px;
  line-height: 1;
}

.course-journal-page-number::after {
  display: block;
  width: 26px;
  height: 3px;
  margin-top: 4px;
  background: var(--pink);
  border-radius: var(--radius-pill);
  content: "";
}

.course-journal-paper--left .course-journal-page-number {
  left: 22px;
}

.course-journal-paper--right .course-journal-page-number {
  right: 22px;
}

.course-journal-pen {
  --journal-pen-angle: 58deg;
  position: absolute;
  z-index: 5;
  right: 58px;
  bottom: -88px;
  width: 198px;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(5px 7px 0 rgba(19, 19, 19, 0.13));
  transform: rotate(var(--journal-pen-angle));
  transform-origin: 78% 72%;
  animation: journal-pen-idle 9s ease-in-out infinite;
}

@keyframes journal-pen-idle {
  0%, 15%, 100% { transform: translate(0, 0) rotate(var(--journal-pen-angle)); }
  4% { transform: translate(-3px, 1px) rotate(calc(var(--journal-pen-angle) - 2.5deg)); }
  8% { transform: translate(2px, -1px) rotate(calc(var(--journal-pen-angle) + 1.8deg)); }
  12% { transform: translate(-1px, 0) rotate(calc(var(--journal-pen-angle) - 0.8deg)); }
}

.course-journal-book-controls {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 46px;
}

.course-journal-book-controls button {
  display: grid;
  width: 54px;
  height: 48px;
  place-items: center;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: 4px 4px 0 var(--pink);
  color: var(--ink);
  cursor: pointer;
  transition:
    transform var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    opacity var(--motion-fast) var(--ease-standard);
}

.course-journal-book-controls button svg {
  width: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course-journal-book-controls button:focus-visible {
  outline: 4px solid var(--violet);
  outline-offset: 4px;
}

.course-journal-book-controls button:disabled {
  opacity: 0.3;
  box-shadow: none;
  cursor: default;
}

@media (hover: hover) {
  .course-journal-book-controls button:not(:disabled):hover {
    background: var(--sky);
    box-shadow: 2px 2px 0 var(--pink);
    transform: translate(2px, 2px);
  }
}

.course-journal-book-controls p {
  display: flex;
  min-width: 116px;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
}

.course-journal-book-controls small {
  margin-right: 4px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.course-journal-book-controls strong,
.course-journal-book-controls b {
  font-family: var(--ff-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.course-journal-book-controls strong {
  color: var(--violet);
}

/* Lesson help */

.lesson-help-button {
  position: fixed;
  z-index: 24;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 8px;
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: 5px 6px 0 var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.lesson-help-button > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: var(--ff-display);
  font-size: 24px;
}

.lesson-help-dialog {
  width: min(calc(100% - 32px), 620px);
  max-width: none;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  color: var(--ink);
}

.lesson-help-dialog::backdrop {
  background: color-mix(in srgb, var(--ink) 56%, transparent);
  backdrop-filter: blur(5px);
}

.lesson-help-card {
  position: relative;
  display: grid;
  padding: clamp(30px, 6vw, 52px);
  background: var(--cream);
  background-image: var(--cream-grid-image);
  background-size: var(--cream-grid-size) var(--cream-grid-size);
  border: 3px solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: 10px 12px 0 var(--ink);
}

.lesson-help-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 42px;
  height: 42px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font: inherit;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}

.lesson-help-doodle {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  margin-bottom: 14px;
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 5px 6px 0 var(--acid);
  font-family: var(--ff-display);
  font-size: 42px;
}

.lesson-help-card > p:first-of-type,
.module-feedback form > p {
  color: var(--violet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.lesson-help-card h2 {
  margin: 5px 0 18px;
  font-family: var(--ff-display);
  font-size: clamp(56px, 9vw, 86px);
  line-height: 0.86;
}

.lesson-help-context {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(150px, 0.7fr);
  gap: 10px;
  margin-bottom: 18px;
}

.lesson-help-context > span {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  background: var(--sky);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
}

.lesson-help-context small {
  color: var(--violet);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lesson-help-context strong {
  font-size: 12px;
  line-height: 1.3;
}

.lesson-help-card > label {
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 900;
}

.lesson-help-card textarea,
.module-feedback textarea {
  min-height: 112px;
  padding: 13px;
}

.lesson-help-send {
  min-height: 50px;
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 4px 5px 0 var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.lesson-help-ready-message {
  margin-top: 14px;
  background: var(--sky) !important;
  font-size: 12px !important;
}

.lesson-help-status {
  min-height: 1.4em;
  margin-top: 11px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

@media (hover: hover) {
  .lesson-help-button:hover {
    box-shadow: 8px 9px 0 var(--ink);
    transform: translate(-2px, -2px);
  }
}

/* Module feedback */

.module-feedback {
  position: relative;
  z-index: 2;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: clamp(18px, 4vw, 36px);
  align-items: start;
  padding: clamp(22px, 4vw, 36px);
  background: var(--sky);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 7px 8px 0 var(--violet);
}

.module-feedback.is-saved {
  background: var(--acid);
}

.module-feedback-number {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 5px 6px 0 var(--ink);
  font-family: var(--ff-display);
  font-size: 58px;
  transform: rotate(-5deg);
}

.module-feedback form {
  min-width: 0;
}

.module-feedback h3 {
  margin: 5px 0 12px;
  font-family: var(--ff-display);
  font-size: clamp(44px, 5vw, 68px);
  line-height: 0.88;
}

.module-feedback label {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 900;
}

.module-feedback form > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.module-feedback button {
  min-height: 46px;
  padding: 10px 15px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 4px 5px 0 var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.module-feedback.is-saved button {
  background: var(--white);
}

.module-feedback form > div > span {
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .course-journal-hero,
  .course-journal-modules {
    width: calc(100vw - var(--course-sidebar-width) - 28px);
  }

  .course-journal-tabs {
    display: flex;
    width: calc(100% - 34px);
    gap: 7px;
    margin-bottom: -3px;
    padding: 7px 3px 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }

  .course-journal-tab,
  .course-journal-tab.is-before,
  .course-journal-tab.is-current,
  .course-journal-tab.is-before.is-current {
    flex: 0 0 152px;
    min-height: 72px;
    padding: 9px 8px 14px;
    border-radius: 13px 13px 3px 3px;
    scroll-snap-align: center;
    transform: translateY(6px) rotate(-0.25deg);
  }

  .course-journal-tab.is-current {
    transform: translateY(0) rotate(0deg);
  }

  .course-journal-pen {
    right: 46px;
    width: 184px;
  }
}

@media (max-width: 900px) {
  .course-daily-row {
    grid-template-columns: 1fr;
  }

  .course-journal-hero {
    width: calc(100vw - 28px);
    grid-template-columns: 1fr;
    gap: 36px;
    margin-left: 50%;
  }

  .course-journal-visual {
    width: min(100%, 430px);
    justify-self: center;
  }

  .course-journal-cover {
    width: min(100%, 360px);
  }

  .course-journal-modules {
    width: calc(100vw - 28px);
    margin-left: 50%;
  }

  .lesson-help-button {
    right: 16px;
    bottom: calc(128px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 620px) {
  .course-daily-row {
    margin-top: 42px;
  }

  .course-streak-card {
    grid-template-columns: 1fr;
  }

  .course-streak-calendar {
    width: min(100%, 220px);
  }

  .course-journal-preview {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .course-journal-preview-icon {
    width: 64px;
    height: 76px;
  }

  .course-journal-preview-icon img {
    width: 80px;
    height: 80px;
  }

  .course-journal-content {
    padding: 26px 14px calc(136px + env(safe-area-inset-bottom));
  }

  .course-journal-hero {
    gap: 30px;
    min-height: 0;
    margin-bottom: 48px;
    padding: 22px 4px 16px;
  }

  .course-journal-hero h1 {
    gap: 0.14em;
    margin-bottom: 20px;
    font-size: clamp(64px, 20vw, 88px);
  }

  .course-journal-hero h1 .course-journal-title-accent {
    border-width: 2px;
    box-shadow: 5px 6px 0 var(--pink);
  }

  .course-journal-cover {
    width: min(100%, 310px);
    transform: rotate(1deg);
  }

  .course-journal-cover img {
    filter: drop-shadow(8px 10px 0 rgba(142, 216, 255, 0.82));
  }

  .course-journal-count strong {
    font-size: 70px;
  }

  .course-journal-privacy {
    width: min(100%, 320px);
    margin-top: 2px;
    padding-top: 14px;
  }

  .course-journal-modules {
    margin-top: 50px;
    padding-bottom: 82px;
  }

  .course-journal-tabs {
    width: calc(100% - 12px);
    gap: 6px;
    margin-bottom: -2px;
    padding-top: 6px;
  }

  .course-journal-tab,
  .course-journal-tab.is-before,
  .course-journal-tab.is-current,
  .course-journal-tab.is-before.is-current {
    flex-basis: 132px;
    min-height: 68px;
    padding: 8px 7px 13px;
  }

  .course-journal-tab > strong {
    font-size: 16px;
  }

  .course-journal-book-cover {
    padding: 5px;
    border-width: 3px;
    border-radius: 16px;
    box-shadow: none;
  }

  .course-journal-spread {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .course-journal-spread[data-journal-mobile-side] .course-journal-book-spine {
    display: none;
  }

  .course-journal-spread[data-journal-mobile-side="left"] .course-journal-paper--right,
  .course-journal-spread[data-journal-mobile-side="right"] .course-journal-paper--left {
    display: none;
  }

  .course-journal-spread[data-journal-mobile-side] .course-journal-paper {
    border-radius: 12px;
  }

  .course-journal-book-spine {
    height: 12px;
    margin: -2px 0;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--violet) 78%, var(--ink)), var(--violet) 30%, color-mix(in srgb, var(--violet) 38%, var(--white)) 50%, var(--violet) 70%, color-mix(in srgb, var(--violet) 78%, var(--ink)));
    border: 0;
    border-inline: 2px solid var(--ink);
    box-shadow: none;
  }

  .course-journal-paper {
    min-height: 0;
    padding: 16px 10px 78px;
    transform: none;
  }

  .course-journal-paper--left {
    border-radius: 12px 12px 3px 3px;
  }

  .course-journal-paper--right {
    border-radius: 3px 3px 12px 12px;
  }

  .course-journal-paper-heading {
    margin-bottom: 10px;
    padding-bottom: 7px;
  }

  .course-journal-paper-heading strong {
    font-size: 24px;
  }

  .course-journal-paper-notes {
    gap: 10px;
  }

  .course-journal-lesson {
    grid-template-rows: auto minmax(86px, 1fr);
    padding: 10px 0 0;
  }

  .course-journal-lesson-heading {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 7px;
    margin-bottom: 6px;
  }

  .course-journal-lesson-heading > span {
    width: 36px;
    min-height: 34px;
    font-size: 19px;
  }

  .course-journal-lesson header h3 {
    font-size: 12px;
    line-height: 1.18;
  }

  .course-journal-open-lesson {
    width: auto;
    min-width: 88px;
    min-height: 44px;
    justify-content: center;
    padding: 6px 7px;
    font-size: 9px;
  }

  .course-journal-open-lesson > span {
    display: inline;
  }

  .course-journal-save-note {
    right: 10px;
    bottom: 10px;
    min-height: 44px;
    padding: 6px 9px;
    font-size: 10px;
  }

  .course-journal-note-status {
    bottom: 15px;
    max-width: calc(100% - 126px);
    font-size: 8px;
  }

  .course-journal-lesson textarea {
    min-height: 86px;
    padding: 10px 10px 60px;
    font-size: 14px;
  }

  .course-journal-empty-slot {
    min-height: 160px;
  }

  .course-journal-pen {
    --journal-pen-angle: 49deg;
    right: 50px;
    bottom: -62px;
    width: 112px;
  }

  .course-journal-book-controls {
    gap: 12px;
    margin-top: 62px;
  }

  .course-journal-book-controls button {
    width: 48px;
    height: 46px;
  }

  .lesson-help-button {
    right: 12px;
    min-height: 48px;
    padding-right: 12px;
  }

  .lesson-help-button b {
    max-width: 84px;
    line-height: 1.05;
    text-align: left;
  }

  .lesson-help-card {
    padding: 34px 18px 24px;
    border-radius: var(--radius-lg);
    box-shadow: 6px 7px 0 var(--ink);
  }

  .lesson-help-card h2 {
    font-size: 55px;
  }

  .lesson-help-context,
  .module-feedback {
    grid-template-columns: 1fr;
  }

  .module-feedback-number {
    width: 66px;
    height: 66px;
    font-size: 46px;
  }

  .module-feedback h3 {
    font-size: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .course-journal-preview,
  .course-journal-lesson,
  .course-journal-open-lesson,
  .course-journal-save-note,
  .lesson-help-button,
  .course-journal-tab,
  .course-journal-book-controls button {
    transition: none !important;
  }

  .course-journal-spread {
    animation: none !important;
  }

  .course-journal-pen {
    animation: none !important;
  }
}

/* Final course review */

.course-final-review {
  position: relative;
  z-index: 2;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: clamp(22px, 4vw, 42px);
  align-items: start;
  padding: clamp(24px, 5vw, 46px);
  background: var(--violet);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 8px 9px 0 var(--pink);
  color: var(--white);
}

.course-final-review[hidden] {
  display: none;
}

.course-final-review.is-saved {
  background: color-mix(in srgb, var(--violet) 82%, var(--sky));
}

.course-final-review-mark {
  display: grid;
  width: 102px;
  height: 102px;
  place-items: center;
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 5px 6px 0 var(--ink);
  color: var(--ink);
  font-family: var(--ff-display);
  font-size: 86px;
  line-height: 0.7;
  transform: rotate(-5deg);
}

.course-final-review form {
  min-width: 0;
}

.course-final-review form > p {
  color: var(--acid);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.course-final-review h3 {
  margin: 5px 0 10px;
  font-family: var(--ff-display);
  font-size: clamp(48px, 6vw, 76px);
  font-weight: 700;
  line-height: 0.86;
}

.course-final-review form > b {
  display: block;
  max-width: 760px;
  margin-bottom: var(--space-6);
  font-size: 13px;
  line-height: 1.5;
}

.course-final-review form > label:not(.course-final-review-consent) {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 900;
}

.course-final-review textarea {
  width: 100%;
  min-height: 154px;
  padding: 14px;
  resize: vertical;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.course-final-review textarea:focus-visible,
.course-final-review-consent input:focus-visible + span,
.course-final-review button:focus-visible {
  outline: 4px solid var(--acid);
  outline-offset: 3px;
}

.course-final-review-consent {
  display: grid;
  width: fit-content;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: var(--space-5);
  cursor: pointer;
}

.course-final-review-consent input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.course-final-review-consent > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 7px;
  color: var(--ink);
}

.course-final-review-consent input:checked + span {
  background: var(--acid);
}

.course-final-review-consent input:checked + span::after {
  width: 12px;
  height: 7px;
  border-bottom: 3px solid currentColor;
  border-left: 3px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(-45deg);
}

.course-final-review-consent > b {
  font-size: 12px;
  line-height: 1.35;
}

.course-final-review form > small {
  display: block;
  margin-top: 8px;
  color: color-mix(in srgb, var(--white) 72%, transparent);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}

.course-final-review form > div {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-5);
}

.course-final-review button {
  min-height: 48px;
  padding: 11px 16px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 4px 5px 0 var(--ink);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.course-final-review form > div > span {
  max-width: 560px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.45;
}

@media (max-width: 620px) {
  .course-final-review {
    grid-template-columns: 1fr;
    padding: 24px 18px;
    border-radius: var(--radius-card);
    box-shadow: 6px 7px 0 var(--pink);
  }

  .course-final-review-mark {
    width: 72px;
    height: 72px;
    font-size: 62px;
  }

  .course-final-review h3 {
    font-size: 48px;
  }

  .course-final-review button {
    width: 100%;
  }
}

/* ========================================================================== 
   COURSE HOME 2.0 - один билет урока и шкала-раскадровка
   ========================================================================== */

.course-page .course-welcome-greeting {
  display: inline-block;
  width: fit-content;
  padding: 0;
  letter-spacing: -0.01em;
  transform: none;
}

.course-page .course-welcome-greeting::before,
.course-page .course-welcome-greeting::after {
  display: none;
}

.course-page .course-continue {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 132px;
  grid-template-columns: 154px minmax(0, 1fr) 94px;
  gap: 0;
  align-items: center;
  margin-top: clamp(var(--space-8), 4vw, var(--space-10));
  padding: 0;
  overflow: hidden;
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 8px 9px 0 var(--sky);
  color: var(--ink);
  isolation: isolate;
}

.course-page .course-continue::before {
  display: none;
}

.course-continue-lesson {
  display: grid;
  width: 100%;
  min-height: 132px;
  align-self: stretch;
  place-content: center;
  justify-items: center;
  padding: 18px 14px;
  background: var(--pink);
  border: 0;
  border-right: 3px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
  transform: none;
}

.course-continue-lesson small {
  color: var(--ink);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.course-continue-lesson strong {
  display: flex;
  gap: 5px;
  align-items: baseline;
  margin-top: 2px;
  font-family: var(--ff-display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.course-continue-lesson strong b {
  color: var(--violet);
  font: inherit;
  font-size: 42px;
}

.course-page .course-continue-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 22px 28px;
}

.course-page .course-continue-copy > small {
  color: var(--violet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.course-page .course-continue-copy > strong {
  max-width: 720px;
  overflow-wrap: anywhere;
  font-family: var(--ff-body);
  font-size: clamp(19px, 2.2vw, 27px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.14;
  text-transform: none;
}

.course-continue-action {
  width: fit-content;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.course-page .course-continue-icon {
  position: relative;
  width: 58px;
  height: 58px;
  justify-self: end;
  margin-right: 26px;
  background: var(--sky);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--pink);
  color: var(--acid);
}

.course-page .course-continue-icon svg {
  filter: drop-shadow(1.5px 1.5px 0 var(--ink));
}

.course-page .course-lesson-progress {
  --lesson-progress-pad: clamp(22px, 3vw, 30px);
  position: relative;
  width: 100%;
  margin-top: clamp(var(--space-10), 5vw, 64px);
  padding: var(--lesson-progress-pad);
  overflow: hidden;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 8px 9px 0 var(--violet);
}

.course-page .course-lesson-progress::before {
  display: none;
}

.course-page .course-lesson-progress::after {
  display: none;
}

.course-page .course-lesson-progress-head {
  align-items: center;
  margin: calc(var(--lesson-progress-pad) * -1) calc(var(--lesson-progress-pad) * -1) 0;
  padding: 18px var(--lesson-progress-pad);
  background: var(--pink);
  border-bottom: 3px solid var(--ink);
}

.course-page .course-lesson-progress-head p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28em;
  align-items: baseline;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  font-size: clamp(15px, 1.6vw, 20px);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
}

.course-page .course-lesson-progress-head p > b {
  color: var(--violet);
  font-family: var(--ff-display);
  font-size: clamp(31px, 3.4vw, 42px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.95;
  text-transform: uppercase;
}

.course-page .course-lesson-progress-head > strong {
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--violet);
  font-family: var(--ff-display);
  font-size: clamp(42px, 5vw, 58px);
  font-weight: 700;
  line-height: 1;
  transform: none;
}

.course-page .course-lesson-progress-bar {
  height: 16px;
  margin-top: var(--lesson-progress-pad);
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(25% - 2px), color-mix(in srgb, var(--ink) 16%, transparent) calc(25% - 2px) 25%),
    var(--white);
  border: 2px solid var(--ink);
  box-shadow: none;
}

.course-page .course-lesson-progress-bar > span {
  background: var(--violet);
}

.course-page .course-lesson-milestones {
  position: static;
  gap: 0;
  margin-top: var(--space-6);
  overflow: hidden;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 12px;
}

.course-page .course-lesson-milestones::before {
  display: none;
}

.course-page .course-lesson-milestones li {
  display: grid;
  min-width: 0;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  justify-items: stretch;
  padding: 13px 14px;
  background: var(--white);
  border: 0;
  border-radius: 0;
  color: color-mix(in srgb, var(--ink) 68%, transparent);
  text-align: left;
  transition:
    background var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.course-page .course-lesson-milestones li + li {
  border-left: 2px solid var(--ink);
}

.course-page .course-lesson-milestones li > span {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  background: var(--sky);
  border: 2px solid var(--ink);
  border-radius: 11px;
  color: var(--ink);
}

.course-page .course-lesson-milestones li > span svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course-page .course-lesson-milestones li:first-child > span svg path:last-child,
.course-page .course-lesson-milestones li:nth-child(4) > span svg path:first-child {
  fill: currentColor;
  stroke: currentColor;
}

.course-page .course-lesson-milestones li > span > b {
  position: absolute;
  right: -7px;
  bottom: -7px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: 7px;
  color: var(--ink);
  font-size: 8px;
  font-weight: 900;
}

.course-page .course-lesson-milestones li > p {
  min-width: 0;
  overflow-wrap: anywhere;
  color: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.course-page .course-lesson-milestones li.is-current {
  background: var(--acid);
  border-color: var(--ink);
  box-shadow: none;
  color: var(--ink);
  transform: none;
}

.course-page .course-lesson-milestones li.is-current > p {
  color: var(--violet);
}

.course-page .course-lesson-milestones li.is-current > span {
  background: var(--pink);
  box-shadow: none;
}

.course-page .course-lesson-milestones li.is-complete {
  background: var(--pink);
  border-color: var(--ink);
  color: var(--ink);
}

.course-page .course-lesson-milestones li.is-complete > span {
  background: var(--ink);
  color: var(--white);
}

.course-page .course-lesson-milestones li.is-complete > span > b {
  background: var(--acid);
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .course-page .course-continue:hover {
    box-shadow: 4px 5px 0 var(--sky);
    transform: translate(4px, 4px);
  }

  .course-page .course-continue:hover .course-continue-icon {
    transform: translateX(5px) rotate(-5deg);
  }
}

@media (max-width: 700px) {
  .course-page .course-continue {
    min-height: 120px;
    grid-template-columns: 88px minmax(0, 1fr) 58px;
    gap: 0;
    padding: 0;
    border-radius: var(--radius-card);
    box-shadow: 6px 7px 0 var(--sky);
  }

  .course-continue-lesson {
    min-height: 120px;
    padding: 13px 6px;
    border-radius: 0;
  }

  .course-continue-lesson small {
    font-size: 7px;
  }

  .course-continue-lesson strong {
    display: grid;
    gap: 1px;
    justify-items: center;
    font-size: 14px;
  }

  .course-continue-lesson strong b {
    font-size: 30px;
  }

  .course-page .course-continue-copy > small {
    font-size: 8px;
  }

  .course-page .course-continue-copy {
    padding: 15px 12px;
  }

  .course-page .course-continue-copy > strong {
    font-size: clamp(15px, 4.2vw, 18px);
  }

  .course-continue-action {
    font-size: 9px;
  }

  .course-page .course-continue-icon {
    width: 44px;
    height: 44px;
    margin-right: 11px;
    border-radius: 11px;
    box-shadow: 3px 3px 0 var(--pink);
  }

  .course-page .course-continue-icon svg {
    width: 29px;
  }

  .course-page .course-lesson-progress {
    --lesson-progress-pad: 16px;
    margin-top: var(--space-10);
    padding: var(--lesson-progress-pad);
    border-radius: var(--radius-card);
  }

  .course-page .course-lesson-milestones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .course-page .course-lesson-milestones li + li {
    border-left: 0;
  }

  .course-page .course-lesson-milestones li:nth-child(even) {
    border-left: 2px solid var(--ink);
  }

  .course-page .course-lesson-milestones li:nth-child(n + 3) {
    border-top: 2px solid var(--ink);
  }
}

@media (max-width: 420px) {
  .course-page .course-continue {
    grid-template-columns: 78px minmax(0, 1fr) 50px;
    gap: 0;
    padding-inline: 0;
  }

  .course-continue-lesson {
    min-height: 120px;
  }

  .course-continue-lesson strong {
    font-size: 13px;
  }

  .course-continue-lesson strong b {
    font-size: 25px;
  }

  .course-page .course-continue-icon {
    width: 40px;
    height: 40px;
    margin-right: 8px;
  }

  .course-page .course-lesson-progress-head > strong {
    font-size: 40px;
  }

  .course-page .course-lesson-milestones {
    gap: 8px;
  }

  .course-page .course-lesson-milestones li {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .course-page .course-lesson-milestones li > span {
    width: 40px;
    height: 40px;
  }

  .course-page .course-lesson-milestones li > span svg {
    width: 27px;
    height: 27px;
  }

  .course-page .course-lesson-milestones li > p {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .course-page .course-continue,
  .course-page .course-continue-icon,
  .course-page .course-lesson-milestones li {
    transition: none !important;
  }
}

/* Desktop cabinet rail: the object itself is the navigation icon. */
@media (min-width: 901px) {
  .course-page,
  .course-page.is-course-sidebar-collapsed {
    --course-sidebar-width: 98px;
  }

  .course-sidebar,
  .is-course-sidebar-collapsed .course-sidebar {
    align-items: center;
    padding: 20px 14px 18px;
    overflow-x: visible;
  }

  .course-sidebar-brand,
  .is-course-sidebar-collapsed .course-sidebar-brand {
    width: auto;
    justify-items: center;
    margin-bottom: 24px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .course-sidebar-brand .course-logo,
  .is-course-sidebar-collapsed .course-logo {
    justify-self: center;
  }

  .course-sidebar-brand .site-logo-wordmark,
  .course-sidebar-brand > p,
  .course-sidebar-toggle {
    display: none;
  }

  .course-nav {
    width: 100%;
    justify-items: center;
    gap: 8px;
  }

  .course-nav-link,
  .is-course-sidebar-collapsed .course-nav-link {
    width: 68px;
    min-height: 68px;
    grid-template-columns: 1fr;
    gap: 0;
    justify-items: center;
    padding: 0;
    background: transparent !important;
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
  }

  .course-nav-link > span:not(.course-nav-art) {
    display: none;
  }

  .course-nav-art {
    width: 58px;
    height: 58px;
  }

  .course-nav-art img {
    width: 61px;
    height: 61px;
  }

  .course-nav-link.is-active .course-nav-art img {
    filter: drop-shadow(4px 4px 0 var(--violet));
    transform: rotate(-4deg) scale(1.08);
  }

  .course-nav-link:focus-visible,
  .course-quick-link:focus-visible,
  .course-profile-link:focus-visible {
    border-radius: 14px;
    outline: 3px solid var(--violet);
    outline-offset: 1px;
  }

  .course-sidebar-bottom,
  .is-course-sidebar-collapsed .course-sidebar-bottom {
    width: 100%;
    gap: 10px;
    padding-top: 18px;
  }

  /* The staff return follows the same compact rail as the course links. */
  .course-staff-return {
    width: 100%;
    max-width: 68px;
    min-height: 54px;
    justify-content: center;
    gap: 0;
    padding: 10px;
  }

  .course-staff-return-label { display: none; }

  .course-quick-links,
  .is-course-sidebar-collapsed .course-quick-links {
    width: 100%;
    justify-items: center;
    gap: 8px;
    padding-top: 15px;
  }

  .course-quick-link,
  .is-course-sidebar-collapsed .course-quick-link {
    width: 68px;
    min-height: 62px;
    grid-template-columns: 1fr;
    gap: 0;
    justify-items: center;
    padding: 0;
    background: transparent !important;
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
    color: var(--ink);
  }

  .course-quick-link-copy {
    display: none;
  }

  .course-quick-link-art {
    width: 54px;
    height: 54px;
  }

  .course-quick-link-art img {
    width: 59px;
    height: 59px;
  }

  .course-katrina-avatar {
    width: 52px;
    height: 52px;
    border-width: 3px;
  }

  .course-profile-link,
  .is-course-sidebar-collapsed .course-profile-link {
    width: 68px;
    min-height: 62px;
    grid-template-columns: 1fr;
    gap: 0;
    justify-items: center;
    padding: 0;
    background: transparent !important;
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
  }

  .course-profile-link > span:not(.course-profile-icon),
  .course-profile-arrow {
    display: none;
  }

  .course-profile-icon {
    width: 52px;
    height: 52px;
    border-width: 3px;
    font-size: 45px;
  }

  .course-profile-link.is-active .course-profile-icon {
    box-shadow: 4px 4px 0 var(--violet);
  }
}

/* Materials library v2. Module folders and shared lesson file cards. */

.course-materials-library {
  gap: clamp(34px, 4vw, 58px);
  padding-top: 12px;
}

.course-material-module {
  position: relative;
  overflow: visible;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: 9px 10px 0 var(--module-shadow);
  isolation: isolate;
}

.course-material-module-tab {
  position: absolute;
  z-index: -1;
  top: -24px;
  left: clamp(24px, 4vw, 58px);
  width: clamp(150px, 19vw, 270px);
  height: 42px;
  background: var(--module-tab);
  border: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  transform: rotate(-0.5deg);
}

.course-material-module-toggle {
  display: grid;
  width: 100%;
  grid-template-columns: 82px minmax(0, 1fr) 58px;
  gap: clamp(16px, 2vw, 28px);
  align-items: center;
  min-height: 148px;
  padding: clamp(20px, 2.6vw, 34px);
  background: var(--module-cover);
  border: 0;
  border-radius: 20px;
  color: var(--module-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    filter var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.course-material-module.is-expanded .course-material-module-toggle {
  border-radius: 20px 20px 0 0;
}

.course-material-module-number {
  display: grid;
  width: 82px;
  height: 78px;
  place-items: center;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 16px 7px 16px 8px;
  box-shadow: 5px 6px 0 var(--module-tab);
  color: var(--ink);
  font-family: var(--ff-display);
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  transform: rotate(-1.5deg);
}

.course-material-module-heading {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.course-material-module-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 3px;
}

.course-material-module-eyebrow b,
.course-material-module-eyebrow i {
  padding: 5px 9px 4px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.09em;
  line-height: 1;
  text-transform: uppercase;
}

.course-material-module-eyebrow b {
  background: var(--cream);
}

.course-material-module-eyebrow i {
  background: var(--module-tab);
}

.course-material-module-heading > strong {
  overflow-wrap: anywhere;
  font-family: var(--ff-display);
  font-size: clamp(48px, 5.2vw, 72px);
  font-weight: 700;
  line-height: 0.9;
  text-transform: uppercase;
}

.course-material-module-heading > small {
  max-width: 860px;
  font-size: clamp(12px, 1.2vw, 15px);
  font-weight: 800;
  line-height: 1.35;
}

.course-material-module-chevron {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  justify-self: end;
  color: var(--module-ink);
  transition: transform var(--motion-base) var(--ease-out);
}

.course-material-module-chevron svg {
  width: 42px;
  overflow: visible;
  fill: none;
  filter: drop-shadow(3px 3px 0 var(--module-shadow));
  stroke: currentColor;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course-material-module.is-expanded .course-material-module-chevron {
  transform: rotate(180deg);
}

.course-material-module-panel {
  border-top: 3px solid var(--ink);
  border-radius: 0 0 21px 21px;
  background-color: var(--cream);
  background-image:
    linear-gradient(color-mix(in srgb, var(--pink) 34%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--pink) 34%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
}

.course-material-module-panel[hidden] {
  display: none;
}

.course-material-files {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
  padding: clamp(18px, 2.4vw, 32px);
}

.course-material-file {
  --file-accent: var(--pink);
  position: relative;
  display: grid;
  min-height: 142px;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: clamp(12px, 1.5vw, 20px);
  align-items: center;
  overflow: hidden;
  padding: 16px 18px 16px 10px;
  background: color-mix(in srgb, var(--white) 92%, var(--file-accent));
  border: 2px solid var(--ink);
  border-radius: 18px 8px 18px 8px;
  box-shadow: 5px 6px 0 var(--file-accent);
  color: var(--ink);
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.course-material-file::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 7px;
  background: var(--file-accent);
  content: "";
}

.course-material-file--xlsx {
  --file-accent: var(--sky);
}

.course-material-file--zip {
  --file-accent: var(--violet);
}

.course-material-file--video {
  --file-accent: var(--acid);
}

.course-material-file--image {
  --file-accent: var(--sky);
}

.course-material-file-visual {
  position: relative;
  display: grid;
  width: 100px;
  height: 104px;
  place-items: center;
}

.course-material-file-visual picture,
.course-material-file-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.course-material-file-visual img {
  filter: drop-shadow(3px 4px 0 color-mix(in srgb, var(--ink) 20%, transparent));
}

.material-video-placeholder {
  display: grid;
  width: 88%;
  height: 78%;
  place-items: center;
  background: var(--violet);
  border: 2px solid var(--ink);
  border-radius: 13px 6px 13px 6px;
  box-shadow: 4px 4px 0 var(--pink);
  color: var(--acid);
  transform: rotate(-2deg);
}

.material-video-placeholder svg {
  width: 70%;
  height: 70%;
  fill: var(--acid);
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.material-video-placeholder svg rect {
  fill: var(--sky);
}

.material-image-placeholder {
  display: grid;
  width: 88%;
  height: 78%;
  place-items: center;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 6px 13px 6px 13px;
  box-shadow: 4px 4px 0 var(--violet);
  color: var(--violet);
  transform: rotate(2deg);
}

.material-image-placeholder svg {
  width: 72%;
  height: 72%;
  fill: var(--pink);
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.material-image-placeholder svg circle {
  fill: var(--acid);
}

.course-material-file-visual > b {
  position: absolute;
  right: 0;
  bottom: 1px;
  padding: 4px 6px 3px;
  background: var(--file-accent);
  border: 2px solid var(--ink);
  border-radius: 6px;
  color: var(--ink);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.course-material-file--zip .course-material-file-visual > b {
  color: var(--white);
}

.course-material-file-copy {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.course-material-file-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.course-material-file-meta b,
.course-material-file-meta i {
  width: fit-content;
  padding: 4px 7px 3px;
  border-radius: 999px;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
}

.course-material-file-meta b {
  background: var(--file-accent);
  border: 1.5px solid var(--ink);
  color: var(--ink);
}

.course-material-file--zip .course-material-file-meta b {
  color: var(--white);
}

.course-material-file-meta i {
  background: var(--cream);
  border: 1.5px solid color-mix(in srgb, var(--ink) 62%, transparent);
  color: var(--ink);
}

.course-material-file-copy > strong {
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.2;
}

.course-material-file-copy > small {
  color: color-mix(in srgb, var(--ink) 70%, transparent);
  font-size: 10px;
  font-weight: 800;
}

.course-material-file-action {
  display: grid;
  min-width: 96px;
  gap: 5px;
  justify-items: center;
  color: var(--violet);
  text-align: center;
}

.course-material-file-action > b {
  max-width: 92px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.15;
}

.course-material-file-action svg {
  width: 34px;
  height: 30px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course-material-file-action svg rect {
  fill: var(--cream);
}

.course-material-file.is-locked {
  opacity: 1;
  background: color-mix(in srgb, var(--cream) 88%, var(--module-cover));
}

.course-material-file.is-locked .course-material-file-visual {
  filter: saturate(0.55);
  opacity: 0.62;
}

.course-material-file.is-locked .course-material-file-action {
  color: color-mix(in srgb, var(--ink) 62%, transparent);
}

.course-material-file.is-locked .course-material-file-action svg {
  width: 28px;
  height: 34px;
}

.course-material-file:target {
  outline: 5px solid var(--acid);
  outline-offset: 5px;
}

.course-material-module-toggle:focus-visible,
.course-material-file:focus-visible {
  outline: 4px solid var(--violet);
  outline-offset: 5px;
}

/* Same file object inside a lesson. */
.lesson-material-links {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.lesson-material-links a.lesson-material-link {
  --file-accent: var(--pink);
  min-height: 108px;
  grid-template-columns: 78px minmax(0, 1fr) 28px;
  gap: 12px;
  padding: 10px 13px 10px 7px;
  background: color-mix(in srgb, var(--white) 92%, var(--file-accent));
  border-radius: 15px 7px 15px 7px;
  box-shadow: 4px 5px 0 var(--file-accent);
  text-align: left;
}

.lesson-material-links a.lesson-material-link--xlsx {
  --file-accent: var(--sky);
}

.lesson-material-links a.lesson-material-link--zip {
  --file-accent: var(--violet);
}

.lesson-material-links a.lesson-material-link--video {
  --file-accent: var(--acid);
}

.lesson-material-links a.lesson-material-link--image {
  --file-accent: var(--sky);
}

.lesson-material-link-visual {
  position: relative;
  display: grid !important;
  width: 76px;
  height: 82px;
  place-items: center;
}

.lesson-material-link-visual picture,
.lesson-material-link-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lesson-material-link-visual > b {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 3px 5px 2px;
  background: var(--file-accent);
  border: 1.5px solid var(--ink);
  border-radius: 5px;
  color: var(--ink);
  font-size: 7px;
  letter-spacing: 0.04em;
}

.lesson-material-link--zip .lesson-material-link-visual > b {
  color: var(--white);
}

.lesson-material-links a.lesson-material-link > svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--violet);
  stroke-width: 2.5;
}

@media (hover: hover) and (pointer: fine) {
  .course-material-module-toggle:hover {
    filter: saturate(1.06) brightness(1.02);
  }

  .course-material-file[href]:hover {
    background: var(--white);
    box-shadow: 7px 8px 0 var(--file-accent);
    transform: translateY(-3px) rotate(-0.25deg);
  }

  .lesson-material-links a.lesson-material-link:hover {
    background: var(--white);
    box-shadow: 6px 7px 0 var(--file-accent);
    transform: translateY(-2px) rotate(-0.2deg);
  }
}

@media (max-width: 1080px) {
  .course-material-files {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .course-materials-library {
    gap: 38px;
    padding-top: 8px;
  }

  .course-material-module {
    border-radius: 18px;
    box-shadow: 6px 7px 0 var(--module-shadow);
  }

  .course-material-module-tab {
    top: -19px;
    left: 18px;
    width: 130px;
    height: 32px;
    border-width: 2px;
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
  }

  .course-material-module-toggle {
    grid-template-columns: 56px minmax(0, 1fr) 34px;
    gap: 11px;
    min-height: 112px;
    padding: 15px 13px;
    border-radius: 15px;
  }

  .course-material-module.is-expanded .course-material-module-toggle {
    border-radius: 15px 15px 0 0;
  }

  .course-material-module-number {
    width: 55px;
    height: 57px;
    border-width: 2px;
    border-radius: 11px 5px 11px 5px;
    box-shadow: 3px 4px 0 var(--module-tab);
    font-size: 32px;
  }

  .course-material-module-heading {
    gap: 4px;
  }

  .course-material-module-eyebrow {
    gap: 4px;
    margin-bottom: 1px;
  }

  .course-material-module-eyebrow b,
  .course-material-module-eyebrow i {
    padding: 4px 6px 3px;
    border-width: 1.5px;
    font-size: 7px;
  }

  .course-material-module-heading > strong {
    font-size: clamp(35px, 11vw, 46px);
  }

  .course-material-module-heading > small {
    display: none;
  }

  .course-material-module-chevron {
    width: 32px;
    height: 32px;
  }

  .course-material-module-chevron svg {
    width: 29px;
    stroke-width: 3;
  }

  .course-material-module-panel {
    border-top-width: 2px;
    border-radius: 0 0 15px 15px;
    background-size: 20px 20px;
  }

  .course-material-files {
    gap: 13px;
    padding: 13px 11px 16px;
  }

  .course-material-file {
    min-height: 124px;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 12px 11px 7px;
    border-radius: 14px 6px 14px 6px;
    box-shadow: 4px 5px 0 var(--file-accent);
  }

  .course-material-file-visual {
    width: 74px;
    height: 80px;
  }

  .course-material-file-visual > b {
    padding: 3px 5px 2px;
    border-width: 1.5px;
    font-size: 7px;
  }

  .course-material-file-copy {
    gap: 5px;
  }

  .course-material-file-copy > strong {
    font-size: 14px;
  }

  .course-material-file-action {
    grid-column: 2;
    grid-template-columns: auto 24px;
    align-items: center;
    justify-content: start;
    justify-items: start;
    min-width: 0;
    color: var(--violet);
  }

  .course-material-file-action > b {
    max-width: none;
  }

  .course-material-file-action svg {
    width: 24px;
    height: 20px;
  }

  .course-material-file.is-locked .course-material-file-action svg {
    width: 20px;
    height: 24px;
  }

  .lesson-materials {
    grid-template-columns: 1fr;
  }

  .lesson-material-links {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .course-material-module-toggle,
  .course-material-module-chevron,
  .course-material-file,
  .lesson-material-links a.lesson-material-link {
    transition: none !important;
  }
}

@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  .course-nav-link:not(.is-active):hover,
  .course-quick-link:hover,
  .course-profile-link:hover {
    box-shadow: none;
    transform: none;
  }

  .course-nav-link:not(.is-active):hover .course-nav-art img,
  .course-quick-link:hover .course-quick-link-art img {
    transform: rotate(-4deg) scale(1.1);
  }

  .course-quick-link--katrina:hover .course-katrina-avatar,
  .course-profile-link:hover .course-profile-icon {
    transform: rotate(-3deg) scale(1.06);
  }
}

/* Lesson handoff lives in Telegram. The site only explains the practice. */
/* Отметка о сдаче задания. Работа уходит Кате в Telegram, на сайте ученица
   только помечает отправку, а следующий урок открывает Катя после проверки. */
.lesson-assignment-handoff {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  max-width: 880px;
  margin-top: clamp(16px, 2vw, 22px);
}

.lesson-assignment-handoff-hint {
  margin: 0;
  font-size: clamp(0.94rem, 0.9rem + 0.2vw, 1.02rem);
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink) 74%, transparent);
}

.lesson-secondary-action--sent {
  min-height: 52px;
}

.lesson-secondary-action--sent[hidden] {
  display: none;
}

.lesson-assignment-handoff-state {
  margin: 0;
  padding: 14px 18px;
  font-weight: 700;
  line-height: 1.4;
  background: var(--sky);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 5px 6px 0 var(--ink);
}

.lesson-assignment-handoff-state.is-error {
  background: var(--pink);
}

@media (max-width: 720px) {
  .lesson-assignment-handoff .lesson-secondary-action--sent {
    width: 100%;
    justify-content: center;
  }
}

.lesson-assignment-telegram {
  position: relative;
  z-index: 2;
  display: grid;
  max-width: 880px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: stretch;
  margin-top: clamp(24px, 3vw, 38px);
}

.lesson-assignment-telegram > div {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 6px 7px 0 var(--sky);
  color: var(--ink);
}

.lesson-assignment-telegram > div > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  flex: 0 0 auto;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 22px;
  font-weight: 900;
}

.lesson-assignment-telegram p {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.lesson-assignment-telegram .lesson-primary-action {
  display: flex;
  min-height: 86px;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 18px 22px;
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 7px 8px 0 var(--pink);
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.lesson-assignment-telegram .lesson-primary-action svg {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

/* Materials are real catalog slots until the author supplies a file. */
.lesson-material-links article.lesson-material-link {
  --file-accent: var(--pink);
  display: grid;
  min-height: 108px;
  grid-template-columns: 78px minmax(0, 1fr) 38px;
  gap: 12px;
  align-items: center;
  padding: 10px 13px 10px 7px;
  background: color-mix(in srgb, var(--white) 88%, var(--file-accent));
  border: 2px dashed color-mix(in srgb, var(--ink) 72%, transparent);
  border-radius: 15px 7px 15px 7px;
  box-shadow: 4px 5px 0 color-mix(in srgb, var(--file-accent) 72%, transparent);
  color: var(--ink);
}

.lesson-material-links article.lesson-material-link--video {
  --file-accent: var(--acid);
}

.lesson-material-links article.lesson-material-link--image {
  --file-accent: var(--sky);
}

.lesson-material-links article.lesson-material-link > span:nth-child(2) {
  display: grid;
  gap: 5px;
}

.lesson-material-links article.lesson-material-link small,
.lesson-material-links article.lesson-material-link em {
  display: block;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.lesson-material-links article.lesson-material-link small {
  color: color-mix(in srgb, var(--ink) 58%, transparent);
}

.lesson-material-links article.lesson-material-link em {
  width: fit-content;
  padding: 4px 7px;
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-pill);
  color: var(--violet);
  letter-spacing: 0.04em;
}

.lesson-material-pending-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1;
}

/* A candid lesson note, separate from homework and course testimonials. */
.lesson-feedback[hidden] {
  display: none;
}

.lesson-feedback {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  margin: clamp(58px, 8vw, 112px) 0 clamp(52px, 7vw, 92px);
  padding: clamp(12px, 2vw, 24px) 0;
}

.lesson-feedback-copy,
.lesson-feedback-form {
  position: relative;
  z-index: 1;
}

.lesson-feedback-kicker {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--violet);
  font-family: var(--ff-hand);
  font-size: clamp(32px, 3vw, 48px);
  font-weight: 700;
  line-height: 1;
  transform: rotate(-2deg);
}

.lesson-feedback-copy h2 {
  display: flex;
  max-width: 570px;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin: 0;
  font-family: var(--ff-display);
  font-size: clamp(54px, 5.6vw, 86px);
  line-height: 0.88;
  letter-spacing: 0.01em;
}

.lesson-feedback-copy h2 span {
  display: block;
}

.lesson-feedback-copy h2 strong {
  display: inline-block;
  padding: 7px 16px 4px;
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: var(--radius-xs);
  box-shadow: 6px 7px 0 var(--pink);
  color: var(--ink);
  font: inherit;
  line-height: 0.86;
  transform: rotate(-1.5deg);
}

.lesson-feedback-copy > p {
  max-width: 610px;
  margin: 22px 0 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
}

/* Вопросы переехали в саму форму отдельными полями, здесь остается только
   короткая подсказка, что отвечать на все четыре не обязательно. */
.lesson-feedback-hint {
  max-width: 610px;
  margin: 18px 0 0;
  color: color-mix(in srgb, var(--ink) 66%, transparent);
  font-size: 14px;
  font-weight: 900;
}

.lesson-feedback-copy ul {
  display: grid;
  gap: 9px;
  margin: 24px 0 0;
}

.lesson-feedback-copy li {
  display: flex;
  gap: 9px;
  align-items: baseline;
  font-size: 14px;
  font-weight: 900;
}

.lesson-feedback-copy li::before {
  color: var(--violet);
  content: "✦";
}

.lesson-feedback-form {
  display: grid;
  gap: 18px;
  padding: clamp(28px, 3.4vw, 42px);
  background: color-mix(in srgb, var(--cream) 78%, var(--white));
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 9px 10px 0 var(--violet);
}

.lesson-feedback-form-tape {
  position: absolute;
  top: -17px;
  left: 50%;
  width: 112px;
  height: 32px;
  background: color-mix(in srgb, var(--acid) 82%, transparent);
  border: 2px solid color-mix(in srgb, var(--ink) 60%, transparent);
  transform: translateX(-50%) rotate(-2deg);
}

.lesson-feedback-form fieldset {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  border: 0;
}

.lesson-feedback-form legend {
  grid-column: 1 / -1;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 900;
}

.lesson-feedback-form fieldset label {
  position: relative;
  cursor: pointer;
}

.lesson-feedback-form fieldset input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.lesson-feedback-choice {
  display: grid;
  min-height: 78px;
  place-items: center;
  padding: 13px 12px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  line-height: 1.2;
  text-align: center;
  transition:
    transform var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}

.lesson-feedback-choice--liked {
  background: color-mix(in srgb, var(--acid) 58%, var(--cream));
}

.lesson-feedback-choice--mixed {
  background: color-mix(in srgb, var(--sky) 62%, var(--cream));
}

.lesson-feedback-choice--improve {
  background: color-mix(in srgb, var(--pink) 62%, var(--cream));
}

.lesson-feedback-choice b {
  font-size: 13px;
  font-weight: 900;
}

.lesson-feedback-form fieldset input:checked + .lesson-feedback-choice {
  box-shadow: 4px 5px 0 var(--violet);
  transform: translateY(-4px);
}

.lesson-feedback-form fieldset input:checked + .lesson-feedback-choice--liked {
  background: var(--acid);
}

.lesson-feedback-form fieldset input:checked + .lesson-feedback-choice--mixed {
  background: var(--sky);
}

.lesson-feedback-form fieldset input:checked + .lesson-feedback-choice--improve {
  background: var(--pink);
}

.lesson-feedback-form fieldset input:focus-visible + .lesson-feedback-choice {
  outline: 4px solid var(--violet);
  outline-offset: 3px;
}

.lesson-feedback-field {
  display: grid;
  gap: 8px;
}

.lesson-feedback-field > span {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
}

.lesson-feedback-field b {
  font-size: 14px;
  font-weight: 900;
}

.lesson-feedback-field small {
  color: color-mix(in srgb, var(--ink) 58%, transparent);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.lesson-feedback-field small i {
  font-style: inherit;
}

.lesson-feedback-field textarea {
  width: 100%;
  min-height: 172px;
  padding: 17px 18px;
  resize: vertical;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 14px;
  color: var(--ink);
  font: 700 16px/1.5 var(--ff-body);
}

.lesson-feedback-field textarea:focus-visible {
  outline: 4px solid var(--sky);
  outline-offset: 3px;
}

.lesson-feedback-form button {
  display: flex;
  width: 100%;
  min-height: 58px;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--acid);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 6px 7px 0 var(--violet);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  transition:
    transform var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}

.lesson-feedback-form button svg {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lesson-feedback-form button:disabled {
  background: color-mix(in srgb, var(--cream) 80%, var(--white));
  box-shadow: 4px 5px 0 color-mix(in srgb, var(--ink) 22%, transparent);
  cursor: not-allowed;
  opacity: 0.55;
}

.lesson-feedback-status {
  min-height: 22px;
  margin: 0;
  color: var(--violet);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.4;
}

.lesson-feedback.is-saved .lesson-feedback-form {
  box-shadow: 8px 9px 0 var(--acid);
}

@media (hover: hover) and (pointer: fine) {
  .lesson-assignment-telegram .lesson-primary-action:hover,
  .lesson-feedback-form button:not(:disabled):hover {
    box-shadow: 3px 4px 0 var(--violet);
    transform: translate(3px, 3px);
  }

  .lesson-feedback-form fieldset label:hover .lesson-feedback-choice {
    transform: translateY(-4px);
  }
}

@media (max-width: 900px) {
  .lesson-feedback {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 700px) {
  .lesson-assignment-telegram {
    grid-template-columns: 1fr;
  }

  .lesson-assignment-telegram .lesson-primary-action {
    min-height: 72px;
  }

  .lesson-feedback {
    gap: 34px;
    margin-right: 0;
    margin-left: 0;
    padding: 10px 0 18px;
  }

  .lesson-feedback-kicker {
    margin-bottom: 12px;
    font-size: 34px;
  }

  .lesson-feedback-copy h2 {
    gap: 8px;
    font-size: clamp(50px, 14vw, 64px);
  }

  .lesson-feedback-copy h2 strong {
    padding: 6px 13px 3px;
    box-shadow: 5px 6px 0 var(--pink);
  }

  .lesson-feedback-copy > p {
    margin-top: 20px;
  }

  .lesson-feedback-form {
    gap: 18px;
    padding: 26px 14px 18px;
    box-shadow: 6px 7px 0 var(--violet);
  }

  .lesson-feedback-form fieldset {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .lesson-feedback-choice {
    min-height: 66px;
    padding: 11px 14px;
    text-align: center;
  }

  .lesson-feedback-field textarea {
    min-height: 190px;
  }

  .lesson-feedback-form button {
    min-height: 66px;
    font-size: 12px;
  }

  .lesson-material-links article.lesson-material-link {
    grid-template-columns: 68px minmax(0, 1fr) 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lesson-assignment-telegram .lesson-primary-action,
  .lesson-feedback-form button,
  .lesson-feedback-form fieldset span {
    transition: none !important;
  }
}

/* Mobile navigation: one row, no duplicate profile, Katya floats separately. */
.course-mobile-katya {
  display: none;
}

@media (min-width: 901px) {
  .course-sidebar .course-profile-link {
    display: none;
  }
}

@media (max-width: 900px) {
  .course-mobile-nav {
    min-height: calc(76px + env(safe-area-inset-bottom));
    grid-template-rows: 68px;
    gap: 3px;
    padding-top: 5px;
  }

  .course-mobile-nav-link--home {
    grid-row: 1;
    grid-column: 1;
  }

  .course-mobile-nav-link--course {
    grid-row: 1;
    grid-column: 2;
  }

  .course-mobile-nav-link--materials {
    grid-row: 1;
    grid-column: 3;
  }

  .course-mobile-nav-link--journal {
    grid-row: 1;
    grid-column: 4;
  }

  .course-mobile-nav-link--stream-chat {
    grid-row: 1;
    grid-column: 5;
  }

  .course-mobile-nav-link--stream-chat .course-mobile-nav-label {
    width: 100%;
    font-size: clamp(8px, 2.35vw, 10px);
    letter-spacing: 0;
  }

  .course-mobile-katya {
    position: fixed;
    z-index: 51;
    right: 14px;
    bottom: calc(87px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
  }

  .course-mobile-katya[hidden] {
    display: none !important;
  }

  .course-mobile-katya-link {
    position: relative;
    display: flex;
    min-height: 48px;
    align-items: center;
    padding: 9px 38px 9px 47px;
    background: var(--pink);
    border: 2px solid var(--ink);
    border-radius: 999px;
    box-shadow: 4px 5px 0 var(--ink);
    color: var(--ink);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    transition:
      transform var(--motion-fast) var(--ease-standard),
      box-shadow var(--motion-fast) var(--ease-standard);
  }

  .course-mobile-katya-avatar {
    position: absolute;
    left: -18px;
    display: grid;
    width: 54px;
    height: 54px;
    overflow: hidden;
    place-items: center;
    background: var(--pink);
    border: 3px solid var(--ink);
    border-radius: 50%;
  }

  .course-mobile-katya-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 42%;
    transform: scale(1.7);
  }

  /* Кнопка занимает 44px, а видимый кружок остается 26px и рисуется внутри.
     Расширять зону нажатия псевдоэлементом здесь нельзя: соседний слой героя
     перекрывает его, и промах мимо кружка не доходил до кнопки. Координаты
     сдвинуты на 9px, чтобы центр кружка остался там же, где был. */
  .course-mobile-katya-close {
    position: absolute;
    top: -18px;
    right: -8px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--ink);
    cursor: pointer;
  }

  /* Кружок и крестик стоят там же, где стояли, а зона нажатия выросла внутрь
     карточки. Наружу расширять нельзя: справа сразу край экрана. */
  .course-mobile-katya-close::before {
    position: absolute;
    top: 9px;
    right: 0;
    width: 26px;
    height: 26px;
    background: var(--acid);
    border: 2px solid var(--ink);
    border-radius: 50%;
    box-shadow: 2px 2px 0 var(--ink);
    content: '';
  }

  .course-mobile-katya-close svg {
    position: absolute;
    top: 15px;
    right: 6px;
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.8;
    stroke-linecap: round;
  }

  .course-mobile-katya-link:focus-visible {
    outline: 3px solid var(--violet);
    outline-offset: 3px;
  }

  /* Рамка фокуса рисуется по видимому кружку, а не по всей зоне нажатия. */
  .course-mobile-katya-close:focus-visible {
    outline: none;
  }

  .course-mobile-katya-close:focus-visible::before {
    outline: 3px solid var(--violet);
    outline-offset: 3px;
  }

  .lesson-help-button {
    display: none !important;
  }
}

@media (hover: hover) and (pointer: fine) {
  .course-mobile-katya-link:hover {
    box-shadow: 2px 3px 0 var(--ink);
    transform: translate(2px, 2px) rotate(-1deg);
  }

  .course-mobile-katya-close:hover {
    transform: rotate(7deg) scale(1.05);
  }
}

/* Canonical course pictograms and dashboard progress icons. */
.course-canonical-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  overflow: visible;
  place-items: center;
}

.course-canonical-icon img {
  width: 50px;
  height: 50px;
  max-width: none;
  object-fit: contain;
}

.lesson-material-links a:has(.course-canonical-icon) {
  grid-template-columns: 44px minmax(0, 1fr);
}

.lesson-footer-link--map:has(.course-canonical-icon),
.module-quiz-secondary:has(.course-canonical-icon),
.lesson-waiting-actions a:has(.course-canonical-icon),
.lesson-secondary-action:has(.course-canonical-icon) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.lesson-footer-link--map .course-canonical-icon,
.module-quiz-secondary .course-canonical-icon,
.lesson-waiting-actions .course-canonical-icon,
.lesson-secondary-action .course-canonical-icon {
  width: 34px;
  height: 34px;
}

.lesson-footer-link--map .course-canonical-icon img,
.module-quiz-secondary .course-canonical-icon img,
.lesson-waiting-actions .course-canonical-icon img,
.lesson-secondary-action .course-canonical-icon img {
  width: 40px;
  height: 40px;
}

.course-page .course-continue-icon {
  width: 72px;
  height: 54px;
  margin-right: 22px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--ink);
}

.course-page .course-continue-icon svg {
  width: 64px;
  height: 48px;
  overflow: visible;
  filter: drop-shadow(3px 3px 0 var(--pink));
  stroke-width: 3.2;
}

.course-page .course-lesson-milestones li {
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 6px;
  padding: 10px 13px;
}

.course-page .course-lesson-milestones li > span,
.course-page .course-lesson-milestones li.is-current > span,
.course-page .course-lesson-milestones li.is-complete > span {
  width: 68px;
  height: 68px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: inherit;
}

.course-page .course-milestone-icon {
  display: block;
  width: 72px;
  height: 72px;
  max-width: none;
  object-fit: contain;
  transition:
    filter var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.course-page .course-lesson-milestones li > span > b {
  display: none;
}

.course-page .course-lesson-milestones li.is-current .course-milestone-icon {
  filter: drop-shadow(3px 3px 0 var(--pink));
  transform: rotate(-3deg) scale(1.05);
}

.course-page .course-lesson-milestones li.is-complete .course-milestone-icon {
  filter: drop-shadow(3px 3px 0 var(--acid));
}

@media (max-width: 700px) {
  .course-page .course-continue-icon {
    width: 52px;
    height: 48px;
    margin-right: 8px;
  }

  .course-page .course-continue-icon svg {
    width: 48px;
    height: 42px;
  }

  .course-page .course-lesson-milestones li {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 5px;
  }

  .course-page .course-lesson-milestones li > span,
  .course-page .course-lesson-milestones li.is-current > span,
  .course-page .course-lesson-milestones li.is-complete > span {
    width: 52px;
    height: 52px;
  }

  .course-page .course-milestone-icon {
    width: 56px;
    height: 56px;
  }
}

/* Canonical outer width for the main student cabinet pages. Lessons keep the
   narrower reading width from the design system. */
@media (min-width: 901px) {
  :where(
    .course-content,
    .program-content,
    .profile-content,
    .course-materials-content,
    .course-journal-content
  ) {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    padding-right: clamp(20px, 2vw, 32px);
    padding-left: clamp(20px, 2vw, 32px);
  }

  .course-journal-hero,
  .course-journal-modules {
    width: 100%;
    margin-left: 0;
    transform: none;
  }
}
html.course-prelaunch-active .course-nav-link--course,
html.course-prelaunch-active .course-nav-link--materials,
html.course-prelaunch-active .course-nav-link--journal,
html.course-prelaunch-active .course-quick-link--chat,
html.course-prelaunch-active .course-mobile-nav-link--course,
html.course-prelaunch-active .course-mobile-nav-link--materials,
html.course-prelaunch-active .course-mobile-nav-link--journal,
html.course-prelaunch-active .course-mobile-nav-link--stream-chat,
html.course-prelaunch-active .course-mobile-katya {
  display: none !important;
}

/* Lesson 1.2 has a deliberately detailed nine-page summary. On phones the
   notebook is taller and the prose uses the body face, so every line stays
   inside the paper without turning the copy into unreadably small type. */
@media (max-width: 700px) {
  .lesson-page[data-lesson-id="1-2"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-book {
    height: clamp(620px, 180vw, 700px);
  }

  .lesson-page[data-lesson-id="1-2"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content {
    gap: 9px;
    padding: 22px 19px 50px;
  }

  .lesson-page[data-lesson-id="1-2"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-kicker {
    padding: 5px 9px 4px;
    font-size: 16px;
  }

  .lesson-page[data-lesson-id="1-2"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content h4.lesson-book-page-title {
    gap: 0.1em 0.12em;
    font-size: clamp(27px, 8.4vw, 35px);
    line-height: 0.95;
  }

  .lesson-page[data-lesson-id="1-2"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content > p:not(.lesson-flipbook-caption) {
    color: var(--ink);
    font-family: var(--ff-body);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.38;
  }

  .lesson-page[data-lesson-id="1-2"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content ul {
    gap: 6px;
  }

  .lesson-page[data-lesson-id="1-2"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content li {
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 7px;
    font-size: 13.5px;
    line-height: 1.34;
  }

  .lesson-page[data-lesson-id="1-2"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content li::before {
    width: 9px;
    height: 9px;
    margin-top: 4px;
  }

  .lesson-page[data-lesson-id="1-2"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-caption {
    padding-bottom: 0.14em;
    font-size: 18px;
    line-height: 1.05;
  }

  .lesson-page[data-lesson-id="1-2"] .lesson-notes-flipbook.is-mobile-book .lesson-book-check {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
    padding: 7px;
  }

  .lesson-page[data-lesson-id="1-2"] .lesson-notes-flipbook.is-mobile-book .lesson-book-check span {
    width: 34px;
    height: 34px;
    font-size: 20px;
  }

  .lesson-page[data-lesson-id="1-2"] .lesson-notes-flipbook.is-mobile-book .lesson-book-check b {
    font-size: 12px;
  }
}

/* Lesson 1.3 compares two income paths across nine detailed pages. The phone
   notebook grows vertically so the 16px learning text never gets clipped. */
@media (max-width: 700px) {
  .lesson-page[data-lesson-id="1-3"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-book {
    height: clamp(740px, 210vw, 820px);
  }

  .lesson-page[data-lesson-id="1-3"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content {
    gap: 10px;
    padding: 24px 20px 54px;
  }

  .lesson-page[data-lesson-id="1-3"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-kicker {
    padding: 5px 9px 4px;
    font-size: 16px;
  }

  .lesson-page[data-lesson-id="1-3"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content h4.lesson-book-page-title {
    gap: 0.1em 0.12em;
    font-size: clamp(28px, 8.6vw, 36px);
    line-height: 0.95;
  }

  .lesson-page[data-lesson-id="1-3"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content > p:not(.lesson-flipbook-caption) {
    color: var(--ink);
    font-family: var(--ff-body);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.4;
  }

  .lesson-page[data-lesson-id="1-3"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content ul {
    gap: 7px;
  }

  .lesson-page[data-lesson-id="1-3"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content li {
    grid-template-columns: 11px minmax(0, 1fr);
    gap: 7px;
    font-size: 16px;
    line-height: 1.34;
  }

  .lesson-page[data-lesson-id="1-3"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content li::before {
    width: 10px;
    height: 10px;
    margin-top: 5px;
  }

  .lesson-page[data-lesson-id="1-3"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-caption {
    padding-bottom: 0.14em;
    font-size: 20px;
    line-height: 1.05;
  }

  .lesson-page[data-lesson-id="1-3"] .lesson-notes-flipbook.is-mobile-book .lesson-book-check {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .lesson-page[data-lesson-id="1-3"] .lesson-notes-flipbook.is-mobile-book .lesson-book-check span {
    width: 36px;
    height: 36px;
    font-size: 21px;
  }

  .lesson-page[data-lesson-id="1-3"] .lesson-notes-flipbook.is-mobile-book .lesson-book-check b {
    font-size: 13px;
  }
}

/* Lesson 1.4 has several dense shopping lists. Keep the learning copy at a
   comfortable phone size while the ten-page notebook keeps every item inside. */
@media (max-width: 700px) {
  .lesson-page[data-lesson-id="1-4"] .lesson-notes-flipbook.is-mobile-book .lesson-flipbook-page-content li {
    font-size: 16px;
    line-height: 1.38;
  }
}

/* ==========================================================================
   Подключение Telegram в профиле ученицы
   ========================================================================== */

.profile-telegram-card[hidden] {
  display: none;
}

.profile-telegram-card .profile-section-heading > span {
  font-size: 15px;
  letter-spacing: 0.04em;
}

.profile-telegram-state {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
}

.profile-telegram-dot {
  width: 18px;
  height: 18px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.profile-telegram-state[data-state="on"] .profile-telegram-dot {
  background: var(--acid);
}

.profile-telegram-state strong {
  display: block;
  font-size: 15px;
  font-weight: 900;
}

.profile-telegram-state small {
  display: block;
  margin-top: 6px;
  color: color-mix(in srgb, var(--ink) 64%, transparent);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.profile-telegram-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.profile-telegram-connect,
.profile-telegram-disconnect {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 0 20px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.profile-telegram-connect {
  background: var(--acid);
  box-shadow: 4px 4px 0 var(--ink);
}

.profile-telegram-disconnect {
  background: var(--white);
}

.profile-telegram-disconnect[hidden] {
  display: none;
}

.profile-telegram-link {
  display: grid;
  gap: 12px;
  justify-items: start;
  margin-top: 18px;
  padding: 18px;
  background: var(--sky);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
}

.profile-telegram-link[hidden] {
  display: none;
}

.profile-telegram-link p {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.profile-telegram-link a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 0 20px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.profile-telegram-link code {
  width: 100%;
  padding: 12px;
  overflow-wrap: anywhere;
  background: var(--white);
  border: 2px dashed var(--ink);
  border-radius: var(--radius-xs, 8px);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
}

.profile-telegram-note {
  margin-top: 16px;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.profile-telegram-error {
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--white);
  border: 2px solid #c8305c;
  border-radius: var(--radius-card);
  color: #8c2043;
  font-size: 13px;
  font-weight: 900;
}

.profile-telegram-error[hidden] {
  display: none;
}

@media (max-width: 620px) {
  .profile-telegram-connect,
  .profile-telegram-disconnect,
  .profile-telegram-link a {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Связь с сайтом потерялась

   Показывается, когда страница кабинета пришла с сервера, но подтверждение
   входа не доехало. Раньше в этом случае урок молча рисовался пустым, и
   девушка думала, что потеряла весь прогресс.
   ========================================================================== */

[data-session-broken] {
  position: fixed;
  z-index: 999;
  display: grid;
  padding: var(--space-4);
  background: color-mix(in srgb, var(--ink) 72%, transparent);
  inset: 0;
  place-items: center;
}

[data-session-broken] > div {
  display: grid;
  width: min(420px, 100%);
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 8px 8px 0 var(--ink);
  text-align: center;
}

[data-session-broken] h2 {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 27px;
  line-height: 1.05;
}

[data-session-broken] p {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

[data-session-broken] button {
  min-height: 52px;
  padding: 0 var(--space-4);
  background: var(--violet);
  border: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: var(--ff-body);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

[data-session-broken] small {
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  font-size: 10px;
  font-weight: 800;
}

[data-session-broken] a {
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

/* Запасная строка урока: рисуется, только если окно выше не доехало. */
[data-session-lost] {
  margin: 0 0 var(--space-4);
  padding: var(--space-4);
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

/* Шапка просмотра сотрудником: явный возврат без наложения на логотип. */
.course-topbar--staff .course-topbar-staff {
  min-height: 44px;
  font-size: 14px;
  padding: 6px 10px;
}

.course-topbar--staff .course-topbar-staff:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .course-topbar.course-topbar--staff {
    display: grid;
    grid-template-columns: max-content minmax(44px, 1fr) 44px;
    gap: 8px;
  }

  .course-topbar--staff .course-topbar-actions {
    position: static;
    grid-column: 1;
    grid-row: 1;
    gap: 8px;
  }

  .course-topbar--staff .course-mobile-logo {
    grid-column: 2;
    grid-row: 1;
  }

  .course-topbar--staff .site-logo-wordmark {
    display: none;
  }

  .course-topbar--staff .course-topbar-profile {
    position: static;
    grid-column: 3;
    grid-row: 1;
  }
}
