/* ================= #labs — for labs + CTA (void, bleeds in from paper) ================= */
#labs{--code-bg:#0f1424;--code-line:rgba(255,255,255,.08);padding-bottom:0}

/* ---------- top bleed: ledger (paper) -> void ---------- */
#labs .lb-bleed{height:clamp(140px,26vh,280px);background:linear-gradient(180deg,var(--paper) 0%,#d9d8d6 14%,#6d717c 46%,#1a1f2e 78%,var(--void) 100%);pointer-events:none}

/* ---------- 1 · delivery ---------- */
#labs .lb-deliver{padding-top:clamp(48px,8vh,96px)}
#labs .lb-head{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;margin-bottom:clamp(40px,5vw,64px)}
#labs .lb-head .eyebrow{grid-column:1/-1}
#labs .lb-head .lede{max-width:52ch;font-size:clamp(17px,1.35vw,20px)}

#labs .lb-console{border:1px solid var(--line-d);background:linear-gradient(180deg,#121829,#0e1322);box-shadow:0 60px 120px -60px rgba(0,0,0,.9),0 0 0 1px rgba(255,255,255,.02) inset;position:relative}
#labs .lb-console:before{content:"";position:absolute;left:0;right:0;top:-1px;height:1px;background:linear-gradient(90deg,transparent,rgba(227,91,50,.7) 30%,rgba(255,122,77,.9) 50%,rgba(227,91,50,.7) 70%,transparent);opacity:.55}
#labs .lb-bar{display:flex;align-items:stretch;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line-d);padding:0 16px 0 0}
#labs .lb-tabs{display:flex;min-width:0;overflow-x:auto;scrollbar-width:none}
#labs .lb-tabs::-webkit-scrollbar{display:none}
#labs .lb-tabs button{position:relative;font-family:var(--mono);font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:var(--mute-d);padding:18px 22px 17px;white-space:nowrap;border-right:1px solid var(--line-d);transition:color .3s,background .3s;display:flex;align-items:baseline;gap:10px}
#labs .lb-tabs button small{font-size:9px;letter-spacing:.18em;opacity:.6}
#labs .lb-tabs button:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--orange);transform:scaleX(0);transform-origin:0 50%;transition:transform .5s var(--ease)}
#labs .lb-tabs button:hover{color:var(--paper)}
#labs .lb-tabs button[aria-selected="true"]{color:var(--paper);background:rgba(255,255,255,.03)}
#labs .lb-tabs button[aria-selected="true"]:after{transform:none}
#labs .lb-tabs button:focus-visible{outline-offset:-3px}
#labs .lb-example{align-self:center;font-family:var(--mono);font-size:10px;letter-spacing:.24em;text-transform:uppercase;color:var(--orange-hi);border:1px solid rgba(227,91,50,.55);padding:6px 9px 5px;white-space:nowrap;display:flex;align-items:center;gap:8px}
#labs .lb-example:before{content:"";width:5px;height:5px;background:var(--orange);transform:rotate(45deg)}

#labs .lb-pane{display:grid;grid-template-columns:minmax(0,1.62fr) minmax(0,1fr)}
#labs .lb-pane[hidden]{display:none}
#labs .lb-pane:focus-visible{outline-offset:-2px}
#labs .lb-pane.swap .lb-code pre,#labs .lb-pane.swap .lb-tree ul{animation:lbIn .6s var(--ease) both}
#labs .lb-pane.swap .lb-tree ul{animation-delay:.06s}
@keyframes lbIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

#labs figure{margin:0;min-width:0}
#labs figcaption{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 20px;border-bottom:1px solid var(--code-line);font-family:var(--mono);font-size:10.5px;letter-spacing:.14em;color:var(--mute-d)}
#labs .lb-file{display:flex;align-items:center;gap:10px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#labs .lb-file:before{content:"";width:6px;height:6px;border-radius:50%;background:var(--orange);box-shadow:0 0 10px var(--orange);flex:none}
#labs .lb-copy{font-family:var(--mono);font-size:10px;letter-spacing:.22em;text-transform:uppercase;color:var(--mute-d);border:1px solid var(--line-d);padding:5px 9px 4px;transition:color .3s,border-color .3s}
#labs .lb-copy:hover,#labs .lb-copy.ok{color:var(--orange-hi);border-color:rgba(227,91,50,.6)}

