:root {
  color-scheme: light;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #eef2f8;
}

.code-lab-page {
  --lab-ink: #11131a;
  --lab-muted: #677183;
  --lab-blue: #2457ff;
  --lab-blue-deep: #153bc6;
  --lab-blue-soft: #e8eeff;
  --lab-lime: #c9ff42;
  --lab-paper: #ffffff;
  --lab-surface: #f5f7fb;
  --lab-border: rgba(25, 41, 80, 0.12);
  --lab-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background: #eef2f8;
  color: var(--lab-ink);
  font-family: "Golos Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-variant-emoji: text;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.code-lab-page *,
.code-lab-page *::before,
.code-lab-page *::after {
  box-sizing: border-box;
}

:where(.code-lab-page) button,
:where(.code-lab-page) textarea {
  color: inherit;
  font: inherit;
}

:where(.code-lab-page) button {
  border: 0;
  cursor: pointer;
}

:where(.code-lab-page) a {
  color: inherit;
  text-decoration: none;
}

.code-lab-page ::selection {
  background: var(--lab-lime);
  color: var(--lab-ink);
}

.code-lab-shell {
  display: grid;
  grid-template-rows: 70px minmax(0, 1fr) 30px;
  min-height: 100vh;
  height: 100dvh;
  padding: 10px;
  background:
    radial-gradient(circle at 88% 8%, rgba(98, 150, 255, 0.22), transparent 24%),
    linear-gradient(135deg, #f8f9fc, #edf1f8 55%, #f7f9fc);
}

.lab-topbar {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 250px minmax(240px, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--lab-border);
  border-radius: 18px 18px 0 0;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 60px rgba(37, 58, 107, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.lab-topbar::after {
  position: absolute;
  right: 22%;
  bottom: 0;
  left: 250px;
  height: 1px;
  transform: scaleX(0.72);
  transform-origin: left;
  background: linear-gradient(90deg, var(--lab-blue), rgba(36, 87, 255, 0));
  content: "";
}

.lab-brand {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 14px;
  padding: 0 24px;
  border-right: 1px solid var(--lab-border);
}

.lab-brand-mark {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 7px);
  gap: 4px;
  align-items: end;
  width: 29px;
  height: 29px;
  padding: 4px;
  overflow: hidden;
  border-radius: 7px;
  background: var(--lab-blue);
  box-shadow: 0 8px 20px rgba(36, 87, 255, 0.25);
}

.lab-brand-mark i {
  display: block;
  border-radius: 2px 2px 0 0;
  background: #ffffff;
}

.lab-brand-mark i:nth-child(1) {
  height: 9px;
}

.lab-brand-mark i:nth-child(2) {
  height: 17px;
}

.lab-brand-mark i:nth-child(3) {
  height: 12px;
  background: var(--lab-lime);
}

.lab-brand-copy {
  display: grid;
  grid-template-columns: auto auto;
  gap: 8px;
  align-items: baseline;
}

.lab-brand-copy strong {
  color: var(--lab-ink);
  font-size: 1rem;
  letter-spacing: -0.04em;
}

.lab-brand-copy small {
  color: var(--lab-blue);
  font-family: var(--lab-mono);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.lab-session {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 28px;
  color: #586276;
  font-family: var(--lab-mono);
  font-size: .75rem;
  letter-spacing: 0.08em;
}

.lab-session small {
  margin-left: auto;
  color: #9aa2af;
  font-size: inherit;
}

.lab-session-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #43c95c;
}

.lab-session-dot::after {
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(67, 201, 92, 0.35);
  border-radius: inherit;
  content: "";
  animation: lab-pulse 2.2s ease-out infinite;
}

@keyframes lab-pulse {
  0% {
    transform: scale(0.35);
    opacity: 1;
  }

  75%,
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.lab-top-actions {
  display: flex;
  align-self: stretch;
  border-left: 1px solid var(--lab-border);
}

.lab-top-actions > a,
.lab-help-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 112px;
  padding: 0 20px;
  background: transparent;
  color: #555f71;
  font-size: .75rem;
  font-weight: 700;
}

.lab-top-actions > a {
  border-right: 1px solid var(--lab-border);
}

.lab-top-actions > a i {
  color: var(--lab-blue);
  font-style: normal;
  transition: transform 0.25s ease;
}

.lab-top-actions > a:hover i {
  transform: translate(3px, -3px);
}

.lab-help-button kbd {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid rgba(36, 87, 255, 0.18);
  border-radius: 5px;
  background: var(--lab-blue-soft);
  color: var(--lab-blue);
  font-family: var(--lab-mono);
  font-size: .75rem;
}

.lab-workspace {
  display: grid;
  grid-template-columns: 250px minmax(500px, 1fr) minmax(290px, 340px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--lab-border);
  border-top: 0;
  border-bottom: 0;
  background: rgba(250, 251, 254, 0.9);
}

.lab-sidebar {
  display: flex;
  min-height: 0;
  flex-direction: column;
  border-right: 1px solid var(--lab-border);
  background: rgba(255, 255, 255, 0.7);
}

.lab-project-head,
.lab-explorer > header,
.lab-missions > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lab-project-head {
  min-height: 52px;
  padding: 0 18px 0 20px;
  border-bottom: 1px solid var(--lab-border);
  color: #7a8496;
  font-family: var(--lab-mono);
  font-size: .75rem;
  letter-spacing: 0.08em;
}

.lab-sidebar-toggle {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 5px;
  background: transparent;
  color: #949cab;
}

.lab-sidebar-toggle:hover {
  background: var(--lab-blue-soft);
  color: var(--lab-blue);
}

.lab-explorer,
.lab-missions {
  padding: 22px 14px 0;
}

.lab-explorer > header,
.lab-missions > header {
  padding: 0 8px 13px;
}

.lab-explorer > header strong,
.lab-missions > header strong {
  font-size: .75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lab-explorer > header small,
.lab-missions > header small {
  color: #9ba4b3;
  font-family: var(--lab-mono);
  font-size: .75rem;
  letter-spacing: 0.06em;
}

.lab-file {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 6px;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 0 12px 0 9px;
  border-radius: 7px;
  background: transparent;
  color: #4f596a;
  font-family: var(--lab-mono);
  font-size: .75rem;
  text-align: left;
}

.lab-file.is-active {
  background: var(--lab-blue-soft);
  color: var(--lab-blue-deep);
}

.lab-file > i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lab-blue);
  box-shadow: 0 0 0 4px rgba(36, 87, 255, 0.1);
}

.lab-file-icon {
  display: grid;
  width: 28px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(36, 87, 255, 0.16);
  border-radius: 5px;
  background: #ffffff;
  color: var(--lab-blue);
  font-family: var(--lab-mono);
  font-size: .75rem;
  font-weight: 800;
}

.lab-missions {
  padding-top: 34px;
}

.lab-missions ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lab-missions button {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  color: #5d6676;
  text-align: left;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.lab-missions button:hover {
  transform: translateX(2px);
  background: rgba(36, 87, 255, 0.055);
}

.lab-missions li.is-active button {
  background: #ffffff;
  box-shadow:
    0 10px 26px rgba(29, 49, 98, 0.08),
    inset 3px 0 0 var(--lab-blue);
  color: var(--lab-ink);
}

.lab-missions button > span:first-child {
  color: #9ca4b1;
  font-family: var(--lab-mono);
  font-size: .75rem;
}

.lab-missions button > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.lab-missions button strong {
  overflow: hidden;
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lab-missions button small {
  color: #9ba3b1;
  font-family: var(--lab-mono);
  font-size: .75rem;
}

.lab-missions button > i {
  color: #c0c5ce;
  font-size: .75rem;
  font-style: normal;
}

.lab-missions li.is-active button > i {
  color: var(--lab-blue);
}

.lab-sidebar-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: auto;
  border-top: 1px solid var(--lab-border);
}

.lab-sidebar-status > div {
  display: grid;
  gap: 5px;
  min-height: 58px;
  align-content: center;
  padding: 0 16px;
}

.lab-sidebar-status > div + div {
  border-left: 1px solid var(--lab-border);
}

.lab-sidebar-status span {
  color: #929aa8;
  font-family: var(--lab-mono);
  font-size: .75rem;
  text-transform: uppercase;
}

.lab-sidebar-status strong {
  overflow: hidden;
  color: #495264;
  font-family: var(--lab-mono);
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lab-editor-panel {
  display: grid;
  grid-template-rows: 52px 40px minmax(0, 1fr) clamp(120px, 26vh, 210px);
  min-width: 0;
  min-height: 0;
  background: #ffffff;
}

.lab-editor-toolbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  border-bottom: 1px solid var(--lab-border);
}

.lab-language-switch {
  display: flex;
  align-items: stretch;
}

.lab-language-switch button {
  position: relative;
  display: grid;
  grid-template-columns: 30px auto auto;
  gap: 8px;
  align-items: center;
  min-width: 134px;
  padding: 0 16px;
  border-right: 1px solid var(--lab-border);
  background: #fafbfe;
  color: #7a8393;
  font-size: .75rem;
}

.lab-language-switch button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  background: var(--lab-blue);
  content: "";
  transition: transform 0.25s ease;
}

.lab-language-switch button.is-active {
  background: #ffffff;
  color: var(--lab-ink);
}

.lab-language-switch button.is-active::after {
  transform: scaleX(1);
}

.lab-language-switch button > i {
  display: grid;
  width: 27px;
  height: 25px;
  place-items: center;
  border-radius: 5px;
  background: var(--lab-blue-soft);
  color: var(--lab-blue);
  font-family: var(--lab-mono);
  font-size: .75rem;
  font-style: normal;
  font-weight: 800;
}

.lab-language-switch button[data-language="csharp"] > i {
  background: #f0ebff;
  color: #6843db;
}

.lab-language-switch button small {
  color: #9aa2b0;
  font-family: var(--lab-mono);
  font-size: .75rem;
}

.lab-run-controls {
  display: flex;
  align-items: stretch;
}

.lab-reset-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-left: 1px solid var(--lab-border);
  background: #ffffff;
  color: #737d8e;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.lab-reset-button i {
  color: #9ba3af;
  font-size: 0.8rem;
  font-style: normal;
}

.lab-run-button {
  position: relative;
  display: grid;
  grid-template-columns: 30px auto 6px;
  gap: 10px;
  align-items: center;
  min-width: 158px;
  padding: 0 16px;
  overflow: hidden;
  background: var(--lab-blue);
  color: #ffffff;
  text-align: left;
  transition:
    background 0.25s ease,
    transform 0.25s ease;
}

.lab-run-button:hover {
  background: var(--lab-blue-deep);
}

.lab-run-button:active {
  transform: scale(0.985);
}

.lab-run-button::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -50%;
  width: 36%;
  transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  content: "";
}

