.lab-section {
  --lab-mint: #6defc3;
  color: #f3f6f2;
  background: #0a1010;
  padding-block: clamp(76px, 8.3vw, 136px);
  font-family: var(--sans, Arial, sans-serif);
}

.lab-section [hidden] {
  display: none !important;
}

.lab-section h2, .lab-section h3, .lab-section p, .lab-section ul {
  margin: 0;
}

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

.lab-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 26px;
  margin: 17px 0 35px;
}

.lab-kicker, .lab-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 10px/1.4 var(--mono, monospace);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.lab-kicker {
  color: var(--lab-mint);
}

.lab-kicker-rule {
  width: 27px;
  height: 1px;
  background: currentColor;
}

.lab-section h2 {
  font: 530 clamp(39px, 4.4vw, 67px)/1.04 var(--sans, Arial, sans-serif);
  letter-spacing: -.063em;
  color: #f3f6f2;
}

.lab-section h2 span {
  color: var(--lab-mint);
}

.lab-section .lab-intro {
  margin-top: 14px;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.5;
  color: #abb9b4;
}

.lab-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid #32403c;
  border-radius: 100px;
  background: #0d1513;
}

.lab-tabs button {
  cursor: pointer;
  border: none;
  background: transparent;
  color: #b3bfb9;
  font: 600 13px/1 var(--sans, Arial, sans-serif);
  padding: 13px 19px;
  border-radius: inherit;
}

.lab-tabs button:hover {
  color: #fff;
}

.lab-tabs button[aria-selected="true"] {
  color: #121d17;
  background: #e6f4e9;
}

.lab-section :is(button,a):focus-visible {
  outline: 2px solid var(--lab-mint);
  outline-offset: 4px;
}

.lab-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr);
  border: 1px solid #2a3835;
  border-radius: 18px;
  overflow: hidden;
  background: #101917;
}

.lab-panel + .lab-panel {
  margin-top: 20px;
}

.lab-panel[hidden] + .lab-panel {
  margin-top: 0;
}

.lab-stage {
  display: grid;
  place-items: center;
  padding: clamp(20px, 2.75vw, 50px);
  isolation: isolate;
  min-width: 0;
  min-height: clamp(370px, 33vw, 470px);
  position: relative;
  overflow: hidden;
}

.lab-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(28px, 3.6vw, 63px);
}

.lab-label {
  color: #9bcec0;
}

.lab-label > span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border: 1px solid var(--lab-mint);
  transform: rotate(45deg);
}

.lab-copy h3 {
  font: 540 clamp(31px, 3vw, 50px)/1.05 var(--sans, Arial, sans-serif);
  letter-spacing: -.055em;
  margin: 20px 0 16px;
  color: #f3f6f2;
  max-width: 15ch;
}

.lab-copy > p:not(.lab-label) {
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.6;
  max-width: 40ch;
  color: #b8c3bd;
}

.lab-section .lab-tags {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 6px;
  padding: 0;
  margin: 22px 0 32px;
}

.lab-tags li {
  font: 500 10px/1.3 var(--mono, monospace);
  border: 1px solid #395047;
  border-radius: 4px;
  padding: 5px 8px;
  color: #c2cfc7;
}

.lab-link {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  padding: 5px 0;
  font: 670 14px/1.5 var(--sans, Arial, sans-serif);
  text-decoration: none;
  color: #95f2ce;
}

.lab-link span {
  transition: transform .2s;
}

.lab-link:hover span {
  transform: translate(2px,-2px);
}

.lab-stage-web {
  background: #b4a694;
  background-image: radial-gradient(ellipse at 10% 10%, #d1c9b7 0%, transparent 65%), linear-gradient(155deg, #bab19f, #ad9f8c 45%, #8e8574);
}

.lab-web-window {
  width: min(97%, 570px);
  padding: 0 clamp(14px, 1.6vw, 26px);
  background: #f1eee4;
  color: #373b2f;
  border: 1px solid #dedac9;
  box-shadow: 0 21px 36px -14px #4e493b99, 0 3px 8px #554b381f;
  transform: rotate(-1.2deg);
}

.lab-web-brand {
  min-height: 41px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #272d22;
}

.lab-web-brand b {
  font: bold 24px/.9 Georgia, serif;
  letter-spacing: -.09em;
}

.lab-web-brand b span {
  color: #83704b;
}

.lab-web-brand > span, .lab-web-foot div > span, .lab-web-photo > span {
  font: 500 clamp(7px,.61vw,10px)/1.15 var(--mono, monospace);
  letter-spacing: .11em;
  text-transform: uppercase;
}

.lab-web-photo {
  aspect-ratio: 2.25;
  position: relative;
  background: #c1ad8d;
  overflow: hidden;
}

.lab-web-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 56%;
}

