/* werkstatt example set: one stylesheet for the website, the lessons and the web app.
   values follow ../assets/tokens.css (palette, 3 px rules, square corners, poppins). */
:root{
  --red:#D93A2B;--yellow:#F4B81B;--blue:#1E4FA0;--ink:#161616;--paper:#EDEAE2;--white:#FAFAF7;--grey:#B9B6AE;
  --rule:3px solid var(--ink);--pad:clamp(20px,5vw,64px);--max:1240px;
  --font:Poppins,Jost,Futura,'Century Gothic','Avenir Next',sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);font:400 17px/1.55 var(--font)}
a{color:inherit}
img,svg{max-width:100%}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
h1,h2,h3{margin:0;letter-spacing:-.035em;line-height:1.02;font-weight:800}
p{margin:0}
.skip{position:absolute;left:-999px;top:0;background:var(--yellow);padding:10px 14px;border:var(--rule);z-index:100}
.skip:focus{left:12px;top:12px}
.wrap{max-width:var(--max);margin:0 auto;padding:0 var(--pad)}
.muted{color:#4a4844}

/* buttons */
.btn{display:inline-flex;align-items:center;gap:10px;min-height:48px;padding:0 24px;border:var(--rule);background:var(--white);color:var(--ink);font:700 17px var(--font);text-decoration:none;cursor:pointer}
.btn:hover{background:var(--yellow);color:var(--ink)}
.btn--red{background:var(--red);color:var(--white)}
.btn--ink{background:var(--ink);color:var(--yellow)}
.btn--blue{background:var(--blue);color:var(--white)}
.btn--yellow{background:var(--yellow)}
.btn--sm{min-height:40px;padding:0 14px;font-size:15px}
.btns{display:flex;flex-wrap:wrap;gap:12px}
.tag{display:inline-block;border:2px solid var(--ink);background:var(--yellow);font-size:13px;font-weight:700;padding:2px 10px}
.tag--blue{background:var(--blue);color:var(--white)}.tag--red{background:var(--red);color:var(--white)}.tag--ink{background:var(--ink);color:var(--yellow)}

/* ---------------- website ---------------- */
.site-head{background:var(--white);border-bottom:var(--rule);position:sticky;top:0;z-index:20}
.site-head .wrap{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 24px;min-height:76px}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;font-weight:800;font-size:24px;letter-spacing:-.03em}
.brand svg{width:40px;height:26px}
.site-nav{display:flex;flex-wrap:wrap;align-items:center;gap:4px 24px;font-weight:600;font-size:16px}
.site-nav a{text-decoration:none;padding:10px 0;border-bottom:3px solid transparent}
.site-nav a[aria-current="page"]{border-bottom-color:var(--red)}
.site-nav .btn{padding:0 18px;min-height:44px;border-bottom:var(--rule)}
.crumbs{font-size:14px;font-weight:600;padding:14px 0 0}
.crumbs a{text-decoration:none;border-bottom:2px solid var(--ink)}
.crumbs span{margin:0 6px}

.hero{display:grid;grid-template-columns:minmax(0,1fr);border-bottom:var(--rule)}
@media(min-width:960px){.hero{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr)}}
.hero .text{padding:clamp(36px,7vw,104px) var(--pad);display:flex;flex-direction:column;justify-content:center;gap:26px}
.hero h1{font-size:clamp(46px,7.5vw,120px);line-height:.92;letter-spacing:-.05em}
.hero .lede{font-size:clamp(18px,1.8vw,21px);max-width:46ch}
.hero .art{display:grid;place-items:center;padding:clamp(24px,4vw,56px);border-top:var(--rule)}
@media(min-width:960px){.hero .art{border-top:0;border-left:var(--rule)}}
.hero .art svg{width:100%;max-width:520px;height:auto}
.bg-red{background:var(--red)}.bg-blue{background:var(--blue)}.bg-yellow{background:var(--yellow)}.bg-ink{background:var(--ink)}.bg-white{background:var(--white)}