.lab-run-button:hover::after {
  animation: lab-run-glint 0.9s ease;
}

@keyframes lab-run-glint {
  to {
    left: 120%;
  }
}

.lab-run-button.is-running {
  pointer-events: none;
}

.lab-run-button.is-running::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  transform-origin: left;
  background: var(--lab-lime);
  content: "";
  animation: lab-run-progress 1.4s ease-in-out infinite;
}

@keyframes lab-run-progress {
  0% {
    transform: scaleX(0);
  }

  55% {
    transform: scaleX(0.72);
  }

  100% {
    transform: scaleX(1);
    opacity: 0;
  }
}

.lab-run-icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  background: var(--lab-lime);
  color: var(--lab-ink);
  font-size: .75rem;
}

.lab-run-copy {
  display: grid;
  gap: 2px;
}

.lab-run-copy strong {
  font-size: .75rem;
  letter-spacing: 0.06em;
}

.lab-run-copy small {
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--lab-mono);
  font-size: .75rem;
}

.lab-run-signal {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lab-lime);
  box-shadow: 0 0 0 4px rgba(201, 255, 66, 0.15);
}

.lab-editor-tabs {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--lab-border);
  background: #f8f9fc;
}

.lab-editor-tabs > button {
  display: grid;
  grid-template-columns: 26px auto 6px;
  gap: 8px;
  align-items: center;
  align-self: stretch;
  min-width: 148px;
  padding: 0 14px;
  border-right: 1px solid var(--lab-border);
  background: #ffffff;
  color: #4e5869;
  font-family: var(--lab-mono);
  font-size: .75rem;
}