.lab-web-photo > span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: #f1eee5;
  color: #383c32;
  padding: 4px 6px;
}

.lab-web-foot {
  padding: 14px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lab-web-foot div {
  display: grid;
  gap: 4px;
}

.lab-web-foot div > span {
  color: #625e50;
  font-size: 7px;
}

.lab-web-foot strong {
  font: normal clamp(26px, 3.1vw, 50px)/1 Georgia, 'Times New Roman', serif;
  color: #24291e;
  letter-spacing: -.062em;
}

.lab-web-foot > i {
  display: block;
  line-height: 1;
  font: normal 27px/1 Georgia, serif;
  color: #4a5141;
}

.lab-stage-sys {
  background: radial-gradient(ellipse at top left,#44665b,transparent 65%),linear-gradient(150deg,#283a33,#172720);
}

.lab-sys-window {
  width: min(100%, 610px);
  background: #f1f2ed;
  color: #222e26;
  border-radius: 8px;
  padding: clamp(13px,1.5vw,25px);
  box-shadow: 0 20px 48px #08130a80;
}

.lab-sys-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid #d7dbd3;
}

.lab-sys-head > span, .lab-sys-title > span, .lab-lane-title {
  display: flex;
  align-items: center;
  gap: 5px;
}

.lab-sys-head > span {
  font: 720 15px/1 var(--sans,Arial,sans-serif);
  letter-spacing: -.04em;
}

.lab-sys-head > span > i {
  border: 2px solid #4c745f;
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 4px 100% 4px 100%;
  transform: rotate(-35deg);
}

.lab-sys-head small,.lab-sys-title > span,.lab-lane-title,.lab-ticket small,.lab-ticket i {
  font: 550 clamp(7px,.6vw,10px)/1.3 var(--sans,Arial,sans-serif);
}

.lab-sys-head small {
  color: #4e5c51;
}

.lab-sys-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: clamp(16px,1.7vw,25px) 0 15px;
}

.lab-sys-title strong {
  font: 650 clamp(18px,2vw,29px)/1.1 var(--sans,Arial,sans-serif);
  letter-spacing: -.052em;
}

.lab-sys-title > span {
  color: #477054;
}

.lab-sys-title > span i,.lab-lane-title > i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6f8e79;
}

.lab-board {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: clamp(4px,.6vw,10px);
}

.lab-lane {
  background: #e4e7e1;
  border-radius: 4px;
  padding: clamp(4px,.5vw,8px);
  min-height: 125px;
}

.lab-lane-title {
  color: #3c4d40;
  font-weight: 650;
  line-height: 1.4;
  margin: 2px 0 9px;
}

.lab-lane-title > em {
  font-style: normal;
  margin-left: auto;
  color: #59695c;
}

.lab-lane-work .lab-lane-title > i {
  background: #a78443;
}

.lab-lane-done .lab-lane-title > i {
  background: #579064;
}

.lab-ticket {
  padding: clamp(5px,.6vw,10px);
  background: #fbfcf9;
  border: 1px solid #d4dace;
  border-radius: 3px;
  margin-block: 5px;
}

.lab-ticket small {
  display: block;
  font-size: clamp(6px,.54vw,9px);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #657262;
}

.lab-ticket b {
  display: block;
  font: 635 clamp(8px,.75vw,12px)/1.4 var(--sans,Arial,sans-serif);
  margin: 4px 0 7px;
  letter-spacing: -.025em;
}

.lab-ticket i {
  display: inline-block;
  background: #e9eee5;
  color: #4c6954;
  font-size: clamp(6px,.54vw,9px);
  border-radius: 2px;
  padding: 2px 4px;
}

