@import url('./exam-trainer.css');
* { box-sizing: border-box; }

:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171717;
  background: #f6f6f3;
  line-height: 1.5;
}

html { scroll-behavior: smooth; }
body { margin: 0; min-width: 0; }
img, iframe, canvas { max-width: 100%; }
button, textarea { font: inherit; }
button { cursor: pointer; min-height: 44px; }

.app-shell {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 14px 64px;
}

.hero { padding: 18px 0 24px; }
.hero h1 {
  margin: 6px 0 12px;
  font-size: clamp(2rem, 11vw, 3.2rem);
  line-height: .98;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}
.hero p:last-child { max-width: 720px; margin-bottom: 0; font-size: 1rem; color: #555; }
.eyebrow { margin: 0 0 8px; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #656565; }

.course-progress {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-inline: -14px;
  margin-bottom: 24px;
  padding: 10px 14px 14px;
  background: #f6f6f3;
  border-bottom: 1px solid #deded7;
}
.course-progress-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}
.course-progress-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: .82rem;
  font-weight: 650;
  text-align: center;
}
.course-progress-jump, .course-progress-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #cfcfc8;
  border-radius: 12px;
  background: #fff;
  color: #171717;
  font: inherit;
  font-size: .78rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}
.course-progress-menu { position: relative; flex: 0 0 auto; }
.course-progress-menu-toggle {
  width: 44px;
  padding: 0;
  font-size: 1.25rem;
  list-style: none;
}
.course-progress-menu-toggle::-webkit-details-marker { display: none; }
.course-progress-menu-toggle:focus-visible { outline: 3px solid rgba(0,0,0,.22); outline-offset: 2px; }
.course-progress-menu-links {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 30;
  width: min(300px, calc(100vw - 28px));
  max-height: min(65vh, 480px);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #cfcfc8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0,0,0,.13);
}
.course-progress-menu-links a {
  display: block;
  padding: 12px;
  border-radius: 9px;
  color: #171717;
  font-size: .88rem;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.course-progress-menu-links a:hover, .course-progress-menu-links a:focus-visible { background: #f1f1ec; }
.course-progress-menu-links a[aria-current="page"] { background: #f1f1ec; font-weight: 750; }
.course-progress-menu-heading {
  display: block;
  padding: 12px 12px 4px;
  color: #66665f;
  font-size: .75rem;
  font-weight: 700;
}
.course-progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #deded7; }
.course-progress-value { height: 100%; width: 0; border-radius: inherit; background: #171717; transition: width .25s ease; }
@media (max-width: 370px) {
  .course-progress-toolbar { gap: 5px; }
  .course-progress-label { font-size: .75rem; }
  .course-progress-jump { padding-inline: 7px; font-size: .73rem; }
}

.unit { display: grid; gap: 14px; margin: 0 0 48px; min-width: 0; scroll-margin-top: 100px; }
.unit-heading { margin-top: 8px; min-width: 0; }
.unit-heading h2 { margin: 0; font-size: clamp(1.6rem, 8vw, 2.2rem); line-height: 1.05; overflow-wrap: anywhere; }

.progress-step {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  scroll-margin-top: 82px;
  border-radius: 18px;
  transition: box-shadow .2s ease;
}
.progress-step.needs-attention { box-shadow: 0 0 0 4px rgba(23,23,23,.14); }
.progress-step.is-completed > .card { opacity: .82; }
.progress-step.is-locked > .card { opacity: .38; filter: grayscale(.35); }

.progress-lock {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 16px;
  border: 1px solid #d9d9d3;
  border-radius: 14px;
  background: #ecece7;
  color: #595954;
  text-align: left;
}
.progress-lock[hidden] { display: none; }
.progress-lock-message { display: grid; gap: 2px; min-width: 0; }
.progress-lock-message > span { font-size: .88rem; font-weight: 400; }

.card, .video-placeholder, .video-frame {
  min-width: 0;
  border: 1px solid #d9d9d3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.035);
}
.card { padding: 18px; transition: border-color .15s ease, box-shadow .15s ease; }
.card.needs-input { border-color: #b55749; box-shadow: 0 0 0 2px #b55749, 0 8px 24px rgba(0,0,0,.035); }
.card h3 { margin: 0 0 10px; font-size: 1.22rem; line-height: 1.2; overflow-wrap: anywhere; }
.card p { margin-top: 0; }
.prose { padding-block: 20px; }

.is-readonly textarea { background: #f5f5f1; cursor: default; }
.is-readonly .scribble-canvas { pointer-events: none; cursor: default; }
.is-readonly .editor-tools button:disabled,
.is-readonly > .actions button:disabled { display: none; }

.task-completion-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #deded7;
}
.task-completion-panel[hidden] { display: none; }
.task-completion-copy {
  display: grid;
  gap: 3px;
}
.task-completion-label {
  font-size: .92rem;
}
.task-completion-detail {
  color: #66665f;
  font-size: .88rem;
  line-height: 1.45;
}
.task-revision-button {
  align-self: flex-start;
}
.task-completion-panel.is-revising {
  padding: 14px 16px;
  border: 1px solid #d9d9d3;
  border-radius: 12px;
  background: #f5f5f1;
}
.progress-step.is-revising > .card {
  border-color: #9d9d95;
  box-shadow: 0 0 0 2px rgba(23,23,23,.08), 0 8px 24px rgba(0,0,0,.035);
}

.video-card { padding: 0; overflow: hidden; }
.video-card > .video-stage { border: 0; border-radius: 0; box-shadow: none; }
.video-card > .progress-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  padding: 14px 16px 16px;
  background: #fff;
  border-top: 1px solid #e3e3dd;
}
.video-card .progress-next { width: 100%; }
.video-card .progress-next.is-pending { opacity: .35; }
.video-validation-error { min-height: 1.45em; margin: 0; }

.video-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e9e9e3;
}
.video-stage iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-cover,
.video-mock-player {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 14px;
  background: linear-gradient(135deg,#e8e8e1,#f8f8f4);
}
.video-cover h3 {
  display: -webkit-box;
  max-width: 100%;
  margin: 0 0 14px;
  overflow: hidden;
  font-size: clamp(1.25rem, 6vw, 1.7rem);
  line-height: 1.06;
  letter-spacing: -.025em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.video-play-button {
  position: relative;
  width: 62px;
  height: 62px;
  min-height: 62px;
  flex: 0 0 62px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 0;
  background: #171717;
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.16);
  animation: video-play-pulse 2.8s ease-in-out infinite;
}
.video-play-button::after { content: ''; position: absolute; inset: -6px; border-radius: inherit; border: 1px solid rgba(23,23,23,.18); opacity: .7; }
.video-play-button span { transform: translateX(2px); }
.video-mock-player strong { display: block; margin-bottom: 8px; font-size: 1.1rem; }
.video-mock-player p:last-child { max-width: 560px; margin-bottom: 0; font-size: .9rem; }

@keyframes video-play-pulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(0,0,0,.16), 0 0 0 0 rgba(23,23,23,.12); }
  50% { box-shadow: 0 8px 20px rgba(0,0,0,.16), 0 0 0 10px rgba(23,23,23,0); }
}

textarea {
  width: 100%;
  min-width: 0;
  resize: vertical;
  border: 1px solid #cfcfc8;
  border-radius: 12px;
  padding: 13px;
  background: #fcfcfa;
  font-size: 16px;
}
textarea:focus, button:focus-visible, input:focus-visible { outline: 3px solid rgba(0,0,0,.16); outline-offset: 2px; }

.code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
pre { max-width: 100%; overflow-x: auto; }
.editor-tools, .actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  margin-top: 12px;
  min-width: 0;
}
/* Respect the hidden attribute even when .actions becomes flex on wide screens. */
.actions[hidden] { display: none !important; }
.editor-tools > button,
.actions > button { width: 100%; }
.progress-actions {
  width: 100%;
  margin-top: 12px;
  justify-items: end;
}
.progress-actions > .progress-next { width: 100%; }

button {
  max-width: 100%;
  border: 1px solid #c6c6be;
  border-radius: 999px;
  background: #fff;
  padding: 10px 16px;
}
button.primary { background: #171717; color: white; border-color: #171717; }
button:disabled { opacity: .55; cursor: default; }

.task-instruction-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 3px solid #c5c8c1;
  background: #f7f8f5;
  border-radius: 0 8px 8px 0;
}

.task-hint-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.task-hint {
  padding: 13px 14px;
  border: 1px solid #d8d8d1;
  border-radius: 12px;
  background: #fafaf6;
}
.task-hint strong {
  display: block;
  margin-bottom: 4px;
  font-size: .9rem;
}
.task-hint p {
  margin: 0;
  color: #4f4f4a;
}
.task-hint-actions {
  margin-top: 10px;
}
.task-hint-actions button[hidden] { display: none; }

.solution { margin-top: 18px; border-top: 1px solid #deded7; padding-top: 18px; min-width: 0; }
.solution[hidden] { display: none; }
.solution pre, .console { overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: #f3f3ef; border-radius: 12px; padding: 12px; }
.solution pre.solution-code { white-space: pre; overflow-x: auto; overflow-wrap: normal; line-height: 1.6; }
.status, .console { margin: 12px 0 0; }
.muted { color: #6a6a64; }
.success { color: #24613c; }
.error { color: #9e2f25; }

.task-validation-error { min-height: 1.45em; margin: 14px 0 0; color: #9e2f25; font-size: .92rem; font-weight: 650; }
.task-validation-error[hidden] { display: block; visibility: hidden; }

.question { min-width: 0; border: 0; padding: 18px 0; margin: 0; border-top: 1px solid #e3e3dd; }
.question:first-of-type { border-top: 0; }
.question legend { width: 100%; max-width: 100%; font-weight: 700; padding: 0 0 10px; overflow-wrap: anywhere; }
.mcq.needs-input { padding-bottom: 22px; }
.mcq-selection-error { margin-top: 12px; }
.answer {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #deded8;
  border-radius: 12px;
  margin: 8px 0;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.answer span { min-width: 0; overflow-wrap: anywhere; }
.answer input { flex: 0 0 auto; margin-top: 4px; }
.answer-correct { border-color: #3f8a5c; background: #edf8f1; }
.answer-incorrect { border-color: #b34a3d; background: #fcefee; }
.answer-reference { box-shadow: inset 0 0 0 1px #3f8a5c; }
.is-correct .mcq-feedback { border-top-color: #9cccad; background: #edf8f1; margin-inline: -8px; padding: 16px 8px 20px; }
.is-incorrect .mcq-feedback { border-top-color: #dfaaa4; background: #fcefee; margin-inline: -8px; padding: 16px 8px 20px; }
.is-correct .mcq-feedback .eyebrow { color: #24613c; }
.is-incorrect .mcq-feedback .eyebrow { color: #9e2f25; }

.scribble-canvas { display: block; width: 100%; height: auto; border: 1px dashed #b8b8b1; border-radius: 12px; background: #fff; touch-action: none; }

.transfer-rich-content,
.transfer-rich-content figure,
.rich-diagram { min-width: 0; max-width: 100%; }
.transfer-rich-content figure,
.rich-diagram { margin: 16px 0; }
.transfer-rich-content img { display: block; max-width: 100%; height: auto; }
.transfer-rich-content pre,
.rich-diagram pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (hover: hover) {
  .progress-lock:hover { background: #e4e4de; }
  button:hover { background: #f1f1ed; }
  button.primary:hover { background: #2b2b2b; }
  .video-play-button:hover { background: #2b2b2b; transform: scale(1.03); }
  .video-card .progress-next.is-pending:hover { opacity: .5; }
  .answer:hover { background: #f8f8f4; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .video-play-button { animation: none; }
}

@media (min-width: 640px) {
  .app-shell { padding: 32px 20px 72px; }
  .hero { padding: 24px 0 30px; }
  .hero h1 { font-size: clamp(2.4rem, 7vw, 4rem); }
  .hero p:last-child { font-size: 1.05rem; }

  .course-progress { margin-inline: 0; padding: 12px 0 14px; margin-bottom: 28px; }
  .course-progress-toolbar { gap: 14px; }
  .course-progress-label { font-size: .9rem; }
  .unit { gap: 18px; margin-bottom: 56px; }
  .unit-heading { margin-top: 10px; }
  .unit-heading h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
  .progress-step { gap: 12px; scroll-margin-top: 92px; border-radius: 20px; }

  .progress-lock { padding: 14px 16px; }
  .progress-lock-message { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }

  .card, .video-placeholder, .video-frame { border-radius: 18px; }
  .card { padding: 22px; }
  .card h3 { font-size: 1.3rem; }
  .prose { padding-block: 26px; }
  .video-card { padding: 0; }
  .video-card > .progress-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px 18px;
  }
  .video-card .progress-next { width: auto; flex: 0 0 auto; }
  .video-validation-error { flex: 1 1 auto; }
  .video-cover, .video-mock-player { padding: 24px; }
  .video-cover h3 { max-width: 720px; margin-bottom: 22px; font-size: clamp(1.7rem, 4vw, 2.6rem); }
  .video-play-button { width: 78px; height: 78px; min-height: 78px; flex-basis: 78px; font-size: 1.45rem; }
  .video-play-button::after { inset: -8px; }

  .editor-tools, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
  .task-completion-panel { flex-direction: row; align-items: center; justify-content: space-between; }
  .task-completion-copy { flex: 1 1 auto; }
  .task-revision-button { flex: 0 0 auto; }
  .editor-tools > button,
  .actions > button { width: auto; }
  .progress-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .progress-actions > .progress-next { width: auto; }
  .question { padding: 22px 0; }
  .answer { padding: 12px 14px; }
  .is-correct .mcq-feedback,
  .is-incorrect .mcq-feedback { margin-inline: -12px; padding: 18px 12px 22px; }
}

@media (min-width: 900px) {
  .app-shell { padding: 40px 20px 80px; }
  .hero { padding: 28px 0 34px; }
  .hero h1 { font-size: clamp(2.8rem, 6vw, 4.5rem); }
  .hero p:last-child { font-size: 1.1rem; }
  .unit { margin-bottom: 64px; }
  .card { padding: 24px; }
  .card h3 { font-size: 1.35rem; }
  .video-card { padding: 0; }
  .video-cover, .video-mock-player { padding: 32px; }
  .video-cover h3 { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 26px; }
  .video-play-button { width: 86px; height: 86px; min-height: 86px; flex-basis: 86px; font-size: 1.55rem; }
}


/* Explicit inline source fragments in prose, lists, hints and examples. */
.inline-code {
  display: inline;
  padding: .08em .3em;
  border: 1px solid #d7d9d4;
  border-radius: .3em;
  background: #f1f3f0;
  color: #193f38;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .91em;
  font-style: normal;
  font-weight: 550;
  white-space: break-spaces;
  overflow-wrap: anywhere;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Semantic learning-content components */
.prose {
  display: grid;
  gap: 22px;
}
.prose > * {
  margin-top: 0;
  margin-bottom: 0;
}
.prose > .eyebrow {
  margin-bottom: -14px;
}
.prose > h3 {
  margin-bottom: -8px;
}
.prose > .progress-actions {
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid #e3e3dd;
}

.content-process {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.content-process li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #deded8;
  border-radius: 12px;
  background: #fafaf7;
}
.content-process li > span:last-child {
  grid-column: 2;
  color: #666;
  font-size: .93rem;
}
.process-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #171717;
  color: #fff;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .04em;
}
.process-block {
  display: grid;
  gap: 20px;
  margin: 0;
}
.process-loop-note {
  margin: 0;
  padding: 16px 18px;
  border-left: 3px solid #171717;
  border-radius: 0 10px 10px 0;
  background: #f3f3ef;
  font-size: .94rem;
  line-height: 1.55;
}
.process-loop-note:last-child { margin-bottom: 0; }

.content-steps { padding-left: 1.4rem; }
.content-steps li + li { margin-top: 8px; }

.content-definition {
  margin: 0;
  padding: 18px;
  border: 1px solid #deded8;
  border-radius: 12px;
  background: #fafaf7;
}
.content-definition dt { font-weight: 750; font-size: 1.05rem; }
.content-definition dd { margin: 6px 0 0; color: #4f4f4a; }

.content-comparison {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0;
}
.comparison-item {
  min-width: 0;
  padding: 18px;
  border: 1px solid #deded8;
  border-radius: 12px;
  background: #fafaf7;
}
.comparison-item h4,
.content-example h4 { margin: 0 0 8px; font-size: 1rem; }
.comparison-item p:last-child,
.content-example p:last-child { margin-bottom: 0; }

.key-points {
  margin: 0;
  padding: 16px 18px 16px 38px;
  border-radius: 12px;
  background: #f3f3ef;
}
.key-points li + li { margin-top: 8px; }

.rich-callout {
  display: block;
  margin: 0;
  padding: 16px 18px;
  border-left: 3px solid #171717;
  border-radius: 0 10px 10px 0;
  background: #f3f3ef;
}
.rich-callout-important { font-weight: 650; }

.content-example {
  margin: 0;
  padding: 18px;
  border: 1px dashed #bdbdb5;
  border-radius: 12px;
  background: #fcfcfa;
}

.table-scroll { max-width: 100%; overflow-x: auto; margin: 0; }
.content-table { width: 100%; border-collapse: collapse; min-width: 540px; }
.content-table th,
.content-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #deded8;
  text-align: left;
  vertical-align: top;
}
.content-table th { font-size: .85rem; color: #555; }

.day-end {
  scroll-margin-top: 100px;
  display: grid;
  gap: 18px;
  margin: 72px 0 20px;
  padding-top: 34px;
  border-top: 2px solid #171717;
}
.final-heading { margin-bottom: 2px; }

.day-optional[hidden] { display: none !important; }
.day-optional {
  display: grid;
  gap: 18px;
  margin: 56px 0 20px;
  padding-top: 30px;
  border-top: 1px solid #cfcfc8;
  scroll-margin-top: 92px;
}
.optional-heading {
  display: grid;
  gap: 7px;
}
.optional-heading .eyebrow,
.optional-heading h2,
.optional-heading p {
  margin: 0;
}
.optional-lock-message {
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  border: 1px solid #d9d9d3;
  border-radius: 12px;
  background: #f1f1ec;
  color: #595954;
}
.optional-lock-message[hidden] { display: none; }
.optional-lock-message span { font-size: .9rem; }
.optional-content {
  display: grid;
  gap: 18px;
}
.day-optional.is-locked .optional-content {
  opacity: .36;
  filter: grayscale(.25);
}
.day-optional.is-unlocked .optional-heading .eyebrow {
  color: #24613c;
}

@media (min-width: 640px) {
  .content-process:not(.is-iterative) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .content-comparison {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }
}

@media (min-width: 900px) {
  .content-process {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .content-process.is-iterative li:last-child {
    grid-column: auto;
  }
}


/* Public Edu homepage */
.home-shell {
  max-width: 1180px;
  padding-top: 18px;
}
.home-header,
.home-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.home-header {
  padding: 8px 0 24px;
}
.home-brand,
.home-nav a,
.home-button {
  color: inherit;
  text-decoration: none;
}
.home-brand {
  font-weight: 800;
  letter-spacing: -.02em;
}
.home-nav {
  display: flex;
  gap: 18px;
  font-size: .92rem;
}
.home-nav a {
  color: #555;
}
.home-hero {
  display: grid;
  align-content: end;
  min-height: min(70vh, 720px);
  padding: 72px 0 82px;
  border-bottom: 1px solid #d9d9d3;
}
.home-hero h1 {
  max-width: 900px;
  margin: 8px 0 20px;
  font-size: clamp(3rem, 9vw, 7.2rem);
  line-height: .9;
  letter-spacing: -.06em;
}
.home-lead {
  max-width: 700px;
  margin: 0;
  color: #50504b;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}
.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.home-button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid #bfbfb8;
  border-radius: 999px;
  background: #fff;
  font-weight: 650;
}
.home-button-primary {
  border-color: #171717;
  background: #171717;
  color: #fff;
}
.home-section,
.home-access {
  padding: 80px 0;
}
.home-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  max-width: 760px;
  margin-bottom: 34px;
}
.home-section-heading h2,
.home-access h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: .98;
  letter-spacing: -.045em;
}
.home-section-heading > p:last-child,
.home-access p {
  color: #575752;
  font-size: 1.05rem;
}
.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.home-card {
  min-height: 220px;
  padding: 22px;
  border: 1px solid #d9d9d3;
  border-radius: 18px;
  background: #fff;
}
.home-card-number {
  display: block;
  margin-bottom: 64px;
  color: #76766f;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
}
.home-card h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}
.home-card p {
  margin: 0;
  color: #60605a;
}
.home-access {
  display: grid;
  gap: 28px;
  border-top: 1px solid #d9d9d3;
  border-bottom: 1px solid #d9d9d3;
}
.home-access > div {
  max-width: 720px;
}
.home-access-note {
  margin: 0;
  font-weight: 700;
}
.home-footer {
  padding: 26px 0 10px;
  color: #66665f;
  font-size: .9rem;
}
@media (min-width: 760px) {
  .home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-access { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
}
@media (max-width: 620px) {
  .home-nav { display: none; }
  .home-header { padding-bottom: 8px; }
  .home-hero { min-height: auto; padding: 64px 0 70px; }
  .home-actions { display: grid; }
  .home-button { justify-content: center; }
  .home-footer { align-items: flex-start; flex-direction: column; gap: 4px; }
}


/* Course shell and overview */
.course-shell-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 20px;
  border-bottom: 1px solid #d9d9d3;
}
.course-shell-brand,
.course-shell-overview-link,
.course-day-card,
.course-day-nav-link {
  color: inherit;
  text-decoration: none;
}
.course-shell-brand {
  font-weight: 800;
  letter-spacing: -.02em;
}
.course-shell-overview-link {
  color: #5e5e58;
  font-size: .92rem;
  font-weight: 650;
  text-align: right;
}
.course-overview-hero {
  padding: 54px 0 34px;
}
.course-overview-hero h1 {
  margin: 8px 0 14px;
  font-size: clamp(2.7rem, 10vw, 5.6rem);
  line-height: .94;
  letter-spacing: -.055em;
}
.course-overview-hero > p:not(.eyebrow):not(.course-overview-meta) {
  max-width: 720px;
  color: #55554f;
  font-size: 1.05rem;
}
.course-overview-meta {
  margin: 22px 0 0;
  color: #707069;
  font-size: .9rem;
  font-weight: 650;
}
.course-day-list {
  display: grid;
  gap: 10px;
  padding-bottom: 64px;
}
.course-day-card {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
  gap: 7px 14px;
  align-items: baseline;
  padding: 18px;
  border: 1px solid #d9d9d3;
  border-radius: 16px;
  background: #fff;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.course-day-number {
  color: #6b6b64;
  font-size: .82rem;
  font-weight: 700;
}
.course-day-card strong {
  min-width: 0;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}
.course-day-status {
  grid-column: 2;
  color: #77776f;
  font-size: .86rem;
}
.course-day-card.is-started .course-day-status {
  color: #4e4e49;
}
.course-day-card.is-complete .course-day-status {
  color: #24613c;
  font-weight: 700;
}
.course-day-card.is-locked {
  background: #f5f5f1;
  color: #8a8a82;
  cursor: not-allowed;
}
.course-day-card.is-locked .course-day-status {
  color: #8a8a82;
}
.course-day-card.is-early-access {
  border-style: dashed;
}
.course-day-card.is-early-access .course-day-status {
  color: #5d5d57;
  font-weight: 700;
}
.course-day-navigation {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 64px 0 8px;
  padding-top: 24px;
  border-top: 1px solid #d9d9d3;
}
.course-day-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #cfcfc8;
  border-radius: 999px;
  background: #fff;
  font-weight: 650;
}
.course-day-nav-overview {
  color: #5e5e58;
  font-weight: 600;
}
.course-day-nav-spacer {
  display: none;
}

@media (hover: hover) {
  .course-day-card:hover {
    border-color: #a9a9a1;
    box-shadow: 0 8px 24px rgba(0,0,0,.045);
    transform: translateY(-1px);
  }
  .course-day-nav-link:hover {
    background: #f1f1ed;
  }
}

@media (min-width: 640px) {
  .course-shell-bar {
    padding: 10px 0 22px;
  }
  .course-overview-hero {
    padding: 68px 0 42px;
  }
  .course-day-card {
    grid-template-columns: 90px minmax(0, 1fr) auto;
    gap: 16px;
    padding: 20px 22px;
  }
  .course-day-status {
    grid-column: auto;
    text-align: right;
  }
  .course-day-navigation {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .course-day-navigation > :last-child {
    justify-self: end;
  }
  .course-day-nav-spacer {
    display: block;
  }
}


/* Course resume */
.course-resume {
  display: grid;
  gap: 7px;
  margin: 0 0 28px;
  padding: 20px;
  border: 1px solid #cfcfc8;
  border-radius: 18px;
  background: #f1f1ec;
}
.course-resume .eyebrow,
.course-resume-copy {
  margin: 0;
}
.course-resume-title {
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  line-height: 1.15;
}
.course-resume-copy {
  color: #60605a;
  font-size: .92rem;
}
.course-resume-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  margin-top: 8px;
  padding: 10px 17px;
  border: 1px solid #171717;
  border-radius: 999px;
  background: #171717;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
@media (hover: hover) {
  .course-resume-action:hover { background: #2b2b2b; }
}
@media (min-width: 640px) {
  .course-resume {
    padding: 24px;
  }
}


/* Learner dashboard and navigation */
.learner-bar {
  display: flex;
  align-items: center;
  min-height: 52px;
  margin-bottom: 28px;
  border-bottom: 1px solid #d9d9d3;
}
.learner-home-link {
  color: inherit;
  font-weight: 750;
  text-decoration: none;
}
.courses-dashboard-hero {
  max-width: 720px;
  padding: 16px 0 34px;
}
.courses-dashboard-hero h1 {
  margin: 4px 0 12px;
  font-size: clamp(2.4rem, 10vw, 4.5rem);
  line-height: .98;
  letter-spacing: -.045em;
}
.courses-dashboard-hero > p:last-child { color: #595954; }
.courses-dashboard-grid {
  display: grid;
  gap: 14px;
}
.courses-dashboard-card {
  display: block;
  padding: 22px;
  border: 1px solid #d9d9d3;
  border-radius: 18px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.035);
}
.courses-dashboard-card h2 {
  margin: 0 0 10px;
  font-size: 1.55rem;
  line-height: 1.1;
}
.courses-dashboard-card > p:not(.eyebrow) { color: #595954; }
.courses-dashboard-action { font-weight: 700; }
.courses-dashboard-empty {
  padding: 22px;
  border: 1px solid #d9d9d3;
  border-radius: 18px;
  background: #fff;
}
.courses-dashboard-empty p { margin-bottom: 0; color: #595954; }
.learner-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: .9rem;
}
.learner-breadcrumbs a { color: inherit; text-decoration: none; font-weight: 650; }
.learner-breadcrumbs [aria-current="page"] { color: #656565; }
.learner-breadcrumb-separator { color: #96968f; }

@media (hover: hover) {
  .courses-dashboard-card:hover { border-color: #a8a8a1; transform: translateY(-1px); }
  .learner-home-link:hover, .learner-breadcrumbs a:hover { text-decoration: underline; }
}

@media (min-width: 640px) {
  .courses-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .courses-dashboard-card { padding: 26px; }
}

/* Web Engineering KT01: focused lessons, accessible review navigation. */
.lesson-focus-nav { display: grid; gap: 12px; margin: 0 0 26px; padding: 16px; border: 1px solid #deded7; border-radius: 16px; background: #fff; scroll-margin-top: 100px; }
.lesson-focus-intro { margin: 0; font-size: .9rem; color: #555; }
.lesson-focus-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 8px; }
.lesson-focus-item { width: 100%; min-height: 48px; text-align: left; border-radius: 10px; font-size: .85rem; font-weight: 600; padding: 11px 12px; line-height: 1.3; }
.lesson-focus-item.is-current { border-color: #171717; }
.lesson-focus-item.is-complete::before { content: '✓ '; }
.lesson-focus-item[aria-current="step"] { background: #171717; color: white; }
.lesson-focus-item:disabled { opacity: .45; cursor: default; }
.unit[hidden], .day-end[hidden] { display: none !important; }


/* Reusable matching exercise: drag-and-drop + keyboard/tap selection. */
.matching { display: grid; gap: 14px; }
.matching-instructions { color: #555; font-size: .93rem; }
.matching-board { display: grid; gap: 18px; min-width: 0; }
.matching-sources, .matching-targets { min-width: 0; }
.matching-sources h4, .matching-targets h4 { margin: 0 0 10px; }
.matching-source-list, .matching-target-list { display: grid; gap: 9px; }
.matching-card { display: grid; gap: 5px; width: 100%; height: auto; min-height: 66px; padding: 12px 14px; text-align: left; border-radius: 12px; background: #fafaf8; cursor: grab; line-height: 1.35; white-space: normal; }
.matching-card:active { cursor: grabbing; }
.matching-card-text { font-weight: 600; }
.matching-assignment, .matching-result, .matching-zone-count { display: block; font-size: .8rem; color: #555; }
.matching-card.is-selected { outline: 3px solid #171717; outline-offset: 1px; background: #fff; }
.matching-card.is-correct { border: 2px solid #287347; background: #e6f4ea; box-shadow: inset 5px 0 0 #287347; }
.matching-card.is-incorrect { border: 2px solid #a83232; background: #fce9e9; box-shadow: inset 5px 0 0 #a83232; }
.matching-card.is-correct .matching-result { color: #14532d; font-size: .96rem; font-weight: 800; }
.matching-card.is-incorrect .matching-result { color: #8b1e1e; font-size: .96rem; font-weight: 800; }
.matching-card.is-correct .matching-card-text, .matching-card.is-incorrect .matching-card-text { font-weight: 700; }
.matching-zone { min-width: 0; padding: 12px; border: 2px dashed #c7c7bd; border-radius: 12px; background: #f8f8f5; }
.matching-zone.is-over { border-color: #171717; background: #eee; }
.matching-zone-action { width: 100%; border-radius: 9px; font-weight: 700; background: #fff; }
.matching-zone-count { margin: 8px 0 0; }
.matching-zone-values { margin: 8px 0 0; padding-left: 20px; font-size: .88rem; }
.matching-zone-values li { margin-block: 3px; overflow-wrap: anywhere; }
.matching-feedback { margin: 0; min-height: 1.5em; font-size: .9rem; }
.matching-check { width: max-content; max-width: 100%; }
.matching-follow-up { display: grid; gap: 8px; }
.matching-follow-up label { font-weight: 600; }
.matching-follow-up textarea { width: 100%; }
.matching-previous { border-top: 1px solid #deded7; padding-top: 10px; overflow-wrap: anywhere; }
.is-readonly .matching-card { cursor: default; }
@media (min-width: 760px) {
  .matching-board { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; gap: 20px; }
}

/* Instant answer feedback for single-choice questions. */
.answer.answer-correct { border: 2px solid #287347; background: #e6f4ea; box-shadow: inset 5px 0 0 #287347; }
.answer.answer-incorrect { border: 2px solid #a83232; background: #fce9e9; box-shadow: inset 5px 0 0 #a83232; }
.answer-text { flex: 1 1 auto; min-width: 0; }
.answer-result { flex: 0 0 auto; font-weight: 800; font-size: .92rem; }
.answer-correct .answer-result { color: #14532d; }
.answer-incorrect .answer-result { color: #8b1e1e; }
@media (max-width: 620px) { .answer { flex-wrap: wrap; } .answer-result { flex-basis: 100%; padding-left: 23px; } }

/* Meaningful destination at the end of a published course day. */
.day-finish-panel[hidden] { display: none !important; }
.day-finish-panel { margin-top: 18px; padding: 18px; border: 1px solid #d9d9d3; border-radius: 14px; background: #f8f8f4; }
.day-finish-panel h3 { margin: 0 0 8px; }
.day-finish-panel p { margin: 0 0 12px; line-height: 1.5; }
.day-finish-panel .day-finish-note { color: #575750; font-size: .9rem; }
.day-finish-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.day-finish-links a, .day-finish-links button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border: 1px solid #c6c6be; border-radius: 999px; background: white; color: #171717; text-decoration: none; font: inherit; }
.day-finish-links a:hover, .day-finish-links button:hover { background: #eeeee8; }

/* Re-triggered every time the learner requests the day summary. */
.day-finish-panel.is-highlighted {
  animation: day-finish-attention 1.1s ease-out;
}
@keyframes day-finish-attention {
  0% { box-shadow: 0 0 0 4px rgba(23, 23, 23, .25); border-color: #171717; background: #eeeee7; }
  55% { box-shadow: 0 0 0 3px rgba(23, 23, 23, .10); }
  100% { box-shadow: 0 0 0 0 rgba(23, 23, 23, 0); border-color: #d9d9d3; background: #f8f8f4; }
}
@media (prefers-reduced-motion: reduce) {
  .day-finish-panel.is-highlighted { animation: none; outline: 3px solid #171717; outline-offset: 2px; }
}

/* Completion is distinct from which lesson is currently open. */
.lesson-focus-item { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; }
.lesson-focus-name { display: block; }
.lesson-focus-status { font-size: .76rem; font-weight: 500; opacity: .83; }
.lesson-focus-item.is-complete { border-color: #287347; background: #eef7ef; }
.lesson-focus-item.is-complete::before { content: none; }
.lesson-focus-item.is-partial { border-color: #aaa99e; background: #f7f7f1; }
.lesson-focus-item[aria-current="step"] { background: #171717; border-color: #171717; color: white; }
.progress-step-status[hidden] { display: none; }
.progress-step-status { display: inline-flex; width: fit-content; padding: 6px 11px; border: 1px solid #b7d3bb; border-radius: 999px; background: #eef7ef; color: #245e37; font-size: .8rem; font-weight: 700; }
.progress-step.is-revising .progress-step-status { border-color: #ccc9bd; background: #f5f5ef; color: #555; }

/* Repeat lesson overview after the lesson, before day-level links. */
.lesson-focus-nav--bottom { margin-top: 36px; margin-bottom: 20px; }
.lesson-focus-nav--bottom + .course-day-navigation { margin-top: 0; }

/* Programming-friendly desktop layout: persistent lesson rail, wide work area.
   Under 1280px, retain the two in-flow navigation controls. */
.course-learning-layout, .course-learning-content { min-width: 0; }
@media (min-width: 1280px) {
  .app-shell:has(.course-learning-layout) { max-width: 1480px; padding-inline: 32px; }
  .course-learning-layout {
    display: grid;
    grid-template-columns: 256px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }
  .course-learning-content { min-width: 0; }
  .course-learning-layout > .lesson-focus-nav {
    position: sticky;
    top: 108px;
    max-height: calc(100vh - 124px);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 12px;
    align-self: start;
  }
  .course-learning-layout > .lesson-focus-nav .lesson-focus-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .course-learning-layout > .lesson-focus-nav .lesson-focus-item { overflow-wrap: anywhere; }
  .course-learning-content > .lesson-focus-nav--bottom { display: none; }
  .course-learning-content > .course-day-navigation { margin-top: 36px; }
}

/* Strong, brief destination cue for navigating from L3 back to the L2 project task. */
.progress-step > .task.card.is-project-link-highlighted{
  position:relative;
  z-index:1;
  animation:uiux-project-link-focus 1.9s ease-out both;
}
@keyframes uiux-project-link-focus{
  0%{box-shadow:0 0 0 6px rgba(35,115,70,.55),0 10px 30px rgba(20,80,42,.15);background-color:#dcf2e1;border-color:#398358}
  38%{box-shadow:0 0 0 5px rgba(35,115,70,.36),0 7px 18px rgba(20,80,42,.10);background-color:#eaf7ed;border-color:#72a77e}
  100%{box-shadow:0 8px 24px rgba(0,0,0,.035);background-color:#fff;border-color:#d9d9d3}
}
@media(prefers-reduced-motion:reduce){
  .progress-step > .task.card.is-project-link-highlighted{
    animation:none;
    outline:4px solid #287347;
    outline-offset:3px;
  }
}

/* Replayed on every successful next-step navigation, including at page bottom. */
.progress-step.is-next-highlighted,
.day-optional.is-next-highlighted {
  animation: next-step-feedback 1.25s ease-out;
}
@keyframes next-step-feedback {
  0% { box-shadow: 0 0 0 5px rgba(35, 105, 66, .35); background-color: rgba(221, 243, 226, .72); }
  60% { box-shadow: 0 0 0 3px rgba(35, 105, 66, .16); background-color: rgba(221, 243, 226, .3); }
  100% { box-shadow: 0 0 0 0 rgba(35, 105, 66, 0); background-color: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .progress-step.is-next-highlighted,
  .day-optional.is-next-highlighted {
    animation: none;
    outline: 3px solid #287347;
    outline-offset: 3px;
  }
}


/* Reusable HTML Tree Lab */
.html-tree-lab { display: grid; gap: 16px; min-width: 0; }
.html-tree-intro, .html-tree-status { margin: 0; }
.html-tree-status { font-weight: 650; }
.html-tree-panels, .html-tree-construct-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.html-tree-panel { min-width: 0; padding: 14px; border: 1px solid #d9d9d2; border-radius: 12px; background: #fafaf8; }
.html-tree-panel h4, .html-tree-detail-heading { margin: 0 0 12px; }
.html-tree-code { display: grid; gap: 3px; max-width: 100%; overflow-x: auto; }
.html-tree-code-line { display: block; width: 100%; min-width: max-content; min-height: 32px; padding: 5px 10px; border: 1px solid transparent; background: none; border-radius: 7px; color: #171717; text-align: left; font: inherit; }
.html-tree-code-line code { font-size: .83rem; white-space: pre; }
.html-tree-code-line:hover:not(:disabled), .html-tree-node-button:hover { background: #eaeae5; }
.html-tree-code-line:disabled { cursor: default; opacity: 1; }
.html-tree-list { margin: 0; padding-left: 18px; list-style: none; border-left: 1px solid #c3cbc4; }
.html-tree-visual > .html-tree-list { padding-left: 0; border-left: 0; }
.html-tree-node { min-width: 0; margin: 7px 0; }
.html-tree-node-button, .html-tree-node-label { display: inline-block; padding: 6px 10px; border-radius: 8px; border: 1px solid #c8cbc7; background: white; color: #171717; overflow-wrap: anywhere; }
.html-tree-node-button { text-align: left; min-height: 38px; max-width: 100%; }
.html-tree-node-button.is-selected, .html-tree-code-line.is-selected { border-color: #275f4b; background: #dff0e6; }
.html-tree-lab button:focus-visible, .html-tree-lab select:focus-visible { outline: 3px solid #19795b; outline-offset: 2px; }
.html-tree-relations { display: grid; grid-template-columns: minmax(95px, 1fr) minmax(0, 2fr); gap: 6px 12px; margin: 0; }
.html-tree-relations dt { font-weight: 700; }
.html-tree-relations dd { margin: 0; overflow-wrap: anywhere; }
.html-tree-current-label { color: #275f4b; }
.html-tree-current-node {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  max-width: 100%;
  padding: 5px 11px;
  border: 2px solid #275f4b;
  border-radius: 8px;
  background: #dff0e6;
  color: #184734;
  font: 700 .92rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}
.html-tree-question, .html-tree-placement { display: grid; gap: 5px; padding: 10px; border: 1px solid #e0e0d9; border-radius: 9px; }
.html-tree-question label, .html-tree-placement label { font-weight: 600; }
.html-tree-question select, .html-tree-placement select { width: 100%; max-width: 100%; min-height: 44px; padding: 8px; border-radius: 8px; border: 1px solid #a6ada8; background: #fff; color: #171717; font: inherit; }
.html-tree-construct-controls { display: grid; align-content: start; gap: 9px; min-width: 0; }
.html-tree-construct-target { align-items: start; }
.html-tree-target-code {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
  font: .84rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.html-tree-construct-instruction { margin: 0; font-weight: 650; }
.html-tree-constructed { min-height: 72px; }
.html-tree-missing { font-size: .87rem; color: #555; overflow-wrap: anywhere; }
.html-tree-answer-feedback { font-size: .85rem; }
.html-tree-answer-feedback.is-correct { color: #17633c; font-weight: 650; }
.html-tree-answer-feedback.is-incorrect { color: #a02828; font-weight: 650; }
@media (max-width: 660px) {
  .html-tree-panels, .html-tree-construct-layout { grid-template-columns: minmax(0,1fr); }
  .html-tree-panel { padding: 11px; }
}


/* Relationship exploration: selected element stays green, related nodes are blue. */
.html-tree-code-line.is-related:not(.is-selected),
.html-tree-node-button.is-related:not(.is-selected) {
  border-color: #245eaf;
  background: #dceaff;
  box-shadow: inset 3px 0 0 #245eaf;
}
.html-tree-relation-hint { margin: 0; color: #555; font-size: .86rem; }
.html-tree-relation-status { margin: 0; min-height: 1.4em; font-size: .86rem; color: #285080; }
.html-tree-relations { align-items: center; }
.html-tree-related-items { line-height: 2.5; }
.html-tree-relation-label, .html-tree-related-node {
  display: inline-block;
  min-height: 36px;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #171717;
  line-height: 1.4;
  text-align: left;
  overflow-wrap: anywhere;
}
.html-tree-relation-label { font-weight: 700; padding-inline: 0; }
.html-tree-relation-label:hover, .html-tree-related-node:hover,
.html-tree-relation-label.is-active, .html-tree-related-node.is-active {
  border-color: #245eaf;
  background: #dceaff;
}
.html-tree-relation-label.is-active { padding-inline: 8px; }
.html-tree-related-node { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
@media (max-width: 660px) {
  .html-tree-relation-label, .html-tree-related-node { min-height: 44px; }
}


/* Emmet Lab: shared, responsive learning interaction. */
.emmet-lab { display:grid;gap:16px;min-width:0; }
.emmet-intro, .emmet-status { margin:0; }
.emmet-examples { display:flex;flex-wrap:wrap;align-items:center;gap:8px; }
.emmet-examples strong { width:100%; }
.emmet-example { min-height:38px;padding:7px 10px;border:1px solid #b6c7bb;border-radius:8px;background:#f4f8f5; }
.emmet-example:hover { background:#e0efe5; }
.emmet-example.is-selected {
  background:#275f4b;
  border-color:#275f4b;
  color:#fff;
  font-weight:700;
  box-shadow:0 0 0 2px rgba(39,95,75,.2);
}
.emmet-example.is-selected:hover { background:#1f4d3e; }
.emmet-editor-label { font-weight:700; }
.emmet-editor { display:block;width:100%;min-height:92px;resize:vertical;font: 1rem/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;padding:12px;border-radius:9px;border:1px solid #aaa; }
.emmet-panels { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px; }
.emmet-panel { padding:14px;border:1px solid #d9d9d2;border-radius:12px;background:#fafaf8;min-width:0; }
.emmet-panel h4 { margin:0 0 10px; }
.emmet-html { margin:0 0 12px;max-width:100%;overflow-x:auto;white-space:pre;font:.86rem/1.65 ui-monospace,SFMono-Regular,Consolas,monospace; }
.emmet-tree { overflow-x:auto; }
.emmet-tree-list { list-style:none;border-left:1px solid #b7c8b9;padding-left:14px;margin:0; }
.emmet-tree-node { margin:5px 0;min-width:0;overflow-wrap:anywhere; }
.emmet-tree-tag { display:inline-block;background:#e1efe7;border:1px solid #abcbb9;border-radius:6px;padding:3px 7px;font: .85rem ui-monospace,SFMono-Regular,Consolas,monospace; }
.emmet-tree-attrs,.emmet-tree-text { display:inline-block;margin-left:7px;color:#555; }
.emmet-status.is-invalid {color:#a02828;}
.emmet-status.is-valid {color:#17633c;font-weight:700;}
.emmet-lab :is(button,textarea):focus-visible{outline:3px solid #19795b;outline-offset:2px;}
@media (max-width:660px){.emmet-panels{grid-template-columns:minmax(0,1fr);}.emmet-panel{padding:11px;}}


/* XML Tree Lab: linked editor, hierarchy and selectable attributes. */
.xml-tree-lab { display:grid; gap:14px; min-width:0; }
.xml-tree-editor-label { display:grid; gap:8px; font-weight:700; }
.xml-tree-editor { width:100%; min-width:0; min-height:170px; padding:12px; border:1px solid #aeb7b3; border-radius:10px; resize:vertical; font: .88rem/1.55 ui-monospace,SFMono-Regular,Consolas,monospace; font-weight:400; }
.xml-tree-panels { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.xml-tree-panel { min-width:0; padding:14px; border:1px solid #d9d9d2; border-radius:12px; background:#fafaf8; }
.xml-tree-panel h4 { margin:0 0 10px; }
.xml-tree-code,.xml-tree-visual { overflow-x:auto; max-width:100%; }
.xml-tree-code-row,.xml-tree-code-text,.xml-tree-code-close { white-space:pre; font:.86rem/1.55 ui-monospace,SFMono-Regular,Consolas,monospace; }
.xml-tree-code-button { min-height:32px; border:1px solid transparent; border-radius:7px; background:transparent; text-align:left; font:inherit; padding:4px 8px; }
.xml-tree-code-close,.xml-tree-code-text { color:#555; }
.xml-tree-list { list-style:none; border-left:1px solid #c3cbc4; padding-left:15px; margin:0; }
.xml-tree-root { border-left:0; padding-left:0; }
.xml-tree-node { margin:7px 0; }
.xml-tree-node-row { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.xml-tree-node-button,.xml-tree-attribute { min-height:36px; border:1px solid #c8cbc7; border-radius:8px; background:white; padding:5px 9px; font:.86rem/1.4 ui-monospace,SFMono-Regular,Consolas,monospace; }
.xml-tree-attribute { background:#eef4ff; border-color:#bdd0ed; }
.xml-tree-text { font-size:.83rem; color:#555; }
.xml-tree-lab button.is-selected { background:#dff0e6; border-color:#275f4b; color:#184734; box-shadow:inset 3px 0 0 #275f4b; }
.xml-tree-lab button:hover { background:#e5eee8; }
.xml-tree-detail { padding:12px; border:1px solid #bfd3c5; border-radius:9px; background:#f1f8f3; font-weight:600; }
.xml-tree-status,.xml-tree-progress,.xml-tree-intro { margin:0; }
.xml-tree-status.is-invalid { color:#a02828; font-weight:650; }
.xml-tree-status.is-valid { color:#17633c; }
.xml-tree-lab :is(button,textarea):focus-visible { outline:3px solid #19795b; outline-offset:2px; }
@media(max-width:660px) { .xml-tree-panels { grid-template-columns:minmax(0,1fr); } .xml-tree-panel { padding:11px; } }


/* Guided XML writing for complete beginners. */
.xml-tag-trainer{display:grid;gap:13px;min-width:0}
.xml-tag-trainer-progress,.xml-tag-trainer-title,.xml-tag-trainer-instructions{margin:0}
.xml-tag-trainer-progress{font-weight:700;color:#275f4b}
.xml-tag-trainer-meter{width:100%;height:12px;accent-color:#287347}
.xml-tag-trainer-title{font-size:1.08rem}
.xml-tag-trainer-label{display:grid;gap:8px;font-weight:650}
.xml-tag-trainer-editor{width:100%;min-width:0;min-height:100px;padding:12px;resize:vertical;border:1px solid #aeb7b3;border-radius:9px;font:1rem/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;font-weight:400}
.xml-tag-trainer-feedback{padding:11px 12px;border:1px solid #d5d7d0;border-radius:9px;background:#f7f7f3;margin:0}
.xml-tag-trainer-feedback.is-correct{border-color:#8cbea1;background:#edf8f0;color:#17633c;font-weight:700}
.xml-tag-trainer-feedback.is-incorrect{border-color:#d9a29a;background:#fff0ee;color:#9e2929;font-weight:650}
.xml-tag-trainer-hint{margin:0;padding:10px 12px;border-left:3px solid #245eaf;background:#eef4ff}
.xml-tag-trainer-explanation{margin:0;color:#275f4b}
.xml-tag-trainer-actions{display:flex;flex-wrap:wrap;gap:8px}
.xml-tag-trainer-actions button{border:1px solid #b4bdb7;background:#fff;border-radius:9px;padding:8px 12px}
.xml-tag-trainer-actions .xml-tag-trainer-check,.xml-tag-trainer-actions .xml-tag-trainer-next{background:#275f4b;color:#fff;border-color:#275f4b}
.xml-tag-trainer-actions button:disabled{opacity:.5;cursor:not-allowed}
.xml-tag-trainer :is(button,textarea):focus-visible{outline:3px solid #19795b;outline-offset:2px}
@media(max-width:520px){.xml-tag-trainer-actions button{flex:1 1 42%}}


/* The five tiny XML exercises have a visible, non-interactive progress trail. */
.xml-tag-trainer-track {
  display:flex; gap:9px; flex-wrap:wrap; align-items:center;
  list-style:none; margin:0; padding:0;
}
.xml-tag-trainer-step {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:38px; min-height:38px; padding:5px 9px;
  border:1px solid #c9cec8; border-radius:999px;
  background:#f6f7f4; color:#555; font-weight:700;
}
.xml-tag-trainer-step.is-current {
  border:2px solid #245bff; background:#eef4ff; color:#174c9e;
}
.xml-tag-trainer-step.is-done {
  border-color:#6aa583; background:#def3e5; color:#17633c;
}
.xml-tag-trainer-step.is-done.is-current {
  border:2px solid #208252; background:#def3e5; color:#17633c;
}
.xml-tag-trainer-feedback.is-fresh-success {
  animation:xml-tag-success 1.3s ease-out;
}
@keyframes xml-tag-success {
  0% { box-shadow:0 0 0 0 rgba(32,130,82,.5); transform:scale(1); }
  22% { box-shadow:0 0 0 5px rgba(32,130,82,.25); transform:scale(1.01); }
  100% { box-shadow:0 0 0 0 rgba(32,130,82,0); transform:scale(1); }
}
@media(prefers-reduced-motion:reduce){
  .xml-tag-trainer-feedback.is-fresh-success{animation:none;outline:2px solid #208252;outline-offset:2px}
}


/* Read-only, keyboard-accessible JSON / XML / YAML reading comparison. */
.format-code-tabs{display:grid;gap:13px;min-width:0}
.format-code-tabs-intro,.format-code-tabs-note{margin:0;color:#525b55}
.format-code-tabs-list{display:flex;gap:7px;flex-wrap:wrap;border-bottom:1px solid #ced5cf;padding-bottom:8px}
.format-code-tabs-tab{min-height:44px;border:1px solid #becac1;border-radius:10px;padding:9px 17px;background:#fff;color:#27382f;font-weight:700}
.format-code-tabs-tab.is-selected{background:#225d49;border-color:#225d49;color:#fff}
.format-code-tabs-tab:focus-visible{outline:3px solid #2b73ce;outline-offset:2px}
.format-code-tabs-panel{display:grid;gap:12px;min-width:0}
.format-code-tabs-panel[hidden]{display:none}
.format-code-tabs-context{margin:0}
.format-code-tabs-example{min-width:0}
.format-code-tabs-example h4,.format-code-tabs-output h4{margin:0 0 6px;font-size:.98rem}
.format-code-tabs-code{margin:0;padding:12px;background:#f3f5f3;border:1px solid #d4ded6;border-radius:10px;overflow-x:auto;white-space:pre;font:.88rem/1.55 ui-monospace,SFMono-Regular,Consolas,monospace}
.format-code-tabs-output{padding:12px;border:1px solid #a4c6ac;background:#f1f9f2;border-radius:10px}
.format-code-tabs-result{margin:0;font-weight:750;color:#1b673d}
.format-code-tabs-explanation{margin:7px 0 0}

/* Context and example cards are readable starting situations, not progress steps. */
.context-card {
  scroll-margin-top: 110px;
  border: 1px solid #bdd4c6;
  border-left: 5px solid #28704e;
  background: #f8fcf9;
  padding: 20px 22px;
  min-width: 0;
}
.context-card > .eyebrow { color: #246145; }
.context-card > h3 { margin: 0 0 12px; }
.context-card > p:last-child { margin-bottom: 0; }
.context-card pre {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid #d2ded6;
  background: #fff;
  border-radius: 9px;
  padding: 14px;
}
@media (max-width: 600px) { .context-card { padding: 16px; } }

/* CSS Lab: responsive editor and sandboxed live preview. */
.css-lab { display:grid; gap:14px; min-width:0; }
.css-lab-panels { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.css-lab-panel { min-width:0; display:grid; align-content:start; gap:10px; padding:14px; border:1px solid #d9d9d2; border-radius:12px; background:#fafaf8; }
.css-lab-panel h4 { margin:0; }
.css-lab-html { margin:0; padding:12px; max-width:100%; overflow-x:auto; white-space:pre; font:.85rem/1.5 ui-monospace,Consolas,monospace; background:white; border:1px solid #e2e2db; border-radius:8px; }
.css-lab-editor-label { font-weight:700; }
.css-lab-editor { width:100%; min-width:0; min-height:170px; resize:vertical; padding:12px; font:.95rem/1.6 ui-monospace,Consolas,monospace; border:1px solid #a6ada5; border-radius:8px; }
.css-lab-preview { display:block; width:100%; min-height:300px; background:white; border:1px solid #c9cdc7; border-radius:8px; }
.css-lab-toolbar { display:flex; flex-wrap:wrap; gap:10px; }
.css-lab-feedback { margin:0; }
.css-lab-feedback.is-valid { color:#17633c; font-weight:700; }
.css-lab-feedback.is-invalid { color:#a02828; }
.css-lab :is(button,textarea):focus-visible { outline:3px solid #19795b; outline-offset:2px; }
@media(max-width:660px) { .css-lab-panels {grid-template-columns:minmax(0,1fr)} .css-lab-panel{padding:11px} .css-lab-toolbar>button{width:100%} }

/* CSS Lab beginner autocomplete */
.css-lab-editor-wrap{position:relative;min-width:0}
.css-lab-suggestions{position:relative;display:grid;gap:2px;max-height:200px;overflow-y:auto;margin-top:5px;padding:5px;background:#fff;border:1px solid #c8d5cb;border-radius:10px;box-shadow:0 4px 12px rgba(0,0,0,.06)}
.css-lab-suggestions[hidden]{display:none}
.css-lab-suggestion{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:36px;padding:7px 10px;text-align:left;border:0;border-radius:6px;background:transparent}
.css-lab-suggestion strong{font:.9rem ui-monospace,Consolas,monospace}
.css-lab-suggestion span{font-size:.77rem;color:#555}
.css-lab-suggestion:hover,.css-lab-suggestion.is-selected{background:#e8f1eb}

/* Live Box Model diagram: nested layers with exact computed values. */
.css-box-model{min-width:0;display:grid;gap:8px;margin-top:6px}
.css-box-model h4,.css-box-model p{margin:0}
.css-box-intro{font-size:.85rem;color:#4b5563}
.css-box-figure{display:grid;gap:5px;min-width:0}
.css-box-layer{min-width:0;padding:9px;border-radius:6px;display:grid;gap:6px}
.css-box-margin{background:#f9e5be;border:1px solid #bb8c3d}
.css-box-border{background:#d9e8f9;border:1px solid #6594c3}
.css-box-padding{background:#d9edda;border:1px solid #73a478}
.css-box-content{background:#fff;border:1px solid #9aa9b8;text-align:center;align-items:center;justify-items:center;gap:2px;min-height:66px}
.css-box-title{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;font-size:.82rem}
.css-box-title>span,.css-box-content>span{font-size:.75rem;color:#344054}
.css-box-readings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 9px}
.css-box-reading{display:flex;flex-wrap:wrap;justify-content:space-between;gap:5px;font-size:.72rem}
.css-box-value,.css-box-content-size{font:600 .75rem ui-monospace,Consolas,monospace}
.css-box-footnote{font-size:.72rem;color:#646464}
@media(max-width:460px){.css-box-layer{padding:7px}.css-box-readings{grid-template-columns:1fr}}


/* Subtle matching-node emphasis in CSS selector examples. */
.selector-example-html .selector-target {
  background: #dceee3;
  color: #174b34;
  border-radius: 2px;
  font-weight: 700;
}


/* CSS specificity: input scores and real browser preview */
.css-specificity-lab{display:grid;gap:16px;min-width:0}
.css-specificity-intro{margin:0}
.css-specificity-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.css-specificity-rule{min-width:0;margin:0;padding:12px;border:1px solid #d0d8d1;border-radius:10px}
.css-specificity-rule legend{padding:0 4px;max-width:100%;overflow-wrap:anywhere}
.css-specificity-rule legend code{white-space:normal}
.css-specificity-score-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.css-specificity-label{display:grid;gap:5px;font-size:.85rem;min-width:0}
.css-specificity-input{width:100%;min-width:0;padding:9px;border:1px solid #aebbb2;border-radius:8px;font:inherit}
.css-specificity-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.css-specificity-panel{padding:14px;min-width:0;border:1px solid #d0d8d1;border-radius:10px;background:#fafbf9}
.css-specificity-panel h4{margin:0 0 12px}
.css-specificity-ranking{display:grid;gap:8px;padding-left:22px;margin:0 0 12px}
.css-specificity-ranked-item{padding:4px 0;overflow-wrap:anywhere}
.css-specificity-ranked-item code{font-family:ui-monospace,Consolas,monospace}
.css-specificity-swatch{display:inline-block;width:11px;height:11px;border-radius:3px;margin-right:8px;border:1px solid #999}
.css-specificity-number{margin-left:10px;font:600 .85rem ui-monospace,Consolas,monospace}
.css-specificity-summary,.css-specificity-note{margin:8px 0 0;color:#515d55;font-size:.85rem}
.css-specificity-target{display:block;overflow-wrap:anywhere;font: .8rem/1.6 ui-monospace,Consolas,monospace}
.css-specificity-preview{width:100%;height:92px;min-width:0;border:1px solid #d0d8d1;background:white;border-radius:8px;margin-top:10px}
.css-specificity-actions{display:flex;flex-wrap:wrap;gap:10px}
.css-specificity-feedback{margin:0}
.css-specificity-feedback.is-valid{color:#226b3d}
.css-specificity-feedback.is-invalid{color:#a02828}
.css-specificity-lab :is(button,input):focus-visible{outline:3px solid #19795b;outline-offset:2px}
@media(max-width:680px){.css-specificity-fields,.css-specificity-results{grid-template-columns:minmax(0,1fr)}}


/* Shared qualitative research workspaces */
.structured-reflection { display:grid;gap:18px;max-width:850px; }
.structured-reflection-field, .research-field {display:grid;gap:8px;min-width:0;}
.structured-reflection-field label,.research-field label{font-weight:700;font-size:.94rem;}
.structured-reflection-field textarea,.structured-reflection-field input,.structured-reflection-field select,
.research-field textarea,.research-field select{width:100%;max-width:100%;box-sizing:border-box;border:1px solid #b6b9b6;border-radius:10px;padding:11px 12px;font:inherit;background:#fff;color:#171717;}
.structured-reflection-field textarea:focus-visible,.structured-reflection-field input:focus-visible,.structured-reflection-field select:focus-visible,.research-field textarea:focus-visible,.research-field select:focus-visible{outline:3px solid #83b8f0;outline-offset:2px;}
.structured-reflection-prompt{margin:0;color:#515760;font-size:.92rem;}
.evidence-board,.journey-builder{display:grid;gap:16px;min-width:0;}
.research-workspace-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding-bottom:12px;border-bottom:1px solid #d9dedc;}
.research-counter,.research-kicker{font-size:.8rem;color:#535c66;font-weight:700;}
.evidence-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:14px;}
.evidence-source-list{display:grid;align-content:start;gap:9px;}
.evidence-note{text-align:left;display:grid;gap:7px;border:1px solid #d4d9d8;border-radius:12px;background:#f8f9f9;padding:14px;color:#222;cursor:pointer;}
.evidence-note.is-active{border:2px solid #23758b;background:#eff8fa;padding:13px;}
.evidence-note.is-complete .evidence-note-state{color:#176b43;}
.evidence-note-source{font-size:.75rem;text-transform:uppercase;letter-spacing:.07em;font-weight:800;color:#58626d;}
.evidence-note-text{line-height:1.5;font-weight:500;}
.evidence-note-state{font-size:.78rem;color:#646d73;}
.evidence-detail{min-width:0;border:1px solid #d6dce0;border-radius:14px;padding:18px;display:grid;align-content:start;gap:14px;background:#fff;}
.evidence-detail h4,.journey-editor h4{margin:0;}
.evidence-quote{border-left:3px solid #3a8497;padding:9px 12px;background:#f3f8f9;margin:0;line-height:1.5;}
.research-field-feedback{margin:0;color:#9f4724;font-size:.87rem;}
.research-source-footnote{font-size:.82rem;color:#58626d;line-height:1.5;margin:0;}
.journey-track{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:9px;align-items:stretch;}
.journey-step{display:flex;flex-direction:column;align-items:flex-start;gap:11px;text-align:left;border:1px solid #d8dedc;background:#f6f8f8;border-radius:12px;padding:14px;min-width:0;cursor:pointer;min-height:150px;}
.journey-step.is-active{border:2px solid #23758b;background:#eff8fa;padding:13px;}
.journey-step.has-pain{box-shadow:inset 0 -4px 0 #b96530;}
.journey-step-number{color:#5b6470;font-weight:800;font-size:.8rem;}
.journey-step-action{font-size:.85rem;line-height:1.45;color:#46515a;overflow-wrap:anywhere;}
.journey-step-marker{font-size:.76rem;font-weight:700;color:#9d4d23;margin-top:auto;min-height:1em;}
.journey-editor{display:grid;gap:14px;padding:18px;border-radius:14px;border:1px solid #d6dce0;background:#fff;min-width:0;}
.journey-pain-toggle{display:flex;gap:10px;align-items:center;font-weight:700;line-height:1.4;}
.journey-pain-toggle input{width:18px;height:18px;flex-shrink:0;}
.is-readonly .evidence-note,.is-readonly .journey-step{cursor:default;}
@media(max-width:720px){.evidence-layout{grid-template-columns:minmax(0,1fr)}.journey-track{grid-template-columns:repeat(2,minmax(0,1fr))}.evidence-detail,.journey-editor{padding:13px;}}
@media(max-width:380px){.journey-track{grid-template-columns:1fr}}

/* Compact introductory research activities */
.research-guidance{margin:0;padding:11px 14px;border-radius:10px;background:#eff5f7;color:#263c47;line-height:1.5}
.journey-guided-overview{display:grid;gap:6px;padding:12px 14px;background:#f7f8f8;border-radius:10px}
.journey-guided-overview p{margin:0;line-height:1.45;font-size:.93rem}

/* Immediate response on guided evidence selections */
.research-field-feedback.is-correct{color:#17643c;font-weight:650}
.research-field-feedback.is-incorrect{color:#9e2929;font-weight:650}
.research-field select.is-correct{border:2px solid #267847;background:#f0faf2}
.research-field select.is-incorrect{border:2px solid #ac3c38;background:#fff3f2}
.evidence-board.is-single .evidence-layout{grid-template-columns:minmax(0,1fr)}
.evidence-board.is-single .evidence-detail{max-width:900px}

/* Semantic HTML learning graphic: two usage contexts, no image asset. */
.context-contrast{display:grid;gap:15px;margin:17px 0}
.context-contrast-shared{text-align:center;border:1px solid #cfd8e1;border-radius:14px;padding:15px;background:#f3f6fa}
.context-contrast-shared strong{display:block;font-size:1.12rem}
.context-contrast-shared p{margin:7px 0 0}
.context-contrast-kicker{font-size:.76rem;font-weight:800;letter-spacing:.06em;color:#586d85}
.context-contrast-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.context-contrast-card{min-width:0;border:1px solid #cddbd7;border-radius:14px;background:#f4faf8;padding:16px}
.context-contrast-card:nth-child(even){background:#f1f5fc;border-color:#c7d5eb}
.context-contrast-card-top{display:flex;gap:12px;align-items:flex-start}
.context-contrast-card-top strong{font-size:1.05rem}
.context-contrast-card-top p{margin:5px 0 0;line-height:1.5;font-size:.9rem}
.context-contrast-symbol{display:grid;place-items:center;border-radius:12px;width:48px;height:48px;flex-shrink:0;background:#dfede8;color:#21584d;font-size:1.65rem}
.context-contrast-card:nth-child(even) .context-contrast-symbol{background:#dbe7f8;color:#274c7d}
.context-contrast-details{display:grid;gap:0;margin:15px 0 0}
.context-contrast-details>div{display:grid;grid-template-columns:115px minmax(0,1fr);gap:8px;padding:8px 0;border-top:1px solid #d5dfdb}
.context-contrast-details dt{font-weight:700;color:#344c55}
.context-contrast-details dd{margin:0;overflow-wrap:anywhere}
.context-contrast-impact{margin:14px 0 0;padding:10px;background:#fff;border-radius:9px;line-height:1.5}
.context-contrast-takeaway{margin:0;font-weight:700;line-height:1.5;text-align:center}
@media(max-width:680px){.context-contrast-grid{grid-template-columns:1fr}.context-contrast-card{padding:13px}}
@media(max-width:370px){.context-contrast-details>div{grid-template-columns:95px minmax(0,1fr)}}

/* Review existing own-project answers and assemble the final Research document. */
.research-review-guidance{color:#516174;font-size:.88rem;line-height:1.5;margin:10px 0 0}
.actions .research-review-action{background:#fff;border:1px solid #8d9cab;color:#263a50;border-radius:8px;padding:10px 14px;font:inherit;font-weight:650;cursor:pointer}
.actions .research-review-action:focus-visible,.research-document-actions button:focus-visible{outline:3px solid #86bcef;outline-offset:2px}
.research-document-preview{border-top:1px solid #dce3e8;margin-top:24px;padding-top:18px;display:grid;gap:14px}
.research-document-preview h4,.research-document-section h5{margin:0}
.research-document-actions{display:flex;gap:10px;flex-wrap:wrap}
.research-document-actions button{padding:10px 14px;border:1px solid #8e9eae;background:#f6f8fa;color:#21334a;border-radius:8px;font:inherit;font-weight:650;cursor:pointer}
.research-document-results{display:grid;gap:12px}
.research-document-section{padding:13px 16px;border:1px solid #dce3e8;border-radius:10px;background:#fafbfd}
.research-document-section p{margin:8px 0;overflow-wrap:anywhere;white-space:pre-wrap;line-height:1.5}

/* Saved transfer answers link directly to their editable source fields. */
.research-document-help{margin:0;color:#516174;font-size:.9rem}
.research-document-heading-link{padding:0;border:0;background:none;color:inherit;font:inherit;font-weight:inherit;text-align:left;cursor:pointer}
.research-document-entry{display:block;width:100%;margin:8px 0;padding:9px 11px;border:1px solid transparent;border-radius:7px;background:transparent;color:#21334a;font:inherit;text-align:left;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;cursor:pointer}
.research-document-entry:hover,.research-document-heading-link:hover{color:#a90060;text-decoration:underline}
.research-document-entry:hover{background:#fff;border-color:#dce3e8}
.research-document-entry:focus-visible,.research-document-heading-link:focus-visible{outline:3px solid #86bcef;outline-offset:2px}
.research-document-empty{color:#5b6776;font-style:italic}


/* Relevant saved answers belong directly in the transfer starting context. */
.research-context-answers{display:grid;gap:15px;margin-top:18px;padding-top:16px;border-top:1px solid #d4e3d9}
.research-context-answer-group{display:grid;gap:8px;min-width:0}
.research-context-answer-group h4{margin:0;font-size:.97rem}
.research-context-answer-link{width:100%;display:grid;gap:4px;padding:10px 12px;text-align:left;border:1px solid #d7e4da;border-radius:8px;background:#fff;color:#24382f;font:inherit;cursor:pointer;overflow-wrap:anywhere}
.research-context-answer-link strong{font-size:.85rem}
.research-context-answer-value{white-space:pre-wrap;line-height:1.5}
.research-context-answer-missing{color:#925317;font-style:italic}
.research-context-answer-link:hover{border-color:#28704e;background:#f0f8f2}
.research-context-answer-link:focus-visible{outline:3px solid #83b8f0;outline-offset:2px}

.research-context-answer-group{border:1px solid #d7e4da;border-radius:10px;background:#fff;overflow:hidden;gap:0}
.research-context-answer-summary{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:12px 14px;cursor:pointer;list-style-position:inside}
.research-context-answer-summary:hover{background:#f0f8f2}
.research-context-answer-summary:focus-visible{outline:3px solid #83b8f0;outline-offset:-3px}
.research-context-answer-title{font-weight:700;font-size:.97rem}
.research-context-answer-count{font-size:.8rem;color:#506758;white-space:nowrap}
.research-context-answer-group[open] .research-context-answer-summary{border-bottom:1px solid #d7e4da}
.research-context-answer-group>.research-context-answer-link{width:calc(100% - 20px);margin:8px 10px}

/* Explicit chevron makes collapsed groups recognisable as accordions. */
.research-context-answer-summary{display:grid;grid-template-columns:minmax(0,1fr) auto 22px;gap:10px;align-items:center;list-style:none}
.research-context-answer-summary::-webkit-details-marker{display:none}
.research-context-answer-summary::marker{content:""}
.research-context-answer-chevron{width:22px;height:22px;display:block;flex-shrink:0;color:#28704e;transition:transform .18s ease}
.research-context-answer-group[open] .research-context-answer-chevron{transform:rotate(180deg)}
@media(max-width:550px){.research-context-answer-summary{grid-template-columns:minmax(0,1fr) 22px}.research-context-answer-count{grid-column:1;grid-row:2}.research-context-answer-chevron{grid-column:2;grid-row:1 / span 2}}
@media(prefers-reduced-motion:reduce){.research-context-answer-chevron{transition:none}}

/* Keep the final transfer reminder visually separate from the following note. */
.transfer-task > .rich-callout + p{margin-top:14px}


/* Reusable JSON/BSON/CBOR byte comparison */
.binary-formats-lab { display: grid; gap: 14px; min-width: 0; }
.binary-input-label { display: grid; gap: 8px; font-weight: 650; }
.binary-input-label textarea { width: 100%; min-width: 0; font-weight: 400; }
.binary-status { margin: 0; line-height: 1.5; }
.binary-formats-results { min-width: 0; }
.binary-comparison-note { margin: 0 0 12px; color: #55554f; font-size: .92rem; }
.binary-format-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.binary-format-card { min-width: 0; padding: 14px; border: 1px solid #deded7; border-radius: 12px; background: #fbfbf8; }
.binary-format-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.binary-format-heading h4 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.binary-format-size { white-space: nowrap; font-variant-numeric: tabular-nums; }
.binary-format-delta { margin: 6px 0 0; color: #52524d; font-size: .86rem; }
.binary-section-label { font-size: .82rem; font-weight: 700; margin: 14px 0 6px; }
.binary-byte-strip { display: flex; flex-wrap: wrap; gap: 3px; padding: 8px; border-radius: 8px; background: #f0f0eb; }
.binary-byte { padding: 2px 3px; border-radius: 3px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .83rem; font-variant-numeric: tabular-nums; }
.binary-byte.is-changed { background: #ffe7ad; color: #643e06; outline: 1px solid #ac6a00; font-weight: 700; }
.binary-decoded { min-width: 0; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .86rem; }
@media (max-width: 920px) { .binary-format-grid { grid-template-columns: 1fr; } }

/* UTF-8 learner lab: characters, decimal codes and hexadecimal bytes */
.utf8-text-lab { display: grid; gap: 12px; min-width: 0; }
.utf8-step-progress { margin: 0; color: #275f4b; font-weight: 700; }
.utf8-step-title { margin: 0; font-size: 1.1rem; }
.utf8-step-instructions { margin: 0; line-height: 1.55; }
.utf8-step-label { display: grid; gap: 8px; font-weight: 650; }
.utf8-step-input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #aeb7b3; border-radius: 9px; font: 1rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 400; }
.utf8-step-output { display: grid; gap: 10px; min-width: 0; }
.utf8-step-total { margin: 0; font-weight: 700; }
.utf8-byte-table th, .utf8-byte-table td { font-variant-numeric: tabular-nums; }
.utf8-step-hex, .utf8-step-decoded { margin: 0; overflow-wrap: anywhere; }
.utf8-feedback { margin: 0; padding: 10px 12px; border-radius: 8px; border: 1px solid #d7dad4; background: #f8f8f6; }
.utf8-feedback.is-correct { background: #edf8f0; border-color: #8cbea1; color: #17633c; font-weight: 700; }
.utf8-feedback.is-incorrect { background: #fff0ed; border-color: #d7a097; color: #9e2f25; font-weight: 650; }
.utf8-step-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.utf8-step-hint { margin: 0; padding: 9px 12px; border-left: 3px solid #909da0; background: #f4f7f7; }
.utf8-step-explanation { margin: 0; line-height: 1.5; }

/* Guided UTF-8 practice: a visible three-step journey, one primary action at a time. */
.utf8-workflow { padding: 16px; border: 1px solid #d7ddd6; background: #f8faf7; border-radius: 14px; }
.utf8-workflow-title { margin: 0 0 5px; font-size: 1.08rem; }
.utf8-workflow-detail { margin: 0 0 14px; color: #555d54; font-size: .92rem; line-height: 1.45; }
.utf8-step-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0; padding: 0; list-style: none; }
.utf8-track-item { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: center; align-items: center; gap: 2px 7px; min-width: 0; padding: 10px; border-radius: 10px; border: 1px solid #d8d8d2; background: #fff; }
.utf8-track-item.is-current { border: 2px solid #171717; background: #fff; padding: 9px; }
.utf8-track-item.is-done { border-color: #94b8a0; background: #ebf5ed; }
.utf8-track-item.is-upcoming { color: #6c6c65; background: #f2f2ef; }
.utf8-track-number { display: flex; align-items: center; justify-content: center; width: 27px; height: 27px; border: 1px solid currentColor; border-radius: 50%; font-weight: 750; font-size: .88rem; }
.utf8-track-item.is-current .utf8-track-number { background: #171717; color: #fff; border-color: #171717; }
.utf8-track-item.is-done .utf8-track-number { background: #24613c; color: #fff; border-color: #24613c; }
.utf8-track-name { font-size: .87rem; font-weight: 650; overflow-wrap: anywhere; }
.utf8-track-status { grid-column: 2; font-size: .75rem; color: #656962; }
.utf8-track-item.is-current .utf8-track-status { font-weight: 700; color: #171717; }
.utf8-active-step { display: grid; gap: 13px; min-width: 0; padding: 16px; border: 1px solid #deded7; border-radius: 14px; }
.utf8-step-support, .utf8-step-main-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.utf8-step-main-actions > .primary { width: 100%; }
.utf8-step-hint[hidden], .utf8-step-explanation[hidden], .utf8-next-panel[hidden] { display: none; }
.utf8-next-panel { display: grid; gap: 12px; padding: 15px; border: 1px solid #b7d3bb; border-radius: 12px; background: #f3faf4; }
.utf8-next-title { color: #245e37; }
.utf8-next-detail { margin: 4px 0 0; font-size: .92rem; }
.utf8-next-panel .primary { width: 100%; font-weight: 700; min-height: 48px; }
.utf8-lab-task.utf8-steps-pending > .progress-actions { display: none; }
@media (max-width: 550px) {
  .utf8-step-track { grid-template-columns: 1fr; gap: 6px; }
  .utf8-track-item { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .utf8-track-status { grid-column: 3; grid-row: 1; }
  .utf8-active-step { padding: 13px; }
}

/* Encoding practice uses two visible stages; focus on the format being taught. */
.binary-workflow { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; list-style: none; padding: 0; margin: 0; }
.binary-workflow-step { border: 1px solid #deded7; border-radius: 10px; background: #f3f3f0; padding: 11px 12px; color: #62625b; font-weight: 600; font-size: .88rem; }
.binary-workflow-step.is-current { color: #171717; background: #fff; border: 2px solid #171717; padding: 10px 11px; }
.binary-workflow-step.is-done { background: #ebf5ed; border-color: #94b8a0; color: #245e37; }
.binary-convert-button.primary { width: 100%; min-height: 48px; font-weight: 700; }
.binary-format-card.is-focus { grid-column: 1 / -1; border-color: #9eaaa0; background: #f8faf7; }
.binary-other-formats { min-width: 0; margin-top: 12px; }
.binary-other-formats > summary { cursor: pointer; padding: 11px 12px; border: 1px solid #c6c6be; border-radius: 9px; font-weight: 650; }
.binary-other-formats[open] > .binary-format-grid { margin-top: 12px; }
.binary-status.success { color: #245e37; }
.binary-status.error { color: #9e2f25; }
@media (max-width: 550px) { .binary-workflow { grid-template-columns: 1fr; } }

.binary-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.binary-actions .binary-convert-button { flex: 1 1 245px; }
.binary-actions .binary-reset-button { flex: 0 1 auto; }
@media (max-width: 550px) { .binary-actions > button { width: 100%; } }

/* The course-level completion action appears only after a valid two-stage encoding. */
.binary-lab-task.binary-steps-pending > .progress-actions { display: none; }

/* Reusable data-flow builder: draggable cards with a click/keyboard alternative. */
.data-flow-builder { display: grid; gap: 14px; min-width: 0; }
.data-flow-guide { margin: 0; line-height: 1.5; }
.data-flow-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; }
.data-flow-source, .data-flow-target { border: 1px solid #deded7; padding: 14px; border-radius: 13px; min-width: 0; background: #fafaf7; }
.data-flow-section-title { margin: 0 0 8px; font-size: 1.04rem; }
.data-flow-help { margin: 0 0 12px; color: #62625b; font-size: .91rem; }
.data-flow-cards { display: grid; gap: 9px; }
.data-flow-card { text-align: left; width: 100%; display: grid; gap: 4px; padding: 12px; border: 1px solid #c7c7bf; background: #fff; border-radius: 10px; cursor: grab; font-weight: 400; line-height: 1.4; }
.data-flow-card strong { font-size: .93rem; }
.data-flow-card-description { display: block; color: #55554f; font-size: .83rem; overflow-wrap: anywhere; }
.data-flow-card.is-selected, .data-flow-card[aria-pressed="true"] { border: 2px solid #171717; padding: 11px; background: #f2f5f2; }
.data-flow-card.is-dragging { opacity: .6; }
.data-flow-path { display: grid; gap: 0; padding: 0; margin: 0; list-style: none; }
.data-flow-row { min-width: 0; }
.data-flow-slot { display: grid; gap: 8px; min-width: 0; padding: 11px; border: 1px dashed #b8b8b1; border-radius: 12px; background: #fff; }
.data-flow-slot.is-filled { border-style: solid; border-color: #b7c4b7; }
.data-flow-slot.is-over { border: 2px solid #171717; padding: 10px; background: #eaf3ed; }
.data-flow-position { font-weight: 750; color: #343b33; font-size: .89rem; }
.data-flow-placeholder { color: #77776f; font-size: .88rem; }
.data-flow-choose { font-weight: 650; }
.data-flow-choose:disabled { display: none; }
.data-flow-remove { justify-self: start; font-size: .8rem; min-height: 34px; padding: 5px 10px; }
.data-flow-arrow { display: block; width: fit-content; margin: 3px auto; font-size: 1.35rem; font-weight: 700; color: #555; }
.data-flow-bank-empty { color: #245e37; font-weight: 600; }
.data-flow-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.data-flow-actions .primary { flex: 1 1 200px; min-height: 48px; }
.data-flow-feedback { margin: 0; padding: 12px; background: #f5f5f1; border: 1px solid #deded7; border-radius: 9px; }
.data-flow-feedback.is-correct { background: #edf8f0; color: #245e37; border-color: #92c5a3; font-weight: 700; }
.data-flow-feedback.is-incorrect { background: #fff1ee; color: #a12d23; border-color: #dfaba2; font-weight: 650; }
.data-flow-task.data-flow-pending > .progress-actions { display: none; }
@media(max-width: 700px) { .data-flow-layout { grid-template-columns: 1fr; } }

/* Optional multi-format transfer task: same two source records in three editable formats. */
.three-formats-lab { display: grid; gap: 15px; min-width: 0; }
.three-formats-reference { border: 1px solid #dfdfd9; background: #fbfbf9; border-radius: 12px; padding: 14px; }
.three-formats-reference h4 { margin: 0 0 10px; }
.three-formats-data-table { width: 100%; border-collapse: collapse; }
.three-formats-data-table th, .three-formats-data-table td { padding: 9px 11px; border-bottom: 1px solid #e5e5df; text-align: left; vertical-align: top; }
.three-formats-values { padding-left: 18px; margin: 0; }
.three-formats-guide { margin: 0; line-height: 1.5; }
.three-formats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.three-formats-pane { display: flex; flex-direction: column; gap: 10px; border: 1px solid #deded7; border-radius: 12px; padding: 13px; min-width: 0; background: #fafaf7; }
.three-formats-pane h4 { margin: 0; }
.three-formats-editor-label { display: flex; flex-direction: column; flex: 1; gap: 7px; font-size: .88rem; font-weight: 600; }
.three-formats-editor-label textarea { box-sizing: border-box; width: 100%; flex: 1; min-height: 260px; resize: vertical; white-space: pre; font-size: .83rem; line-height: 1.45; }
.three-formats-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.three-formats-actions button { min-height: 44px; flex: 1 1 120px; }
.three-formats-check { font-weight: 650; }
.three-formats-status { margin: 0; color: #666; font-size: .86rem; line-height: 1.45; overflow-wrap: anywhere; }
.three-formats-status.is-success, .three-formats-overall.is-success { color: #24613c; font-weight: 650; }
.three-formats-status.is-error { color: #9d3327; }
.three-formats-overall { margin: 0; padding: 12px; border: 1px solid #deded7; border-radius: 9px; background: #f7f7f4; }
.three-formats-overall.is-success { border-color: #a4c8ad; background: #eef8f0; }
@media (max-width: 950px) { .three-formats-grid { grid-template-columns: 1fr; } .three-formats-editor-label textarea { min-height: 180px; } }


/* Select a CSS rule's matching elements in a real HTML element tree. */
.css-selector-tree-lab{display:grid;gap:12px;min-width:0}
.selector-tree-counter{margin:0;font-weight:700;color:#245e37}
.selector-tree-rule{padding:14px;border:1px solid #cbd5cd;border-radius:12px;background:#f7faf7;min-width:0}
.selector-tree-rule-heading{margin:0 0 8px;font-weight:650}
.selector-tree-code{display:block;white-space:pre-wrap;overflow-wrap:anywhere;font:600 .92rem/1.6 ui-monospace,Consolas,monospace}
.selector-tree-help{margin:0;line-height:1.5}
.selector-tree-surface{border:1px solid #d6ddd7;border-radius:12px;padding:14px;background:#fff;overflow-x:auto}
.selector-tree-list{list-style:none;margin:0;padding:0 0 0 18px;border-left:2px solid #dce3dd}
.selector-tree-surface>.selector-tree-list{border-left:0;padding-left:0}
.selector-tree-node{margin:5px 0}
.selector-tree-node-button{max-width:100%;text-align:left;white-space:normal;overflow-wrap:anywhere;font:500 .88rem/1.55 ui-monospace,Consolas,monospace;padding:7px 10px;border:1px solid #c5cec7;border-radius:7px;background:#f9faf9;color:#24322c}
.selector-tree-node-button.is-selected{background:#dcf5e6;border:2px solid #237747;padding:6px 9px;color:#15472a;font-weight:700}
.selector-tree-node-button:focus-visible{outline:3px solid #237747;outline-offset:2px}
.selector-tree-feedback{margin:0;padding:10px 12px;background:#f7f7f4;border:1px solid #d9ded7;border-radius:8px}
.selector-tree-feedback.is-valid{color:#245e37;background:#edf8f0;border-color:#96c5a4}
.selector-tree-feedback.is-invalid{color:#9c3328;background:#fff0ed;border-color:#d7a097}
.selector-tree-actions{display:flex;flex-wrap:wrap;gap:9px}
.selector-tree-actions button{min-height:42px}
@media(max-width:550px){.selector-tree-surface{padding:10px}.selector-tree-list{padding-left:12px}.selector-tree-actions button{flex:1 1 130px}}

/* Flexbox live playground: controls and preview remain visible on desktop and mobile. */
.css-flex-playground{display:grid;gap:14px;min-width:0}
.flex-playground-intro{margin:0;line-height:1.55}
.flex-playground-layout{display:grid;grid-template-columns:minmax(0,0.85fr) minmax(0,1.15fr);gap:14px;align-items:start}
.flex-playground-panel{border:1px solid #d5ddd7;border-radius:12px;padding:14px;background:#fafbf9;min-width:0}
.flex-playground-panel h4{margin:0 0 12px;font-size:1rem}
.flex-playground-controls{display:grid;gap:13px}
.flex-playground-control{display:grid;gap:5px;min-width:0}
.flex-playground-label{font-weight:700;font:.92rem/1.4 ui-monospace,Consolas,monospace}
.flex-playground-select{width:100%;max-width:100%;min-height:42px;padding:8px;border:1px solid #b8c4bd;border-radius:8px;background:white;color:#1b2820}
.flex-playground-field-help{margin:0;color:#55635a;font-size:.82rem;line-height:1.4}
.flex-playground-axis{margin:0 0 10px;font-size:.88rem;font-weight:650;color:#2f5942;line-height:1.5}
.flex-playground-stage{min-width:0;overflow:hidden;border:1px dashed #aab7ad;border-radius:10px;background:#f2f5f2}
.flex-playground-items{box-sizing:border-box;width:100%;height:285px;min-width:0;padding:14px;display:flex;gap:16px;align-items:stretch;background:repeating-linear-gradient(45deg,#f4f8f5,#f4f8f5 12px,#ebf1ed 12px,#ebf1ed 24px)}
.flex-playground-item{box-sizing:border-box;min-width:0;max-width:100%;min-height:46px;flex:0 1 auto;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;padding:12px 10px;border:2px solid #536b83;border-radius:9px;background:#dfeaf4;color:#19314d;text-align:center;font-weight:750;font-size:.92rem;overflow-wrap:anywhere}
.flex-playground-item:nth-child(2){background:#ffedc6;border-color:#a9751a;color:#633d0c}
.flex-playground-item:nth-child(3){background:#e9e0fa;border-color:#7555a8;color:#47326d}
.flex-playground-item.is-target{outline:2px dashed #95631e;outline-offset:3px}
.flex-playground-mark{font-size:.7rem;font-weight:650;line-height:1.2}
.flex-playground-target-note{font-size:.83rem;color:#545d55;margin:9px 0 15px}
.flex-playground-code{margin:0;min-width:0;max-height:260px;overflow:auto;padding:12px;border:1px solid #d7ddd6;border-radius:8px;background:#fff;font:.83rem/1.55 ui-monospace,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}
.flex-playground-note{margin:10px 0 0;font-size:.9rem;line-height:1.5}
.flex-playground-progress{margin:0;font-weight:650}
.flex-playground-actions{display:flex;gap:10px}
.css-flex-playground :is(select,button):focus-visible{outline:3px solid #19795b;outline-offset:2px}
@media(max-width:790px){.flex-playground-layout{grid-template-columns:minmax(0,1fr)}.flex-playground-items{height:275px}}
@media(max-width:390px){.flex-playground-panel{padding:10px}.flex-playground-items{padding:8px}.flex-playground-item{padding:7px 5px;font-size:.79rem}.flex-playground-mark{font-size:.63rem}}

/* Computed border-box width complements the schematic Box Model layers. */
.css-box-width-summary{display:flex;flex-wrap:wrap;gap:5px;align-items:baseline;padding:9px 11px;background:#eef3f8;border:1px solid #bacad8;border-radius:8px;font-size:.84rem;line-height:1.5}
.css-box-outer-width{font:750 .95rem ui-monospace,Consolas,monospace;color:#19314d}
.css-box-sizing-note{font-size:.78rem;color:#495a67}


/* Reusable CSS Grid playground: complements the KT03 Flexbox explorer. */
.css-grid-playground{display:grid;gap:14px;min-width:0}
.grid-playground-intro{margin:0;line-height:1.55}
.grid-playground-layout{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:14px;align-items:start}
.grid-playground-panel{min-width:0;border:1px solid #d5ddd7;border-radius:12px;padding:14px;background:#fafbf9}
.grid-playground-panel h4{margin:0 0 12px;font-size:1rem}
.grid-playground-controls{display:grid;gap:13px}
.grid-playground-control{display:grid;gap:5px;min-width:0}
.grid-playground-label{font:700 .92rem/1.4 ui-monospace,Consolas,monospace}
.grid-playground-select{width:100%;max-width:100%;min-height:44px;padding:8px;border:1px solid #b8c4bd;border-radius:8px;background:#fff;color:#1b2820}
.grid-playground-field-help{margin:0;color:#55635a;font-size:.82rem;line-height:1.4}
.grid-playground-summary{margin:0 0 10px;color:#2f5942;font-weight:650;font-size:.9rem;line-height:1.5}
.grid-playground-stage{min-width:0;overflow:hidden;border:1px dashed #aab7ad;border-radius:10px;background:#f2f5f2}
.grid-playground-items{box-sizing:border-box;width:100%;min-width:0;min-height:245px;padding:14px;display:grid;gap:16px;align-content:start;background:repeating-linear-gradient(45deg,#f4f8f5,#f4f8f5 12px,#ebf1ed 12px,#ebf1ed 24px)}
.grid-playground-item{box-sizing:border-box;min-width:0;max-width:100%;min-height:77px;padding:12px 8px;border:2px solid #536b83;border-radius:9px;background:#dfeaf4;color:#19314d;display:flex;align-items:center;justify-content:center;text-align:center;font-weight:750;font-size:.92rem;overflow-wrap:anywhere}
.grid-playground-item:nth-child(2){background:#ffedc6;border-color:#a9751a;color:#633d0c}
.grid-playground-item:nth-child(3){background:#e9e0fa;border-color:#7555a8;color:#47326d}
.grid-playground-item:nth-child(4){background:#d4eee3;border-color:#337359;color:#174f39}
.grid-playground-item:nth-child(5){background:#f7dce4;border-color:#ad5572;color:#783049}
.grid-playground-item:nth-child(6){background:#dbe7fa;border-color:#627fb5;color:#324d79}
.grid-playground-code{margin:0;min-width:0;max-height:250px;overflow:auto;padding:12px;border:1px solid #d7ddd6;border-radius:8px;background:white;font:.83rem/1.55 ui-monospace,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}
.grid-playground-note{margin:10px 0 0;font-size:.9rem;line-height:1.5}
.grid-playground-progress{margin:0;font-weight:650}
.grid-playground-reset{justify-self:start;min-height:42px}
.css-grid-playground :is(select,button):focus-visible{outline:3px solid #19795b;outline-offset:2px}
@media(max-width:790px){.grid-playground-layout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:390px){.grid-playground-panel{padding:10px}.grid-playground-items{padding:8px;gap:8px}.grid-playground-item{padding:8px 4px;min-height:65px;font-size:.8rem}}

/* KT04: browser chrome belongs to the learning platform, not to the simulated website. */
.responsive-width-lab{min-width:0;display:grid;gap:16px}
.responsive-width-layout{min-width:0;display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:16px;align-items:start}
.responsive-width-controls,.responsive-width-output{min-width:0;border:1px solid #d5ddd7;border-radius:12px;padding:14px;background:#fafbf9}
.responsive-width-controls{display:grid;gap:14px;align-content:start}
.responsive-width-controls h4,.responsive-width-output h4{margin:0;font-size:1rem}
.responsive-width-output{display:grid;gap:11px}
.responsive-width-output h4:not(:first-child){margin-top:6px}
.responsive-width-control{display:grid;gap:5px}
.responsive-width-control label{font-weight:650;font-size:.9rem}
.responsive-width-control select{min-height:44px;width:100%;max-width:100%;padding:8px;border:1px solid #b5c5b9;border-radius:8px;background:#fff}
.responsive-width-checkbox{display:flex;align-items:center;gap:10px;min-height:42px;font-size:.88rem;cursor:pointer}
.responsive-width-checkbox input{width:20px;height:20px;flex:none}
.responsive-width-reset{justify-self:start;border:1px solid #b5c5b9;border-radius:8px;background:#fff;padding:8px 14px}
.responsive-width-status{margin:0;color:#365b45;font-weight:650;font-size:.88rem}
.responsive-width-browser{min-width:0;max-width:100%;overflow:hidden;border:1px solid #b8c7be;border-radius:11px;background:#eef3f0}
.responsive-width-browser-chrome{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:42px;padding:8px 12px;background:#e3e8e4;border-bottom:1px solid #b8c7be;font-size:.72rem;color:#3a5146}
.responsive-width-browser-chrome strong{font-weight:650;overflow-wrap:anywhere}
.responsive-width-browser-area{position:relative;overflow:hidden;width:100%;background:#eef3f0}
.responsive-width-browser-page{position:absolute;top:0;left:0;border:0;max-width:none!important;transform-origin:top left;background:#eef3f0}
.responsive-width-code{margin:0;min-width:0;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;padding:14px;border:1px solid #dae2db;border-radius:8px;background:#fff;font:.83rem/1.55 ui-monospace,Consolas,monospace}
.responsive-width-lab :is(select,input,button):focus-visible{outline:3px solid #19795b;outline-offset:2px}
@media(max-width:790px){.responsive-width-layout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:390px){.responsive-width-controls,.responsive-width-output{padding:10px}}

/* KT04: independently sized browser controls and a true media-query viewport. */
.media-query-lab{display:grid;min-width:0;gap:14px}
.media-query-layout{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:14px;align-items:start;min-width:0}
.media-query-controls,.media-query-output{display:grid;align-content:start;gap:11px;min-width:0;padding:14px;border:1px solid #d5ddd7;border-radius:12px;background:#fafbf9}
.media-query-controls h4,.media-query-output h4{margin:0;font-size:1rem}
.media-query-label{font-size:.9rem;font-weight:700}
.media-query-select{min-height:44px;width:100%;max-width:100%;padding:8px;border-radius:8px;border:1px solid #b5c5b9;background:#fff}
.media-query-note{font-size:.88rem;line-height:1.5;margin:0;color:#526659}
.media-query-status,.media-query-progress{margin:0;font-weight:650;color:#365b45;font-size:.9rem}
.media-query-browser{min-width:0;max-width:100%;overflow:hidden;border:1px solid #b8c7be;border-radius:10px;background:#eef3f0}
.media-query-chrome{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:42px;padding:8px 12px;background:#e3e8e4;border-bottom:1px solid #b8c7be;color:#3a5146;font-size:.73rem}
.media-query-chrome strong{font-weight:650;overflow-wrap:anywhere}
.media-query-area{position:relative;overflow:hidden;width:100%;background:#eef3f0}
.media-query-page{position:absolute;top:0;left:0;max-width:none!important;border:0;transform-origin:top left;background:#eef3f0}
.media-query-code{margin:0;min-width:0;max-width:100%;max-height:320px;overflow:auto;padding:14px;border:1px solid #d7e0da;border-radius:9px;background:#fff;white-space:pre-wrap;overflow-wrap:anywhere;font:.85rem/1.6 ui-monospace,Consolas,monospace}
.media-query-editor{width:100%;min-width:0;min-height:255px;padding:12px;border:1px solid #9baa9f;border-radius:9px;background:#fff;color:#1d2d23;font:.9rem/1.6 ui-monospace,Consolas,monospace;resize:vertical}
.media-query-actions{display:flex;flex-wrap:wrap;gap:10px}
.media-query-actions button,.media-query-reset{min-height:42px}
.media-query-feedback{margin:0;font-size:.9rem;line-height:1.5}
.media-query-feedback.is-valid{color:#17633c;font-weight:650}
.media-query-feedback.is-invalid{color:#a02828}
.media-query-lab :is(select,textarea,button):focus-visible{outline:3px solid #19795b;outline-offset:2px}
@media(max-width:790px){.media-query-layout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:390px){.media-query-controls,.media-query-output{padding:10px}}

/* KT04 responsive component debugging: browser chrome independent of simulated site */
.responsive-components-lab{display:grid;gap:14px;min-width:0}
.responsive-components-layout{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:14px;align-items:start;min-width:0}
.responsive-components-controls,.responsive-components-output{display:grid;align-content:start;gap:12px;min-width:0;border:1px solid #d5ddd7;border-radius:12px;background:#fafbf9;padding:14px}
.responsive-components-controls h4,.responsive-components-output h4{margin:0;font-size:1rem}
.responsive-components-label{font-size:.9rem;font-weight:700}
.responsive-components-select{width:100%;max-width:100%;min-height:44px;background:#fff;padding:8px;border:1px solid #b5c5b9;border-radius:8px}
.responsive-components-note{font-size:.9rem;line-height:1.5;margin:0;color:#526659}
.responsive-components-status,.responsive-components-audit-status{margin:0;font-size:.9rem;font-weight:650;color:#365b45}
.responsive-components-browser{max-width:100%;min-width:0;overflow:hidden;background:#eef3f0;border:1px solid #b8c7be;border-radius:10px}
.responsive-components-chrome{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;min-height:42px;background:#e3e8e4;border-bottom:1px solid #b8c7be;color:#3a5146;font-size:.73rem}
.responsive-components-chrome strong{font-weight:650;overflow-wrap:anywhere}
.responsive-components-area{position:relative;width:100%;overflow:hidden;background:#eef3f0}
.responsive-components-page{position:absolute;left:0;top:0;max-width:none!important;border:0;transform-origin:top left;background:#eef3f0}
.responsive-components-editor{width:100%;min-width:0;min-height:220px;background:white;border:1px solid #9baa9f;border-radius:9px;padding:12px;resize:vertical;font:.88rem/1.55 ui-monospace,Consolas,monospace}
.responsive-components-actions{display:flex;gap:10px;flex-wrap:wrap}
.responsive-components-actions button,.responsive-components-controls button{min-height:42px}
.responsive-components-feedback{margin:0;font-size:.9rem;line-height:1.5}
.responsive-components-feedback.is-valid{color:#17633c;font-weight:650}
.responsive-components-feedback.is-invalid{color:#a02828}
.responsive-components-lab :is(select,textarea,button):focus-visible{outline:3px solid #19795b;outline-offset:2px}
@media(max-width:790px){.responsive-components-layout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:390px){.responsive-components-controls,.responsive-components-output{padding:10px}}


/* KT04: Accessibility debug lab. The browser controls never scale with its example. */
.accessibility-lab{display:grid;gap:14px;min-width:0}
.accessibility-lab-layout{display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);gap:14px;align-items:start;min-width:0}
.accessibility-lab-panel{display:grid;align-content:start;gap:12px;min-width:0;padding:14px;border:1px solid #d5ddd7;border-radius:12px;background:#fafbf9}
.accessibility-lab-panel h4{margin:0;font-size:1rem}
.accessibility-lab-label{font-weight:700;font-size:.9rem}
.accessibility-lab-editor{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:190px;resize:vertical;padding:12px;border:1px solid #9baa9f;border-radius:9px;background:#fff;color:#1d2d23;font:.87rem/1.55 ui-monospace,Consolas,monospace}
.accessibility-lab-actions{display:flex;flex-wrap:wrap;gap:10px}
.accessibility-lab-actions button,.accessibility-lab-preview-panel>button{min-height:44px}
.accessibility-lab-browser{min-width:0;overflow:hidden;border:1px solid #b8c7be;border-radius:10px;background:#eef3f0}
.accessibility-lab-chrome{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:42px;padding:8px 12px;background:#e3e8e4;border-bottom:1px solid #b8c7be;color:#3a5146;font-size:.73rem}
.accessibility-lab-chrome strong{overflow-wrap:anywhere}
.accessibility-lab-frame{display:block;width:100%;max-width:100%;height:300px;border:0;background:white}
.accessibility-lab-feedback,.accessibility-lab-observation{margin:0;font-size:.9rem;line-height:1.5}
.accessibility-lab-observation{color:#526659}
.accessibility-lab-feedback.is-valid{color:#17633c;font-weight:650}
.accessibility-lab-feedback.is-invalid{color:#a02828}
.accessibility-lab :is(textarea,button):focus-visible{outline:3px solid #19795b;outline-offset:2px}
@media(max-width:790px){.accessibility-lab-layout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:390px){.accessibility-lab-panel{padding:10px}}

/* L4: CSS editing belongs to the left-hand controls; the right pane is preview-only. */
.responsive-components-layout{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);align-items:start}
.responsive-components-controls{gap:10px}
.responsive-components-editor{min-height:155px;max-height:260px}
.responsive-components-output{align-content:start}
.responsive-components-actions button{flex:0 1 auto;width:auto;min-height:44px;white-space:nowrap;font-size:.85rem;padding:8px 10px}
@media(max-width:790px){.responsive-components-layout{grid-template-columns:minmax(0,1fr)}}


/* KT04 L6: visual graphics exercises use independent, unscaled control panels. */
.web-graphics-lab{display:grid;grid-template-columns:minmax(0,.83fr) minmax(0,1.17fr);gap:14px;min-width:0;align-items:start}
.graphics-panel{display:grid;align-content:start;gap:12px;min-width:0;border:1px solid #d5ddd7;background:#fafbf9;padding:14px;border-radius:12px}
.graphics-panel h4{margin:0;font-size:1rem}
.graphics-field{display:grid;gap:6px;font-size:.9rem;font-weight:650;min-width:0}
.graphics-select{min-height:44px;width:100%;max-width:100%;border:1px solid #b5c5b9;border-radius:8px;padding:8px;background:#fff;color:#24372b}
.graphics-note{margin:0;line-height:1.5;font-size:.9rem;color:#526659}
.graphics-progress,.graphics-info{margin:0;line-height:1.5;font-weight:650;font-size:.9rem;color:#365b45}
.graphics-zoom-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0}
.graphics-zoom-card{min-width:0;border:1px solid #d5ddd7;background:#fafbf9;border-radius:12px;padding:12px;display:grid;align-content:start;gap:10px}
.graphics-zoom-card h5{font-size:.9rem;line-height:1.4;margin:0}
.graphics-zoom-stage{height:295px;min-width:0;max-width:100%;overflow:auto;border:1px dashed #b7cbbb;border-radius:8px;background:#fff;display:flex;align-items:flex-start;justify-content:flex-start;padding:10px}
.graphics-raster-logo{image-rendering:pixelated;flex:none;max-width:none}
.graphics-svg-logo{flex:none;display:block;max-width:none}
.graphics-sample-window{min-width:0;max-width:100%;padding:12px;background:#eaf2eb;border-radius:8px}
.graphics-sample-window canvas,.graphics-sample-canvas{display:block;width:100%;max-width:100%;height:auto;border-radius:8px}
.graphics-data-table{width:100%;border-collapse:collapse;font-size:.86rem}
.graphics-data-table th,.graphics-data-table td{padding:9px 6px;border-bottom:1px solid #d9e0d9;text-align:left;vertical-align:top}
.graphics-data-table th{font-weight:700}
.graphics-feedback{font-size:.9rem;line-height:1.5;margin:0}
.graphics-feedback.is-valid{color:#17633c;font-weight:650}
.graphics-feedback.is-invalid{color:#a02828}
.web-graphics-lab :is(select,button):focus-visible{outline:3px solid #19795b;outline-offset:2px}
@media(max-width:790px){.web-graphics-lab{grid-template-columns:minmax(0,1fr)}}
@media(max-width:480px){.graphics-zoom-grid{grid-template-columns:minmax(0,1fr)}.graphics-panel,.graphics-zoom-card{padding:10px}}

/* KT04 L5: Emmet expansion stays readable in the left editor panel. */
.accessibility-lab-generated{min-width:0;display:grid;gap:7px}
.accessibility-lab-generated h5{margin:0;font-size:.88rem}
.accessibility-lab-generated-code{margin:0;max-width:100%;overflow-x:auto;white-space:pre-wrap;overflow-wrap:anywhere;padding:11px;border:1px solid #d5ddd7;border-radius:8px;background:#fff;font:.83rem/1.5 ui-monospace,Consolas,monospace}

/* KT04 L3: code-writing controls stay on the left; the right side only shows the browser. */
.media-query-controls .media-query-editor{min-height:185px;max-height:300px}
.media-query-actions button{flex:0 1 auto;width:auto;white-space:nowrap}

/* Reusable scored format comparison: weights stay adjacent to the answers. */
.weighted-format-score{display:grid;gap:16px;min-width:0}
.weighted-format-score .table-scroll{max-width:100%;overflow-x:auto}
.weighted-format-score .content-table{min-width:420px}
.weighted-format-score-note{margin:0;color:#4d5450;font-size:.94rem}
.weighted-format-score-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.weighted-format-score-field,.weighted-format-score-winner{display:grid;gap:7px;min-width:0}
.weighted-format-score-field label,.weighted-format-score-winner label{font-size:.94rem;font-weight:700}
.weighted-format-score-field input,.weighted-format-score-winner select{width:100%;min-height:44px;min-width:0;border:1px solid #b7beb9;border-radius:9px;padding:9px 11px;background:#fff;color:#171717;font:inherit}
.weighted-format-score :is(input,select):focus-visible{outline:3px solid #82b8f0;outline-offset:2px}
.weighted-format-score :is(input,select)[aria-invalid="true"]{border-color:#b22b2b}
.weighted-format-score-feedback{min-height:1.3em;font-size:.84rem;color:#424942}
.weighted-format-score-status{margin:0;font-size:.92rem}
.weighted-format-score-status.is-correct{color:#17633c;font-weight:700}
.weighted-format-score-status.is-incorrect{color:#a02828}
.weighted-format-score>button{justify-self:start}
@media(max-width:620px){.weighted-format-score-fields{grid-template-columns:1fr}.weighted-format-score .content-table{min-width:380px}}


/* Reusable JavaScript learning labs — separate from the Task App website. */
.js-lab{display:grid;gap:14px;min-width:0}
.js-lab-layout{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:14px;align-items:start}
.js-lab-panel{min-width:0;display:grid;align-content:start;gap:11px;padding:14px;border:1px solid #d5ddd7;border-radius:12px;background:#fafbf9}
.js-lab-panel h4{margin:0;font-size:1rem}
.js-lab-field{display:grid;gap:5px;min-width:0}
.js-lab-field label,.js-lab-panel>label{font-size:.91rem;font-weight:650}
.js-lab-select{display:block;width:100%;min-width:0;min-height:44px;padding:9px 10px;border:1px solid #bbc8bf;border-radius:8px;background:#fff;color:#1b2820}
.js-lab-code,.js-lab-output{min-width:0;max-width:100%;margin:0;padding:12px;border:1px solid #d6ded7;border-radius:9px;background:#fff;font:.86rem/1.65 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;overflow:auto}
.js-model-inspector{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:8px;margin:0;font-size:.91rem;overflow-wrap:anywhere}
.js-model-inspector dt{margin:0;font-weight:700}
.js-model-inspector dd{margin:0}
.js-lab-progress{margin:0;font-size:.9rem;font-weight:650;color:#285e46}
.js-lab-note{margin:0;color:#4c5d52;font-size:.88rem;line-height:1.5}
.js-lab-reset{justify-self:start;min-height:44px}
.js-flow-code{list-style:decimal;list-style-position:outside;margin:0;padding:10px 10px 10px 48px;border-radius:9px;background:white;font:.83rem/1.6 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.js-flow-code li{padding:3px 6px;border-radius:5px;white-space:pre-wrap;overflow-wrap:anywhere}
.js-flow-code li.is-active{background:#d7efe3;outline:2px solid #508a70}
.js-flow-message{min-height:82px;margin:0;line-height:1.55}
.js-lab-actions{display:flex;flex-wrap:wrap;gap:8px}
.js-lab-actions button{min-height:44px}
.js-array-list{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.js-array-list li{display:grid;gap:2px;padding:9px;border:1px solid #d9dfd8;border-radius:8px;background:#fff;font-size:.88rem;overflow-wrap:anywhere}
.js-array-list li span{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#476454}
.js-lab-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.js-lab-action-grid button{min-height:48px;white-space:normal;text-align:center}
.js-lab :is(button,select):focus-visible{outline:3px solid #19795b;outline-offset:2px}
@media(max-width:790px){.js-lab-layout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:390px){.js-lab-panel{padding:10px}.js-lab-action-grid{grid-template-columns:minmax(0,1fr)}}

/* Beginner-friendly learning guidance for KT05 JavaScript labs. */
.js-lab-task{margin:0;padding:13px 15px;border-left:4px solid #34785a;border-radius:0 10px 10px 0;background:#edf5ef;font-weight:600;line-height:1.6}
.js-lab-feedback{margin:0;padding:11px 13px;border:1px solid #c9dfd1;border-radius:9px;background:#f4f9f5;line-height:1.55}
.js-model-code-line{display:block;white-space:pre-wrap;border-radius:4px}
.js-model-code-line.is-changed{background:#d7efe1;outline:1px solid #a3ceae}
.js-model-inspector .is-changed{color:#176442;font-weight:750}
.js-flow-outcome{margin:0;font-weight:650;color:#285e46;line-height:1.55}
.js-flow-outcome:empty{display:none}
.js-lab-action-grid button.is-active{background:#d9eee2;border-color:#3f8461;font-weight:700}
.js-lab-action-grid button.is-explored:not(.is-active){border-color:#7fb59b}
.js-flow-next-case[hidden]{display:none}

/* Plain / JSON are alternative accessible views of the same array. */
.js-array-view-tabs{display:flex;gap:5px;padding:4px;border:1px solid #d3ddd5;border-radius:10px;background:#eef2ed}
.js-array-view-tab{flex:1;min-width:0;min-height:44px;padding:8px 12px;border:1px solid transparent;border-radius:7px;background:transparent;color:#43584b;font:inherit;font-weight:650}
.js-array-view-tab[aria-selected="true"]{border-color:#b3cfc0;background:#fff;color:#174a33;box-shadow:0 1px 3px rgb(0 0 0 / 7%)}
.js-array-view-tab:focus-visible{outline:3px solid #19795b;outline-offset:2px}
.js-array-view-panel{min-width:0}
.js-array-view-panel[hidden]{display:none}
.js-array-view-panel:focus-visible{outline:3px solid #19795b;outline-offset:3px}
.js-array-json{max-height:420px;white-space:pre;overflow:auto;overflow-wrap:normal;font-size:.8rem}
.js-array-view-note{min-height:2.4em}

/* KT05 project workshop: concise lesson refresh links and optional layout demonstrations. */
.workshop-refresh-links{margin-top:14px;padding:14px 16px;border:1px solid #d8e1d9;border-radius:10px;background:#f6faf6}
.workshop-refresh-title{font-weight:650;margin:0 0 8px}
.workshop-refresh-links ul{margin:0;padding-left:20px;display:grid;gap:7px}
.workshop-refresh-links a{color:#171717;text-decoration:underline;text-underline-offset:3px}
.workshop-refresh-links a:visited{color:#171717}
.workshop-refresh-links a:hover{text-decoration-thickness:2px}
.workshop-refresh-links a:focus-visible{outline:2px solid #171717;outline-offset:3px;border-radius:2px}
.workshop-layout-refresh{margin:18px 0 10px;min-width:0}
.workshop-layout-refresh h4{margin:0 0 9px}
.workshop-layout-refresh details{border:1px solid #d8e1d9;border-radius:10px;overflow:hidden}
.workshop-layout-refresh summary{padding:12px 15px;cursor:pointer;font-weight:650;background:#f3f7f4}
.workshop-layout-playgrounds{padding:14px;display:grid;gap:14px;min-width:0}
.workshop-layout-playgrounds>h5{margin:8px 0 0;font-size:1rem}
.workshop-layout-playgrounds :is(.css-flex-playground,.css-grid-playground){min-width:0}
@media(max-width:600px){.workshop-layout-playgrounds{padding:9px}.workshop-refresh-links{padding:11px}}

/* Reusable WEE HTML/CSS repetition (only rendered when attached to a course day). */
.css-specificity-review{display:grid;gap:14px;min-width:0}
.css-specificity-review>.eyebrow,.css-specificity-review>h3,.css-review-description{margin:0}
.css-review-primer{padding:14px 16px;border:1px solid #d9d9d3;border-radius:10px;background:#f7f8f5}
.css-review-primer h4{margin:0 0 8px;font-size:1rem}
.css-review-primer ul{display:grid;gap:6px;margin:0;padding-left:20px}
.css-review-guide,.css-review-group{border:1px solid #d9d9d3;border-radius:12px;min-width:0}
.css-review-guide>summary,.css-review-group>summary{cursor:pointer;font-weight:700;padding:14px 16px}
.css-review-body{display:grid;gap:16px;padding:4px 16px 16px}
.css-review-hint{margin:0;color:#53534f;font-size:.92rem}
.css-review-rows{display:grid;gap:10px}
.css-review-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(225px,270px);align-items:center;gap:10px;padding:10px 12px;border:1px solid #e1e2dc;border-radius:9px;min-width:0}
.css-review-selector{font-size:.88rem;overflow-wrap:anywhere;min-width:0}
.css-review-score-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-width:0}
.css-review-score-label{display:grid;gap:5px;min-width:0;font-size:.8rem;color:#53534f;text-align:center}
.css-review-input{width:100%;min-width:0;min-height:40px;padding:7px 4px;border:1px solid #aebbb2;border-radius:8px;font:inherit;font-variant-numeric:tabular-nums;text-align:center;background:#fff}
.css-review-row-status{grid-column:1/-1;font-size:.85rem;text-align:right}
.css-review-row-status:empty{display:none}
.css-review-row.is-correct{border-color:#a0c9ac}
.css-review-row.is-correct .css-review-row-status{color:#226b3d}
.css-review-row.is-incorrect .css-review-row-status{color:#aa3434}
.css-review-actions{display:flex;flex-wrap:wrap;gap:10px}
.css-review-feedback{margin:0;font-weight:650}
.css-review-solutions>summary{cursor:pointer;font-weight:650}
.css-review-solutions ol{display:grid;gap:7px;margin:10px 0 0;padding-left:23px}
.css-review-solutions li{overflow-wrap:anywhere}
.css-review-bonus-choices{display:grid;gap:10px;margin:0;padding:0;border:0}
.css-review-bonus-option{display:flex;gap:10px;align-items:center;min-width:0}
.css-review-bonus-option code{overflow-wrap:anywhere}
.css-review-bonus button{justify-self:start}
.css-specificity-review :is(input,button,summary):focus-visible{outline:3px solid #19795b;outline-offset:2px}
@media(max-width:640px){.css-review-row{grid-template-columns:minmax(0,1fr)}.css-review-row-status{text-align:left}.css-review-score-fields{max-width:320px}}


/* HTTP-Transport: echte responsive SVG-Strassenanimation und sichtbarer Paketverlust. */
.http-transport-lab{display:grid;gap:16px;min-width:0}
.http-transport-lab>p{margin:0}
.http-transport-intro{max-width:75ch;line-height:1.55}
.http-transport-top{display:flex;flex-wrap:wrap;align-items:end;gap:16px}
.http-transport-label{display:grid;gap:7px;font-weight:650;min-width:0;max-width:600px}
.http-transport-label select{max-width:100%;min-height:46px;border:1px solid #9fafa9;border-radius:9px;padding:10px;background:#fff;font:inherit;color:#172d29}
.http-transport-heading{margin:0;font-size:1.3rem}
.http-transport-description{margin:0;max-width:80ch;line-height:1.6;color:#344a42}
.http-transport-stage{width:100%;min-width:0;overflow:hidden;background:#e6f0e9;border:1px solid #b9d1c4;border-radius:18px;box-shadow:0 10px 25px #142c2112}
.http-transport-svg{display:block;width:100%;height:auto;min-height:170px}
.http-transport-svg .http-transport-vehicle{pointer-events:none}
.http-transport-legend{display:flex;flex-wrap:wrap;gap:14px 24px;align-items:center;font-size:.9rem;color:#35443c}
.http-transport-legend-item{display:inline-flex;align-items:center;gap:8px}
.http-transport-swatch{display:inline-block;width:18px;height:15px;border:2px solid #53756a;border-radius:5px}
.http-transport-swatch.is-image{background:#f6c04b}
.http-transport-swatch.is-json{background:#56cebb}
.http-transport-swatch.is-lost{background:#e76664}
.http-transport-question{max-width:720px}
.http-transport-actions{display:flex;flex-wrap:wrap;gap:10px}
.http-transport-button{display:inline-flex;justify-content:center;align-items:center;min-height:44px;padding:9px 14px;border-radius:9px;border:1px solid #8baca0;background:#f9fbfa;color:#204236;font:inherit;font-weight:650;cursor:pointer;transition:background .15s}
.http-transport-button.is-primary{background:#177456;border-color:#177456;color:#fff}
.http-transport-button.is-danger{background:#a63838;border-color:#a63838;color:#fff}
.http-transport-button:disabled{opacity:.47;cursor:not-allowed}
.http-transport-button:not(:disabled):hover{filter:brightness(.94)}
.http-transport-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.http-transport-status-card{display:grid;gap:4px;align-content:start;padding:13px 15px;border-radius:10px;border:1px solid #adc5ba;border-left:5px solid #f6c04b;background:#f8fbf9}
.http-transport-status-card.is-json{border-left-color:#35baa5}
.http-transport-status-card.is-blocked{background:#fff0ee;border-color:#dca5a5;border-left-color:#d6534a}
.http-transport-status-heading{font-size:.78rem;text-transform:uppercase;letter-spacing:.045em;font-weight:750;color:#435b52}
.http-transport-status-card strong{font-size:.94rem;color:#1f3930}
.http-transport-result{margin:0;line-height:1.55}
.http-transport-result[data-valid=true]{color:#175b38}
.http-transport-result[data-valid=false]{color:#a52a32}
.http-transport-progress{margin:0;font-weight:700}
.http-transport-note{margin:0;color:#5d6b61;font-size:.85rem}
.http-transport-lab :is(select,button):focus-visible{outline:3px solid #167c5b;outline-offset:3px}
@media(max-width:640px){
  .http-transport-status-grid{grid-template-columns:1fr}
  .http-transport-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .http-transport-actions button{padding:9px 7px;font-size:.87rem}
  .http-transport-svg{min-height:135px}
}
@media(max-width:360px){.http-transport-actions{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.http-transport-button{transition:none}}

/* Formatted solutions use the same safe inline markup as learning text. */
.solution-formatted{white-space:pre-line}


/* Client–Server–Database: responsive learning diagram for HTTP data flow. */
.http-exchange-figure{margin:18px 0 20px;display:grid;gap:12px;min-width:0}
.http-exchange-title{font-size:1rem;font-weight:750;color:#244b40}
.http-exchange-svg{display:block;width:100%;height:auto;border-radius:16px;border:1px solid #c6ddd2}
.http-exchange-mobile{display:none;list-style:none;margin:0;padding:0;gap:10px}
.http-exchange-step{display:grid;gap:7px;padding:13px 15px;border:1px solid #cbded4;border-left:4px solid #358b74;border-radius:10px;background:#f6faf7;min-width:0}
.http-exchange-step-heading{display:flex;align-items:center;gap:9px}
.http-exchange-step-heading strong{font-size:.93rem;overflow-wrap:anywhere}
.http-exchange-number{display:inline-grid;place-items:center;flex:none;width:26px;height:26px;border-radius:50%;background:#217d6d;color:#fff;font-size:.8rem;font-weight:800}
.http-exchange-step-type{font-size:.8rem;color:#466457;font-weight:650}
.http-exchange-step-code{display:block;overflow-wrap:anywhere;white-space:normal;font-size:.85rem;background:#e8f1eb;border-radius:6px;padding:7px 9px;color:#223d34}
.http-exchange-step.is-result{border-left-color:#9766b7;background:#f5f0f8}
.http-exchange-step.is-result span{color:#45604e}
.http-exchange-note{margin:0;font-size:.9rem;line-height:1.6;color:#355447}
@media(max-width:760px){.http-exchange-svg{display:none}.http-exchange-mobile{display:grid}}


/* Guided API laboratory: shared progression visual language with UTF-8 lab. */
.api-lab{display:grid;gap:18px;min-width:0}
.api-lab :is(select,input,textarea,pre){max-width:100%;box-sizing:border-box}
.api-simulation-note{margin:0;padding:11px 14px;border-left:4px solid #7c9f95;background:#f2f7f4;border-radius:0 9px 9px 0;color:#3c5f54;font-size:.9rem}
.api-guide{display:grid;gap:15px;min-width:0}
.api-guide-intro{margin:0;line-height:1.6;color:#3b4c44}
.api-step-track-title{font-size:1.06rem;margin:0;font-weight:750}
.api-step-track{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}
.api-step-track li{display:flex;align-items:center;gap:10px;min-width:0;padding:11px 12px;border:1px solid #deded7;border-radius:11px;background:#fafaf7;font-size:.91rem;line-height:1.35}
.api-step-track li.is-current{background:#edf4f0;border-color:#6fab91;box-shadow:inset 0 0 0 1px #9ac8af}
.api-step-track li.is-complete{background:#eef8ef;border-color:#a5ceae;color:#23603d}
.api-step-track li.is-upcoming{color:#73756f}
.api-step-number{display:inline-grid;place-items:center;flex:none;width:30px;height:30px;background:#e8e8e3;color:#565952;border-radius:50%;font-weight:800}
.api-step-track .is-current .api-step-number{background:#226b50;color:#fff}
.api-step-track .is-complete .api-step-number{background:#267349;color:#fff}
.api-step-name{overflow-wrap:anywhere;font-weight:650}
.api-active-step{display:grid;gap:12px;min-width:0;padding:17px 18px;border:1px solid #d9dfd8;border-radius:14px;background:#fff}
.api-active-step.is-complete{border-color:#a6cbb1;background:#f4faf6}
.api-step-heading{margin:0;font-size:1.1rem}
.api-step-instructions{margin:0;line-height:1.6;overflow-wrap:anywhere}
.api-hint-button{justify-self:start}
.api-guide-hint{margin:0;border-left:3px solid #9aa79e;background:#f1f5f3;padding:10px 12px;border-radius:0 8px 8px 0;color:#3d5046}
.api-guide-feedback{margin:0;padding:12px 14px;border:1px solid #d8ddd7;border-radius:10px;background:#f7f8f6;line-height:1.5}
.api-guide-feedback.is-correct{background:#edf8f0;border-color:#8cbea1;color:#17633c;font-weight:700}
.api-guide-feedback.is-incorrect{background:#fff0ed;border-color:#d7a097;color:#9e2f25;font-weight:650}
.api-guide-feedback.is-neutral{background:#f4f7f8;border-color:#cad6d6;color:#3c585e}
.api-next-panel{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px;border:1px solid #b7d3bb;border-radius:12px;background:#f3faf4;min-width:0}
.api-next-copy{display:grid;gap:4px}
.api-next-title{font-weight:750;color:#245e37}
.api-next-detail{margin:0;font-size:.9rem;color:#35583e}
.api-next-button{flex:none;min-height:46px;font-weight:700}
.api-request-panel,.api-response-panel{display:grid;gap:13px;min-width:0;padding:17px 18px;border:1px solid #d9dfd8;border-radius:14px;background:#fff}
.api-section-title{margin:0;font-size:1.05rem}
.api-request-row{display:grid;grid-template-columns:minmax(140px,.3fr) minmax(0,1fr);gap:12px}
.api-field{display:grid;gap:7px;min-width:0;color:#34443a;font-weight:650;font-size:.9rem}
.api-field :is(select,input,textarea){width:100%;min-width:0;min-height:44px;border:1px solid #bac7be;border-radius:9px;background:#fff;color:#202c25;padding:10px 12px;font:inherit;font-weight:400}
.api-field textarea{min-height:130px;resize:vertical;line-height:1.6;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.api-header-row{display:flex;align-items:center;padding:11px 13px;border:1px solid #dfe6df;background:#f7faf7;border-radius:9px}
.api-content-type{display:flex;align-items:center;gap:10px;font-size:.9rem;overflow-wrap:anywhere}
.api-content-type input{width:18px;height:18px;flex:none;accent-color:#267349}
.api-request-actions{display:flex;flex-wrap:wrap;gap:10px;margin:0}
.api-request-actions button{min-height:44px;font-weight:650}
.api-response-panel{background:#fafbf9}
.api-response-status{margin:0;font-weight:700;padding:10px 12px;border:1px solid #d9e1da;background:#f3f5f3;border-radius:9px}
.api-response-status.is-ok{border-color:#8cbea1;background:#edf8f0;color:#17633c}
.api-response-status.is-error{border-color:#d7a097;background:#fff0ed;color:#9e2f25}
.api-response-panel pre,.api-curl-details pre{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;min-width:0;font-size:.86rem}
.api-curl-details{min-width:0;border:1px solid #dde3db;border-radius:10px;padding:12px;background:#fafbf9}
.api-curl-details summary{cursor:pointer;font-weight:650}
.api-curl-details pre{margin-top:10px}
.api-lab [hidden]{display:none!important}
.api-lab :is(button,select,input,textarea,summary):focus-visible{outline:3px solid #1e7b58;outline-offset:3px}
@media(max-width:650px){
  .api-step-track{grid-template-columns:1fr}
  .api-request-row{grid-template-columns:1fr}
  .api-active-step,.api-request-panel,.api-response-panel{padding:13px}
  .api-next-panel{flex-direction:column;align-items:stretch}
  .api-next-button{width:100%}
  .api-request-actions{display:grid;grid-template-columns:1fr}
  .api-request-actions button{width:100%}
}


/* The next-step action sits with the request controls, without a second card
   below the server response. The completion feedback remains green above. */
.api-request-actions .api-next-panel{
  display:contents;
  padding:0;
  border:0;
  background:transparent;
}
.api-request-actions .api-next-button{
  flex:none;
  min-height:44px;
  border-color:#267349;
  background:#267349;
  color:#fff;
}
.api-request-actions .api-next-button:not(:disabled):hover{
  background:#1f603b;
  border-color:#1f603b;
}
.api-request-actions .api-next-button[disabled]{
  cursor:default;
}


/* Guided API next-step navigation: keep the heading visible and flash the
   exact task card after advancing, not the entire lesson or input editor. */
.api-active-step { scroll-margin-top: 112px; }
.api-active-step.is-new-step-highlighted {
  animation: api-new-step-attention 1.3s ease-out;
}
@keyframes api-new-step-attention {
  0% { box-shadow: 0 0 0 5px rgba(35, 105, 66, .32); background-color: #ddf3e2; border-color: #398358; }
  55% { box-shadow: 0 0 0 3px rgba(35, 105, 66, .15); background-color: #f0faf3; }
  100% { box-shadow: 0 0 0 0 rgba(35, 105, 66, 0); background-color: #fff; border-color: #d9dfd8; }
}
@media (prefers-reduced-motion: reduce) {
  .api-active-step.is-new-step-highlighted {
    animation: none;
    outline: 3px solid #267349;
    outline-offset: 2px;
  }
}


/* Responsive HTTP request / response workspace. The container query uses the
   actual learning-card width, not the browser's viewport width. */
.api-lab{container-type:inline-size}
.api-workspace{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:18px;
  align-items:start;
  min-width:0;
}
.api-workspace > *{min-width:0}
.api-response-status{scroll-margin-top:110px}
@container (min-width:780px){
  .api-workspace{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  }
  .api-workspace .api-response-panel{
    position:sticky;
    top:100px;
  }
}


/* HTTP/1.1 vs HTTP/2: calm, static overview before the animated road lab. */
.http-connections-figure{display:grid;gap:14px;margin:20px 0;min-width:0}
.http-connections-caption{font-weight:800;color:#224f40;font-size:1.05rem}
.http-connections-lead{margin:0;line-height:1.55}
.http-connections-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:stretch}
.http-connections-card{border:1px solid #ccdbd4;border-radius:14px;background:#f7fbf9;padding:16px;display:grid;gap:16px;align-content:start;min-width:0}
.http-connections-card-head{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between;gap:9px}
.http-connections-card-head h4{margin:0;font-size:1.14rem;color:#234c41}
.http-connections-count{border-radius:999px;padding:5px 10px;background:#e4eee9;font-size:.78rem;color:#2b5b47;font-weight:750}
.http-connections-endpoints{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:6px;align-items:center}
.http-connections-endpoint{display:grid;justify-items:center;gap:7px;text-align:center;min-width:0;padding:12px 6px;border:1px solid #d6e2dc;border-radius:9px;background:#fff;font-size:.85rem}
.http-connections-endpoint strong{overflow-wrap:anywhere}
.http-connections-browser-icon{display:block;width:38px;height:27px;border:2px solid #638f84;border-radius:5px;background:linear-gradient(to bottom,#dcefe8 0 8px,#fff 8px)}
.http-connections-server-icon{display:block;width:38px;height:29px;border:2px solid #67849b;border-radius:5px;background:repeating-linear-gradient(to bottom,#d7e6f0 0 6px,#6c95ac 6px 9px)}
.http-connections-direction{white-space:nowrap;color:#327d65;font-size:.84rem;font-weight:750}
.http-connections-tracks{display:grid;gap:12px;min-width:0}
.http-connections-track{display:grid;gap:5px;min-width:0}
.http-connections-track-title{font-size:.78rem;color:#4b6055;font-weight:650}
.http-connections-rail{display:flex;align-items:center;justify-content:space-evenly;gap:7px;border:2px solid #8ca7a0;background:#e9f3ef;border-radius:9px;padding:11px 10px;min-height:54px;min-width:0}
.http-connections-frame{display:inline-flex;align-items:center;justify-content:center;padding:8px 11px;min-width:0;border-radius:6px;border:1px solid;font-size:.84rem;font-weight:800;white-space:nowrap}
.http-connections-frame.is-image{border-color:#ce9930;background:#ffe6a1;color:#674e15}
.http-connections-frame.is-json{border-color:#2e9e8a;background:#b8eadd;color:#175b50}
.http-connections-explanation{margin:0;line-height:1.55;font-size:.91rem;color:#33483c}
.http-connections-legend{display:flex;gap:12px 20px;flex-wrap:wrap}
.http-connections-legend-item{display:inline-flex;align-items:center;gap:7px;font-size:.86rem;color:#385347}
.http-connections-swatch{width:19px;height:15px;display:inline-block;border-radius:4px}
.http-connections-swatch.is-image{background:#ffe6a1;border:1px solid #ce9930}
.http-connections-swatch.is-json{background:#b8eadd;border:1px solid #2e9e8a}
.http-connections-footnote{margin:0;padding:11px 13px;border-left:3px solid #7cae9b;background:#eff7f3;color:#385347;font-size:.87rem;line-height:1.55}
@media(max-width:760px){.http-connections-grid{grid-template-columns:1fr}.http-connections-card{padding:13px}}
@media(max-width:380px){.http-connections-rail{padding:8px 5px;gap:4px}.http-connections-frame{padding:6px 8px}}


/* KT05 HTTP/2 vs HTTP/3: packet-loss overview before interactive traffic. */
.http-loss-intro{display:grid;gap:14px;min-width:0;margin:18px 0 22px}
.http-loss-caption{font-size:1.07rem;font-weight:800;color:#244f40}
.http-loss-lead{margin:0;line-height:1.6}
.http-loss-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;min-width:0}
.http-loss-card{min-width:0;display:grid;gap:13px;align-content:start;padding:15px;border:1px solid #cadcd3;border-radius:15px;background:#f8fbf9}
.http-loss-card-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:9px}
.http-loss-card-head h4{margin:0;font-size:1.16rem;color:#254e42}
.http-loss-connection-label{padding:6px 9px;border-radius:99px;background:#e3f0e9;color:#35614d;font-size:.78rem;font-weight:700;overflow-wrap:anywhere}
.http-loss-svg{display:block;width:100%;height:auto;min-width:0;border-radius:12px;border:1px solid #d5e5dd}
.http-loss-statuses{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.http-loss-status{display:grid;gap:4px;padding:10px 11px;border-radius:9px;border:1px solid #d7e3da;background:#f1f6f2;min-width:0}
.http-loss-status.is-wartet{border-color:#dfbbb6;background:#fff2ef;color:#8e3430}
.http-loss-status.is-weiter{border-color:#a1c9ac;background:#ecf8ef;color:#22603b}
.http-loss-status-label{font-size:.83rem;font-weight:650}
.http-loss-status strong{font-size:.88rem;overflow-wrap:anywhere}
.http-loss-explanation{margin:0;font-size:.92rem;line-height:1.58;color:#3b5247}
.http-loss-legend{display:flex;flex-wrap:wrap;gap:10px 21px}
.http-loss-legend-item{display:inline-flex;align-items:center;gap:8px;font-size:.84rem;color:#3e594b}
.http-loss-swatch{width:18px;height:15px;display:inline-block;flex:none;border-radius:4px;border:1px solid}
.http-loss-swatch.is-image{background:#f4c354;border-color:#9d742d}
.http-loss-swatch.is-json{background:#56cbb9;border-color:#267a6f}
.http-loss-swatch.is-missing{background:#ec7570;border-color:#a33036}
.http-loss-footnote{margin:0;border-left:3px solid #85ae99;border-radius:0 8px 8px 0;background:#f0f7f2;padding:12px 14px;color:#3a5546;line-height:1.55;font-size:.87rem}
@media(max-width:830px){.http-loss-grid{grid-template-columns:1fr}}
@media(max-width:460px){
  .http-loss-card{padding:12px}
  .http-loss-svg{height:auto}
  .http-loss-statuses{grid-template-columns:1fr}
}


/* Dual analog / technical representations. Use real container width rather
   than viewport size, since learning cards can have a narrow content column. */
.http-transport-lab{container-type:inline-size}
.http-transport-view-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0}
.http-transport-view-tab{border:1px solid #91b2a2;background:#fff;border-radius:9px;min-height:44px;padding:9px 13px;font:inherit;font-weight:650;color:#315445;cursor:pointer}
.http-transport-view-tab[aria-pressed=true]{background:#256e52;color:#fff;border-color:#256e52}
.http-transport-views{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;min-width:0}
.http-transport-view{display:grid;gap:10px;min-width:0;align-content:start}
.http-transport-view-heading{margin:0;font-size:1.04rem;color:#234f3b;font-weight:750}
.http-transport-network{min-width:0;display:grid;gap:12px;padding:14px;border:1px solid #bfd5ca;border-radius:14px;background:#f1f7f3}
.http-transport-network-connection{margin:0;padding:10px 11px;border-radius:9px;background:#e0ece5;color:#1e5342;font-weight:750;font-size:.9rem;overflow-wrap:anywhere}
.http-transport-network-endpoints{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;font-size:.83rem;color:#315846}
.http-transport-network-endpoints strong{border:1px solid #c2d5c9;background:#fff;border-radius:8px;padding:9px}
.http-transport-network-groups{display:grid;gap:10px}
.http-transport-network-group{min-width:0;display:grid;gap:8px;padding:11px;border-radius:10px;background:#fff;border:1px solid #d2ded7}
.http-transport-network-group h5{margin:0;font-size:.88rem;color:#385e4c}
.http-transport-network-blocks{display:flex;gap:6px;flex-wrap:wrap;align-items:center;min-height:42px}
.http-transport-network-block{min-height:40px;padding:7px 10px;border:2px solid transparent;border-radius:8px;font:inherit;font-size:.83rem;font-weight:750;cursor:pointer}
.http-transport-network-block.is-image{background:#fbe6aa;border-color:#c38f2a;color:#684913}
.http-transport-network-block.is-json{background:#bbeadf;border-color:#2b9d88;color:#15574c}
.http-transport-network-block.is-missing{background:#ffe1db;border-color:#ba514e;color:#8f2423}
.http-transport-network-block.is-waiting{border-style:dashed;filter:saturate(.7)}
.http-transport-network-block.is-emphasized{outline:3px solid #1a523d;outline-offset:2px;box-shadow:0 0 0 3px #cae5d4}
.http-transport-network-block.is-dimmed{opacity:.36}
.http-transport-vehicle.is-emphasized{filter:drop-shadow(0 0 5px #f7f9ef)}
.http-transport-vehicle.is-dimmed{opacity:.28}
.http-transport-vehicle[role=button]{cursor:pointer;outline:none}
.http-transport-vehicle[role=button]:focus-visible{filter:drop-shadow(0 0 6px #f9f8c0)}
.http-transport-network-outcome{margin:0;padding:12px;border-radius:9px;border:1px solid #c8d7ce;background:#fff;color:#305545;font-weight:700;line-height:1.5}
.http-transport-network-outcome[data-valid=true]{border-color:#a0c7ad;background:#e7f5eb;color:#236040}
.http-transport-network-outcome[data-valid=false]{border-color:#dfa7a2;background:#fff0ee;color:#953029}
.http-transport-correspondence{padding:11px 13px;border-left:4px solid #5f9e84;background:#eef7f1;border-radius:0 8px 8px 0;color:#365948;font-size:.89rem;line-height:1.5}
.http-transport-view[hidden]{display:none!important}
.http-transport-views{grid-template-columns:minmax(0,1fr)}
.http-transport-view-tab[aria-selected=true]{background:#256e52;color:#fff;border-color:#256e52}
.http-transport-view-tab[aria-selected=false]{background:#fff;color:#315445}
.http-transport-network-track{position:relative;overflow:hidden;min-height:68px;background:#314551;border:1px solid #60767c;border-radius:10px}
.http-transport-network-track::before{content:"";position:absolute;left:12px;right:12px;top:51%;border-top:2px dashed #8ba4a2}
.http-transport-network-track-caption{position:absolute;top:6px;left:10px;font-size:.74rem;font-weight:650;color:#dceee5}
.http-transport-network-movers{position:relative;height:68px;margin:0 30px 0 12px}
.http-transport-moving-packet{display:grid;place-items:center;position:absolute;top:30px;left:0;min-width:42px;height:31px;border-radius:7px;border:2px solid #a9b5b0;transform:translateX(-50%);font-weight:800;font-size:.84rem;will-change:left}
.http-transport-moving-packet.is-image{background:#f7db91;border-color:#c38f2a;color:#62460d}
.http-transport-moving-packet.is-json{background:#a1e3d5;border-color:#2b9d88;color:#174e46}
.http-transport-moving-packet.is-blocked{outline:3px dashed #da756a;outline-offset:2px}
.http-transport-moving-packet.is-emphasized{box-shadow:0 0 0 4px #f3f2a1}
.http-transport-moving-packet.is-dimmed{opacity:.33}
@media(prefers-reduced-motion:reduce){.http-transport-moving-packet{transition:none}}
@media(max-width:520px){
  .http-transport-view-tab{flex:1 1 0;font-size:.86rem;padding:8px}
  .http-transport-network{padding:10px}
  .http-transport-network-group{padding:9px}
  .http-transport-correspondence{font-size:.85rem}
}

/* Python list indexing: reusable, accessible content illustration. */
.python-list-index {
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 14px;
  padding: 1rem;
  margin: 1rem 0;
  background: var(--surface, #fff);
}
.python-list-index h4 { margin: 0 0 .35rem; }
.python-list-index p { margin: .4rem 0 .8rem; }
.python-list-index-cells {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  padding: .25rem 0;
}
.python-list-index-cell {
  display: flex;
  flex: 1 1 100px;
  max-width: 160px;
  min-width: 85px;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  padding: .75rem .5rem;
  color: inherit;
  background: transparent;
  border: 2px solid var(--border, #cbd5e1);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
}
.python-list-index-cell strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.python-list-index-label { font-size: .8rem; opacity: .85; }
.python-list-index-cell[aria-pressed="true"] {
  border-color: var(--primary, #2563eb);
  background: var(--surface-alt, rgba(37, 99, 235, .09));
}
.python-list-index-cell:focus-visible { outline: 3px solid var(--primary, #2563eb); outline-offset: 3px; }
.python-list-index-feedback { font-weight: 650; margin-top: .8rem !important; }
.python-list-index-count { font-size: .9rem; }