.lab-editor-tabs .lab-file-icon {
  width: 24px;
  height: 20px;
  font-size: .75rem;
}

.lab-editor-tabs > button > i {
  color: var(--lab-blue);
  font-size: .75rem;
  font-style: normal;
}

.lab-editor-path {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 0 16px;
  overflow: hidden;
  color: #9aa2af;
  font-family: var(--lab-mono);
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lab-editor-path i {
  color: var(--lab-blue);
  font-style: normal;
}

.lab-editor-path strong {
  color: #697284;
  font-weight: 600;
}

.lab-editor-surface {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 96% 4%, rgba(36, 87, 255, 0.035), transparent 24%),
    #ffffff;
}

#lab-monaco-editor,
#lab-editor-fallback {
  position: absolute;
  inset: 0;
}

#lab-monaco-editor {
  z-index: 2;
}

#lab-editor-fallback {
  z-index: 1;
  width: 100%;
  height: 100%;
  resize: none;
  border: 0;
  outline: 0;
  padding: 26px 24px 26px 72px;
  background: #ffffff;
  color: #1b2436;
  font-family: var(--lab-mono);
  font-size: 13px;
  line-height: 1.7;
  tab-size: 4;
}

.lab-editor-coordinate {
  position: absolute;
  z-index: 5;
  top: 10px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid rgba(36, 87, 255, 0.1);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.82);
  color: #8b94a4;
  font-family: var(--lab-mono);
  font-size: .75rem;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.lab-editor-coordinate i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lab-blue);
}

.lab-loading-editor {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #657084;
  font-family: var(--lab-mono);
  text-align: center;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}

.lab-editor-surface.is-ready .lab-loading-editor {
  visibility: hidden;
  opacity: 0;
}

.lab-loading-editor > span {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(36, 87, 255, 0.15);
  border-top-color: var(--lab-blue);
  border-radius: 50%;
  animation: lab-spinner 0.9s linear infinite;
}

@keyframes lab-spinner {
  to {
    transform: rotate(360deg);
  }
}

.lab-loading-editor strong {
  margin-top: 7px;
  color: var(--lab-blue);
  font-size: .75rem;
  letter-spacing: 0.1em;
}

.lab-loading-editor small {
  color: #a0a7b3;
  font-size: .75rem;
}

.lab-console {
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr);
  min-height: 0;
  border-top: 1px solid var(--lab-border);
  background: #f8f9fc;
}

.lab-console-head {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  border-bottom: 1px solid var(--lab-border);
}

.lab-console-head > div {
  display: flex;
  align-items: center;
}

.lab-console-head [role="tab"] {
  position: relative;
  min-width: 84px;
  padding: 0 16px;
  background: transparent;
  color: #8b94a3;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lab-console-head [role="tab"]::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  transform: scaleX(0);
  background: var(--lab-blue);
  content: "";
}

.lab-console-head [role="tab"].is-active {
  color: var(--lab-blue);
}

.lab-console-head [role="tab"].is-active::after {
  transform: scaleX(1);
}

.lab-console-head > div:last-child {
  gap: 14px;
  padding-right: 12px;
}

.lab-console-head > div:last-child span {
  color: #9aa3b2;
  font-family: var(--lab-mono);
  font-size: .75rem;
}

.lab-console-head [data-clear-console] {
  padding: 5px 8px;
  border-radius: 4px;
  background: transparent;
  color: #778194;
  font-family: var(--lab-mono);
  font-size: .75rem;
}

.lab-console-head [data-clear-console]:hover {
  background: var(--lab-blue-soft);
  color: var(--lab-blue);
}

.lab-console-body {
  display: none;
  min-width: 0;
  min-height: 0;
  padding: 13px 18px;
  overflow: auto;
}

.lab-console-body.is-active {
  display: grid;
}

.lab-console-body[data-console-panel="output"] {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.lab-console-prompt {
  display: flex;
  gap: 7px;
  align-items: center;
  padding-top: 2px;
  color: #919aaa;
  font-family: var(--lab-mono);
  font-size: .75rem;
}

.lab-console-prompt > span {
  color: var(--lab-blue);
  font-size: .75rem;
}

.lab-console pre {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #273246;
  font-family: var(--lab-mono);
  font-size: .75rem;
  line-height: 1.58;
  white-space: pre-wrap;
}

.lab-console pre .is-system {
  color: #8993a4;
}

.lab-console pre .is-error {
  color: #d33c54;
}

.lab-console pre .is-success {
  color: #168243;
}

.lab-console-body label {
  display: grid;
  grid-template-rows: auto minmax(60px, 1fr);
  gap: 9px;
  min-height: 100%;
}

.lab-console-body label > span {
  color: #8791a2;
  font-family: var(--lab-mono);
  font-size: .75rem;
  letter-spacing: 0.04em;
}

#lab-stdin {
  width: 100%;
  min-height: 62px;
  resize: none;
  border: 1px solid rgba(36, 87, 255, 0.12);
  border-radius: 7px;
  outline: none;
  padding: 10px 12px;
  background: #ffffff;
  color: #253147;
  font-family: var(--lab-mono);
  font-size: .75rem;
  line-height: 1.5;
}

#lab-stdin:focus {
  border-color: rgba(36, 87, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(36, 87, 255, 0.07);
}

.lab-brief {
  display: grid;
  grid-template-rows: 52px minmax(190px, auto) auto auto minmax(70px, 1fr);
  min-height: 0;
  overflow: auto;
  border-left: 1px solid var(--lab-border);
  background:
    radial-gradient(circle at 88% 15%, rgba(36, 87, 255, 0.13), transparent 24%),
    #f7f9fd;
}

.lab-brief-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--lab-border);
  color: #7c8697;
  font-family: var(--lab-mono);
  font-size: .75rem;
  letter-spacing: 0.07em;
}

