/* Shared Tech Lab studios. Scoped to .ts-* to avoid affecting existing site styles. */
.ts-shell {max-width:1500px;margin:0 auto}.ts-top {display:flex;gap:16px;align-items:flex-start;justify-content:space-between;margin-bottom:20px}.ts-back{color:#8bdfef;text-decoration:none;font-size:13px;font-weight:700}.ts-top h1{font-size:clamp(29px,3.5vw,43px);margin:10px 0 7px;color:#eaf6ff;line-height:1.13}.ts-top p{color:#a1b4ca;max-width:820px;line-height:1.55;font-size:14px}.ts-mark{font-size:10px;letter-spacing:2px;color:#68d6e6;font-weight:900;text-transform:uppercase}.ts-panel{background:linear-gradient(150deg,#111f32,#0b1525);border:1px solid #2a415c;border-radius:16px;padding:18px;min-width:0}.ts-panel h2{margin:0 0 12px;font-size:17px;color:#eef8ff}.ts-panel h3{font-size:13px;color:#a7c0d6;margin:14px 0 10px}.ts-panel p{color:#99aec5;font-size:12px;line-height:1.5}.ts-app{display:grid;grid-template-columns:minmax(240px,280px) minmax(0,1fr) minmax(235px,270px);gap:15px;align-items:start}.ts-stack{display:grid;gap:15px;min-width:0}.ts-field{display:grid;gap:6px;margin-bottom:11px;font-size:12px;font-weight:650;color:#acc7dc}.ts-field>span{display:block}.ts-field input,.ts-field select,.ts-field textarea,.ts-input,.ts-table input{border:1px solid #35516c;background:#081526;color:#f1fcff;border-radius:8px;padding:10px 11px;width:100%;font:inherit;font-size:13px;min-width:0}.ts-field input:focus,.ts-field select:focus,.ts-field textarea:focus,.ts-input:focus,.ts-table input:focus{outline:2px solid #58d4e2;outline-offset:1px}.ts-field textarea{min-height:60px;resize:vertical}.ts-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.ts-button{border:1px solid #3d607d;background:#172c43;color:#e1f3ff;border-radius:8px;font-weight:750;font-size:12px;padding:10px 12px;cursor:pointer;line-height:1.3;white-space:normal;text-align:center}.ts-button:hover:not(:disabled){background:#1f405c;border-color:#65bbd5}.ts-button:focus-visible{outline:2px solid #78e4f1;outline-offset:2px}.ts-button:disabled{opacity:.4;cursor:not-allowed}.ts-button.ts-primary{background:#126577;border-color:#309fb2;color:#fff}.ts-button.ts-primary:hover{background:#167f91}.ts-button.ts-danger{color:#ffcad1;border-color:#6f3c51}.ts-buttons{display:flex;flex-wrap:wrap;gap:7px}.ts-buttons>.ts-button{flex:1 1 auto}.ts-help{font-size:11px;color:#8ba2ba;line-height:1.55;margin:8px 0 0}.ts-notice{border:1px solid #2b6172;border-radius:9px;background:#082535;color:#c5eef6;padding:10px 12px;font-size:12px;line-height:1.5;margin-top:9px;white-space:pre-wrap}.ts-notice[data-kind="error"]{border-color:#945363;background:#361b29;color:#ffced6}.ts-notice[data-kind="success"]{border-color:#39886b;background:#103629;color:#aff7d7}.ts-plot{width:100%;min-height:420px;border:1px solid #294058;border-radius:12px;background:#081322;overflow:hidden;position:relative}.ts-plot svg{display:block;width:100%;height:auto;min-height:340px}.ts-plot[aria-busy="true"]{opacity:.7}.ts-pair{display:flex;gap:8px;align-items:center}.ts-pair>.ts-field{flex:1}.ts-separator{height:1px;background:#284057;margin:14px 0}.ts-scroll{overflow:auto;max-height:290px}.ts-table{width:100%;border-collapse:collapse;min-width:320px;font-size:12px}.ts-table th,.ts-table td{padding:5px 6px;border-bottom:1px solid #283a4d;text-align:left;white-space:nowrap}.ts-table th{position:sticky;top:0;background:#15283c;color:#9fd9e5;z-index:1}.ts-table input{padding:6px;max-width:140px;border-radius:5px}.ts-table button{padding:4px 8px}.ts-stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.ts-stat{border:1px solid #2b465f;background:#0a1a2a;padding:11px;border-radius:10px;min-width:0}.ts-stat span{color:#8ca9c2;font-size:10px;display:block}.ts-stat strong{display:block;color:#b9eef9;font-size:14px;margin-top:5px;overflow-wrap:anywhere}.ts-series-card{border:1px solid #2b455d;border-radius:10px;padding:10px;margin-bottom:9px;background:#0b1b2b}.ts-series-head{display:flex;align-items:center;gap:8px;margin-bottom:8px}.ts-series-head input[type="color"]{width:31px;height:28px;border:0;padding:0;background:transparent;cursor:pointer}.ts-series-head input[type="text"]{flex:1;min-width:0}.ts-series-head button{padding:5px 7px}.ts-footer-note{font-size:11px;color:#83a3bd;line-height:1.6;margin:18px 0}.ts-pills{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0}.ts-pill{font-size:10px;color:#b4dce9;border:1px solid #36566c;border-radius:30px;padding:5px 9px}.ts-mode-row{display:flex;gap:8px;flex-wrap:wrap}.ts-mode-row .ts-button[aria-pressed="true"]{background:#155c71;border-color:#67cce1;color:#fff}.ts-hidden{display:none!important}.ts-inputfile{display:none}.ts-circuit-canvas{height:570px;min-height:400px;position:relative;border:1px solid #2c4b63;border-radius:12px;overflow:hidden;background:#071423;touch-action:none}.ts-circuit-canvas>svg{display:block;width:100%;height:100%;user-select:none;touch-action:none}.ts-circuit-canvas circle.ts-terminal{cursor:crosshair;stroke:#061421;stroke-width:3;fill:#7de5f0}.ts-circuit-canvas circle.ts-terminal:hover,.ts-circuit-canvas circle.ts-terminal[data-active="true"]{fill:#f7c45a;stroke:#e1ac38}.ts-circuit-canvas .ts-part{cursor:grab}.ts-circuit-canvas .ts-part:active{cursor:grabbing}.ts-circuit-canvas .ts-part[data-selected="true"] .ts-part-outline{stroke:#f9c65b}.ts-circuit-canvas .ts-part text{pointer-events:none}.ts-circuit-canvas .ts-wire{stroke:#70bacd;stroke-width:3;fill:none;stroke-linejoin:round;pointer-events:stroke;cursor:pointer}.ts-circuit-canvas .ts-wire:hover{stroke:#f4bd69;stroke-width:5}.ts-circuit-canvas .ts-grid-dot{fill:#294158}.ts-circuit-plot{width:100%;height:185px;background:#081625;border:1px solid #294058;border-radius:9px;display:block}.ts-results{max-height:305px;overflow:auto}.ts-results table{border-collapse:collapse;width:100%;font-size:11px}.ts-results td,.ts-results th{border-bottom:1px solid #294057;padding:7px 4px;text-align:right;white-space:nowrap}.ts-results td:first-child,.ts-results th:first-child{text-align:left}.ts-results th{color:#93cbdd}.ts-tag{font-size:10px;padding:5px 7px;border:1px solid #315368;border-radius:6px;color:#a0d8e7}.ts-toolgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.ts-toolgrid .ts-button[aria-pressed="true"]{background:#126577;border-color:#5ec6d5}.ts-topnav{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.ts-topnav a{border:1px solid #36556d;border-radius:8px;padding:8px 11px;color:#bce9f3;font-size:12px;text-decoration:none}.ts-topnav a:hover{background:#164057}.ts-topnav a[aria-current="page"]{border-color:#5bd1e6;background:#16475a;color:white}.ts-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0 0 25px}.ts-gallery-card{display:block;padding:20px;border:1px solid #315271;border-radius:16px;background:linear-gradient(135deg,#12293f,#10192d);text-decoration:none;color:#fff}.ts-gallery-card:hover{border-color:#65cfe5;transform:translateY(-2px)}.ts-gallery-card strong{display:block;font-size:18px;margin-bottom:8px}.ts-gallery-card span{font-size:12px;color:#9dbbd2;line-height:1.6}.ts-gallery-card small{display:block;color:#6bdbeb;font-size:10px;letter-spacing:1px;margin-bottom:10px;font-weight:900}.ts-inline-check{display:flex;align-items:center;gap:7px;color:#9fb9cd;font-size:12px}.ts-inline-check input{accent-color:#66cbdc}.ts-circuit-toolbar{margin-bottom:10px}.ts-cursor{font-family:Consolas,monospace;color:#91e9f6;font-size:11px;margin:10px 0 0;min-height:17px}
@media(max-width:1250px){.ts-app{grid-template-columns:235px minmax(0,1fr)}.ts-app>.ts-stack:last-child{grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr))}.ts-app>.ts-stack:last-child>.ts-panel{align-self:start}}
@media(max-width:820px){.ts-app{grid-template-columns:1fr}.ts-app>.ts-stack:last-child{grid-column:auto;grid-template-columns:1fr}.ts-plot{min-height:300px}.ts-circuit-canvas{height:410px}.ts-top{display:block}.ts-gallery{grid-template-columns:1fr}}
/* Inputs and labels must remain within compact sidebar columns. */
.ts-shell *,.ts-gallery *{box-sizing:border-box}
.ts-series-head input[type="text"]{background:#081526;color:#f1fcff;border:1px solid #35516c;border-radius:8px;padding:8px;font-size:12px;width:100%;min-width:0}
.ts-series-head input[type="text"]:focus{outline:2px solid #58d4e2}
.ts-circuit-canvas circle.ts-terminal[data-probe="true"]{fill:#a8f0a3}
.ts-circuit-canvas circle.ts-terminal[data-active="true"]{fill:#f7c45a}
@media(max-width:650px){.ts-plot{overflow-x:auto}.ts-plot svg{min-width:700px}}

/* Tech Lab 2.1: clearer onboarding and manually editable wire routes */
.ts-onboarding{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:16px;flex-wrap:wrap}
.ts-onboarding strong{color:#b8f0f6;font-size:17px}.ts-onboarding p{margin:7px 0 0;max-width:710px}
.ts-details{border:1px solid #28445d;border-radius:10px;margin:10px 0;padding:9px 12px;background:#091a2c}
.ts-details summary{color:#a9e0ee;font-size:12px;font-weight:750;cursor:pointer}.ts-details[open] summary{margin-bottom:12px}
.ts-details p{font-size:12px;line-height:1.6}.ts-details textarea{min-height:108px;resize:vertical}
.ts-circuit-canvas .ts-wire-handle{cursor:move;stroke:#082135;stroke-width:2.5;fill:#f4bb65}
.ts-circuit-canvas .ts-wire-hit{stroke:transparent;stroke-width:18;fill:none;cursor:move;pointer-events:stroke}
.ts-circuit-canvas .ts-wire-preview{stroke:#f5cb7c;stroke-width:2.5;stroke-dasharray:7 6;fill:none;pointer-events:none}
.ts-auth-link{color:#7ce6f2!important;text-decoration:underline}
.ts-lab-highlight{background:#132e40;border-color:#3b8a9a}
@media(max-width:820px){.ts-onboarding{display:block}.ts-onboarding .ts-buttons{margin-top:12px}}

.ts-shell[data-workflow="measurements"] .ts-series-card>.ts-field{display:none}

/* Circuit Studio: larger scrollable precision-grid workspace */
.ts-circuit-canvas{height:600px;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y;scrollbar-color:#40627b #0a1c2d}
.ts-circuit-canvas>svg{width:2400px;height:1500px;max-width:none;max-height:none;min-width:0;min-height:0;flex:none;touch-action:none;user-select:none}
.ts-workspace-controls{display:flex;flex-wrap:wrap;gap:9px;align-items:center;justify-content:space-between;margin-bottom:9px;color:#98bcd1;font-size:11px}
.ts-workspace-controls .ts-buttons{align-items:center}
.ts-workspace-controls strong{min-width:44px;text-align:center;color:#bcebf5}
.ts-workspace-controls .ts-button{padding:6px 10px}
@media(max-width:820px){.ts-circuit-canvas{height:480px}}

/* Circuit Studio 3.1: accessible marquee selection and mouse-only viewport pan. */
.ts-selection-marquee{fill:rgba(85,208,231,.15);stroke:#7be2f4;stroke-width:2;stroke-dasharray:8 5;}
.ts-circuit-canvas svg{user-select:none;-webkit-user-select:none;touch-action:none;}
.ts-circuit-canvas .ts-wire-hit{cursor:move;}
.ts-circuit-canvas .ts-part[data-selected="true"]{cursor:move;}

/* Circuit Studio 3.2 – compact engineering workbench and real virtual instrument panels */
.ts-circuit-v32{max-width:1800px}
.ts-circuit-v32 .ts-compact-header{align-items:flex-end;padding:0 0 8px;border-bottom:1px solid #263e54;margin-bottom:16px}
.ts-circuit-v32 .ts-compact-header .ts-mark{margin-top:12px}
.ts-circuit-v32 .ts-compact-header h1{font-size:clamp(28px,3vw,39px);margin:6px 0}
.ts-circuit-v32 .ts-compact-header p{font-size:12px;max-width:720px;margin:7px 0;line-height:1.5}
.ts-circuit-v32 .ts-topnav{margin:0 0 6px}
.ts-circuit-v32 .ts-app{grid-template-columns:minmax(225px,245px) minmax(0,1fr) minmax(220px,250px);gap:12px}
.ts-circuit-v32 .ts-stack{gap:12px}
.ts-circuit-v32 .ts-panel{padding:15px}
.ts-circuit-v32 .ts-panel h2{font-size:15px;margin-bottom:9px}
.ts-circuit-v32 .ts-core-tools{margin:8px 0 14px}
.ts-circuit-v32 .ts-toolgrid.ts-core-tools{grid-template-columns:repeat(2,minmax(0,1fr))}
.ts-circuit-v32 .ts-field select{cursor:pointer}
.ts-circuit-v32 .ts-details{padding:9px 10px;margin:10px 0 0}
.ts-circuit-v32 details.ts-panel{margin:0;padding:14px}
.ts-circuit-v32 details.ts-panel>summary{font-size:14px}
.ts-circuit-v32 .ts-workbench-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;flex-wrap:wrap}
.ts-circuit-v32 .ts-workbench-heading h2{margin:0 0 4px}
.ts-circuit-v32 .ts-workbench-heading span{font-size:11px;color:#9db8ca}
.ts-circuit-v32 .ts-workbench-heading>.ts-buttons{display:flex;align-items:center}
.ts-circuit-v32 .ts-workbench-heading .ts-button{padding:6px 9px}
.ts-circuit-v32 .ts-workbench-heading strong{font-size:12px;color:#bcebf5}
.ts-circuit-v32 .ts-circuit-canvas{height:min(57vh,610px);min-height:400px}
.ts-circuit-v32 .ts-circuit-toolbar{margin:12px 0 3px}
.ts-circuit-v32 .ts-circuit-toolbar .ts-button{font-size:12px;min-width:100px}
.ts-circuit-v32 .ts-workbench .ts-notice{margin-top:8px}
.ts-circuit-v32 .ts-instrument-rack{background:linear-gradient(150deg,#112438,#111826)}
.ts-circuit-v32 .ts-instrument-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:12px;align-items:stretch}
.ts-circuit-v32 .ts-instrument{background:#111d29;border:1px solid #38546a;border-radius:12px;padding:12px;min-width:0;box-shadow:0 5px 20px rgba(0,0,0,.13)}
.ts-circuit-v32 .ts-device-top{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:9px}
.ts-circuit-v32 .ts-device-top strong{font-size:12px;color:#d7f0f5;display:flex;align-items:center;gap:7px}
.ts-circuit-v32 .ts-device-select{display:flex;align-items:center;gap:7px;font-size:10px;color:#99b6c8}
.ts-circuit-v32 .ts-device-select select{background:#091927;color:#d8f6fa;border:1px solid #3b6778;border-radius:6px;padding:5px;max-width:140px;font-size:11px}
.ts-circuit-v32 .ts-led-indicator{display:inline-block;width:7px;height:7px;border-radius:100%;background:#688293;box-shadow:0 0 0 2px #1b3039}
.ts-circuit-v32 .ts-instrument[data-ready="true"] .ts-led-indicator{background:#75efb2;box-shadow:0 0 7px #75efb2}
.ts-circuit-v32 #c-scope-screen{width:100%;height:auto;border-radius:6px;border:5px solid #273f42;background:#051a20;display:block;image-rendering:auto}
.ts-circuit-v32 .ts-instrument-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-top:9px}
.ts-circuit-v32 .ts-instrument-stats span{font-size:9px;color:#90b4bc;padding:5px 4px;border:1px solid #344e55;border-radius:6px}
.ts-circuit-v32 .ts-instrument-stats b{display:block;color:#b8fadd;font-size:11px;margin-top:2px;overflow-wrap:anywhere}
.ts-circuit-v32 .ts-instrument-footer{display:flex;justify-content:space-between;align-items:center;gap:7px;margin-top:7px}
.ts-circuit-v32 .ts-instrument-footer span{font-size:10px;color:#97b7bd;line-height:1.45}
.ts-circuit-v32 .ts-instrument-footer .ts-button{font-size:11px;padding:6px 9px;flex-shrink:0}
.ts-circuit-v32 .ts-meter-display{height:clamp(180px,19vw,245px);display:flex;flex-direction:column;justify-content:space-between;background:linear-gradient(150deg,#becfbd,#96b6a5);border:9px solid #30434d;box-shadow:inset 0 0 16px rgba(24,66,55,.35);color:#14342d;border-radius:12px;padding:15px 12px;overflow:hidden}
.ts-circuit-v32 .ts-meter-mode{font-size:12px;font-weight:900;letter-spacing:.5px}
.ts-circuit-v32 .ts-meter-display>div{display:flex;align-items:baseline;justify-content:flex-end;gap:6px;min-width:0}
.ts-circuit-v32 .ts-meter-readout{font-size:clamp(25px,3.4vw,49px);font-family:'Consolas','Courier New',monospace;font-weight:700;letter-spacing:-2px;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.ts-circuit-v32 .ts-meter-unit{font-size:clamp(13px,1.4vw,19px);font-weight:700}
.ts-circuit-v32 .ts-meter-status{font-size:10px;color:#2e5147}
.ts-circuit-v32 .ts-multimeter>.ts-help{margin-top:8px;font-size:10px}
.ts-circuit-v32 .ts-secondary-wave summary{font-size:13px}
.ts-circuit-v32 .ts-secondary-wave[open] summary{margin-bottom:14px}
.ts-circuit-v32 .ts-secondary-wave .ts-circuit-plot{height:240px}
.ts-circuit-v32 .ts-results{max-height:330px}
@media(max-width:1460px){.ts-circuit-v32 .ts-app{grid-template-columns:minmax(210px,250px) minmax(0,1fr)}.ts-circuit-v32 .ts-rightside{grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr))}.ts-circuit-v32 .ts-rightside>:first-child{grid-row:span 2}}
@media(max-width:1020px){.ts-circuit-v32 .ts-instrument-grid{grid-template-columns:1fr}.ts-circuit-v32 .ts-meter-display{height:170px}.ts-circuit-v32 .ts-meter-readout{font-size:36px}}
@media(max-width:820px){.ts-circuit-v32 .ts-app{grid-template-columns:minmax(0,1fr)}.ts-circuit-v32 .ts-rightside{grid-column:auto;grid-template-columns:1fr}.ts-circuit-v32 .ts-rightside>:first-child{grid-row:auto}.ts-circuit-v32 .ts-compact-header{display:block}.ts-circuit-v32 .ts-compact-header .ts-topnav{margin:12px 0}.ts-circuit-v32 .ts-circuit-canvas{min-height:400px;height:54vh}}