.sec{padding:clamp(44px,7vw,96px) 0;border-bottom:var(--rule)}
.sec:last-of-type{border-bottom:0}
.sec-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 32px;margin-bottom:clamp(24px,4vw,40px)}
.sec-head h2{font-size:clamp(32px,4.6vw,60px)}
.sec-head p{max-width:46ch;font-size:18px}
.sec--ink{background:var(--ink);color:var(--white)}.sec--ink h2{color:var(--yellow)}
.sec--blue{background:var(--blue);color:var(--white)}
.sec--yellow{background:var(--yellow)}
.lead{font-size:clamp(18px,1.8vw,21px);max-width:60ch}
.prose{max-width:68ch;display:flex;flex-direction:column;gap:18px;font-size:18px}
.prose h2{font-size:clamp(28px,3.4vw,40px);margin-top:12px}
.prose h3{font-size:22px}

.cards{display:grid;gap:20px;grid-template-columns:repeat(auto-fill,minmax(min(280px,100%),1fr))}
.card{border:var(--rule);background:var(--white);display:flex;flex-direction:column;text-decoration:none;min-width:0}
a.card:hover{background:var(--yellow)}
a.card:hover .card-art{filter:saturate(1.1)}
.card-art{height:200px;display:grid;place-items:center;border-bottom:var(--rule);padding:16px}
.card-art svg{max-height:100%;width:auto;height:100%}
.card-body{padding:22px;display:flex;flex-direction:column;gap:10px;flex:1}
.card-body h3{font-size:26px}
.card-meta{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:14px;font-weight:600;margin-top:auto;padding-top:6px}
.card-go{font-weight:700;margin-top:auto}

.split{display:grid;grid-template-columns:minmax(0,1fr);border-bottom:var(--rule)}
@media(min-width:900px){.split{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
.split>div{padding:clamp(32px,6vw,80px) var(--pad);display:flex;flex-direction:column;justify-content:center;gap:22px}
.split>.art{display:grid;place-items:center;border-bottom:var(--rule)}
@media(min-width:900px){.split>.art{border-bottom:0;border-right:var(--rule)}}
.split>.art svg{width:100%;max-width:440px;height:auto}
.split h2{font-size:clamp(32px,4.6vw,60px)}

.steps{list-style:none;margin:0;padding:0;display:grid;gap:3px;background:var(--ink);border:var(--rule);counter-reset:s}
.steps li{background:var(--white);padding:18px 20px 18px 76px;position:relative;counter-increment:s;min-height:72px}
.steps li::before{content:counter(s);position:absolute;left:18px;top:16px;width:40px;height:40px;display:grid;place-items:center;background:var(--ink);color:var(--yellow);font-weight:800;font-size:18px}
.steps b{display:block;font-size:19px;letter-spacing:-.01em}

.facts{display:grid;gap:3px;background:var(--ink);border:var(--rule);grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr))}
.facts div{background:var(--white);padding:14px 16px;font-size:14px}
.facts b{display:block;font-size:22px;letter-spacing:-.02em}

.parts{display:grid;gap:12px}
.part{display:flex;gap:16px;align-items:center;border:var(--rule);background:var(--white);padding:12px 16px}
.part svg{flex:none;width:44px;height:44px}
.part b{display:block;font-size:17px}

.lesson-list{display:grid;gap:3px;background:var(--ink);border:var(--rule)}
.lesson-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:16px;align-items:center;background:var(--white);padding:16px 20px;text-decoration:none}
.lesson-row:hover{background:var(--yellow)}
.lesson-row .num{width:44px;height:44px;display:grid;place-items:center;border:var(--rule);font-weight:800}
.lesson-row b{display:block;font-size:19px;letter-spacing:-.01em}
.lesson-row small{font-size:14px}
.room-color .num{background:var(--blue);color:var(--white)}.room-form .num{background:var(--red);color:var(--white)}.room-type .num{background:var(--yellow)}

.pager{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr))}
.pager a{border:var(--rule);background:var(--white);padding:18px 20px;text-decoration:none;display:flex;flex-direction:column;gap:4px}
.pager a:hover{background:var(--yellow)}
.pager small{font-size:13px;font-weight:600}.pager b{font-size:20px;letter-spacing:-.02em;line-height:1.1}
.pager .next{text-align:right}