.lab-brief-head > span strong {
  color: var(--lab-blue);
}

.lab-brief-head small {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #758092;
  font-size: .75rem;
}

.lab-brief-head small i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #43c95c;
  box-shadow: 0 0 0 4px rgba(67, 201, 92, 0.1);
}

.lab-brief-main {
  position: relative;
  display: flex;
  min-height: 220px;
  align-items: flex-end;
  padding: 28px 24px;
  overflow: hidden;
  border-bottom: 1px solid var(--lab-border);
  background: rgba(255, 255, 255, 0.64);
}

.lab-brief-main::before {
  position: absolute;
  top: 20px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(36, 87, 255, 0.15);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 8px rgba(36, 87, 255, 0.035),
    inset 0 0 0 15px rgba(36, 87, 255, 0.03);
  content: "";
}

.lab-brief-main::after {
  position: absolute;
  top: 41px;
  right: 37px;
  width: 14px;
  height: 2px;
  transform: rotate(-35deg);
  background: var(--lab-blue);
  content: "";
  transform-origin: right center;
  animation: lab-gauge 4s ease-in-out infinite alternate;
}

@keyframes lab-gauge {
  to {
    transform: rotate(35deg);
  }
}

.lab-brief-index {
  position: absolute;
  top: -0.12em;
  left: -0.05em;
  color: rgba(36, 87, 255, 0.055);
  font-size: clamp(8rem, 11vw, 11rem);
  font-weight: 800;
  letter-spacing: -0.1em;
  line-height: 1;
  pointer-events: none;
}

.lab-brief-copy {
  position: relative;
  z-index: 1;
}

.lab-brief-copy > span {
  color: var(--lab-blue);
  font-family: var(--lab-mono);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.lab-brief-copy h1 {
  max-width: 270px;
  margin: 13px 0 0;
  font-size: clamp(2rem, 2.8vw, 3.2rem);
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.lab-brief-copy p {
  max-width: 280px;
  margin: 16px 0 0;
  color: #677183;
  font-size: .75rem;
  line-height: 1.55;
}

.lab-checklist,
.lab-brief-hint {
  padding: 22px 24px;
  border-bottom: 1px solid var(--lab-border);
}

.lab-checklist > span,
.lab-brief-hint header {
  color: #8d96a5;
  font-family: var(--lab-mono);
  font-size: .75rem;
  letter-spacing: 0.07em;
}

.lab-checklist ul {
  display: grid;
  gap: 11px;
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
}

.lab-checklist li {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  color: #555f70;
  font-size: .75rem;
  line-height: 1.42;
}

.lab-checklist li i {
  position: relative;
  width: 13px;
  height: 13px;
  margin-top: 1px;
  border: 1px solid rgba(36, 87, 255, 0.28);
  border-radius: 3px;
}

.lab-checklist li i::after {
  position: absolute;
  top: 2px;
  left: 3px;
  width: 5px;
  height: 3px;
  transform: rotate(-45deg);
  border-bottom: 1px solid var(--lab-blue);
  border-left: 1px solid var(--lab-blue);
  content: "";
}

.lab-brief-hint header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lab-brief-hint button {
  padding: 0;
  background: transparent;
  color: var(--lab-blue);
  font-family: var(--lab-mono);
  font-size: .75rem;
}

.lab-brief-hint p {
  max-height: 0;
  margin: 0;
  overflow: hidden;
  color: #657082;
  font-size: .75rem;
  line-height: 1.55;
  opacity: 0;
  transition:
    max-height 0.35s ease,
    margin 0.35s ease,
    opacity 0.25s ease;
}

.lab-brief-hint.is-open p {
  max-height: 100px;
  margin-top: 14px;
  opacity: 1;
}

.lab-brief-progress {
  display: grid;
  gap: 13px;
  align-content: end;
  min-height: 84px;
  padding: 20px 24px;
}

.lab-brief-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8c95a4;
  font-family: var(--lab-mono);
  font-size: .75rem;
  letter-spacing: 0.06em;
}

.lab-brief-progress > div strong {
  color: var(--lab-blue);
}

.lab-brief-progress > span {
  height: 3px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(36, 87, 255, 0.1);
}

.lab-brief-progress > span i {
  display: block;
  width: 33.333%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lab-blue), #7894ff, var(--lab-lime));
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.lab-statusbar {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--lab-border);
  border-radius: 0 0 18px 18px;
  background: var(--lab-blue);
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--lab-mono);
  font-size: .75rem;
  letter-spacing: 0.04em;
}

.lab-statusbar > span {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 7px;
  padding: 0 13px;
  border-right: 1px solid rgba(255, 255, 255, 0.13);
  white-space: nowrap;
}

.lab-statusbar > span:first-child {
  color: #ffffff;
}

.lab-statusbar > span:last-child {
  margin-left: auto;
  border-right: 0;
}

.lab-statusbar i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lab-lime);
}

.lab-statusbar a {
  color: #ffffff;
}

.lab-shortcuts {
  position: fixed;
  z-index: 100;
  top: 84px;
  right: 24px;
  width: min(320px, calc(100vw - 40px));
  transform: translateY(-12px) scale(0.98);
  visibility: hidden;
  border: 1px solid rgba(36, 87, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(31, 48, 95, 0.18);
  opacity: 0;
  backdrop-filter: blur(18px);
  transition:
    transform 0.25s ease,
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.lab-shortcuts.is-open {
  transform: translateY(0) scale(1);
  visibility: visible;
  opacity: 1;
}

.lab-shortcuts header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 17px;
  border-bottom: 1px solid var(--lab-border);
}

.lab-shortcuts header strong {
  font-size: .75rem;
}

.lab-shortcuts header button {
  background: transparent;
  color: #7d8798;
  font-size: 1.2rem;
}

.lab-shortcuts dl {
  margin: 0;
  padding: 8px 17px 14px;
}

.lab-shortcuts dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  border-bottom: 1px solid rgba(25, 41, 80, 0.08);
}

