:root {
  --canvas: #f4f7fb;
  --paper: #fffdf8;
  --ink: #182b38;
  --muted: #586c78;
  --faint: #748690;
  --line: rgba(29, 74, 91, 0.14);
  --sea: #194f49;
  --sea-deep: #123f3a;
  --sea-soft: #e8f4f1;
  --blue: #1767bd;
  --blue-soft: #e9f3ff;
  --gold: #9c6d16;
  --gold-soft: #f8eed7;
  --correct: #13795b;
  --correct-soft: #e6f5ef;
  --incorrect: #b4233d;
  --incorrect-soft: #fcecef;
  --focus: #0c6fe8;
  --shadow: 0 24px 70px -52px rgba(20, 55, 70, 0.7);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(780px 430px at 85% -180px, rgba(23, 103, 189, 0.12), transparent 70%),
    radial-gradient(680px 380px at 10% 62%, rgba(25, 79, 73, 0.07), transparent 72%),
    var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Noto Sans Arabic", "Noto Naskh Arabic", "Geeza Pro", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  inset-inline-start: 14px;
  top: -80px;
  z-index: 100;
  border-radius: 12px;
  background: var(--sea-deep);
  color: white;
  padding: 11px 16px;
  font-weight: 800;
  text-decoration: none;
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 247, 251, 0.93);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  width: min(1080px, calc(100% - 28px));
  min-height: 62px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand,
.return-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sea);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.brand__mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #3c95ee, #2464d9);
  color: white;
  box-shadow: 0 8px 18px -10px rgba(36, 100, 217, 0.85);
  direction: ltr;
  font-size: 12px;
  letter-spacing: -0.04em;
}

.return-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  padding-inline: 14px;
}

.intro {
  width: min(1080px, calc(100% - 28px));
  min-height: calc(100dvh - 62px);
  margin-inline: auto;
  padding-block: 30px calc(42px + var(--safe-bottom));
  display: grid;
  align-items: center;
  gap: 30px;
}

.intro__copy {
  min-width: 0;
}

.eyebrow {
  width: fit-content;
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 850;
}

.intro h1 {
  max-width: 700px;
  margin: 15px 0 0;
  color: #143f4d;
  font-size: clamp(31px, 7.8vw, 57px);
  line-height: 1.25;
  text-wrap: balance;
}

.intro__lead {
  max-width: 660px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 3.6vw, 17px);
  line-height: 1.85;
}

.intro__meta {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.intro__meta span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  padding-inline: 13px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.intro__meta b {
  color: var(--sea);
  font-size: 13px;
}

.source-note {
  max-width: 630px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(19, 121, 91, 0.18);
  border-radius: 18px;
  background: rgba(232, 245, 239, 0.8);
  padding: 12px 14px;
}

.source-note__icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--correct);
  color: white;
  font-weight: 900;
}

.source-note b,
.source-note small {
  display: block;
}

.source-note b {
  color: var(--correct);
  font-size: 12px;
}

.source-note small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
}

.intro__actions {
  margin-top: 21px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.primary-button,
.secondary-button,
.text-button,
.icon-button,
.reveal-button {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.primary-button {
  background: var(--sea);
  color: white;
  padding-inline: 20px;
  box-shadow: 0 15px 28px -20px rgba(25, 79, 73, 0.9);
}

.primary-button:hover {
  background: var(--sea-deep);
}

.primary-button:disabled {
  cursor: not-allowed;
  background: #aebbbf;
  box-shadow: none;
}

.secondary-button {
  border: 1px solid var(--line);
  background: white;
  color: var(--sea);
  padding-inline: 18px;
}

.text-button {
  background: transparent;
  color: var(--blue);
  padding-inline: 12px;
}

.icon-button {
  width: 44px;
  min-width: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--sea);
  font-family: Georgia, serif;
  font-size: 18px;
}

.intro__scene {
  min-width: 0;
  border: 1px solid rgba(23, 103, 189, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(23, 103, 189, 0.07) 30px 31px);
  padding: clamp(20px, 5vw, 38px);
  box-shadow: var(--shadow);
}

.bridge-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.35fr);
  align-items: center;
  gap: 8px;
  color: #173f68;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: clamp(16px, 4.2vw, 23px);
  text-align: center;
}

.bridge-demo span {
  min-height: 58px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  padding: 9px 10px;
}

.bridge-demo__noun {
  border: 1px solid rgba(23, 103, 189, 0.22);
  background: var(--blue-soft);
}