.related{border:var(--rule);background:var(--yellow);padding:18px 20px;display:flex;flex-wrap:wrap;gap:8px 20px;align-items:baseline;font-weight:600}
.related b{font-size:16px}

.site-foot{background:var(--ink);color:var(--white);border-top:var(--rule)}
.site-foot .cols{display:grid;gap:28px;grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr));padding:clamp(36px,5vw,56px) 0}
.site-foot h2{font-size:15px;letter-spacing:0;color:var(--yellow);margin-bottom:10px}
.site-foot ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;font-size:15px}
.site-foot a{text-decoration:none}.site-foot a:hover{text-decoration:underline}
.site-foot .bar{border-top:3px solid #333;padding:16px 0 20px;font-size:13px;display:flex;flex-direction:column;gap:4px}
.site-foot .bar a{text-decoration:underline}

/* ---------------- web app ---------------- */
body.app{min-height:100vh}
.app-shell{display:grid;min-height:100vh;grid-template-columns:minmax(0,1fr);grid-template-rows:auto 1fr auto}
@media(min-width:900px){.app-shell{grid-template-columns:248px minmax(0,1fr);grid-template-rows:auto 1fr}}
.app-top{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px;padding:0 20px;background:var(--white);border-bottom:var(--rule);position:sticky;top:0;z-index:20}
.app-top .brand{font-size:22px}
.app-top nav{display:flex;gap:16px;font-size:14px;font-weight:600}
.app-top nav a{text-decoration:none}
.app-side{display:none}
@media(min-width:900px){.app-side{display:flex;flex-direction:column;gap:3px;background:var(--ink);border-right:var(--rule);position:sticky;top:64px;height:calc(100vh - 64px);overflow:auto}}
.app-side a{display:flex;align-items:center;gap:12px;background:var(--white);padding:14px 18px;text-decoration:none;font-weight:700;font-size:16px}
.app-side a:hover{background:#f3e3b5}
.app-side a[aria-current="page"]{background:var(--yellow)}
.app-side svg{width:24px;height:24px;flex:none}
.app-side .grow{flex:1;background:var(--white)}
.app-side .small{font-size:14px;font-weight:600}
.app-main{padding:clamp(20px,3.5vw,44px);display:flex;flex-direction:column;gap:clamp(20px,3vw,32px);min-width:0;max-width:1200px;width:100%}
.app-main h1{font-size:clamp(34px,4.4vw,56px)}
.app-tabs{display:grid;grid-template-columns:repeat(5,1fr);border-top:var(--rule);background:var(--ink);gap:3px;position:sticky;bottom:0;z-index:20}
@media(min-width:900px){.app-tabs{display:none}}
.app-tabs a{background:var(--white);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:64px;text-decoration:none;font-size:12px;font-weight:700}
.app-tabs a[aria-current="page"]{background:var(--yellow)}
.app-tabs svg{width:22px;height:22px}
.panel{border:var(--rule);background:var(--white);padding:clamp(16px,2.5vw,24px);display:flex;flex-direction:column;gap:14px;min-width:0}
.panel h2{font-size:24px}
.panel--blue{background:var(--blue);color:var(--white)}
.panel--yellow{background:var(--yellow)}
.grid-2{display:grid;gap:20px;grid-template-columns:minmax(0,1fr)}
@media(min-width:1000px){.grid-2{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr)}}
.grid-3{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr))}
.tile{border:var(--rule);background:var(--white);padding:16px;display:flex;flex-direction:column;gap:12px;text-decoration:none;min-height:140px}
.tile:hover{background:var(--yellow)}
.tile svg{width:48px;height:48px}
.tile b{font-size:19px}
.banner{border:var(--rule);background:var(--yellow);padding:14px 18px;display:flex;flex-wrap:wrap;gap:8px 18px;align-items:center;font-weight:600}
.banner[hidden]{display:none}
.toast{position:fixed;left:50%;bottom:90px;transform:translateX(-50%);background:var(--ink);color:var(--yellow);border:var(--rule);padding:12px 18px;font-weight:700;z-index:50;opacity:0;pointer-events:none;transition:opacity .2s}
.toast.on{opacity:1}
@media(min-width:900px){.toast{bottom:24px}}
@media (prefers-reduced-motion:reduce){.toast{transition:none}html{scroll-behavior:auto}}