.lab-shortcuts dt {
  color: #5d6678;
  font-size: .75rem;
}

.lab-shortcuts dd {
  display: flex;
  gap: 4px;
  margin: 0;
}

.lab-shortcuts kbd {
  display: grid;
  min-width: 24px;
  height: 23px;
  place-items: center;
  padding: 0 5px;
  border: 1px solid rgba(36, 87, 255, 0.14);
  border-radius: 5px;
  background: var(--lab-blue-soft);
  color: var(--lab-blue);
  font-family: var(--lab-mono);
  font-size: .75rem;
}

.code-lab-shell.is-sidebar-collapsed .lab-workspace {
  grid-template-columns: 58px minmax(500px, 1fr) minmax(290px, 340px);
}

.code-lab-shell.is-sidebar-collapsed .lab-sidebar {
  overflow: hidden;
}

.code-lab-shell.is-sidebar-collapsed .lab-project-head {
  justify-content: center;
  padding: 0;
}

.code-lab-shell.is-sidebar-collapsed .lab-project-head > span,
.code-lab-shell.is-sidebar-collapsed .lab-explorer > header,
.code-lab-shell.is-sidebar-collapsed .lab-missions > header,
.code-lab-shell.is-sidebar-collapsed .lab-file > span:not(.lab-file-icon),
.code-lab-shell.is-sidebar-collapsed .lab-file > i,
.code-lab-shell.is-sidebar-collapsed .lab-missions button > span,
.code-lab-shell.is-sidebar-collapsed .lab-missions button > i,
.code-lab-shell.is-sidebar-collapsed .lab-sidebar-status {
  display: none;
}

.code-lab-shell.is-sidebar-collapsed .lab-explorer,
.code-lab-shell.is-sidebar-collapsed .lab-missions {
  padding-right: 8px;
  padding-left: 8px;
}

.code-lab-shell.is-sidebar-collapsed .lab-file,
.code-lab-shell.is-sidebar-collapsed .lab-missions button {
  display: grid;
  min-width: 40px;
  padding: 0;
  place-items: center;
}

.code-lab-shell.is-sidebar-collapsed .lab-missions li {
  position: relative;
  height: 42px;
}

.code-lab-shell.is-sidebar-collapsed .lab-missions li::after {
  display: grid;
  position: absolute;
  inset: 0;
  place-items: center;
  border-radius: 7px;
  color: #7e8796;
  content: attr(data-short-label);
  font-family: var(--lab-mono);
  font-size: .75rem;
  pointer-events: none;
}

.code-lab-shell.is-sidebar-collapsed .lab-missions li.is-active::after {
  color: var(--lab-blue);
}

@media (max-width: 1180px) {
  .lab-topbar {
    grid-template-columns: 220px minmax(190px, 1fr) auto;
  }

  .lab-topbar::after {
    left: 220px;
  }

  .lab-workspace {
    grid-template-columns: 220px minmax(470px, 1fr) 300px;
  }

  .lab-brand {
    padding: 0 18px;
  }

  .lab-session {
    padding: 0 18px;
  }

  .lab-language-switch button {
    min-width: 122px;
    padding: 0 12px;
  }

  .lab-brief-main,
  .lab-checklist,
  .lab-brief-hint,
  .lab-brief-progress {
    padding-right: 20px;
    padding-left: 20px;
  }
}

@media (max-width: 980px) {
  .code-lab-page {
    overflow: auto;
  }

  .code-lab-shell {
    display: block;
    height: auto;
    min-height: 100vh;
    padding: 8px;
  }

  .lab-topbar {
    position: sticky;
    top: 8px;
    grid-template-columns: 210px minmax(0, 1fr) auto;
    min-height: 64px;
    border-radius: 16px;
  }

  .lab-session {
    justify-content: center;
  }

  .lab-session small {
    display: none;
  }

  .lab-top-actions > a {
    min-width: 72px;
  }

  .lab-top-actions > a span,
  .lab-help-button > span {
    display: none;
  }

  .lab-help-button {
    min-width: 56px;
    padding: 0 14px;
  }

  .lab-workspace,
  .code-lab-shell.is-sidebar-collapsed .lab-workspace {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    grid-template-rows: minmax(680px, calc(100vh - 114px)) auto;
    margin-top: 8px;
    overflow: visible;
    border: 1px solid var(--lab-border);
    border-radius: 16px;
  }

  .lab-sidebar {
    grid-column: 1;
    grid-row: 1;
    border-radius: 16px 0 0 0;
  }

  .lab-editor-panel {
    grid-column: 2;
    grid-row: 1;
    grid-template-rows: 52px 40px minmax(330px, 1fr) 190px;
    border-radius: 0 16px 0 0;
  }

  .lab-brief {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: minmax(250px, 0.9fr) minmax(280px, 1.1fr) minmax(240px, 0.8fr);
    grid-template-rows: 52px minmax(220px, auto) auto;
    border-top: 1px solid var(--lab-border);
    border-left: 0;
    border-radius: 0 0 16px 16px;
  }

  .lab-brief-head {
    grid-column: 1 / -1;
  }

  .lab-brief-main {
    grid-column: 1;
    grid-row: 2 / 4;
    border-right: 1px solid var(--lab-border);
    border-bottom: 0;
  }

  .lab-checklist {
    grid-column: 2;
    grid-row: 2 / 4;
    border-right: 1px solid var(--lab-border);
    border-bottom: 0;
  }

  .lab-brief-hint {
    grid-column: 3;
    grid-row: 2;
  }

  .lab-brief-progress {
    grid-column: 3;
    grid-row: 3;
  }

  .lab-statusbar {
    min-height: 30px;
    margin-top: 8px;
    border-radius: 12px;
  }

  .lab-statusbar > span:nth-child(3),
  .lab-statusbar > span:last-child {
    display: none;
  }
}