/* code */
#labs .lb-code{background:var(--code-bg);border-right:1px solid var(--line-d);display:flex;flex-direction:column}
#labs pre{margin:0;padding:22px 0 26px;overflow-x:auto;font-family:var(--mono);font-size:clamp(11.5px,.92vw,13.5px);line-height:1.85;color:#d6dbe7;tab-size:4;flex:1;scrollbar-width:thin;scrollbar-color:#ffffff22 transparent}
#labs pre code{display:block;min-width:max-content;counter-reset:ln}
#labs pre .ln{display:block;padding:0 28px 0 0;position:relative}
#labs pre .ln:before{counter-increment:ln;content:counter(ln);display:inline-block;width:52px;padding-right:20px;text-align:right;color:#4a5370;user-select:none;-webkit-user-select:none}
#labs pre .ln.hl{background:linear-gradient(90deg,rgba(227,91,50,.10),rgba(227,91,50,0) 70%)}
#labs pre .ln.hl:after{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;background:var(--orange)}
/* tokens: one accent. Orange is reserved for the human fields (hands, task, why). */
#labs .tk-k{color:#f4f3f0;font-weight:700}
#labs .tk-s{color:#c7b79a}
#labs .tk-c{color:#5d6784;font-style:italic}
#labs .tk-c .tk-s{color:#8e8578}
#labs .tk-n{color:#c7b79a}
#labs .tk-f{color:#ffffff}
#labs .tk-b{color:#9aa3b8}
#labs .tk-p{color:#6b7591}
#labs .tk-h{color:var(--orange-hi)}

/* tree */
#labs .lb-tree{background:rgba(255,255,255,.012)}
#labs .lb-tree ul{list-style:none;padding:20px 22px 26px;font-family:var(--mono);font-size:clamp(11.5px,.88vw,13px);line-height:1.6;color:#d6dbe7}
#labs .lb-tree li{position:relative;padding:5px 0 5px calc(var(--lv,0) * 22px);display:flex;flex-wrap:wrap;align-items:baseline;column-gap:12px;white-space:nowrap}
#labs .lb-tree li.l1{--lv:1}#labs .lb-tree li.l2{--lv:2}
#labs .lb-tree li.l1:before,#labs .lb-tree li.l2:before{content:"";position:absolute;left:calc(var(--lv) * 22px - 15px);top:0;bottom:0;border-left:1px solid #ffffff1c}
#labs .lb-tree li.l1:after,#labs .lb-tree li.l2:after{content:"";position:absolute;left:calc(var(--lv) * 22px - 15px);top:calc(5px + .8em);width:9px;border-top:1px solid #ffffff1c}
#labs .lb-tree li.last:before{bottom:calc(100% - 5px - .8em)}
#labs .lb-tree li.d{color:#ffffff;font-weight:700}
#labs .lb-tree li.f{color:#b9c0d1}
#labs .lb-tree li.hr{color:var(--orange-hi)}
#labs .lb-tree li.hr:after{border-color:rgba(227,91,50,.5)}
#labs .lb-tree em{font-style:normal;font-weight:400;font-size:.82em;letter-spacing:.06em;color:#5d6784;white-space:normal}
#labs .lb-tree li.hr em{color:#a46a56}
#labs .lb-fine{margin-top:16px}

@media (max-width:1100px){
  #labs .lb-pane{grid-template-columns:1fr}
  #labs .lb-code{border-right:0;border-bottom:1px solid var(--line-d)}
  #labs .lb-tree ul{padding-top:16px;padding-bottom:20px}
  #labs .lb-tree li{white-space:normal}
}
@media (max-width:640px){
  #labs pre .ln:before{width:34px;padding-right:12px}
  #labs pre .ln{padding-right:18px}
  #labs .lb-tabs button{padding:16px 14px 15px;letter-spacing:.14em}
  #labs .lb-tabs button small{display:none}
  #labs .lb-bar{padding-right:10px}
  #labs figcaption{padding:11px 14px}
}

/* ---------- shared sub-heads ---------- */
#labs .lb-sub{font-family:var(--display);font-weight:800;letter-spacing:-.03em;line-height:1.05;font-size:clamp(26px,2.6vw,40px);display:flex;flex-direction:column;gap:16px;margin-bottom:clamp(28px,3.4vw,44px)}
#labs .lb-sub .label{color:var(--orange);opacity:1;font-weight:700}