.lab-ticket-progress {
  height: 3px;
  width: 100%;
  margin-bottom: 6px;
  background: linear-gradient(to right,#bfa469 62%,#e7e3d8 62%);
}

@media(max-width: 860px) {
  .lab-panel {
    grid-template-columns: minmax(0,1.12fr) minmax(258px,.85fr);
  }
  .lab-stage {
    min-height: 320px;
  }
  .lab-copy {
    padding: 25px;
  }
}

@media(max-width: 680px) {
  .lab-head {
    display: grid;
    gap: 22px;
    margin: 15px 0 20px;
  }
  .lab-tabs {
    justify-self: start;
  }
  .lab-tabs button {
    padding: 12px 17px;
  }
  .lab-panel {
    grid-template-columns: minmax(0,1fr);
    border-radius: 12px;
  }
  .lab-stage {
    min-height: 0;
    aspect-ratio: 1.62;
    padding: 20px;
  }
  .lab-copy {
    padding: 24px;
  }
  .lab-copy h3 {
    margin: 14px 0 12px;
    max-width: 21ch;
  }
  .lab-section .lab-tags {
    margin: 17px 0 16px;
  }
  .lab-web-window {
    width: 86%;
  }
  .lab-web-brand {
    min-height: 26px;
  }
  .lab-web-brand b {
    font-size: 19px;
  }
  .lab-web-foot {
    padding: 8px 0 10px;
  }
  .lab-web-foot strong {
    font-size: 25px;
  }
  .lab-sys-window {
    width: 95%;
  }
  .lab-sys-head {
    padding-bottom: 6px;
  }
  .lab-sys-title {
    margin: 12px 0 8px;
  }
  .lab-lane {
    min-height: 75px;
  }
  .lab-ticket b {
    margin: 3px 0;
  }
  .lab-ticket small, .lab-ticket i {
    font-size: 6px;
  }
}

@media(max-width: 360px) {
  .lab-stage {
    aspect-ratio: 1.42;
    padding: 13px;
  }
}

@media(prefers-reduced-motion:reduce) {
  .lab-link span {
    transition: none;
  }
}

@media(max-width:400px) {
  .lab-head {
    grid-template-columns: minmax(0,1fr);
  }
  .lab-tabs {
    max-width: 100%;
    gap: 0;
  }
  .lab-tabs button {
    padding: 11px 12px;
    font-size: 12px;
  }
}

#lab-infra {
  --inspect: #9bdcff;
  --success: #8bedd2;
  --timeout: #fdbe76;
}

.lab-stage.lab-stage-infra {
  --signal: var(--success);
  --scenario: var(--success);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  padding: 0;
  aspect-ratio: auto;
  background: #0c1718;
  color: #e5eee9;
}

.lab-stage-infra[data-scenario="timeout"] { --scenario: var(--timeout); }
.lab-stage-infra[data-fault="true"] { --signal: var(--timeout); }

.ops-heading, .ops-console {
  position: relative;
  z-index: 1;
  flex: none;
  padding-inline: clamp(14px, 1.65vw, 26px);
}

.ops-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding-block: 10px;
  border-bottom: 1px solid #31423e;
  background: #101b1b;
}

.ops-title, .ops-log-title, .ops-now-label {
  color: #a5bab2;
  font: 550 10px/1.4 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}

.ops-title { color: #d5e5dc; }

.ops-scenario {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--scenario);
  font: 550 11px/1.4 var(--mono);
  white-space: nowrap;
}

.ops-scenario::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.ops-viewport {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  aspect-ratio: 1.76;
  overflow: hidden;
  background: #0c1718;
}

.ops-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.ops-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(3px, 1vw, 14px);
  color: #cce6dc;
  font: 550 12px/1.4 var(--mono);
}

.ops-fallback span {
  border: 1px solid #45645f;
  border-radius: 4px;
  padding: 7px;
}

.ops-fallback b { color: #82b9aa; }

.lab-stage-infra[data-focus="api"] .ops-fallback [data-ops-target="api"],
.lab-stage-infra[data-focus="servers"] .ops-fallback [data-ops-target="servers"],
.lab-stage-infra[data-focus="integration"] .ops-fallback [data-ops-target="integration"] {
  outline: 1px solid var(--inspect);
  outline-offset: 2px;
  color: var(--inspect);
  background: #102a34;
}

.ops-console {
  padding-block: 15px;
  background: #101c1b;
  border-top: 1px solid #314440;
}

.ops-readout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 5px 10px;
}

.ops-request-id {
  grid-column: 1 / -1;
  color: #a8bfb6;
  font: 550 10px/1.35 var(--mono);
}

.ops-phase {
  font: 560 clamp(12px, 1.04vw, 16px)/1.4 var(--sans);
  letter-spacing: -.02em;
}

.ops-trace {
  color: var(--signal);
  font: 510 clamp(10px, .8vw, 12px)/1.4 var(--mono);
  text-align: right;
}

.ops-progress {
  height: 3px;
  margin-block: 10px 14px;
  overflow: hidden;
  background: #2a403a;
}

.ops-progress i {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--signal);
}

.ops-log-title {
  margin: 0 0 5px;
  font-size: 9px;
}