@media (max-width: 720px) {
  .code-lab-shell {
    padding: 0;
  }

  .lab-topbar {
    top: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 62px;
    border-width: 0 0 1px;
    border-radius: 0;
  }

  .lab-topbar::after,
  .lab-session {
    display: none;
  }

  .lab-brand {
    border-right: 0;
  }

  .lab-top-actions {
    border-left: 0;
  }

  .lab-workspace,
  .code-lab-shell.is-sidebar-collapsed .lab-workspace {
    display: flex;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    flex-direction: column;
  }

  .lab-sidebar {
    display: block;
    order: 2;
    border-top: 1px solid var(--lab-border);
    border-right: 0;
    border-radius: 0;
  }

  .lab-project-head,
  .lab-explorer,
  .lab-sidebar-status {
    display: none;
  }

  .lab-missions {
    padding: 16px 14px;
  }

  .lab-missions > header {
    padding-bottom: 10px;
  }

  .lab-missions ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lab-missions button {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 60px;
    padding: 8px;
  }

  .lab-missions button > i,
  .lab-missions button small {
    display: none;
  }

  .lab-editor-panel {
    display: grid;
    order: 1;
    min-height: calc(100dvh - 62px);
    grid-template-rows: auto 40px minmax(360px, 1fr) 180px;
    border-radius: 0;
  }

  .lab-editor-toolbar {
    min-height: 100px;
    flex-direction: column;
  }

  .lab-language-switch {
    min-height: 48px;
  }

  .lab-language-switch button {
    min-width: 0;
    flex: 1;
  }

  .lab-run-controls {
    min-height: 52px;
    border-top: 1px solid var(--lab-border);
  }

  .lab-reset-button {
    margin-left: auto;
  }

  .lab-run-button {
    min-width: 166px;
  }

  .lab-editor-path,
  .lab-editor-coordinate {
    display: none;
  }

  .lab-console-body.is-active[data-console-panel="output"] {
    display: block;
  }

  .lab-console-prompt {
    margin-bottom: 8px;
  }

  .lab-brief {
    display: grid;
    order: 3;
    grid-template-columns: 1fr;
    grid-template-rows: 52px auto auto auto auto;
    overflow: visible;
    border-top: 1px solid var(--lab-border);
    border-radius: 0;
  }

  .lab-brief-head,
  .lab-brief-main,
  .lab-checklist,
  .lab-brief-hint,
  .lab-brief-progress {
    grid-column: 1;
    grid-row: auto;
    border-right: 0;
  }

  .lab-brief-main {
    min-height: 230px;
    border-bottom: 1px solid var(--lab-border);
  }

  .lab-checklist,
  .lab-brief-hint {
    border-bottom: 1px solid var(--lab-border);
  }

  .lab-statusbar {
    min-height: 34px;
    margin: 0;
    border-width: 1px 0 0;
    border-radius: 0;
  }

  .lab-statusbar > span:nth-child(2),
  .lab-statusbar > span:nth-child(3),
  .lab-statusbar > span:nth-child(4),
  .lab-statusbar > span:last-child {
    display: none;
  }

  .lab-shortcuts {
    top: 72px;
    right: 10px;
  }
}