/* ---------- 2 · what it feeds ---------- */
#labs .lb-feeds{padding-top:clamp(96px,14vh,160px)}
#labs .lb-three{list-style:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid var(--line-d)}
#labs .lb-fam{padding:28px clamp(18px,2.4vw,36px) 30px 0;display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;column-gap:20px;row-gap:8px;align-items:start}
#labs .lb-fam+.lb-fam{padding-left:clamp(18px,2.4vw,36px);border-left:1px solid var(--line-d)}
#labs .lb-glyph{grid-row:1/3;width:56px;height:56px;fill:none;stroke:#d6dbe7;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
#labs .lb-glyph .o{stroke:var(--orange)}
#labs .lb-glyph .f{fill:var(--orange)}
#labs .lb-glyph circle:not(.f){fill:var(--void)}
#labs .lb-glyph path{stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset 1.6s var(--ease) .25s}
#labs .lb-glyph .o{transition-delay:.7s}
#labs .lb-fam.in .lb-glyph path{stroke-dashoffset:0}
#labs .lb-fam .label{opacity:1;color:var(--paper);font-weight:700;padding-top:4px}
#labs .lb-fam-l{font-size:clamp(15px,1.15vw,17px);line-height:1.5;color:var(--mute-d);max-width:30ch}
@media (max-width:900px){
  #labs .lb-three{grid-template-columns:1fr}
  #labs .lb-fam,#labs .lb-fam+.lb-fam{padding:24px 0;border-left:0;border-bottom:1px solid var(--line-d)}
}

/* ---------- 3 · how to start ---------- */
#labs .lb-start{padding-top:clamp(96px,14vh,160px)}
#labs .lb-steps{list-style:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;position:relative}
#labs .lb-step{position:relative;padding:0 clamp(20px,3vw,48px) 0 0}
#labs .lb-n{display:flex;align-items:center;gap:14px;font-family:var(--mono);font-size:12px;letter-spacing:.24em;color:var(--orange);font-weight:700;margin-bottom:22px}
#labs .lb-n:after{content:"";flex:1;height:1px;background:linear-gradient(90deg,rgba(227,91,50,.7),rgba(255,255,255,.1))}
#labs .lb-step:not(:last-child) .lb-n:before{content:"→";position:absolute;right:clamp(8px,1.4vw,22px);top:-1px;color:var(--orange);font-family:var(--sans);letter-spacing:0;font-size:14px}
#labs .lb-step:not(:last-child) .lb-n{padding-right:clamp(28px,2.6vw,40px)}
#labs .lb-st{font-family:var(--display);font-weight:800;letter-spacing:-.025em;font-size:clamp(21px,1.9vw,28px);line-height:1.08;margin-bottom:12px}
#labs .lb-sd{font-size:clamp(15px,1.1vw,16.5px);line-height:1.55;color:var(--mute-d);max-width:34ch}
@media (max-width:900px){
  #labs .lb-steps{grid-template-columns:1fr;gap:34px}
  #labs .lb-step{padding:0 0 0 0}
  #labs .lb-step:not(:last-child) .lb-n:before{content:"↓"}
}

/* ---------- 4 · CTA ---------- */
#labs .lb-cta{position:relative;margin-top:clamp(24px,4vh,56px);min-height:min(100svh,900px);display:flex;align-items:center;overflow:hidden;isolation:isolate}
#labs .lb-trail{position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none;
  -webkit-mask-image:linear-gradient(180deg,transparent 0%,#000 22%,#000 82%,transparent 100%);mask-image:linear-gradient(180deg,transparent 0%,#000 22%,#000 82%,transparent 100%)}
#labs .lb-cta-in{padding-top:clamp(80px,12vh,140px);padding-bottom:clamp(96px,14vh,160px)}
#labs .lb-dot{color:var(--orange);opacity:1}
#labs .lb-cta .eyebrow{color:var(--mute-d)}
#labs .lb-cta-h{font-family:var(--display);font-weight:800;letter-spacing:-.055em;line-height:.88;font-size:clamp(60px,11.4vw,196px);margin:28px 0 clamp(36px,4.6vw,60px);max-width:9.5ch;text-wrap:balance}
#labs .lb-cta-h .accent{white-space:nowrap}
#labs .lb-cta-row{display:flex;flex-wrap:wrap;align-items:center;gap:20px clamp(24px,3vw,44px)}
#labs .lb-btn{display:inline-flex;align-items:center;gap:18px;background:var(--orange);color:#fff;text-decoration:none;font-family:var(--mono);font-weight:700;text-transform:uppercase;letter-spacing:.2em;font-size:clamp(12px,1vw,14px);padding:clamp(18px,1.5vw,22px) clamp(24px,2.2vw,32px);
  transition:background .3s,transform .3s var(--ease),box-shadow .3s}
