.foundation-lab{--foundation-ink:#e8f3fa;--foundation-muted:#bdd0de;--foundation-edge:#355469;--foundation-accent:#71e4ce;max-width:1220px;margin:0 auto;color:var(--foundation-ink);background:#0c1927;border:1px solid var(--foundation-edge);border-radius:14px;overflow:hidden}
.foundation-heading{padding:1.3rem 1.5rem;background:linear-gradient(120deg,#0d3440,#14253c)}
.foundation-heading>a{display:inline-flex;min-height:44px;align-items:center;color:#c2e8e8}
.foundation-heading h1{font-size:clamp(1.75rem,3.5vw,2.6rem);line-height:1.12;margin:.3rem 0 .65rem;letter-spacing:-.02em}
.foundation-heading>p:last-child{max-width:65ch;line-height:1.55;margin:0;color:var(--foundation-muted)}
.foundation-eyebrow{margin:0 0 .4rem;color:var(--foundation-accent);font-size:.76rem;font-weight:750;letter-spacing:.07em}
.foundation-lab button,.foundation-lab textarea,.foundation-handoff>a{font:inherit}
.foundation-lab button,.foundation-handoff>a{min-height:48px;padding:.65rem .85rem;border:1px solid #4c7185;border-radius:8px;color:var(--foundation-ink);background:#183248;cursor:pointer;touch-action:manipulation;white-space:normal}
.foundation-lab button:hover,.foundation-handoff>a:hover{background:#22495a;border-color:var(--foundation-accent)}
.foundation-lab button:focus-visible,.foundation-lab summary:focus-visible,.foundation-lab textarea:focus-visible,.foundation-lab a:focus-visible{outline:3px solid var(--foundation-accent);outline-offset:3px}
.foundation-lab button[aria-pressed=true]{border-color:var(--foundation-accent);background:#125852}
.foundation-lab .foundation-primary{background:#087568;border-color:#79e7cd;font-weight:700}
.foundation-lab [hidden]{display:none!important}
.foundation-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.45rem;padding:.6rem;position:sticky;top:0;z-index:8;background:#0d1e2b;border-bottom:1px solid var(--foundation-edge)}
.foundation-tabs button{min-width:0;font-size:.95rem;font-weight:700;display:flex;gap:.5rem;justify-content:center;align-items:center}
.foundation-tabs button>span{display:inline-flex;width:1.65rem;height:1.65rem;border-radius:50%;align-items:center;justify-content:center;background:#0b1f2d;flex-shrink:0;color:var(--foundation-accent)}
.foundation-tabs button[aria-selected=true]{background:#12564f;border-color:var(--foundation-accent)}
.foundation-body{padding:1rem}
.foundation-prompt{padding:1rem 1.15rem;background:#132a3a;border:1px solid var(--foundation-edge);border-radius:10px;margin-bottom:1rem}
.foundation-prompt h2{font-size:clamp(1.2rem,2.3vw,1.55rem);line-height:1.35;margin:0 0 .5rem;max-width:65ch}
.foundation-prompt p{font-size:1rem;line-height:1.6;max-width:75ch;margin:.4rem 0 .7rem;color:var(--foundation-muted)}
.foundation-answer-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem;margin-top:.85rem}
.foundation-answer-options button{min-width:0;text-align:left;line-height:1.45}
.foundation-prompt .foundation-correct{color:#a4f0dc}
.foundation-stage{min-width:0;margin-bottom:.85rem}
.foundation-visual{min-width:0;scroll-margin-top:5.25rem;border:1px solid var(--foundation-edge);border-radius:10px;overflow:hidden;background:#091724}
.foundation-visual svg{display:block;max-width:100%;height:auto}
.foundation-hardware-diagram{background:#0a1420}
.foundation-pc-svg{display:block;width:100%;height:auto;max-height:620px;touch-action:pan-y}
.foundation-diagram-part{cursor:pointer;outline:none}
.foundation-diagram-part:hover>rect,.foundation-diagram-part[aria-pressed=true]>rect{stroke:#55ddc2;stroke-width:3}
.foundation-diagram-part:focus-visible{outline:3px solid #71e4ce;outline-offset:3px}
.foundation-diagram-part:focus-visible>rect{stroke:#b5fff0;stroke-width:4}
.foundation-hardware-diagram>.foundation-visual-readout{padding:.7rem;border-top:1px solid var(--foundation-edge)}
.foundation-part-portrait{display:grid;grid-template-columns:120px minmax(0,1fr);gap:.8rem;align-items:center;padding:.75rem;border-top:1px solid var(--foundation-edge);background:#102b38}
.foundation-part-portrait svg{width:120px;height:85px;object-fit:contain}
.foundation-part-portrait strong{display:block;font-size:1rem;color:#b9f6e5}
.foundation-part-portrait p,.foundation-part-portrait span{font-size:.88rem;line-height:1.5;color:var(--foundation-muted);margin:.25rem 0 0}
.foundation-equipment-map{padding:.75rem}
.foundation-equipment-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem}
.foundation-equipment-grid .foundation-equipment-card{display:flex;flex-direction:column;gap:.4rem;align-items:center;min-width:0;text-align:center;padding:.8rem;background:#112e40}
.foundation-equipment-card svg{width:140px;height:90px;object-fit:contain}
.foundation-equipment-card strong{font-size:1rem;line-height:1.4}
.foundation-equipment-card span{font-size:.84rem;line-height:1.45;color:var(--foundation-muted)}
.foundation-visual-readout{display:flex;gap:.45rem;flex-wrap:wrap;padding:.8rem 0 0;font-size:.84rem;line-height:1.5}
.foundation-visual-readout>span{border:1px solid var(--foundation-edge);background:#102432;border-radius:6px;padding:.4rem .65rem}
.foundation-visual-readout [data-foundation-state=done]{color:#a5f2d9;border-color:#54b99b}
.foundation-item-buttons{display:flex;gap:.45rem;flex-wrap:wrap;margin:.75rem 0}
.foundation-item-buttons button{min-width:0;flex:1 1 150px;text-align:left;font-size:.88rem;line-height:1.4}
.foundation-item-buttons span{color:#9de8d3;font-size:.76rem}
.foundation-caption{padding:.9rem 1rem;border-left:3px solid var(--foundation-accent);background:#102b35;border-radius:4px;min-height:6rem}
.foundation-caption h2{font-size:1.15rem;line-height:1.4;margin:0 0 .35rem;color:#b9f6e5}
.foundation-caption p{margin:.4rem 0;font-size:.96rem;line-height:1.55;color:var(--foundation-muted)}
.foundation-feedback{padding:.8rem 1rem;background:#103c40;color:#d4f5eb;border:1px solid #2e7d79;border-radius:8px;line-height:1.55;font-size:.94rem;overflow-wrap:anywhere}
.foundation-help{border:1px solid var(--foundation-edge);border-radius:8px;margin:1rem 0;padding:0 1rem;background:#112532}
.foundation-help summary{cursor:pointer;min-height:48px;display:list-item;list-style-position:inside;padding:.75rem 0;font-weight:650;color:#c2e5eb}
.foundation-help li,.foundation-help p{line-height:1.6;color:var(--foundation-muted);margin:.5rem 0}
.foundation-small,.foundation-prompt .foundation-small{font-size:.86rem;color:var(--foundation-muted);line-height:1.55}
.foundation-outcomes{list-style:none;padding:0;margin:.8rem 0}
.foundation-outcomes li{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap;padding:.75rem 0;border-bottom:1px solid var(--foundation-edge)}
.foundation-outcomes li>span{color:var(--foundation-accent);font-size:1.25rem}
.foundation-outcomes li>b{margin-left:auto;font-size:.82rem;color:var(--foundation-accent)}
.foundation-handoff{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap}
.foundation-handoff>a{display:inline-flex;align-items:center;text-decoration:none}
.foundation-code-workspace{padding:1rem;border:1px solid var(--foundation-edge);border-radius:10px;background:#102432;margin-bottom:1rem}
.foundation-code-workspace>label{display:block;font-size:1.05rem;font-weight:700;margin-bottom:.6rem}
.foundation-code-workspace textarea{display:block;width:100%;max-width:100%;min-height:180px;resize:vertical;line-height:1.6;font-family:Consolas,"Cascadia Code",monospace;font-size:1rem;color:#e9f5fb;background:#071724;border:1px solid #5b8195;border-radius:7px;padding:.8rem;tab-size:2}
.foundation-code-workspace>p{font-size:.88rem;line-height:1.5;color:var(--foundation-muted)}
.foundation-code-workspace [data-foundation-code-results] ul{list-style:none;padding:0;margin:.8rem 0 0;display:grid;gap:.5rem}
.foundation-code-workspace [data-foundation-code-results] li{padding:.65rem .8rem;background:#0a1a28;border:1px solid var(--foundation-edge);border-radius:7px;overflow-wrap:anywhere}
.foundation-code-workspace [data-foundation-code-results] li>strong,.foundation-code-workspace [data-foundation-code-results] li>span{display:block;line-height:1.55}
.foundation-code-workspace [data-foundation-code-results] li>span{font-size:.85rem;color:var(--foundation-muted)}
@media(max-width:700px){.foundation-heading{padding:1rem}.foundation-body{padding:.75rem}.foundation-answer-options{grid-template-columns:minmax(0,1fr)}.foundation-item-buttons button{flex-basis:130px}.foundation-prompt{padding:.9rem}.foundation-handoff>*{flex:1 1 100%;justify-content:center}.foundation-tabs{gap:.3rem;padding:.45rem}.foundation-tabs button{font-size:.86rem;padding:.55rem .3rem;gap:.35rem}.foundation-equipment-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){.foundation-tabs button>span{width:1.35rem;height:1.35rem}.foundation-item-buttons button{flex-basis:110px}.foundation-visual{scroll-margin-top:6rem}.foundation-equipment-grid{grid-template-columns:minmax(0,1fr)}.foundation-part-portrait{grid-template-columns:96px minmax(0,1fr);gap:.6rem}.foundation-part-portrait svg{width:96px;height:74px}}