.bridge-demo__connector {
  position: relative;
  min-width: 68px;
  background: var(--sea);
  color: white;
  box-shadow: 0 0 0 7px var(--sea-soft);
  font-weight: 700;
}

.bridge-demo__connector::before,
.bridge-demo__connector::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 14px;
  height: 2px;
  background: var(--sea);
}

.bridge-demo__connector::before {
  right: 100%;
}

.bridge-demo__connector::after {
  left: 100%;
}

.bridge-demo__clause {
  border: 1px solid rgba(156, 109, 22, 0.2);
  background: var(--gold-soft);
}

.xray-demo {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: var(--muted);
}

.xray-demo span {
  min-width: 95px;
  border-bottom: 3px solid var(--blue);
  padding: 7px 9px 9px;
  text-align: center;
}

.xray-demo b,
.xray-demo small {
  display: block;
}

.xray-demo b {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.xray-demo small {
  margin-top: 3px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.xray-demo i {
  color: var(--faint);
  font-style: normal;
}

.comma-demo {
  margin-top: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #6c4c12;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(15px, 3.7vw, 20px);
}

.comma-demo b {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: white;
  font-size: 25px;
  line-height: 1;
}

.lesson {
  width: min(900px, calc(100% - 28px));
  margin-inline: auto;
  padding-block: 24px calc(120px + var(--safe-bottom));
}

.lesson__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.lesson__heading span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
}

.lesson__heading h2 {
  margin: 4px 0 0;
  color: #143f4d;
  font-size: clamp(23px, 6vw, 34px);
  line-height: 1.4;
}

.mission-progress {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.mission-progress li {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
  padding: 7px;
  color: var(--faint);
}

.mission-progress li[data-status="current"] {
  border-color: rgba(23, 103, 189, 0.32);
  background: var(--blue-soft);
  color: var(--blue);
}

.mission-progress li[data-status="done"] {
  border-color: rgba(19, 121, 91, 0.22);
  background: var(--correct-soft);
  color: var(--correct);
}

.mission-progress span {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: currentColor;
  color: white;
  font-size: 11px;
  font-weight: 850;
}

.mission-progress li[data-status="future"] span {
  background: #e6ecef;
  color: #73838b;
}

.mission-progress small {
  min-width: 0;
  overflow: hidden;
  font-size: 9.5px;
  font-weight: 750;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worked-examples {
  margin-top: 17px;
}

.model-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.model-heading span {
  color: var(--sea);
  font-size: 12px;
  font-weight: 850;
}

.model-heading small {
  color: var(--faint);
  font-size: 10px;
}

.model-grid {
  margin-top: 8px;
  display: grid;
  gap: 9px;
}

.model-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(156, 109, 22, 0.2);
  border-radius: 17px;
  background: linear-gradient(135deg, #fffdf7, #fdf7ea);
  padding: 15px;
}

.model-card::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  background: var(--gold);
}

.model-card__source {
  display: block;
  color: var(--gold);
  direction: ltr;
  font-size: 9.5px;
  font-weight: 800;
  text-align: left;
}

.english-sentence {
  unicode-bidi: isolate;
  color: #193b4e;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
}

.model-card .english-sentence {
  margin: 8px 0 0;
  font-size: clamp(16px, 4vw, 20px);
  line-height: 1.5;
}

.model-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.model-tags span {
  border-radius: 999px;
  background: rgba(156, 109, 22, 0.1);
  padding: 4px 8px;
  color: #755412;
  font-size: 9.5px;
  font-weight: 750;
}

.mission-body {
  margin-top: 15px;
}

.task-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  padding: clamp(16px, 4vw, 25px);
  box-shadow: var(--shadow);
}

.task-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--blue);
}

.task-card__header span,
.task-card__header small {
  font-size: 10.5px;
  font-weight: 850;
}

.task-card__header small {
  direction: ltr;
  color: var(--faint);
}

.task-prompt {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.65;
}

.sentence-board {
  margin-top: 14px;
  border: 1px solid rgba(23, 103, 189, 0.15);
  border-radius: 17px;
  background:
    linear-gradient(rgba(249, 252, 255, 0.96), rgba(249, 252, 255, 0.96)),
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(23, 103, 189, 0.08) 27px 28px);
  padding: 19px 16px;
}

.sentence-board .english-sentence {
  margin: 0;
  font-size: clamp(18px, 4.7vw, 24px);
  line-height: 1.65;
  text-align: center;
}

.sentence-gap {
  border-bottom: 3px solid var(--blue);
  color: var(--blue);
  padding-inline: 5px;
}

.sentence-target {
  border-radius: 7px;
  background: var(--gold-soft);
  color: #6f4d0e;
  padding: 2px 5px;
}