#labs .lb-btn span{font-family:var(--sans);letter-spacing:0;font-size:1.3em;transition:transform .3s var(--ease)}
#labs .lb-btn:hover{background:var(--orange-hi);transform:translateY(-2px);box-shadow:0 0 0 1px rgba(255,122,77,.4),0 24px 60px -18px rgba(255,122,77,.75)}
#labs .lb-btn:hover span{transform:translateX(4px)}
#labs .lb-mail{font-family:var(--display);font-weight:600;letter-spacing:-.02em;font-size:clamp(20px,2vw,28px);color:var(--paper);text-decoration:none;border-bottom:1px solid var(--line-d);padding-bottom:4px;user-select:text;-webkit-user-select:text;transition:color .3s,border-color .3s}
#labs .lb-mail:hover{color:var(--orange-hi);border-color:var(--orange-hi)}
#labs .lb-back{display:inline-flex;gap:10px;margin-top:clamp(40px,5vw,64px);font-family:var(--mono);font-size:11px;letter-spacing:.22em;text-transform:uppercase;color:var(--mute-d);text-decoration:none;border-bottom:1px solid var(--line-d);padding-bottom:6px;transition:color .3s,border-color .3s}
#labs .lb-back:hover{color:var(--orange-hi);border-color:var(--orange-hi)}
@media (max-width:640px){
  #labs .lb-cta-h{font-size:clamp(52px,16vw,84px)}
  #labs .lb-btn{width:100%;justify-content:space-between}
  #labs .lb-cta-row{flex-direction:column;align-items:flex-start}
}

@media (prefers-reduced-motion:reduce){
  #labs .lb-glyph path{stroke-dashoffset:0;transition:none}
  #labs .lb-pane.swap .lb-code pre,#labs .lb-pane.swap .lb-tree ul{animation:none}
  #labs .lb-btn,#labs .lb-btn span{transition:none}
}

/* ---------- phone: keep the close tight (scroll budget) ---------- */
@media (max-width:640px){
  #labs .lb-bleed{height:120px}
  #labs .lb-deliver{padding-top:24px}
  #labs pre{font-size:11px;line-height:1.75;padding:16px 0 18px}
  #labs .lb-tree ul{padding:14px 14px 18px;font-size:11.5px}
  #labs .lb-tree li{padding-top:3px;padding-bottom:3px}
  #labs .lb-tree li.opt,#labs .lb-tree li:not(.hr) em{display:none}
  #labs .lb-tree li.l1:after,#labs .lb-tree li.l2:after{top:calc(3px + .8em)}
  #labs .lb-tree li.last:before{bottom:calc(100% - 3px - .8em)}
  #labs .lb-feeds,#labs .lb-start{padding-top:72px}
  #labs .lb-fam,#labs .lb-fam+.lb-fam{padding:18px 0;column-gap:16px}
  #labs .lb-glyph{width:44px;height:44px}
  #labs .lb-steps{gap:26px}
  #labs .lb-n{margin-bottom:14px}
  #labs .lb-cta{min-height:auto;margin-top:16px}
  #labs .lb-cta-in{padding-top:96px;padding-bottom:112px}
  #labs .lb-cta-h{font-size:clamp(56px,18vw,84px)}
}
@media (min-width:641px) and (max-width:1100px){
  #labs .lb-tree li.opt{display:none}
  #labs .lb-feeds,#labs .lb-start{padding-top:96px}
  #labs .lb-cta{min-height:auto}
  #labs .lb-cta-in{padding-top:120px;padding-bottom:140px}
}