/* studio */
.wheel-wrap{display:grid;place-items:center}
.wheel-wrap svg{width:min(100%,420px);height:auto}
.swatches{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.swatches button{min-height:48px;border:var(--rule);padding:0;cursor:pointer}
.swatches button[aria-pressed="true"]{box-shadow:0 0 0 3px var(--white),0 0 0 6px var(--ink)}
.pair{display:grid;gap:12px;grid-template-columns:1fr 1fr}
.pair div{border:var(--rule);padding:14px;display:flex;flex-direction:column;gap:2px;min-height:110px}
.pair small{font-size:13px;font-weight:600}.pair b{font-size:22px;letter-spacing:-.02em;line-height:1.1}
.vibrate{border:var(--rule);height:140px;display:grid;grid-template-columns:1fr 1fr}

/* form lab */
.lab-canvas{border:var(--rule);background:var(--white);aspect-ratio:1;width:100%;max-width:640px;display:block;touch-action:manipulation;cursor:crosshair}
.toolbar{display:flex;flex-wrap:wrap;gap:8px}
.toolbar button{min-height:48px;min-width:48px;border:var(--rule);background:var(--white);font:700 15px var(--font);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 12px}
.toolbar button[aria-pressed="true"]{background:var(--yellow)}
.toolbar .sw{width:48px;padding:0}
.toolbar .sw[aria-pressed="true"]{box-shadow:0 0 0 3px var(--white),0 0 0 6px var(--ink)}
.toolbar svg{width:24px;height:24px}
.label{font-size:14px;font-weight:700}

/* type room */
.type-preview{border:var(--rule);background:var(--white);min-height:300px;padding:clamp(20px,4vw,48px);display:flex;align-items:flex-end;overflow:hidden;position:relative}
.type-preview.grid{background-image:linear-gradient(to right,rgba(30,79,160,.18) 1px,transparent 1px),linear-gradient(to bottom,rgba(30,79,160,.18) 1px,transparent 1px);background-size:calc(100%/12) 8px}
.type-preview p{margin:0;line-height:.95;word-break:break-word;max-width:100%}
.field{display:flex;flex-direction:column;gap:6px;font-weight:700;font-size:15px}
.field input[type=text]{min-height:48px;border:var(--rule);padding:0 12px;font:500 17px var(--font);background:var(--white)}
.field input[type=range]{accent-color:var(--red);width:100%}
.field select{min-height:48px;border:var(--rule);padding:0 10px;font:600 16px var(--font);background:var(--white)}
.check{display:flex;align-items:center;gap:10px;font-weight:600}
.check input{width:22px;height:22px;accent-color:var(--blue)}

/* notebook */
.notes{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(min(260px,100%),1fr))}
.note{border:var(--rule);background:var(--white);display:flex;flex-direction:column}
.note .vis{height:150px;border-bottom:var(--rule);display:grid;overflow:hidden}
.note .meta{padding:12px 14px;display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:14px;font-weight:600}
.note button{border:2px solid var(--ink);background:var(--white);font:700 13px var(--font);padding:4px 10px;cursor:pointer}
.empty{border:3px dashed var(--ink);padding:28px;text-align:center;font-weight:600}

/* posters */
body.poster{background:var(--ink);color:var(--white)}
.poster-shell{display:grid;min-height:100vh;grid-template-columns:minmax(0,1fr)}
@media(min-width:1000px){.poster-shell{grid-template-columns:minmax(0,1fr) 380px}}
.poster-stage{display:grid;place-items:center;padding:clamp(16px,3vw,40px)}
.poster-stage svg{display:block;height:auto;width:100%;max-width:min(760px,calc((100vh - 80px)*.8));border:3px solid var(--white)}
.poster-side{background:var(--white);color:var(--ink);border-left:var(--rule);padding:28px;display:flex;flex-direction:column;gap:18px}
.poster-side h1{font-size:40px}
.poster-top{background:var(--white);color:var(--ink);border-bottom:var(--rule);grid-column:1/-1}
.poster-top .wrap{display:flex;justify-content:space-between;align-items:center;min-height:64px;gap:12px;max-width:none}