.choice-grid {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.choice-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice {
  min-height: 52px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  background: #fbfdfe;
  padding: 8px 13px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
}

.choice:hover:not(:disabled) {
  border-color: rgba(23, 103, 189, 0.34);
  background: var(--blue-soft);
}

.choice.is-selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: #12599f;
  box-shadow: inset 0 0 0 1px var(--blue);
}

.choice i {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  font-style: normal;
}

.choice:disabled {
  cursor: default;
  opacity: 1;
}

.xray-rail {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(7, auto);
  align-items: center;
  justify-content: center;
  gap: 7px;
  direction: ltr;
}

.xray-rail span {
  min-width: 86px;
  border-bottom: 3px solid var(--blue);
  border-radius: 7px 7px 0 0;
  background: rgba(233, 243, 255, 0.48);
  padding: 7px 8px 8px;
  text-align: center;
}

.xray-rail span[data-kind="verb"] {
  border-color: var(--gold);
  background: rgba(248, 238, 215, 0.52);
}

.xray-rail small,
.xray-rail b {
  display: block;
}

.xray-rail small {
  color: var(--faint);
  direction: rtl;
  font-size: 9px;
}

.xray-rail b {
  margin-top: 3px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
}

.xray-rail i {
  color: var(--faint);
  font-style: normal;
}

.extra-info-label {
  width: fit-content;
  margin-top: 12px;
  border-radius: 999px;
  background: var(--gold-soft);
  padding: 5px 10px;
  color: #77540f;
  font-size: 10px;
  font-weight: 800;
}

.source-statements {
  margin-top: 13px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.source-statements article {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbfdfe;
  padding: 12px;
}

.source-statements small {
  color: var(--blue);
  font-size: 9.5px;
  font-weight: 850;
}

.source-statements p {
  margin: 6px 0 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  line-height: 1.5;
}

.assembly {
  margin-top: 12px;
  min-height: 92px;
  border: 1px dashed rgba(25, 79, 73, 0.34);
  border-radius: 17px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--sea-soft);
  padding: 14px;
  color: #173f3b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(15px, 3.8vw, 19px);
  line-height: 1.6;
}

.comma-gate {
  width: 44px;
  height: 44px;
  border: 2px dashed var(--gold);
  border-radius: 50%;
  background: white;
  color: var(--gold);
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 28px;
  line-height: 1;
}

.comma-gate.is-on {
  border-style: solid;
  background: var(--gold);
  color: white;
}

.connector-slot {
  min-width: 60px;
  border-bottom: 3px solid var(--sea);
  color: var(--sea);
  padding: 3px 6px;
  text-align: center;
  font-weight: 700;
}

.feedback {
  min-height: 0;
  margin-top: 13px;
}

.feedback[data-tone] {
  min-height: 58px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 15px;
  padding: 11px 12px;
}

.feedback[data-tone="correct"] {
  border-color: rgba(19, 121, 91, 0.2);
  background: var(--correct-soft);
  color: var(--correct);
}

.feedback[data-tone="incorrect"] {
  border-color: rgba(180, 35, 61, 0.2);
  background: var(--incorrect-soft);
  color: var(--incorrect);
}

.feedback > span {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: currentColor;
  color: white;
  font-weight: 900;
}

.feedback p {
  margin: 1px 0 0;
  color: inherit;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.75;
}

.reveal-button {
  margin-top: 9px;
  border: 1px solid rgba(180, 35, 61, 0.2);
  background: white;
  color: var(--incorrect);
  padding-inline: 14px;
  font-size: 11px;
}

.practice-label {
  margin-top: 12px;
  display: block;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.6;
  text-align: center;
}

.action-dock {
  position: sticky;
  bottom: calc(10px + var(--safe-bottom));
  z-index: 30;
  margin-top: 15px;
  border: 1px solid var(--line);
  border-radius: 19px;
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 9px;
  background: rgba(255, 255, 255, 0.92);
  padding: 9px;
  box-shadow: 0 22px 48px -30px rgba(18, 63, 58, 0.8);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.result-card {
  border: 1px solid var(--line);
  border-radius: 25px;
  background: white;
  padding: clamp(19px, 5vw, 30px);
  box-shadow: var(--shadow);
  text-align: center;
}

.score-ring {
  width: 112px;
  height: 112px;
  margin-inline: auto;
  border: 10px solid var(--correct-soft);
  border-top-color: var(--correct);
  border-radius: 50%;
  display: grid;
  place-content: center;
  direction: ltr;
  color: var(--correct);
}

.score-ring b {
  font-size: 34px;
  line-height: 1;
}

.score-ring span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.result-kicker {
  margin-top: 16px;
  display: block;
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 850;
}

.result-card h3 {
  margin: 5px 0 0;
  color: #143f4d;
  font-size: clamp(20px, 5vw, 28px);
  line-height: 1.5;
}

.family-results {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  text-align: start;
}

.family-results li {
  min-height: 56px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 10px 12px;
}

.family-results li > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--correct-soft);
  color: var(--correct);
  font-weight: 900;
}

