/* Sketch Lab shell. Shares Layer Lab's look: white header, dark viewport, white panels. */
:root{font-family:Inter,ui-sans-serif,system-ui,sans-serif;color:#1f3037;background:#e9eeef;font-size:16px;font-synthesis:none;
  --ink:#1f3037;--muted:#65757b;--line:#d5dddd;--accent:#c0ef82;--accent-ink:#24381b;--focus:#669b35;--panel:#fff;--dark:#173e32;--dark-2:#293b44;--dark-ink:#e4eeed}
*{box-sizing:border-box}
body{margin:0}
[hidden]{display:none!important}
button,input,select{font:inherit}
button,select{cursor:pointer}
button{border:1px solid #cbd4d5;border-radius:8px;background:#fff;color:#26383e;padding:9px 12px;font-size:.875rem;font-weight:600;transition:background .15s;min-height:36px}
button:hover{background:#edf4e6}
button:disabled{opacity:.45;cursor:default}
button:focus-visible,input:focus-visible,select:focus-visible,[tabindex]:focus-visible,summary:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
button[aria-pressed=true]{background:#d4efb7;border-color:#80a853;color:#24381b}
.primary{background:#193f2d;border-color:#193f2d;color:#fff}
.primary:hover{background:#2a5940;color:#fff}
header{background:#fff;display:flex;align-items:center;justify-content:space-between;padding:12px 24px;border-bottom:1px solid #cddbd1;gap:12px 18px;flex-wrap:wrap}
header .brand{font-size:25px;font-weight:800;color:#193f2d;text-decoration:none}
header .page-title{font-size:14px;color:#5a7061;white-space:nowrap}
header nav.site-nav{display:flex;align-items:center;gap:16px;margin-left:auto;flex-wrap:wrap}
header nav.site-nav a{color:#245f43;text-decoration:none;font-size:14px;font-weight:600}
header nav.site-nav a:hover{text-decoration:underline}
header nav.site-nav a[aria-current]{color:#193f2d}
.header-actions{display:flex;align-items:center;gap:12px}
.local{font-size:.8rem;color:#5a7061}
/* Keeps the header on one row on 1280- and 1100-wide windows. */
@media(max-width:1300px){.local{display:none}}
@media(max-width:1180px) and (min-width:901px){header .page-title{display:none}}

/* Lesson tabs */
.lab-tabs{display:flex;gap:6px;padding:10px 24px 0;background:#e9eeef}
.lab-tabs [role=tab]{display:flex;flex-direction:column;align-items:flex-start;gap:1px;border-radius:10px 10px 0 0;border:1px solid var(--line);border-bottom:0;background:#dfe6e7;padding:8px 18px 9px;min-width:170px;text-align:left}
.lab-tabs [role=tab] strong{font-size:1rem}
.lab-tabs [role=tab] span{font-size:.75rem;font-weight:500;color:var(--muted)}
.lab-tabs [role=tab][aria-selected=true]{background:#fff;box-shadow:0 -3px 0 #7fb34a inset}
.lab-tabs [role=tab]:hover{background:#f3f7f0}

main{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:16px;padding:0 24px 20px;max-width:1900px;margin:0 auto;align-items:start}
.workspace{min-width:0;display:flex;flex-direction:column;gap:12px;padding-top:12px}
.viewport{background:var(--dark);border-radius:12px;position:relative;overflow:hidden;height:clamp(420px,66vh,860px);color:var(--dark-ink)}
#scene{position:absolute;inset:0}
#scene canvas{display:block;width:100%;height:100%;touch-action:none;outline:none}
#scene canvas:focus-visible{outline:3px solid var(--focus);outline-offset:-3px}
.overlay{position:absolute;inset:0;pointer-events:none;z-index:1;overflow:hidden}
.view-top{position:absolute;top:14px;left:16px;right:16px;z-index:2;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;pointer-events:none}
.view-top>div:first-child{min-width:0;flex:1}
.eyebrow{font-size:.7rem;letter-spacing:1.6px;font-weight:600;opacity:.7;text-transform:uppercase}
.view-top h1{font-size:1.2rem;letter-spacing:-.4px;margin:4px 0 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#object-note{display:block;font-size:.75rem;line-height:1.4;color:#adbdc3;max-width:30rem}
.view-tools{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;max-width:360px;pointer-events:auto}
.view-tools button,.float-button{background:var(--dark-2);color:#d6e3e8;border-color:#46565e;font-size:.8rem;padding:7px 10px}
.view-tools button:hover,.float-button:hover{background:#41565d}
.view-tools button[aria-pressed=true]{background:#405a37;border-color:#79975b;color:#e9ffd6}
.view-bottom{position:absolute;left:16px;right:16px;bottom:12px;z-index:2;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:8px;font-size:.75rem;color:#b5c6cd;pointer-events:none}
.view-bottom button,.view-bottom input,.view-bottom label,.view-bottom select{pointer-events:auto}
#message.viewer-message{position:absolute;left:16px;right:16px;bottom:64px;z-index:4;margin:0;padding:12px 14px;border-radius:8px;background:#fdf3d7;color:#543e16;font-size:.875rem;line-height:1.4;border:1px solid #d1b97b;box-shadow:0 2px 10px #0002}
#drop-overlay{display:none;position:absolute;inset:12px;border:2px dashed #baf479;background:#15242de8;z-index:5;align-items:center;justify-content:center;font-size:1.5rem;border-radius:10px}
body.dragging #drop-overlay{display:flex}

/* Side panel (each tab fills its own) */
.lab-panel{display:flex;flex-direction:column;gap:12px;padding-top:12px;min-width:0}
.lab-panel:focus-visible{outline:2px solid #82a157;outline-offset:3px;border-radius:8px}
.panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:16px 18px}
.panel h2{font-size:1rem;margin:0 0 10px;font-weight:650;letter-spacing:-.2px;line-height:1.35}
.panel h3{font-size:.875rem;margin:14px 0 6px}
.panel p,.panel li{font-size:.875rem;line-height:1.5;color:var(--muted)}
.panel p{margin:8px 0}
.panel .note{font-size:.8rem;color:#79858a}
details.panel>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:8px;font-weight:650}
details.panel>summary::-webkit-details-marker{display:none}
details.panel>summary::after{content:'⌄';margin-left:auto;transition:transform .15s}
details.panel:not([open])>summary::after{transform:rotate(-90deg)}
details.panel[open]>summary{margin-bottom:10px}
.field{display:flex;flex-direction:column;gap:6px;font-size:.875rem;margin:10px 0}
.field select,.field input[type=number]{width:100%;background:#fff;border:1px solid #cbd4d5;border-radius:6px;padding:8px;font-size:.875rem;color:#26383e}
.row{display:flex;gap:6px;flex-wrap:wrap}
.row>button{flex:1 1 auto}
.check{display:flex;align-items:center;gap:9px;font-size:.875rem;cursor:pointer;margin:8px 0}
input[type=checkbox]{accent-color:#4d781d;width:17px;height:17px}
input[type=range]{accent-color:#6b973e;width:100%;cursor:pointer}
.range-title{display:flex;justify-content:space-between;font-size:.875rem;margin:12px 0 4px}
.range-title output{font-weight:600;color:#547b2f;font-variant-numeric:tabular-nums}
.range-ends{display:flex;justify-content:space-between;font-size:.7rem;color:#7c898e}
.status{padding:9px 11px;background:#eef6e5;color:#416126;border-radius:6px;font-size:.85rem;line-height:1.45;margin:10px 0 0}
.status.warn{background:#fff0df;color:#975516}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.noscript{padding:20px;text-align:center}

/* Sheet area (Views practice) sits beside the 3D view when there is room. */
.sheet-area{background:#fff;border:1px solid var(--line);border-radius:12px;min-width:0;position:relative}
/* Stacked (phone, tablet, very short windows): a shorter 3D view while practising,
   so the object and the sheet below it fit on one screen. */
@media(max-width:900px),(max-height:519px){body.sheet-open .viewport{height:40dvh;min-height:260px}}

/* Side by side down to 520px tall: a 1366×768 Chromebook with the shelf and a
   bookmarks bar leaves about 600px. views.js and sheet.js test the same query. */
@media(min-width:901px) and (min-height:520px){
  body{height:100dvh;display:flex;flex-direction:column;overflow:hidden}
  header{flex-shrink:0}
  main{width:100%;flex:1;min-height:0;align-items:stretch}
  .workspace{min-height:0;height:100%}
  .viewport{flex:1;min-height:240px;height:auto}
  .lab-panel{height:100%;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-right:4px;padding-bottom:16px}
  .site-credit{flex-shrink:0;padding:4px 16px 8px}
  /* Practising: the side panel and footer step aside so the sheet gets real room.
     Its controls move onto the sheet and the 3D view's toolbar. */
  body.sheet-open main{grid-template-columns:minmax(0,1fr);padding-bottom:12px}
  body.sheet-open #views-panel,body.sheet-open .site-credit{display:none}
  body.sheet-open .workspace{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);grid-template-rows:minmax(0,1fr)}
  body.sheet-open .viewport,body.sheet-open .sheet-area{height:100%}
}
@media(max-width:1100px) and (min-width:901px){main{grid-template-columns:minmax(0,1fr) 300px}}
@media(max-width:900px){
  main{grid-template-columns:1fr;padding:0 12px 16px}
  header{padding:10px 14px}
  header nav.site-nav{margin-left:0;width:100%;order:3;gap:8px 16px}
  .header-actions{margin-left:auto}
  .local{display:none}
  .lab-tabs{padding:8px 12px 0}
  .lab-tabs [role=tab]{min-width:0;flex:1}
  .viewport{height:58dvh;min-height:380px}
  .sheet-area{min-height:420px}
}
@media(max-width:600px){
  .view-top{flex-wrap:wrap}
  .view-tools{justify-content:flex-start;max-width:none;width:100%}
  .view-top h1{font-size:1.05rem}
  header .brand{font-size:21px}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
