/* carbon website (paper): the demo desktop on /demo/ (assets/desk.js).
   One computer screen drawn in the site's own paper, ink and wine, in the manner of an early desktop: flat, outlined,
   a striped title bar, icons in the hero's dot matrix, and shadows made of dots. It holds a menu bar, eight icons and
   one window; the window's contents are the small demos' styles in minis.css. On a narrow page the screen stands
   upright: the window on top, the icons under it. */
/* as wide as the page allows, but never so tall that the screen cannot be seen whole in the browser window */
.dk-lap{position:relative;isolation:isolate;max-width:min(1080px,max(700px,calc((100vh - 300px) * 1.6)));margin:0 auto}
.dk-lid{position:relative;border-radius:16px;background:var(--bg);box-shadow:0 0 0 1.5px var(--ink)}
/* the screen's shadow: a patch of dots, set down and to the right */
.dk-lid::after{content:"";position:absolute;z-index:-1;inset:11px -11px -11px 11px;border-radius:18px;background:radial-gradient(var(--ink) 1.15px,transparent 1.6px) 0 0/6px 6px;opacity:.5}
.dk-base{display:none}
.dk-scr{position:relative;aspect-ratio:16/10;display:grid;grid-template:auto minmax(0,1fr)/auto minmax(0,1fr);overflow:hidden;border-radius:16px;color:var(--ink);
  background:radial-gradient(rgba(13,20,36,.17) 1px,transparent 1.5px) 0 0/11px 11px,#f1e8d6}
.dk-mb{grid-column:1/-1;height:32px;display:flex;align-items:center;gap:18px;padding:0 16px;background:var(--bg);border-bottom:1.5px solid var(--ink);font:500 12.5px Inter,system-ui,sans-serif;color:var(--ink);white-space:nowrap}
.dk-mb b{font:400 17px/1 'Urbanist',sans-serif;letter-spacing:-.035em;margin-right:2px}
.dk-mb span{opacity:.72}
.dk-mb .r{margin-left:auto;font:400 11.5px var(--mono);opacity:.72}
.dk-mb .lg{width:9px;height:9px;border-radius:50%;background:var(--wine);opacity:1}

/* the icons */
/* sized from the screen itself (cqh = 1% of its height), so four rows always fit whatever size the screen is */
.dk-scr{container-type:size}
.dk-icons{display:grid;grid-template-columns:repeat(2,auto);align-content:start;gap:clamp(6px,2.4cqh,18px) clamp(2px,1cqw,14px);padding:clamp(10px,4cqh,30px) 0 0 clamp(10px,2.2cqw,26px)}
.dk-ic{display:grid;justify-items:center;align-content:start;gap:clamp(4px,1.2cqh,8px);width:clamp(66px,9.4cqw,94px);padding:3px 0;color:var(--ink);border-radius:10px;outline-offset:2px}
.dk-tile{display:grid;place-items:center;width:clamp(34px,10cqh,62px);aspect-ratio:1;border-radius:22%;background:var(--bg);color:var(--ink);box-shadow:0 0 0 1.5px var(--ink),3px 3px 0 0 var(--ink);transition:transform .16s var(--ease-out),box-shadow .16s var(--ease-out),background .16s,color .16s}
.dk-tile svg{width:80%;height:80%;fill:currentColor}
.dk-tile svg .off{opacity:.13}
.dk-lbl{font-size:clamp(10px,2cqh,12.5px);font-weight:500;line-height:1.2;padding:2px 7px;border-radius:4px;background:#f1e8d6;white-space:nowrap;transition:background .16s,color .16s}
.dk-ic[aria-selected=true] .dk-tile{background:var(--wine);color:var(--bg);box-shadow:0 0 0 1.5px var(--ink),1px 1px 0 0 var(--ink);transform:translate(2px,2px)}
.dk-ic[aria-selected=true] .dk-tile svg .off{opacity:.2}
.dk-ic[aria-selected=true] .dk-lbl{background:var(--ink);color:var(--bg)}
.dk-ic:active .dk-tile{box-shadow:0 0 0 1.5px var(--ink),1px 1px 0 0 var(--ink);transform:translate(2px,2px)}
@media(hover:hover) and (pointer:fine){.dk-ic:not([aria-selected=true]):hover .dk-tile{transform:translate(-1px,-1px);box-shadow:0 0 0 1.5px var(--ink),4px 4px 0 0 var(--ink)}}

/* the window: outlined, with a striped title bar and one square button, on a shadow of dots */
.dk-stage{display:grid;place-items:center;min-width:0;min-height:0;isolation:isolate;padding:clamp(10px,4cqh,30px) clamp(10px,2.6cqw,30px)}
.dk-win{position:relative;cursor:pointer}
.dk-win::after{content:"";position:absolute;z-index:-1;inset:9px -9px -9px 9px;border-radius:9px;background:radial-gradient(var(--ink) 1.15px,transparent 1.6px) 0 0/5px 5px;opacity:.6}
.dk-win .mwin{width:440px;height:300px;zoom:var(--zm,1.5);border-radius:7px;box-shadow:0 0 0 1px var(--ink)}
.dk-win .mwin.term{background:var(--ink)}
.dk-win .mbar{height:26px;gap:0;padding:0 9px;color:var(--ink);border-bottom:1px solid var(--ink);
  background:repeating-linear-gradient(180deg,transparent 0 2px,rgba(13,20,36,.6) 2px 3px) center/calc(100% - 18px) 12px no-repeat,var(--bg)}
.dk-win .lights{padding-right:7px;background:var(--bg)}
.dk-win .lights i{width:9px;height:9px;border-radius:2px;background:var(--bg);box-shadow:inset 0 0 0 1px var(--ink)}
.dk-win .lights i+i{display:none}
.dk-win .mttl{flex:0 1 auto;margin:0 auto;padding:0 9px;background:var(--bg);color:var(--ink);font-size:10.5px}
.dk-win .mwin.app .mttl{margin:0 auto;padding:0 9px;border-radius:0;background:var(--bg);text-align:center}
.dk-win.in{animation:dk-in .22s var(--ease-out)}
@keyframes dk-in{from{opacity:0;transform:translate(-5px,-5px)}}

/* under the screen: which demo this is, and its controls */
.dk-foot{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px 32px;align-items:start;max-width:min(1080px,max(700px,calc((100vh - 300px) * 1.6)));margin:clamp(34px,4vw,52px) auto 0}
.dk-track{grid-column:1/-1;grid-row:1}
.dk-h{font-size:clamp(22px,2.4vw,30px);letter-spacing:-.03em;line-height:1.12}
.dk-p{margin-top:8px;max-width:62ch;color:var(--sub);font-size:15.5px;min-height:3.1em}
.dk-ctl{display:flex;gap:6px}
.desk+.note{max-width:min(1080px,max(700px,calc((100vh - 300px) * 1.6)))}

@media(max-width:719px){
  .dk-lid,.dk-scr{border-radius:14px}
  .dk-lid::after{inset:8px -6px -8px 6px;border-radius:16px}
  .dk-scr{aspect-ratio:auto;container-type:normal;grid-template:auto auto auto/minmax(0,1fr)}
  .dk-stage{grid-row:2;padding:16px 16px 10px 12px}
  .dk-win::after{inset:6px -6px -6px 6px}
  .dk-icons{grid-row:3;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 2px;padding:16px 8px 18px}
  .dk-ic{width:auto;gap:8px}
  .dk-tile{width:48px}
  .dk-lbl{font-size:11px;padding:2px 5px}
  .dk-lap,.dk-foot{max-width:none}
  .dk-foot{grid-template-columns:minmax(0,1fr);gap:16px}
  .dk-track{grid-row:2}
  .dk-mb span:nth-of-type(n+3):not(.r){display:none}
  .dk-p{min-height:4.6em}
}
@media(prefers-reduced-motion:reduce){.dk-win.in{animation:none}.dk-tile{transition:none}}