.family-results li[data-tone="review"] > span {
  background: var(--gold-soft);
  color: var(--gold);
}

.family-results b {
  font-size: 12px;
}

.family-results small {
  color: var(--faint);
  direction: ltr;
  font-size: 10px;
  font-weight: 800;
}

.result-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.result-actions {
  margin-top: 17px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.source-dialog {
  width: min(560px, calc(100% - 28px));
  max-height: min(82dvh, 720px);
  border: 0;
  border-radius: 24px;
  background: white;
  padding: 0;
  color: var(--ink);
  box-shadow: 0 30px 90px -35px rgba(8, 30, 40, 0.72);
}

.source-dialog::backdrop {
  background: rgba(13, 30, 38, 0.48);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.source-dialog form {
  position: relative;
  padding: 25px;
}

.source-dialog h2 {
  margin: 12px 0 0;
  color: #143f4d;
  font-size: 24px;
  line-height: 1.45;
}

.source-dialog p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.85;
}

.source-dialog__limit {
  border-radius: 14px;
  background: var(--gold-soft);
  padding: 11px 12px;
  color: #6d4c10 !important;
}

.source-dialog .secondary-button {
  width: 100%;
  margin-top: 17px;
}

.dialog-close {
  position: absolute;
  inset-block-start: 14px;
  inset-inline-end: 14px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #eef2f4;
  color: var(--ink);
  cursor: pointer;
  font-size: 24px;
}

.noscript {
  margin: 30px auto;
  max-width: 600px;
  border-radius: 14px;
  background: var(--incorrect-soft);
  padding: 15px;
  color: var(--incorrect);
  text-align: center;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
}

@media (min-width: 760px) {
  .intro {
    grid-template-columns: minmax(0, 1.13fr) minmax(310px, 0.87fr);
  }

  .model-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header__inner,
  .intro,
  .lesson {
    width: min(100% - 20px, 100%);
  }

  .brand > span:last-child {
    display: none;
  }

  .return-link {
    max-width: calc(100vw - 74px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .intro {
    align-content: center;
    padding-top: 22px;
  }

  .intro__scene {
    border-radius: 21px;
  }

  .lesson {
    padding-top: 18px;
  }

  .mission-progress small {
    display: none;
  }

  .mission-progress li {
    justify-content: center;
    padding: 5px;
  }

  .source-statements,
  .result-actions {
    grid-template-columns: 1fr;
  }

  .xray-rail {
    grid-template-columns: repeat(7, max-content);
    justify-content: start;
    overflow-x: auto;
    padding: 3px 2px 7px;
    scrollbar-width: thin;
  }

  .xray-rail span {
    min-width: 76px;
  }
}

@media (max-width: 420px) {
  .intro__actions,
  .intro__actions .primary-button {
    width: 100%;
  }

  .intro__actions .text-button {
    flex: 1;
  }

  .bridge-demo {
    grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1.3fr);
    gap: 6px;
  }

  .bridge-demo span {
    min-height: 52px;
    padding: 7px 6px;
  }

  .bridge-demo__connector {
    min-width: 58px;
  }

  .task-card {
    border-radius: 20px;
    padding-inline: 13px;
  }

  .choice-grid,
  .choice-grid--three {
    grid-template-columns: 1fr;
  }

  .choice-grid--three .choice {
    min-height: 48px;
  }

  .assembly {
    padding-inline: 8px;
  }

  .action-dock {
    grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.32fr);
  }

  .action-dock .primary-button,
  .action-dock .secondary-button {
    padding-inline: 10px;
    font-size: 12px;
  }
}

@media (max-width: 340px) {
  .return-link {
    padding-inline: 10px;
    font-size: 11px;
  }

  .intro h1 {
    font-size: 29px;
  }

  .intro__meta span {
    padding-inline: 10px;
  }

  .comma-demo {
    gap: 4px;
  }

  .lesson__heading h2 {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .choice.is-selected,
  .comma-gate.is-on,
  .mission-progress li[data-status="current"] {
    outline: 3px solid CanvasText;
  }
}
