.guide-page {
  --lab-green: #b3ff4c;
  --lab-blue: #72ecff;
  --lab-ink: #0c1310;
  background: radial-gradient(ellipse at 75% 12%, #15201a 0%, transparent 58%), #070a0a;
}
.guide-page [hidden] { display: none !important; }
.guide-page .lab-shell { width: min(1240px, calc(100% - 80px)); padding: 0 0 38px; }
.guide-page .guide-header { display: flex; align-items: center; }
.lab-nav, .lab-kicker, .lab-scene-top, .lab-scene-bottom, .lab-console-head > span, .lab-stages span {
  font: 650 11px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .12em;
}
.lab-nav { display: flex; gap: 20px; color: #b4c6bf; }
.lab-nav a:hover, .lab-hint:hover, .lab-notes a:hover { color: var(--lab-green); }
.lab-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(24px, 4vw, 66px);
  padding: 35px 0 28px;
}
.lab-kicker { display: flex; align-items: center; gap: 10px; color: var(--lab-green); }
.lab-kicker span { width: 7px; height: 7px; background: currentColor; box-shadow: 0 0 14px currentColor; }
.lab-copy h1 { margin: 25px 0 16px; font-size: clamp(27px, 4.3vw, 65px); letter-spacing: -.04em; }
.lab-copy h1 em { color: var(--lab-green); font-style: normal; }
.lab-copy > p { margin: 0 0 25px; color: #b4c6bf; font-size: clamp(15px, 1.7vw, 21px); line-height: 1.45; }
.lab-actions { display: flex; align-items: stretch; flex-wrap: wrap; gap: 10px; }
.lab-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid #6d8278;
  background: #0b1410;
  color: #e9f4eb;
  font: 750 14px/1.1 Inter, sans-serif;
}
.lab-primary { background: var(--lab-green); border-color: var(--lab-green); color: #111808; }
.lab-primary:hover { background: #d2ff95; }
.lab-secondary:hover { border-color: var(--lab-blue); color: var(--lab-blue); }
.lab-uses { margin-top: 24px; padding: 12px 0 0 13px; border-left: 1px solid #568147; }
.lab-uses h2 { margin: 0 0 8px; color: var(--lab-green); font: 650 11px/1.3 ui-monospace, monospace; letter-spacing: .12em; }
.lab-uses ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.lab-uses li { color: #b4c6bf; font-size: 13px; line-height: 1.4; }
.lab-uses li strong { color: #f0f5f0; }
.lab-hint { display: inline-flex; gap: 8px; margin-top: 15px; color: #aab8b1; font-size: 13px; }
.lab-scene {
  --phase: #b3ff4c;
  position: relative;
  height: clamp(315px, 30vw, 455px);
  isolation: isolate;
  border: 1px solid #35473b;
  background: radial-gradient(ellipse at 50% 44%, color-mix(in srgb, var(--phase), #090e0b 84%), #070a0a 72%);
  overflow: hidden;
}
.lab-scene[data-stage="1"] { --phase: #73f1ff; }
.lab-scene[data-stage="2"] { --phase: #4dffc4; }
.lab-scene[data-stage="3"] { --phase: #ffca74; }
.lab-grid, .lab-render, .lab-blueprint { position: absolute; inset: 0; width: 100%; height: 100%; }
.lab-grid {
  background:
    repeating-linear-gradient(0deg, transparent 0 29px, #b4ffc314 29px 30px),
    repeating-linear-gradient(90deg, transparent 0 29px, #b4ffc314 29px 30px);
  mask-image: radial-gradient(ellipse, #000, transparent 77%);
}
.lab-blueprint { color: var(--phase); padding: 12px; }
.lab-scene.is-rendering .lab-blueprint { visibility: hidden; }
.lab-scene:not(.is-rendering) .lab-render { visibility: hidden; }
.lab-render canvas { display: block; width: 100%; height: 100%; }
.lab-scene-top, .lab-scene-bottom {
  position: absolute;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  left: 14px;
  right: 14px;
  color: #a5b6ac;
  pointer-events: none;
}
.lab-scene-top { top: 14px; }
.lab-scene-bottom { bottom: 14px; }
.lab-scene-bottom span:first-child { color: var(--phase); }
.lab-console { border: 1px solid #30433a; background: #0a100e; scroll-margin-top: 106px; }
.lab-console-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 13px clamp(12px, 2vw, 22px);
}
.lab-console-head h2 { margin: 0; font-size: 21px; }
.lab-console-head > span { color: #a5b6ac; }
.lab-stages { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; }
.lab-stages li { min-width: 0; }
.lab-stages a {
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 11px;
  padding: 8px;
  text-align: center;
  border-block: 1px solid #30433a;
  border-inline-end: 1px solid #30433a;
  font-size: 14px;
  font-weight: 700;
  color: #b6c9bf;
  background: #0e1813;
}
.lab-stages li:last-child a { border-inline-end: 0; }
.lab-stages a:hover { color: #fff; background: #1a2a21; }
.lab-stages a[aria-selected="true"] { color: var(--lab-green); background: #1b2a13; border-bottom-color: var(--lab-green); }
.lab-stages a:focus-visible { position: relative; z-index: 1; outline-offset: -3px; }
.lab-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 12px 22px;
  min-height: 106px;
  padding: 16px clamp(12px, 2vw, 22px);
  scroll-margin-top: 105px;
}
.lab-panel + .lab-panel { border-top: 1px solid #30433a; }
.lab-panel h3 { margin: 0 0 5px; font-size: 18px; }
.lab-panel p { margin: 0; color: #afc1b6; line-height: 1.5; font-size: 14px; }
.lab-link, .lab-notes a { color: var(--lab-blue); font-size: 13px; text-underline-offset: .25em; text-decoration: underline; }
.lab-link:hover { color: #fff; }
.lab-command { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-width: 0; max-width: 100%; }
.lab-command pre { flex: 1; min-width: 0; margin: 0; padding: 8px; color: var(--lab-green); background: #040807; white-space: pre-wrap; overflow-wrap: anywhere; }
.lab-command .guide-copy { min-height: 36px; }
.lab-command .guide-copy-status:not(:empty) { flex-basis: 100%; padding: 0; }
.lab-notes { display: flex; flex-wrap: wrap; gap: 12px 34px; align-items: start; color: #afc1b6; font-size: 13px; padding: 17px 0; }
.lab-notes summary { cursor: pointer; }
.lab-notes details p { max-width: 65ch; line-height: 1.65; }
@media (max-width: 850px) {
  .guide-page .lab-shell { width: calc(100% - 40px); }
  .lab-hero { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 22px 0; }
  .lab-copy h1 { margin: 16px 0 9px; }
  .lab-copy > p { margin-bottom: 16px; }
  .lab-hint { margin-top: 13px; }
  .lab-scene { height: clamp(204px, 49vw, 365px); }
}
@media (max-width: 520px) {
  .guide-page .lab-shell { width: calc(100% - 24px); }
  .guide-page .guide-header { min-height: 62px; padding: 10px 12px; }
  .guide-page .site-logo-mark { width: 36px; height: 36px; }
  .guide-page .logo-lockup { gap: 8px; }
  .guide-page .logo { font-size: 12px; }
  .guide-page .logo-sub { font-size: 6px; }
  .lab-nav { gap: 0; font-size: 9px; }
  .lab-nav a:first-child { display: none; }
  .lab-actions { display: grid; grid-template-columns: 1.05fr 1fr; }
  .lab-button { gap: 4px; min-height: 45px; padding: 0 7px; font-size: 12px; white-space: nowrap; }
  .lab-uses { margin-top: 16px; padding-top: 8px; }
  .lab-scene-top, .lab-scene-bottom { font-size: 9px; }
  .lab-console-head > span { font-size: 8px; }
  .lab-stages a { gap: 4px; flex-direction: column; padding: 7px 3px; font-size: 11px; }
  .lab-panel { grid-template-columns: minmax(0, 1fr); }
  .lab-console { scroll-margin-top: 72px; }
}
