.uhl-lab {
  --ul-ink:#192f34;
  --ul-teal:#116761;
  --ul-line:#d6e1dc;
  --ul-muted:#506565;
  max-width:100%;
  color:var(--ul-ink);
  font:inherit;
}
.uhl-lab *, .uhl-lab *::before, .uhl-lab *::after { box-sizing:border-box; }
.uhl-lab h3,.uhl-lab h4,.uhl-lab p,.uhl-lab dl,.uhl-lab dd {margin:0;}
.uhl-lab button,.uhl-lab select {font:inherit;color:inherit;}
.uhl-lab button {cursor:pointer;}
.uhl-lab button:focus-visible,.uhl-lab canvas:focus-visible,.uhl-lab select:focus-visible {outline:3px solid #2d8f82;outline-offset:3px;}
.uhl-lab [hidden]{display:none!important;}
.uhl-tabs,.uhl-actions,.uhl-controls,.uhl-compare {display:flex;align-items:center;gap:.45rem;}
.uhl-tabs {display:inline-flex;flex-wrap:wrap;background:#e9eeea;border:1px solid #d7e0d9;border-radius:12px;padding:4px;margin:0 0 1.2rem;}
.uhl-tab {display:inline-flex;align-items:center;justify-content:center;gap:.5rem;font-weight:650!important;font-size:.9rem!important;line-height:1.22;min-height:39px;background:transparent;border:1px solid transparent;border-radius:8px;padding:.52rem .9rem;}
.uhl-tab svg,.uhl-node svg,.uhl-part svg,.uhl-stage-head>svg,.uhl-primary svg,.uhl-secondary svg {flex:none;}
.uhl-tab[aria-pressed=true]{background:#fff;color:var(--ul-teal);border-color:#d8e4dd;box-shadow:0 2px 5px #173c3020;}
.uhl-layout {display:grid;grid-template-columns:minmax(0,1.63fr) minmax(252px,1fr);gap:1rem;align-items:start;}
.uhl-figure,.uhl-panel,.uhl-flow {min-width:0;background:#fff;border:1px solid var(--ul-line);border-radius:16px;overflow:hidden;}
.uhl-stage-head,.uhl-foot,.uhl-shotcap {display:flex;align-items:center;justify-content:space-between;gap:.85rem;padding:.9rem 1.05rem;}
.uhl-stage-head {border-bottom:1px solid var(--ul-line);}
.uhl-stage-head h3,.uhl-stage-head h4,.uhl-panel h3 {font:inherit;font-weight:700;font-size:1.02rem;line-height:1.35;letter-spacing:-.02em;color:var(--ul-ink);}
.uhl-stage-head>svg {color:var(--ul-teal);}
.uhl-viewport {position:relative;isolation:isolate;width:100%;height:clamp(274px,28vw,436px);background:radial-gradient(ellipse at 49% 46%,#f8faf2 0,#e9f0e8 60%,#d8e8df 100%);overflow:hidden;}
.uhl-modelcanvas {width:100%;height:100%;display:block;touch-action:pan-y;}
.uhl-viewport .uhl-modelcanvas {touch-action:none;cursor:grab;}
.uhl-viewport .uhl-modelcanvas:active{cursor:grabbing;}
.uhl-pin {position:absolute;transform:translate(-50%,-50%);padding:0;width:24px;height:24px;isolation:isolate;border:1.5px solid white;border-radius:50%;font-size:12px!important;line-height:1;font-weight:700!important;color:white!important;background:#345752;box-shadow:0 1px 5px #163d4252;}
.uhl-pin::before {content:'';inset:-5px;position:absolute;border-radius:50%;}
.uhl-pin[aria-pressed=true] {background:#146e62;box-shadow:0 0 0 4px #70c5aa80;}
.uhl-foot {border-top:1px solid var(--ul-line);padding-bottom:.65rem;}
.uhl-hint,.uhl-shotcap,.uhl-source,.uhl-solved {font-size:.78rem!important;line-height:1.45;font-weight:500;color:var(--ul-muted);}
.uhl-controls {flex:none;}
.uhl-move {display:inline-flex;align-items:center;justify-content:center;gap:.32rem;border:1px solid #abcfc3;background:#e4f3ea;border-radius:7px;min-height:32px;color:#195b4e!important;padding:.3rem .53rem;font-size:.73rem!important;font-weight:650!important;line-height:1.2;}
.uhl-move svg {height:13px;width:13px;flex:none;}
.uhl-foot {flex-wrap:wrap;}
.uhl-controls {margin-left:auto;}
.uhl-icon {display:grid;place-items:center;border:1px solid var(--ul-line);border-radius:7px;background:#fff;width:32px;height:32px;padding:5px;}
.uhl-icon:hover,.uhl-secondary:hover,.uhl-part:hover,.uhl-node:hover,.uhl-case:hover {background:#eff6ee;}
.uhl-icon svg {width:16px;height:16px;}
.uhl-source {padding:.5rem 1.05rem .9rem;}
.uhl-panel {padding:1.05rem;}
.uhl-partlist {display:flex;flex-direction:column;gap:3px;margin:.55rem 0 .8rem;}
.uhl-part,.uhl-case {display:flex;align-items:center;gap:.55rem;background:transparent;border:1px solid transparent;border-radius:7px;min-height:36px;text-align:start;line-height:1.25;font-size:.86rem!important;font-weight:600!important;padding:.38rem .48rem;}
.uhl-part[aria-pressed=true],.uhl-case[aria-pressed=true] {background:#e3f2e9;color:#125b50;border-color:#c8e0d2;}
.uhl-id,.uhl-stagecount,.uhl-node small,.uhl-io dt,.uhl-detail-body small {font-family:'IBM Plex Mono',ui-monospace,Consolas,monospace;font-variant-numeric:tabular-nums;}
.uhl-id {font-size:.75rem;color:#558075;padding:.17rem .1rem;font-weight:600;}
.uhl-part svg {width:13px;height:13px;margin-left:auto;opacity:.48;}
.uhl-detail {display:grid;grid-template-columns:minmax(60px,30%) 1fr;gap:.75rem;border-top:1px solid var(--ul-line);padding-top:.85rem;align-items:start;}
.uhl-detail-photo {display:block;width:100%;height:110px;object-fit:contain;object-position:center;background:#edf2ee;border-radius:7px;}
.uhl-detail-body small {display:block;font-size:.65rem;line-height:1.42;color:var(--ul-muted);margin-bottom:.25rem;}
.uhl-detail-body p,.uhl-flowbody p,.uhl-work>p,.uhl-intro p {font-size:.9rem;line-height:1.55;color:#465c5b;}
.uhl-flow,.uhl-samples {padding:1.25rem;}
.uhl-samples {padding:0;}
.uhl-intro {margin:0 0 1.1rem;}
.uhl-intro h3 {font:inherit;font-weight:680;letter-spacing:-.035em;font-size:clamp(1.28rem,2.1vw,1.72rem);line-height:1.2;margin-bottom:.55rem;}
.uhl-flowscheme {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));background:radial-gradient(at 40% 0,#eff5ed,#e8efe8);border:1px solid var(--ul-line);border-radius:12px;padding:1.15rem .65rem;gap:.3rem;}
.uhl-node {position:relative;display:flex;align-items:center;flex-direction:column;gap:4px;background:transparent;border:0;border-radius:9px;padding:7px 2px;color:#45605c!important;min-width:0;}
.uhl-node small {font-size:.7rem;line-height:1.3;letter-spacing:.08em;}
.uhl-node strong {font-size:.82rem;line-height:1.25;font-weight:650;overflow-wrap:anywhere;}
.uhl-node-icon {height:43px;width:43px;display:grid;place-items:center;border:1px solid #bdd0c5;background:#f6f8f2;border-radius:13px;margin:0 0 .3rem;position:relative;z-index:1;}
.uhl-node-icon svg {width:24px;height:24px;}
.uhl-node:not(:last-child)::after {content:'';position:absolute;top:28px;left:calc(50% + 23px);width:calc(100% - 41px);height:2px;background:repeating-linear-gradient(90deg,#9cb6ac 0 5px,transparent 5px 9px);}
.uhl-node.passed::after {background:#6bad98;}
.uhl-node[aria-pressed=true] .uhl-node-icon {color:#fff;background:#176a5c;box-shadow:0 0 0 4px #67ad8c35;border-color:#176a5c;}
.uhl-node[aria-pressed=true]:not(:last-child)::after {background:linear-gradient(90deg,#238371 0 35%,#93cab5 50%,#238371 65%);background-size:180% 100%;animation:uhl-path 1.8s linear infinite;}
@keyframes uhl-path{to{background-position:-180% 0;}}
.uhl-flowinfo {display:grid;grid-template-columns:1.5fr 1fr;align-items:start;gap:2rem;padding:1.45rem 0;}
.uhl-stagecount {display:block;font-size:.72rem;letter-spacing:.08em;font-weight:650;color:#41776a;}
.uhl-flowbody h4,.uhl-work h4 {font:inherit;font-size:1.21rem;font-weight:700;line-height:1.3;letter-spacing:-.025em;margin:.4rem 0;}
.uhl-io {display:grid;gap:.55rem;}
.uhl-io>div {border-left:2px solid #7aad99;padding:.3rem .8rem;}
.uhl-io dt {font-size:.69rem;color:var(--ul-muted);letter-spacing:.04em;}
.uhl-io dd {font-size:.91rem;font-weight:600;margin-top:.25rem;}
.uhl-primary,.uhl-secondary {display:inline-flex;align-items:center;justify-content:center;gap:.52rem;padding:.58rem .92rem;min-height:39px;border-radius:8px;font-size:.87rem!important;line-height:1.2;font-weight:650!important;}
.uhl-primary {background:#155f52;border:1px solid #155f52;color:white!important;}
.uhl-primary:hover {background:#104d42;}
.uhl-secondary {background:#fff;border:1px solid var(--ul-line);}
.uhl-primary svg,.uhl-secondary svg {width:16px;height:16px;}
.uhl-flow>.uhl-source {padding:1rem 0 0;}
.uhl-casebar {display:flex;flex-wrap:wrap;gap:.35rem;margin:0 0 .9rem;}
.uhl-case {background:#fff;border-color:var(--ul-line);padding:.34rem .62rem;font-size:.8rem!important;border-radius:7px;}
.uhl-case .uhl-id {font-size:.7rem;}
.uhl-shot {width:100%;background:#1b343b;aspect-ratio:480/344;}
.uhl-shot canvas {width:100%;height:100%;display:block;cursor:crosshair;}
.uhl-compare {gap:0;border:1px solid var(--ul-line);border-radius:6px;overflow:hidden;flex-wrap:wrap;}
.uhl-compare-btn {background:#fff;border:0;font-weight:600!important;font-size:.75rem!important;line-height:1.25;min-height:30px;padding:.34rem .52rem;}
.uhl-compare-btn[aria-pressed=true] {background:#e3efe6;color:#1b5a4e;}
.uhl-work {display:flex;align-items:flex-start;flex-direction:column;gap:.55rem;}
.uhl-work h4 {margin:0;}
.uhl-field {display:flex;flex-direction:column;gap:.28rem;width:100%;}
.uhl-field span {font-size:.78rem;font-weight:650;color:#445f57;}
.uhl-field select {width:100%;color:var(--ul-ink);background:#fcfdfb;border:1px solid #bdcec2;border-radius:7px;min-height:38px;font-size:.87rem;padding:.35rem .5rem;}
.uhl-work .uhl-primary {margin-top:.25rem;}
.uhl-result {font-size:.84rem;line-height:1.5;padding:.65rem .8rem;border-radius:7px;background:#fbf0db;color:#765222;}
.uhl-result.valid {background:#e6f3e9;color:#185a49;}
.uhl-solved {font-size:.74rem!important;}
@media(max-width:850px){
  .uhl-layout {grid-template-columns:minmax(0,1.35fr) minmax(220px,1fr);}
  .uhl-detail{grid-template-columns:1fr;}
  .uhl-detail-photo{max-height:93px;}
}
@media(max-width:700px){
  .uhl-tabs{width:100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(62px,1fr));gap:2px;}
  .uhl-tab{flex-direction:column;gap:.2rem;padding:.4rem .25rem;font-size:.75rem!important;min-height:53px;overflow-wrap:anywhere;text-align:center;}
  .uhl-tab svg{width:17px;height:17px;}
  .uhl-layout{grid-template-columns:minmax(0,1fr);}
  .uhl-viewport {height:clamp(235px,65vw,390px);}
  .uhl-detail{grid-template-columns:minmax(65px,23%) 1fr;}
  .uhl-foot{align-items:flex-start;}
  .uhl-flow,.uhl-panel {padding:.9rem;}
  .uhl-flowscheme{padding:.6rem .25rem;gap:0;}
  .uhl-node small{font-size:.58rem;}
  .uhl-node strong{font-size:.64rem;}
  .uhl-node-icon{width:30px;height:30px;border-radius:9px;}
  .uhl-node-icon svg{width:18px;height:18px;}
  .uhl-node:not(:last-child)::after{top:21px;left:calc(50% + 16px);width:calc(100% - 31px);}
  .uhl-flowinfo{gap:.65rem;grid-template-columns:minmax(0,1fr);padding:1rem 0;}
  .uhl-io{grid-template-columns:1fr 1fr;}
  .uhl-actions{flex-wrap:wrap;}
  .uhl-testlayout .uhl-stage-head{flex-wrap:wrap;}
}
@media(prefers-reduced-motion:reduce){
  .uhl-lab *,.uhl-lab *::after{animation:none!important;transition:none!important;}
}

/* Keep the action for the current teaching step visible beside the illustration. */
.uhl-lab .uhl-primary,.uhl-lab .uhl-secondary,.uhl-lab .uhl-guide-choice,.uhl-lab summary,.uhl-lab .uhl-back{min-height:44px}
.uhl-lab .uhl-primary{font-size:1rem!important;line-height:1.35;padding:.66rem 1.12rem}
.uhl-lab .uhl-primary:focus-visible,.uhl-lab summary:focus-visible,.uhl-lab .uhl-back:focus-visible{outline:3px solid #2d8f82;outline-offset:3px}
.uhl-lab summary{display:list-item;cursor:pointer;padding:.72rem .05rem;color:var(--ul-teal);font-size:.9rem;font-weight:600;line-height:1.4}
.uhl-disclosure{border-top:1px solid var(--ul-line)}
.uhl-disclosure[open]>summary{padding-bottom:.45rem}
.uhl-disclosure .uhl-controls{flex-wrap:wrap;margin:0;padding-bottom:.75rem}
.uhl-disclosure .uhl-controls button{min-height:42px;white-space:normal}
.uhl-disclosure .uhl-technical-text,.uhl-technical>p{font-size:.95rem;line-height:1.65;color:var(--ul-muted);padding-bottom:.7rem}
.uhl-view-controls{padding-inline:1rem}
.uhl-lab .uhl-stagecount{letter-spacing:.035em;font-size:.79rem;color:#447263}
.uhl-model-card{padding:1.2rem}
.uhl-lab .uhl-current-title,.uhl-lab .uhl-task-title{font-weight:650;font-size:clamp(1.18rem,2vw,1.52rem);line-height:1.3;letter-spacing:-.025em;margin:.45rem 0 .65rem}
.uhl-lab .uhl-detail{border:0;padding:0;display:flex;flex-direction:column;gap:.65rem}
.uhl-detail .uhl-detail-photo{width:100%;height:clamp(100px,12vw,160px);max-height:160px}
.uhl-lab .uhl-detail-body p,.uhl-lab .uhl-instruction,.uhl-lab .uhl-intro>p,.uhl-lab .uhl-flowbody>p{font-size:1rem;line-height:1.6}
.uhl-detail-body .uhl-see{margin-top:.5rem;font-size:.86rem!important;color:var(--ul-muted)}
.uhl-model-card>.uhl-primary{margin:1rem 0}
.uhl-detail .uhl-detail-body{order:-1}
.uhl-lab .uhl-flowbody{margin:1rem 0}
.uhl-lab .uhl-flow>.uhl-actions{margin-bottom:1.1rem}
.uhl-flow .uhl-technical{padding:0 0 .8rem}
.uhl-flow .uhl-io{grid-template-columns:1fr 1fr;margin:.5rem 0}
.uhl-samples .uhl-intro{max-width:74ch}
.uhl-samples .uhl-intro .uhl-stagecount{margin-bottom:.35rem}
.uhl-samples .uhl-intro h3{margin-bottom:.35rem}
.uhl-other-cases{margin-top:1.2rem}
.uhl-other-cases[open] .uhl-casebar{margin:.4rem 0}
.uhl-work{gap:.6rem}
.uhl-lab .uhl-work .uhl-task-title{margin:0}
.uhl-work .uhl-answers,.uhl-work .uhl-chosen,.uhl-work .uhl-result,.uhl-work .uhl-task-actions{width:100%}
.uhl-answers{display:grid;gap:.4rem}
.uhl-guide-choice{border:1px solid #bdcfc5;border-radius:8px;background:#fbfdf9;text-align:start;display:flex;align-items:center;gap:.65rem;font-size:1rem!important;line-height:1.4;padding:.6rem .8rem}
.uhl-guide-choice:hover,.uhl-guide-choice.uhl-retry{border-color:#609886;background:#e8f3e9}
.uhl-choice-no{display:grid;place-items:center;min-width:24px;min-height:24px;background:#e3eee5;border-radius:50%;font-size:.8rem;font-weight:700}
.uhl-chosen{display:grid;gap:5px;margin:.2rem 0;padding:.64rem .78rem;border-radius:8px;background:#eff4ed}
.uhl-chosen>div{display:flex;justify-content:space-between;gap:.6rem;align-items:baseline;flex-wrap:wrap;text-align:start}
.uhl-chosen span{font-size:.8rem;color:var(--ul-muted)}
.uhl-chosen strong{font-size:.88rem;font-weight:640}
.uhl-task-actions{display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:column;gap:.4rem}
.uhl-back{display:inline-flex;align-items:center;gap:.35rem;background:transparent;text-decoration:underline;text-underline-offset:3px;border:0;color:var(--ul-teal)!important;padding:.5rem .2rem}
.uhl-back svg{width:16px;height:16px}
.uhl-lab .uhl-result{font-size:.92rem}
.uhl-work.uhl-finished{border-color:#a1c4a8}
.uhl-compare button{min-height:40px;font-size:.8rem!important}
.uhl-lab [tabindex="-1"]:focus{outline:none}
.uhl-worked-example .uhl-chosen{display:block;padding:0;background:transparent}
.uhl-demo-steps{display:grid;gap:.55rem;padding:.85rem .95rem;border-radius:9px;background:#eff4ed}
.uhl-demo-steps dt{font-size:.78rem;line-height:1.35;color:var(--ul-muted)}
.uhl-lab .uhl-demo-steps dd{margin:.12rem 0 0;font-size:1rem;line-height:1.36;font-weight:650}
.uhl-worked-example .uhl-demo-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem;align-items:start;margin:.85rem 0 .4rem}
.uhl-demo-crop{margin:0;overflow:hidden;border-radius:7px;background:#f3f6f1;border:1px solid var(--ul-line)}
.uhl-demo-crop canvas{display:block;width:100%;height:auto;aspect-ratio:31/20}
.uhl-demo-crop figcaption{font-weight:600;font-size:.8rem;line-height:1.35;padding:.35rem .5rem}
.uhl-lab .uhl-demo-caption{font-size:.8rem;line-height:1.45;color:var(--ul-muted)}
@media(max-width:700px){
  .uhl-lab .uhl-guided-model .uhl-detail{display:grid;grid-template-columns:minmax(0,1fr) 82px;align-items:center}
  .uhl-lab .uhl-detail-photo{height:95px}
  .uhl-guided-model .uhl-model-card{padding:1rem}
  .uhl-lab .uhl-viewport{height:clamp(190px,53vw,290px)}
  .uhl-lab .uhl-shot{max-height:310px;aspect-ratio:480/344}
  .uhl-lab .uhl-model-card>.uhl-primary,.uhl-work .uhl-primary{width:100%}
  .uhl-lab .uhl-tab{min-height:60px}
  .uhl-lab .uhl-result,.uhl-lab .uhl-guide-choice{font-size:.98rem!important}
  .uhl-samples .uhl-layout{gap:.65rem}
}
@media(max-width:700px){
  .uhl-testlayout:has(.uhl-worked-example) .uhl-worked-example{order:-1}
}
