/* KEYLINE: a product-design studio sheet. Paper, ink, one tangerine for every annotation. Everything sits on a 24 px grid. */
:root{
  --paper:#f7f7f5;--ink:#121212;--acc:#ff7a00;--white:#fff;
  --mute:#6b6b66;--hair:rgba(18,18,18,.12);--grid:rgba(18,18,18,.045);--grid2:rgba(18,18,18,.08);
  --g:clamp(16px,3vw,48px);--hd:64px;--r:14px;
  --disp:'Lexend',system-ui,sans-serif;--mono:'Space Mono',ui-monospace,monospace;
}
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
html,body{overflow-x:clip}
body{background-color:var(--paper);color:var(--ink);font:300 16px/1.55 var(--disp);-webkit-font-smoothing:antialiased;
  background-image:linear-gradient(var(--grid2) 1px,transparent 1px),linear-gradient(90deg,var(--grid2) 1px,transparent 1px),linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px);
  background-size:144px 144px,144px 144px,24px 24px,24px 24px;background-position:-1px -1px}
html.lenis,html.lenis body{height:auto}
.lenis.lenis-smooth{scroll-behavior:auto!important}
.lenis.lenis-stopped{overflow:hidden}
a{color:inherit;text-decoration:none}
button,input{font:inherit;color:inherit}
button{background:none;border:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
svg{display:block;overflow:visible}
::selection{background:var(--acc);color:var(--ink)}
:focus-visible{outline:2px solid var(--acc);outline-offset:3px}
[hidden]{display:none!important}
.m{font-family:var(--mono);font-weight:400;font-size:11.5px;letter-spacing:.02em;line-height:1.4}
.wrap{padding-inline:var(--g)}
.ic{width:24px;height:24px}
.sl{padding-bottom:.06em;margin-bottom:-.06em}

/* type */
.h1{font:500 clamp(46px,8.6vw,138px)/.9 var(--disp);letter-spacing:-.055em}
.h1 .ln{display:block;overflow:clip;padding:.04em 0 .1em;margin-bottom:-.12em;perspective:600px}
.h1 .ch{display:inline-block;will-change:transform}
.h1-s{font-size:clamp(40px,6.4vw,100px);max-width:13ch}
.h2{font:500 clamp(30px,4.4vw,64px)/.98 var(--disp);letter-spacing:-.045em;max-width:16ch}
.h2-s{font-size:clamp(26px,3vw,42px)}
.dot{color:var(--acc);font-style:normal;display:inline-block}
.lede{font-size:clamp(16px,1.35vw,19px);line-height:1.55;max-width:44ch;color:#3a3a37}
.sec-no{display:flex;gap:14px;align-items:center;color:var(--mute);margin-bottom:18px}
.sec-no span:first-child{color:var(--acc)}

/* buttons */
.btn{position:relative;display:inline-flex;align-items:center;justify-content:center;height:50px;padding:0 24px;border-radius:12px;font-weight:500;font-size:15px;letter-spacing:-.01em;white-space:nowrap;transition:background-color .3s,color .3s,border-color .3s}
.btn .bi{display:inline-block;pointer-events:none}
.btn-ink{background:var(--ink);color:var(--paper)}
.btn-ink:hover{background:#000}
.btn-line{border:1px solid var(--ink)}
.btn-line:hover{background:var(--ink);color:var(--paper)}
.btn-acc{background:var(--acc);color:var(--ink)}
.btn-acc:hover{background:var(--ink);color:var(--paper)}
.cta .btn-acc:hover{background:var(--paper);color:var(--ink)}
.btn-s{height:40px;padding:0 16px;font-size:13.5px;border-radius:10px}
.iconbtn{width:40px;height:40px;border-radius:10px;border:1px solid var(--hair);display:grid;place-items:center;background:var(--white);transition:border-color .3s}
.iconbtn:hover{border-color:var(--ink)}
.iconbtn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* custom cursor */
.has-cur,.has-cur *{cursor:none!important}
.cur{position:fixed;left:0;top:0;z-index:400;pointer-events:none;color:var(--ink)}
.cur.on-dark{color:var(--paper)}
.cur>*{position:absolute;left:0;top:0}
.cur-x{width:22px;height:22px}
.cur-x i{position:absolute;background:currentColor}
.cur-x i:first-child{left:10.5px;top:0;width:1px;height:22px}
.cur-x i:last-child{top:10.5px;left:0;height:1px;width:22px}
.cur-sq{width:48px;height:48px;border:1.5px solid var(--acc);border-radius:12px;opacity:0}
.cur-c{width:30px;height:30px;border-radius:50%;background:var(--acc);opacity:0;mix-blend-mode:multiply}
.cur-xy{margin:14px 0 0 14px;font-size:10px;white-space:nowrap;color:var(--mute)}
.cur.on-dark .cur-xy{color:#9b9b96}
.cur[data-s=draw] .cur-xy{color:var(--acc)}
.cur-lab{background:var(--ink);color:var(--paper);font:400 11px/1 var(--mono);padding:7px 10px;border-radius:7px;white-space:nowrap;opacity:0}
.cur.on-dark .cur-lab{background:var(--paper);color:var(--ink)}
.cur[data-s=icon] .cur-lab{margin-top:46px}
.cur-ic{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;opacity:0}
.cur-ic[data-ic=draw]{margin:-14px 0 0 14px;stroke:var(--acc)}
@media (hover:none),(pointer:coarse){.cur{display:none}}

/* header */
.hd{position:fixed;left:0;right:0;top:0;z-index:100;height:var(--hd);display:flex;align-items:center;gap:28px;padding:0 var(--g);background:rgba(247,247,245,.82);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--hair)}
.hd-logo{display:flex;align-items:center;gap:10px;font:600 17px/1 var(--disp);letter-spacing:.06em}
.logo{width:26px;height:26px}
.logo-pt{fill:var(--acc);stroke:none}
.hd-nav{display:flex;gap:28px;margin-left:auto}
.hd-nav a{font-weight:400;font-size:14.5px;position:relative}
.rl{display:inline-block;overflow:hidden;vertical-align:top;height:1.4em;line-height:1.4}
.rl>span{display:block;transition:transform .55s cubic-bezier(.16,.84,.3,1)}
a:hover .rl>span,a:focus-visible .rl>span{transform:translateY(-100%)}
.hd-nav a.on::after{content:'';position:absolute;left:0;right:0;bottom:-6px;height:2px;background:var(--acc);border-radius:2px}
.hd-spec{color:var(--mute)}
.hd-cta{height:40px;padding:0 16px;font-size:13.5px;border-radius:10px}
.hd-menu{display:none;margin-left:auto;font:500 14px/1 var(--disp);height:40px;padding:0 16px;border:1px solid var(--ink);border-radius:10px}
.menu{position:fixed;inset:0;z-index:99;background:var(--paper);display:flex;flex-direction:column;justify-content:flex-end;padding:90px var(--g) 40px;clip-path:inset(0% 0% 100% 0%);visibility:hidden}
.menu a{display:block;overflow:hidden;border-bottom:1px solid var(--hair);padding:14px 0}
.menu .mi{display:flex;align-items:center;gap:16px;font:500 clamp(38px,11vw,70px)/1 var(--disp);letter-spacing:-.05em}
.menu .mi svg{width:.7em;height:.7em;flex:none}
.menu .mi em{margin-left:auto;font-style:normal;color:var(--mute)}
.menu a.on b{color:var(--acc)}
.menu b{font-weight:500}
.menu p{margin-top:26px;color:var(--mute)}

/* preloader */
.pre{position:fixed;inset:0;z-index:300;background:var(--paper);display:none;place-items:center;clip-path:inset(0% 0% 0% 0%)}
html.preload .pre{display:grid}
html.preload body{overflow:hidden}
.pre-box{width:min(56vmin,300px)}
.pre-svg{width:100%;height:auto}
.pg{stroke:var(--ink);stroke-opacity:.16;stroke-width:1;vector-effect:non-scaling-stroke}
.pg.gl-m{stroke-opacity:.3}
.pk{fill:none;stroke:var(--acc);stroke-width:1;vector-effect:non-scaling-stroke}
.pre-logo path{fill:none;stroke:var(--ink);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pre-pen{fill:var(--acc)}
.pre-meta{display:flex;justify-content:space-between;margin-top:22px;color:var(--mute)}
.pre-meta #preNo{color:var(--ink)}

/* page wipe */
.wipe{position:fixed;inset:0;z-index:350;background:var(--ink);color:var(--paper);display:grid;place-items:center;clip-path:inset(100% 0% 0% 0%);pointer-events:none}
html.wiping .wipe{clip-path:inset(0% 0% 0% 0%)}
.wipe-grid{position:absolute;width:min(78vmin,620px);height:auto;left:50%;top:50%;transform:translate(-50%,-50%)}
.wg{stroke:#fff;stroke-opacity:.1;stroke-width:1;vector-effect:non-scaling-stroke}
.wg.gl-m{stroke-opacity:.22}
.wipe-ic{position:relative;width:min(30vmin,200px);height:min(30vmin,200px);color:var(--paper)}
.wipe-ic svg{width:100%;height:100%}
.wipe-lab{position:absolute;left:var(--g);bottom:28px;color:var(--acc);font-size:13px}
.wipe-no{position:absolute;right:var(--g);bottom:28px;color:#8d8d88}

/* hero */
.hero{min-height:100svh;padding-top:calc(var(--hd) + 28px);padding-bottom:40px;display:flex;flex-direction:column}
.hero-meta{display:flex;gap:28px;color:var(--mute);margin-bottom:clamp(20px,4vh,48px)}
.hero-meta span:first-child{color:var(--acc)}
.hero-grid{display:grid;grid-template-columns:1.12fr 1fr;gap:clamp(24px,4vw,72px);align-items:center;flex:1}
.hero-copy .lede{margin-top:clamp(22px,3.4vh,36px)}
.hero-cta{display:flex;flex-wrap:wrap;gap:12px;margin-top:30px}
.stage{position:relative;background:var(--white);border:1px solid var(--hair);border-radius:22px;padding:clamp(14px,2vw,26px);justify-self:end;width:min(100%,560px)}
.stage-top,.stage-bot{display:flex;justify-content:space-between;gap:10px;color:var(--mute)}
.stage-top #stageName{color:var(--ink)}
.stage-bot #stagePair{color:var(--acc)}
.stage-svg{width:100%;height:auto;margin:14px 0}
.sg{stroke:var(--ink);stroke-opacity:.09;stroke-width:1;vector-effect:non-scaling-stroke}
.sg.gl-m{stroke-opacity:.2}
.st-pad{fill:var(--acc);fill-opacity:.07}
.st-keys path,.dr-keys path,.b-keys path{fill:none;stroke:var(--acc);stroke-opacity:.75;stroke-width:1;vector-effect:non-scaling-stroke}
.st-fill{fill:var(--acc)}
.st-icon path{fill:none;stroke:var(--ink);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tick{position:absolute;width:12px;height:12px;border:0 solid var(--ink)}
.tick.tl{left:-1px;top:-1px;border-left-width:2px;border-top-width:2px;border-top-left-radius:22px}
.tick.tr{right:-1px;top:-1px;border-right-width:2px;border-top-width:2px;border-top-right-radius:22px}
.tick.bl{left:-1px;bottom:-1px;border-left-width:2px;border-bottom-width:2px;border-bottom-left-radius:22px}
.tick.br{right:-1px;bottom:-1px;border-right-width:2px;border-bottom-width:2px;border-bottom-right-radius:22px}
.pairs{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin-top:clamp(24px,4vh,44px)}
.pair{position:relative;display:flex;align-items:center;justify-content:center;gap:10px;height:60px;border:1px solid var(--hair);border-radius:12px;background:var(--white);color:var(--mute);transition:color .3s}
.pair:hover,.pair.on{color:var(--ink)}
.pair svg{width:24px;height:24px}
.pair .pa,.pair .pb{transition:color .3s}
.pair.on .pa{color:var(--acc)}
.pair.on.second .pa{color:var(--ink)}
.pair.on.second .pb{color:var(--acc)}
.pair i{font-style:normal;color:var(--mute)}
.pair-ind{position:absolute;inset:-1px;border:2px solid var(--ink);border-radius:12px;pointer-events:none}

/* rules strip */
.rules{display:grid;grid-template-columns:repeat(5,1fr);border-top:1px solid var(--ink);margin-top:20px}
.rule{padding:22px 16px 26px 0;border-right:1px solid var(--hair);margin-right:16px}
.rule:last-child{border-right:0}
.rule b{display:block;font:700 clamp(28px,3.2vw,46px)/1 var(--mono);letter-spacing:-.04em;margin-bottom:10px}
.rule span{font-size:14px;color:#3a3a37}

/* anatomy (pinned) */
.ana{margin-top:clamp(80px,12vh,140px)}
.ana-pin{height:100svh;display:grid;grid-template-columns:minmax(280px,.8fr) 1.2fr;gap:clamp(24px,4vw,64px);align-items:center;padding:calc(var(--hd) + 16px) var(--g) 24px}
.ana-steps{list-style:none;margin-top:clamp(20px,4vh,40px);display:grid;gap:4px}
.ana-steps li{display:grid;grid-template-columns:34px 1fr;gap:10px;padding:12px 0;border-top:1px solid var(--hair);opacity:.38;transition:opacity .4s}
.ana-steps li.on{opacity:1}
.ana-steps li.done{opacity:.62}
.ana-steps li i{font-style:normal;color:var(--mute);padding-top:3px}
.ana-steps li.on i{color:var(--acc)}
.ana-steps b{font-weight:500;font-size:17px;display:block}
.ana-steps small{display:block;font-size:14px;color:#4a4a46;max-height:0;overflow:hidden;transition:max-height .5s}
.ana-steps li.on small{max-height:80px}
.ana-stage{position:relative;justify-self:center;width:min(100%,calc(100svh - var(--hd) - 90px));}
.ana-svg{width:100%;height:auto;background:transparent}
.ana-cap{position:absolute;left:0;bottom:-24px;color:var(--acc);display:none}
.a-paper{fill:var(--white);stroke:var(--hair)}
.ag{stroke:var(--ink);stroke-opacity:.12;stroke-width:1}
.ag.gl-m{stroke-opacity:.26}
.a-live{fill:var(--ink);fill-opacity:.025}
.ak{fill:none;stroke:var(--acc);stroke-width:2}
.a-t{font:400 15px var(--mono);fill:var(--ink)}
.a-acc{fill:var(--acc)}
.a-w{fill:var(--paper)}
.a-big{font-size:17px;fill:var(--mute)}
.a-dim{fill:none;stroke:var(--acc);stroke-width:2.5}
.a-lead{fill:none;stroke:var(--acc);stroke-width:1.5}
.a-tag{fill:var(--ink)}
.a-cr{fill:var(--acc);fill-opacity:.08;stroke:var(--acc);stroke-width:2}
.a-cd{fill:var(--acc)}
#anaSetLab{opacity:0}

/* consistency (pinned) */
.cons{margin-top:clamp(60px,10vh,120px)}
.cons-pin{height:100svh;display:flex;flex-direction:column;justify-content:center;gap:clamp(18px,3.6vh,40px);padding:calc(var(--hd) + 12px) 0 20px}
.cons-head .h2{max-width:20ch}
.cons-body{display:grid;grid-template-columns:1fr minmax(240px,300px);gap:clamp(20px,3vw,48px);align-items:center}
.cons-set{position:relative;display:grid;grid-template-columns:repeat(4,1fr);gap:clamp(8px,1.4vw,18px);max-width:min(860px,calc((100svh - 330px) * 2))}
.cons-set.messy .cs-cell{position:absolute;width:calc((100% - 3 * clamp(8px,1.4vw,18px)) / 4)}
.cs-cell{background:var(--white);border:1px solid var(--hair);border-radius:var(--r);padding:clamp(6px,1vw,12px);transition:border-color .5s}
.cons-set.is-done .cs-cell{border-color:var(--ink)}
.cs-box{position:relative;aspect-ratio:1;overflow:hidden;border-radius:8px}
.cs-in{position:absolute;inset:16%}
.cs-l,.cs-key{position:absolute;inset:0;width:100%;height:100%;color:var(--ink)}
.cs-key rect{fill:none;stroke:var(--acc);stroke-width:.35;stroke-dasharray:1 1}
.cs-key .cs-live{stroke-opacity:.35;stroke-dasharray:none}
.cs-scan{position:absolute;left:0;top:0;bottom:0;width:2px;margin-left:-1px;background:var(--acc);box-shadow:0 0 0 3px rgba(255,122,0,.15)}
.cs-name{display:flex;justify-content:space-between;gap:4px;margin-top:8px;color:var(--mute);font-size:10.5px;white-space:nowrap;overflow:hidden}
.cs-name em{font-style:normal;color:var(--acc)}
.cons-rules ol{list-style:none;display:grid}
.cons-rules li{display:grid;grid-template-columns:30px 1fr 22px;gap:8px;align-items:center;padding:11px 0;border-top:1px solid var(--hair);color:var(--mute);transition:color .4s}
.cons-rules li.on{color:var(--ink)}
.cons-rules li.done{color:var(--ink)}
.cons-rules li b{font-weight:400;font-size:15px}
.cons-rules li svg{width:20px;height:20px;fill:none;stroke:var(--acc);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;opacity:0;transition:opacity .2s}
.cons-rules li.done svg{opacity:1}
.cons-rules li.on span{color:var(--acc)}
.score{display:grid;grid-template-columns:1fr auto;gap:8px;padding-top:14px;border-top:1px solid var(--ink)}
.score b{font-size:26px;font-weight:700;letter-spacing:-.04em}
.score i{grid-column:1/-1;height:6px;background:var(--hair);border-radius:3px;overflow:hidden}
.score em{display:block;height:100%;background:var(--acc);transform-origin:0 50%;transform:scaleX(.18)}

/* library marquee */
.lib{margin-top:clamp(60px,10vh,120px)}
.lib-head{display:grid;gap:18px;max-width:900px}
.marq{margin-top:40px;overflow:hidden;display:grid;gap:14px;padding:6px 0;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.marq.grab{cursor:grabbing}
.marq-row{display:flex;width:max-content;will-change:transform}
.mq-t{display:flex;gap:14px;padding-right:14px}
.mq-i{width:132px;height:132px;flex:none;background:var(--white);border:1px solid var(--hair);border-radius:var(--r);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;transition:border-color .3s,color .3s}
.mq-i:hover{border-color:var(--acc)}
.mq-i svg{width:40px;height:40px}
.mq-i em{font-style:normal;color:var(--mute);font-size:10.5px}
.lib-foot{display:flex;align-items:center;gap:24px;margin-top:32px}
.lib-foot .m{color:var(--mute)}

/* CTA */
.cta{position:relative;overflow:hidden;background:var(--ink);color:var(--paper);margin-top:clamp(80px,14vh,160px);padding:clamp(80px,16vh,180px) 0}
.cta-grid{position:absolute;inset:0;width:100%;height:100%}
.cg{stroke:#fff;stroke-opacity:.07;stroke-width:1;vector-effect:non-scaling-stroke}
.cg.gl-m{stroke-opacity:.16}
.cta-in{position:relative;display:grid;gap:24px;justify-items:start}
.cta .h2{max-width:14ch;font-size:clamp(36px,6vw,92px)}
.cta .lede{color:#c9c9c4}
.cta .sec-no{color:#8d8d88}

/* footer */
.ft{padding-top:clamp(60px,10vh,110px);border-top:1px solid var(--hair);background:var(--paper)}
.ft-top{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:28px}
.ft-say{font:500 clamp(24px,2.6vw,36px)/1.08 var(--disp);letter-spacing:-.04em;max-width:16ch}
.ft-col{display:grid;align-content:start;gap:8px;font-size:14.5px}
.ft-col h4{color:var(--mute);margin-bottom:6px}
.ft-col a:hover{color:var(--acc)}
.ft-word{display:grid;grid-template-columns:repeat(7,1fr);margin:clamp(40px,8vh,90px) var(--g) 0;border-top:1px solid var(--ink);border-left:1px solid var(--hair)}
.ft-word span{display:block;overflow:hidden;border-right:1px solid var(--hair);border-bottom:1px solid var(--hair);text-align:center}
.ft-word b{display:block;font:500 clamp(48px,14vw,230px)/1.05 var(--disp);letter-spacing:-.05em}
.ft-base{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px 28px;padding-top:22px;padding-bottom:26px;color:var(--mute)}
.ft-base .concept{color:var(--ink)}

.toast{position:fixed;left:16px;right:16px;margin:0 auto;width:max-content;bottom:22px;z-index:380;background:var(--ink);color:var(--paper);padding:12px 16px;border-radius:10px;font-size:12px;max-width:calc(100vw - 32px);visibility:hidden}

/* ================= library page ================= */
.lh{padding-top:calc(var(--hd) + 48px)}
.lh .sec-no #libCount{color:var(--ink)}
.lh-tools{display:grid;gap:16px;margin-top:36px}
.search{display:flex;align-items:center;gap:12px;height:58px;padding:0 18px;background:var(--white);border:1px solid var(--hair);border-radius:var(--r);max-width:620px;transition:border-color .3s}
.search:focus-within{border-color:var(--ink)}
.search svg{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.search input{flex:1;min-width:0;border:0;background:none;outline:0;font-size:17px;font-weight:300}
.search kbd{border:1px solid var(--hair);border-radius:6px;padding:2px 7px;color:var(--mute)}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{position:relative;height:38px;padding:0 14px;border:1px solid var(--hair);border-radius:10px;background:var(--white);font-size:14px;display:inline-flex;align-items:center;gap:8px}
.chip em{font-style:normal;color:var(--mute);font-size:10.5px}
.chip.on em{color:var(--acc)}
.chip-k{position:absolute;inset:-1px;border:2px solid var(--ink);border-radius:10px;pointer-events:none}
.tiles{list-style:none;display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:12px;margin-top:32px;padding-bottom:100px}
.tile.off{display:none}
.tile button{position:relative;width:100%;aspect-ratio:1;background:var(--white);border:1px solid var(--hair);border-radius:var(--r);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;transition:border-color .3s}
.tile button:hover,.tile button:focus-visible{border-color:var(--acc)}
.tile svg{width:36px;height:36px}
.tile span{color:var(--mute);font-size:10.5px}
.tile i{position:absolute;left:10px;top:9px;font-style:normal;color:#b0b0aa;font-size:10px}
.empty{padding:40px 0 120px;font-size:18px}
.empty a{color:var(--acc);text-decoration:underline}
.scrim{position:fixed;inset:0;z-index:200;background:rgba(18,18,18,.35);opacity:0;visibility:hidden}
.drawer{position:fixed;top:0;right:0;bottom:0;z-index:210;width:min(560px,100vw);background:var(--paper);border-left:1px solid var(--ink);display:flex;flex-direction:column;visibility:hidden;clip-path:inset(0% 0% 0% 100%)}
.dr-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:20px 24px;border-bottom:1px solid var(--hair)}
.dr-cat{color:var(--acc)}
.dr-name{font:500 32px/1.05 var(--disp);letter-spacing:-.04em;margin-top:4px}
.dr-nav{display:flex;gap:6px}
.dr-body{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:20px 24px 40px;display:grid;gap:22px;align-content:start}
.dr-big{background:var(--white);border:1px solid var(--hair);border-radius:18px;padding:16px}
.dr-big svg{width:100%;height:auto}
.dg{stroke:var(--ink);stroke-opacity:.09;stroke-width:1;vector-effect:non-scaling-stroke}
.dg.gl-m{stroke-opacity:.2}
#dIcon{color:var(--ink)}
.dr-big figcaption{display:flex;justify-content:space-between;color:var(--mute);margin-top:10px}
.dr-big #dSw{color:var(--acc)}
.ctl{display:grid;gap:10px}
.ctl-row{display:flex;justify-content:space-between;align-items:center;font-weight:400;font-size:15px}
.ctl-row output{color:var(--acc)}
input[type=range]{-webkit-appearance:none;appearance:none;width:100%;height:28px;background:none;--p:50%}
input[type=range]::-webkit-slider-runnable-track{height:4px;border-radius:2px;background:linear-gradient(90deg,var(--acc) var(--p),var(--hair) var(--p))}
input[type=range]::-moz-range-track{height:4px;border-radius:2px;background:linear-gradient(90deg,var(--acc) var(--p),var(--hair) var(--p))}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:22px;height:22px;margin-top:-9px;border-radius:7px;background:var(--white);border:2px solid var(--ink)}
input[type=range]::-moz-range-thumb{width:18px;height:18px;border-radius:7px;background:var(--white);border:2px solid var(--ink)}
.ticks{display:flex;justify-content:space-between;color:var(--mute);margin-top:-6px}
.seg{position:relative;display:inline-flex;background:var(--white);border:1px solid var(--hair);border-radius:11px;padding:3px;gap:2px;width:max-content;max-width:100%}
.seg button{position:relative;z-index:1;height:36px;padding:0 16px;border-radius:8px;font-size:14px;transition:color .3s}
.seg button[aria-pressed=true]{color:var(--paper)}
.seg .seg-k,.seg .knob{position:absolute;inset:0;z-index:-1;background:var(--ink);border-radius:8px}
.seg.disabled button[data-v=filled]{opacity:.4}
.sizes{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px}
.sz{display:grid;justify-items:center;gap:8px}
.sz span{display:grid;place-items:center;min-width:64px;height:72px;background:var(--white);border:1px solid var(--hair);border-radius:10px;padding:0 8px}
.sz em{font-style:normal;color:var(--mute)}
.code{background:var(--ink);color:#e9e9e4;border-radius:12px;padding:14px;font-size:11px;line-height:1.6;white-space:pre-wrap;word-break:break-all;max-height:220px;overflow:auto}
html.dr-open body{overflow:hidden}

/* ================= studio page ================= */
.studio{padding-top:calc(var(--hd) + 44px)}
.sh{margin-bottom:34px}
.st-wrap{display:grid;grid-template-columns:240px minmax(0,1fr) 300px;gap:clamp(16px,2.4vw,36px);align-items:start}
.pl{color:var(--mute);margin-bottom:12px}
.prompts ol{position:relative;list-style:none;display:grid;gap:6px}
.prompts li{position:relative}
.pr{position:relative;z-index:1;display:grid;grid-template-columns:24px 1fr auto auto;align-items:center;gap:12px;width:100%;height:52px;padding:0 14px;border:1px solid var(--hair);border-radius:12px;background:var(--white);text-align:left;font-size:15px;transition:color .3s}
.pr svg{width:22px;height:22px}
.pr em{font-style:normal;color:var(--acc)}
.pr i{font-style:normal;color:var(--mute)}
.prompts .knob{position:absolute;inset:0;z-index:2;border:2px solid var(--ink);border-radius:12px;pointer-events:none}
.brief{margin-top:16px;font-size:15px;line-height:1.5;color:#3a3a37;padding:14px;border-left:2px solid var(--acc);background:rgba(255,122,0,.06);border-radius:0 10px 10px 0}
.toolbar{display:flex;justify-content:space-between;gap:12px;margin-bottom:12px;flex-wrap:wrap}
.tools{position:relative;display:flex;gap:4px;background:var(--white);border:1px solid var(--hair);border-radius:12px;padding:3px}
.tool{position:relative;z-index:1;width:48px;height:42px;border-radius:9px;display:grid;place-items:center;transition:color .3s}
.tool svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tool span{position:absolute;right:4px;bottom:2px;font-size:8.5px;opacity:.55}
.tool[aria-pressed=true]{color:var(--paper)}
.tools .knob{position:absolute;inset:0;z-index:-1;background:var(--ink);border-radius:9px}
.acts{display:flex;gap:6px}
.board-box{position:relative;background:var(--white);border:1px solid var(--ink);border-radius:18px;padding:clamp(10px,2vw,22px)}
.board{width:100%;height:auto;touch-action:none;user-select:none;-webkit-user-select:none;color:var(--ink)}
.bg{stroke:var(--ink);stroke-opacity:.12;stroke-width:1;vector-effect:non-scaling-stroke}
.bg.gl-m{stroke-opacity:.26}
.ghost{color:var(--ink);opacity:0;transition:opacity .4s}
.ghost.on{opacity:.12}
#shapes path{transition:stroke .3s}
#shapes path.bad{stroke:var(--acc)}
.preview{stroke:var(--acc);opacity:.85}
#polyPts circle{fill:var(--acc)}
.snap-dot{fill:var(--acc)}
.board-read{display:flex;justify-content:space-between;gap:10px;color:var(--mute);margin-top:8px}
.board-read #readTool{color:var(--acc)}
.finish{position:absolute;right:16px;top:16px}
.opts{display:flex;flex-wrap:wrap;gap:14px 22px;margin-top:16px}
.opt{display:grid;gap:6px}
.opt>.m{color:var(--mute)}
.seg-s button{height:32px;padding:0 11px;font-size:13px}
.opt-ghost{display:flex;align-items:center;gap:10px;align-self:end;height:40px;font-size:14px}
.opt-ghost input{width:18px;height:18px;accent-color:var(--acc)}
.check{background:var(--white);border:1px solid var(--hair);border-radius:18px;padding:18px}
.check-head{display:flex;justify-content:space-between;align-items:baseline}
.check-score{font-size:30px;font-weight:700;letter-spacing:-.04em}
.rules-list{list-style:none;display:grid;margin-top:6px}
.rules-list li{position:relative;display:grid;grid-template-columns:28px 1fr 22px;gap:8px;align-items:start;padding:12px 0;border-top:1px solid var(--hair)}
.rules-list .rn{color:var(--mute);padding-top:2px}
.rules-list b{font-weight:400;font-size:15px;display:block}
.rules-list small{display:block;color:var(--mute);font-size:10.5px;margin-top:3px}
.rules-list li.pass small{color:var(--ink)}
.rules-list li.fail small,.rules-list li.fail .rn{color:var(--acc)}
.mark{width:22px;height:22px;fill:none;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.mark .ok{stroke:var(--ink)}
.mark .no{stroke:var(--acc)}
.bar{position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--ink);transform-origin:0 50%;transform:scaleX(0)}
.rules-list li.fail .bar{background:var(--acc)}
.verdict{margin:14px 0;font-size:15px;line-height:1.45;min-height:3em}
.check-acts{display:flex;flex-wrap:wrap;gap:8px}
.check-acts .btn-acc{width:100%}
.miniset{margin-top:clamp(70px,12vh,130px);padding-bottom:110px}
.ms-head{display:grid;gap:4px;margin-bottom:26px}
.ms-head #msCount{color:var(--ink)}
.ms-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}
.ms-card{display:grid;gap:12px;padding:14px;background:var(--white);border:1px solid var(--hair);border-radius:16px;text-align:left;transition:border-color .3s}
.ms-card.on{border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink)}
.ms-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ms-cell{display:grid;place-items:center;aspect-ratio:1;border-radius:10px;background-color:var(--paper);background-image:linear-gradient(var(--grid2) 1px,transparent 1px),linear-gradient(90deg,var(--grid2) 1px,transparent 1px);background-size:12.5% 12.5%}
.ms-you{color:var(--ink)}
.ms-cell em{font-style:normal;color:#aaa}
.ms-small{grid-template-columns:repeat(4,auto);justify-content:space-between;align-items:center;min-height:24px}
.ms-lab{display:flex;justify-content:space-between;align-items:baseline;gap:6px}
.ms-lab b{font-weight:500}
.ms-lab em{font-style:normal;color:var(--acc)}
.ms-note{color:var(--mute);margin-top:16px}

/* ================= responsive ================= */
@media (max-width:1100px){
  .st-wrap{grid-template-columns:220px minmax(0,1fr)}
  .check{grid-column:1/-1}
  .ms-grid{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:900px){
  .hd-nav,.hd-spec,.hd-cta{display:none}
  .hd-menu{display:block}
  .hero-grid{grid-template-columns:1fr}
  .stage{justify-self:stretch;width:100%;max-width:560px}
  .pairs{grid-template-columns:repeat(3,1fr)}
  .rules{grid-template-columns:repeat(2,1fr)}
  .rule{border-right:0;border-bottom:1px solid var(--hair)}
  .ana-pin{grid-template-columns:1fr;grid-template-rows:auto auto;align-content:center;gap:14px}
  .ana-steps{display:none}
  .ana-cap{display:block;position:static;margin-top:10px;font-size:12px}
  .ana-stage{width:min(100%,calc(100svh - var(--hd) - 220px));align-self:start}
  .ana-copy .h2{font-size:clamp(26px,7vw,40px)}
  .cons-body{grid-template-columns:1fr}
  .cons-set{max-width:none}
  .cons-rules ol{grid-template-columns:1fr 1fr;column-gap:16px}
  .cons-rules li{padding:7px 0;grid-template-columns:24px 1fr 18px}
  .cons-rules li b{font-size:13px}
  .cons-head .h2{font-size:clamp(24px,6.4vw,40px)}
  .ft-top{grid-template-columns:1fr 1fr}
  .ft-say{grid-column:1/-1}
  .st-wrap{grid-template-columns:1fr}
  .prompts ol{grid-template-columns:repeat(5,1fr)}
  .pr{grid-template-columns:1fr;justify-items:center;height:auto;padding:10px 4px;gap:4px;font-size:12px;text-align:center}
  .pr i{display:none}
  .pr em{font-size:10px}
}
@media (max-width:560px){
  .hero-meta .hide-s{display:none}
  .hero-meta{gap:16px}
  .pair{height:52px;gap:6px}
  .pair svg{width:20px;height:20px}
  .rule b{font-size:26px}
  .rule span{font-size:13px}
  .cons-pin{gap:12px}
  .cons-set{gap:6px}
  .cs-cell{padding:4px;border-radius:10px}
  .cs-name{font-size:9px}
  .cs-name em{display:none}
  .cons-set.messy .cs-cell{width:calc((100% - 18px) / 4)}
  .cons-rules ol{grid-template-columns:1fr}
  .cons-rules li{padding:4px 0}
  .score b{font-size:20px}
  .mq-i{width:104px;height:104px;gap:12px}
  .mq-i svg{width:32px;height:32px}
  .tiles{grid-template-columns:repeat(auto-fill,minmax(98px,1fr));gap:8px}
  .tile svg{width:30px;height:30px}
  .lib-foot{flex-wrap:wrap}
  .dr-head{padding:16px}
  .dr-body{padding:16px 16px 40px}
  .dr-name{font-size:26px}
  .sz span{min-width:52px;height:62px}
  .ms-grid{grid-template-columns:1fr 1fr}
  .opts{gap:12px 14px}
  .seg-s button{padding:0 8px}
  .tool{width:40px}
  .ft-top{grid-template-columns:1fr}
  .ft-word b{font-size:clamp(40px,12.5vw,80px)}
}
@media (max-height:760px) and (min-width:901px){
  .ana-steps small{display:none}
  .cons-head .h2{font-size:clamp(28px,3.4vw,44px)}
}
html.rm *{transition:none!important}