@media (max-width: 430px) {
  .lab-brand {
    gap: 10px;
    padding: 0 14px;
  }

  .lab-brand-copy {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .lab-top-actions > a {
    display: none;
  }

  .lab-language-switch button {
    grid-template-columns: 28px auto;
    gap: 7px;
  }

  .lab-language-switch button small {
    display: none;
  }

  .lab-reset-button {
    padding: 0 14px;
  }

  .lab-reset-button span {
    display: none;
  }

  .lab-run-button {
    min-width: 158px;
  }

  .lab-editor-tabs > button {
    min-width: 132px;
  }

  .lab-missions button > span:first-child {
    display: none;
  }

  .lab-missions button {
    grid-template-columns: 1fr;
  }

  .lab-missions button strong {
    font-size: .75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .code-lab-page *,
  .code-lab-page *::before,
  .code-lab-page *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Code Lab continues the visual system of the main HSDT page. */
.code-lab-page {
  --lab-gutter: clamp(24px, 4vw, 68px);
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
}

.code-lab-shell {
  display: grid;
  grid-template-rows: 86px minmax(0, 1fr) 34px;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: #ffffff;
}

.lab-topbar {
  position: relative;
  grid-template-columns: 240px minmax(220px, 1fr) auto;
  min-height: 86px;
  border: 0;
  border-bottom: 1px solid rgba(36, 87, 255, 0.12);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 38px rgba(24, 39, 79, 0.07);
}

.lab-topbar::after {
  display: none;
}

.lab-brand {
  align-self: stretch;
  padding: 12px 0 12px var(--lab-gutter);
  border-right: 0;
}

.lab-brand-logo {
  display: block;
  width: 190px;
  height: 56px;
  object-fit: cover;
  object-position: left center;
  mix-blend-mode: multiply;
}

.lab-page-label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 0 26px;
  color: #606875;
}

.lab-page-label span {
  color: var(--lab-blue);
  font-family: var(--lab-mono);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lab-page-label small {
  font-size: .75rem;
}

.lab-top-actions {
  border-left: 1px solid rgba(36, 87, 255, 0.1);
}

.lab-top-actions > a,
.lab-help-button {
  min-width: 118px;
}

.lab-workspace {
  height: auto;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-top: 1px solid rgba(36, 87, 255, 0.12);
  border-bottom: 1px solid rgba(36, 87, 255, 0.12);
  background: #ffffff;
}

.lab-sidebar {
  background: #f8f9fc;
}

.lab-project-head {
  color: var(--lab-blue);
}

.lab-missions li.is-active button {
  box-shadow:
    0 10px 26px rgba(29, 49, 98, 0.06),
    inset 3px 0 0 var(--lab-blue);
}

.lab-editor-panel {
  background: #ffffff;
}

.lab-brief {
  background: #f7f9fd;
}

.lab-brief-main {
  background: #ffffff;
}

.lab-brief-main::before,
.lab-brief-main::after {
  display: none;
}

.lab-brief-copy > span {
  letter-spacing: 0.06em;
}

.lab-brief-head small {
  color: #778196;
}

.lab-checklist > span,
.lab-brief-hint header {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lab-loading-editor {
  gap: 12px;
}

.lab-loading-editor strong {
  margin-top: 6px;
  text-transform: none;
}

.lab-statusbar {
  min-height: 34px;
  border: 0;
  border-radius: 0;
  background: var(--lab-blue);
}

.lab-statusbar > span:first-child {
  padding-left: var(--lab-gutter);
}

@media (max-width: 1180px) {
  .lab-topbar {
    grid-template-columns: 220px minmax(180px, 1fr) auto;
  }

}

@media (max-width: 980px) {
  .code-lab-shell {
    padding: 0;
  }

  .lab-topbar {
    top: 0;
    border-width: 0 0 1px;
    border-radius: 0;
  }

  .lab-workspace,
  .code-lab-shell.is-sidebar-collapsed .lab-workspace {
    height: auto;
    min-height: 0;
    margin-top: 0;
    border-width: 1px 0;
    border-radius: 0;
  }

  .lab-editor-panel {
    min-height: 0;
    grid-template-rows: 52px 40px minmax(0, 1fr) minmax(140px, 24vh);
  }

  .lab-sidebar,
  .lab-editor-panel,
  .lab-brief {
    border-radius: 0;
  }

  .lab-statusbar {
    margin-top: 0;
    border-radius: 0;
  }
}

@media (max-width: 720px) {
  .lab-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .lab-brand {
    padding-left: 18px;
  }

  .lab-brand-logo {
    width: 160px;
    height: 48px;
  }

  .lab-page-label {
    display: none;
  }

  .lab-statusbar > span:first-child {
    padding-left: 14px;
  }
}

@media (max-width: 430px) {
  .lab-brand {
    padding-left: 14px;
  }

  .lab-brand-logo {
    width: 148px;
    height: 44px;
  }
}

/* Project explorer */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lab-workspace,
.code-lab-shell.is-sidebar-collapsed .lab-workspace {
  grid-template-columns: 270px minmax(0, 1fr);
}

.lab-explorer {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 22px 12px;
}

.lab-explorer > header > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lab-explorer > header [data-new-file],
.lab-explorer > header [data-download-project] {
  position: relative;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(36, 87, 255, 0.14);
  border-radius: 5px;
  background: #ffffff;
  color: var(--lab-blue);
  font-family: var(--lab-mono);
  font-size: 0.84rem;
  line-height: 1;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.lab-explorer > header [data-new-file]:hover,
.lab-explorer > header [data-download-project]:hover {
  background: var(--lab-blue);
  color: #ffffff;
}

.lab-explorer > header [data-download-project] {
  font-size: 0.92rem;
}

.lab-explorer > header [data-download-project][aria-busy="true"] {
  color: transparent;
  pointer-events: none;
}

.lab-explorer > header [data-download-project][aria-busy="true"]::after {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(36, 87, 255, 0.25);
  border-top-color: var(--lab-blue);
  border-radius: 50%;
  content: "";
  animation: lab-spinner 0.65s linear infinite;
}

.lab-file-list {
  display: grid;
  gap: 3px;
}

.lab-file-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  border-radius: 7px;
}

.lab-file-row.is-active {
  background: #ffffff;
  box-shadow:
    0 9px 24px rgba(29, 49, 98, 0.06),
    inset 3px 0 0 var(--lab-blue);
}

.lab-file-row .lab-file {
  grid-template-columns: 30px minmax(0, 1fr) 6px;
  min-width: 0;
  padding-right: 7px;
}

.lab-file-row .lab-file > i {
  opacity: 0;
}

.lab-file-row.is-active .lab-file > i {
  opacity: 1;
}

.lab-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lab-file-actions {
  display: flex;
  align-items: center;
  padding-right: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lab-file-row:hover .lab-file-actions,
.lab-file-row:focus-within .lab-file-actions {
  opacity: 1;
}

.lab-file-actions button {
  display: grid;
  min-width: 25px;
  height: 25px;
  place-items: center;
  padding: 0 5px;
  border-radius: 4px;
  background: transparent;
  color: #8a93a3;
  font-family: var(--lab-mono);
  font-size: .75rem;
}

.lab-file-actions button:hover {
  background: var(--lab-blue-soft);
  color: var(--lab-blue);
}

.lab-file-actions button.is-confirming {
  width: auto;
  background: #fff0f2;
  color: #c9344d;
  font-size: .75rem;
}

.lab-file-create,
.lab-file-rename {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 25px 25px;
  gap: 5px;
  align-items: center;
  min-height: 42px;
  margin-top: 4px;
  padding: 4px 6px 4px 9px;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(29, 49, 98, 0.08);
}

.lab-file-create[hidden] {
  display: none;
}

.lab-file-rename {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 0;
}

.lab-file-create label {
  min-width: 0;
}

.lab-file-create input,
.lab-file-rename input {
  width: 100%;
  min-width: 0;
  height: 29px;
  border: 1px solid rgba(36, 87, 255, 0.24);
  border-radius: 4px;
  outline: 0;
  padding: 0 7px;
  background: #ffffff;
  color: #374255;
  font-family: var(--lab-mono);
  font-size: .75rem;
}

.lab-file-create input:focus,
.lab-file-rename input:focus {
  border-color: var(--lab-blue);
  box-shadow: 0 0 0 3px rgba(36, 87, 255, 0.07);
}

.lab-file-create > button,
.lab-file-rename > button {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  padding: 0;
  border-radius: 4px;
  background: var(--lab-blue-soft);
  color: var(--lab-blue);
  font-family: var(--lab-mono);
  font-size: .75rem;
}

.lab-file-message {
  min-height: 18px;
  margin: 8px 6px 0;
  color: #7c8595;
  font-size: .75rem;
  line-height: 1.4;
}

.lab-file-message.is-error {
  color: #c9344d;
}

.lab-run-controls {
  margin-left: auto;
}

.code-lab-shell.is-sidebar-collapsed .lab-explorer > header strong,
.code-lab-shell.is-sidebar-collapsed .lab-explorer > header small,
.code-lab-shell.is-sidebar-collapsed .lab-file-actions,
.code-lab-shell.is-sidebar-collapsed .lab-file-message,
.code-lab-shell.is-sidebar-collapsed .lab-file-create {
  display: none;
}

.code-lab-shell.is-sidebar-collapsed .lab-explorer > header {
  justify-content: center;
  padding-right: 0;
  padding-left: 0;
}

.code-lab-shell.is-sidebar-collapsed .lab-explorer > header > div {
  display: block;
}

.code-lab-shell.is-sidebar-collapsed .lab-file-row {
  display: block;
}

.code-lab-shell.is-sidebar-collapsed .lab-file-row.is-active {
  box-shadow: inset 3px 0 0 var(--lab-blue);
}

@media (max-width: 1180px) {
  .lab-workspace,
  .code-lab-shell.is-sidebar-collapsed .lab-workspace {
    grid-template-columns: 230px minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .lab-workspace,
  .code-lab-shell.is-sidebar-collapsed .lab-workspace {
    grid-template-columns: 210px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .code-lab-shell {
    grid-template-rows: 62px minmax(0, 1fr) 34px;
  }

  .lab-brand {
    padding-block: 7px;
  }

  .lab-workspace,
  .code-lab-shell.is-sidebar-collapsed .lab-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 140px minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
  }

  .lab-sidebar {
    display: flex;
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--lab-border);
  }

  .lab-project-head,
  .lab-sidebar-status {
    display: none;
  }

  .lab-explorer {
    display: block;
    min-height: 0;
    overflow: auto;
    padding: 18px 14px;
  }

  .lab-editor-panel {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
    height: auto;
    order: initial;
    grid-template-rows: 100px 40px minmax(0, 1fr) 140px;
  }

  .lab-file-actions {
    opacity: 1;
  }

  .lab-file-message {
    min-height: 0;
  }
}

.lab-console-title {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-left: 16px;
}

.lab-console-title > span {
  color: var(--lab-blue);
  font-family: var(--lab-mono);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.lab-console-title > strong {
  color: #778194;
  font-size: .75rem;
}

.lab-console-stream {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.lab-stdin-line {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) 30px;
  gap: 8px;
  align-items: center;
  max-width: 680px;
  padding: 5px 6px 5px 10px;
  border: 1px solid rgba(36, 87, 255, 0.18);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(31, 50, 99, 0.06);
}

.lab-stdin-line[hidden] {
  display: none;
}

.lab-stdin-line > span {
  color: var(--lab-blue);
  font-family: var(--lab-mono);
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}

.lab-stdin-line #lab-stdin {
  width: 100%;
  min-height: 0;
  min-width: 0;
  padding: 0;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #273246;
  font-family: var(--lab-mono);
  font-size: .75rem;
}

.lab-stdin-line #lab-stdin:focus {
  border: 0;
  box-shadow: none;
}

.lab-stdin-line #lab-stdin::placeholder {
  color: #a1a9b6;
}

.lab-stdin-line button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 5px;
  background: var(--lab-blue);
  color: #ffffff;
  font-family: var(--lab-mono);
  font-size: .75rem;
}

@media (max-width: 720px) {
  .lab-console-title > strong {
    display: none;
  }

  .lab-console-stream {
    gap: 8px;
  }

  .lab-stdin-line {
    max-width: none;
  }
}

.lab-statusbar > .lab-inline-status {
  padding: 0;
}

.lab-inline-status button {
  display: flex;
  height: 100%;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--lab-mono);
  font-size: .75rem;
  letter-spacing: 0.04em;
}

.lab-inline-status button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.lab-inline-status button i {
  background: var(--lab-lime);
  transition:
    background 0.2s ease,
    opacity 0.2s ease;
}

.lab-inline-status button small {
  color: var(--lab-lime);
  font-size: .75rem;
  font-weight: 800;
}

.lab-inline-status button[aria-pressed="false"] {
  color: rgba(255, 255, 255, 0.46);
}

.lab-inline-status button[aria-pressed="false"] i {
  background: rgba(255, 255, 255, 0.38);
}

.lab-inline-status button[aria-pressed="false"] small {
  color: rgba(255, 255, 255, 0.48);
}

.lab-inline-status button.is-loading i {
  animation: lab-inline-pulse 0.9s ease-in-out infinite alternate;
}

@keyframes lab-inline-pulse {
  to {
    transform: scale(1.65);
    opacity: 0.45;
  }
}

@media (max-width: 560px) {
  .lab-inline-status button > span {
    display: none;
  }
}

/* Interface type scale: compact enough for an IDE, readable at normal zoom. */
.code-lab-page {
  --lab-type-ui: clamp(.66rem, .63rem + .06vw, .72rem);
  --lab-type-meta: clamp(.56rem, .54rem + .04vw, .6rem);
}

.lab-brand-copy small,
.lab-session,
.lab-project-head,
.lab-file-icon,
.lab-sidebar-status span,
.lab-language-switch button small,
.lab-editor-path,
.lab-console-head,
.lab-console-title,
.lab-file-message,
.lab-statusbar,
.lab-inline-status button,
.lab-inline-status button small {
  font-size: var(--lab-type-meta);
}

.lab-top-actions > a,
.lab-help-button,
.lab-file,
.lab-sidebar-status strong,
.lab-language-switch button,
.lab-run-copy strong,
.lab-editor-tabs > button,
.lab-console-head [role="tab"],
.lab-console-head [data-clear-console],
.lab-console pre,
.lab-console-body label,
.lab-explorer,
.lab-file-name,
.lab-stdin-line #lab-stdin {
  font-size: var(--lab-type-ui);
}

.lab-session,
.lab-sidebar-status span,
.lab-language-switch button small,
.lab-editor-path,
.lab-console-head > div:last-child span,
.lab-file-message {
  color: #737e90;
}

.lab-statusbar {
  color: rgba(255, 255, 255, .8);
}

.lab-project-head > small,
.lab-explorer > header small,
.lab-run-copy small,
.lab-editor-tabs .lab-file-icon,
.lab-console-title > span,
.lab-console-title > strong,
.lab-console-head > div:last-child span,
.lab-console-head [data-clear-console] {
  font-size: var(--lab-type-meta);
}