.ops-history {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 6px;
  min-height: 3.4em;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #c0cec8;
  font: 500 11px/1.4 var(--mono);
}

.ops-history li {
  display: grid;
  align-content: start;
  gap: 2px;
}

.ops-history li + li {
  padding-left: 10px;
  border-left: 1px solid #344640;
}

.ops-history strong {
  color: var(--success);
  font-weight: 590;
}

.ops-history [data-outcome="timeout"] strong { color: var(--timeout); }

.ops-history .ops-history-empty {
  grid-column: 1 / -1;
  color: #a0b0a9;
}

.ops-inspector {
  align-items: stretch;
  padding: clamp(24px, 2.9vw, 48px);
}

.ops-inspector .ops-intro h3 {
  margin-block: 14px 12px;
  max-width: 16ch;
}

.ops-intro > p:last-child {
  max-width: 41ch;
  color: #becec5;
  font: 440 clamp(14px, 1.16vw, 17px)/1.55 var(--sans);
}

.ops-pick { margin-block: 20px 13px; }

.ops-pick > p {
  color: #b8cac1;
  font: 560 12px/1.4 var(--sans);
}

.ops-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.ops-selector button {
  appearance: none;
  min-height: 38px;
  padding: 6px clamp(9px, .79vw, 14px);
  border: 1px solid #536962;
  border-radius: 5px;
  color: #d7e5dd;
  background: #15201d;
  cursor: pointer;
  font: 570 12px/1.3 var(--sans);
}

.ops-selector button:hover { border-color: #85a89f; }

.ops-selector button[aria-pressed="true"] {
  border-color: var(--inspect);
  color: #0c2835;
  background: var(--inspect);
}

.ops-inspection {
  padding: 13px 0 3px 14px;
  border-top: 1px solid #344641;
  border-left: 2px solid #5a9abc;
}

.ops-focus-title {
  margin: 0 0 5px;
  color: #d2efff;
  font: 580 16px/1.35 var(--sans);
}

.ops-focus-copy, .ops-focus-state {
  display: block;
  color: #bfcdc7;
  font: 440 13px/1.55 var(--sans);
}

.ops-focus-copy { min-block-size: 3.1em; }

.ops-focus-now {
  display: grid;
  gap: 2px;
  padding-top: 9px;
}

.ops-now-label { font-size: 9px; }

.ops-focus-state {
  min-block-size: 3.1em;
  color: #e0eae5;
}

.ops-inspector .lab-link {
  align-self: flex-start;
  margin-top: 15px;
}

@media(max-width: 1000px) {
  .ops-readout { grid-template-columns: 1fr; }
  .ops-trace { text-align: left; }
  .ops-inspector { padding: 23px; }
  .ops-history { font-size: 10px; }
}

@media(max-width: 860px) {
  .ops-title, .ops-scenario { font-size: 10px; }
  .ops-viewport { aspect-ratio: 1.5; }
  .ops-selector { gap: 4px; }
  .ops-selector button { padding-inline: 8px; }
  .ops-history li + li { padding-left: 6px; }
}

@media(max-width: 680px) {
  #lab-infra {
    grid-template-areas: "intro" "pick" "bench" "detail" "action";
    padding-block: 21px 18px;
  }
  #lab-infra .ops-inspector { display: contents; }
  .ops-intro, .ops-pick, .ops-inspection, .ops-inspector .lab-link {
    margin-inline: 18px;
  }
  .ops-intro { grid-area: intro; }
  .ops-intro > p:last-child { max-width: 48ch; }
  .ops-pick { grid-area: pick; margin-block: 15px 13px; }
  .ops-selector { gap: 6px; }
  .ops-selector button { min-height: 40px; padding-inline: 12px; }
  .lab-stage.lab-stage-infra { grid-area: bench; border-block: 1px solid #344641; }
  .ops-viewport { aspect-ratio: 1.45; }
  .ops-heading { min-height: 42px; }
  .ops-console { padding-block: 10px; }
  .ops-inspection { grid-area: detail; margin-top: 16px; }
  .ops-inspector .lab-link { grid-area: action; justify-self: start; }
  .ops-readout { min-height: 56px; gap: 1px; }
  .ops-history { min-height: 4.2em; }
  .ops-log-title { font-size: 9px; }
}

@media(max-width: 355px) {
  .ops-intro, .ops-pick, .ops-inspection, .ops-inspector .lab-link { margin-inline: 13px; }
  .ops-heading, .ops-console { padding-inline: 10px; }
  .ops-title, .ops-scenario { font-size: 9px; }
}
