/* Shoshin Labs: a full-screen Mac in light mode on a blue koi pond, after lautarosuarez.com/computer.
   Light-mode colours are Apple's, not guesses: Notes.app's Assets.car (Accent #fcb827, body text #454545), the light
   screenshots in Apple's Notes guide (list #fff, selected note #fdf2cd, row lines #ececec, list|note divider #e6e6e6,
   sidebar #ededed, its selected row #d7d7d4), macOS label colours, and Terminal's Basic profile (black on white).
   No inline styles (the site's CSP): positions and the dock's magnification are set from labs.js through CSSOM. */
:root{
  --sys:-apple-system,BlinkMacSystemFont,'SF Pro Text','Helvetica Neue',system-ui,sans-serif;
  --mono:ui-monospace,SFMono-Regular,Menlo,monospace;
  --win:#ffffff;--side:#ffffff;--line:#e6e6e6;--text:rgba(0,0,0,.85);--muted:rgba(0,0,0,.5);
  --pick:#fdf2cd;--link:#fcb827;--red:#d8401f;--ink:#191816;--pond:#123a5c;--ease:cubic-bezier(.16,1,.3,1)
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;background:var(--pond)}
body{font:400 13px/1.45 var(--sys);color:var(--text);-webkit-font-smoothing:antialiased;
  -webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}  /* the Mac's chrome never highlights; notes and the terminal opt back in */
img{-webkit-user-drag:none;-webkit-touch-callout:none}
button{appearance:none;border:0;background:none;padding:0;font:inherit;color:inherit;cursor:default}
a{color:var(--link);cursor:default}  /* the arrow, as on a Mac: lists, menus and the menu bar never show a hand */
.note a,.about-body a{cursor:pointer}  /* links written inside a note do, as in Notes */
img{display:block}
:focus-visible{outline:2px solid #ff9a72;outline-offset:2px}

/* wallpaper: a blue koi pond, deeper toward the edges, with light where the sun comes through; the koi swims in it
   and lily pads and maple leaves (the homepage's v4 pond, archive/v4/float.webp) float on top, above the koi */
.wall{position:fixed;inset:0;z-index:0;background:radial-gradient(120% 95% at 64% 30%,#2a6f9e 0%,#1a4f78 38%,var(--pond) 72%,#0a2238 100%)}
.wall::before{content:'';position:absolute;inset:0;background-image:radial-gradient(36% 26% at 72% 26%,rgba(150,215,240,.16),transparent 70%),radial-gradient(30% 22% at 22% 70%,rgba(150,215,240,.1),transparent 70%),radial-gradient(26% 20% at 44% 92%,rgba(4,18,32,.3),transparent 70%)}
.koi{position:absolute;inset:0;width:100%;height:100%;display:block}
.pads{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.pad{position:absolute;left:0;top:0;background:url(/labs/pond/float.webp) no-repeat 0 0/400% 100%;will-change:transform;filter:drop-shadow(10px 18px 9px rgba(2,14,28,.42))}

/* menu bar */
.menubar{position:fixed;z-index:60;top:0;left:-40px;right:-40px;height:28px;display:flex;justify-content:space-between;align-items:center;padding:0 50px;color:#fff;  /* wider than the screen: a blur fades at its own edges */
 
  background:rgba(26,26,28,.55);-webkit-backdrop-filter:blur(20px) saturate(1.6);backdrop-filter:blur(20px) saturate(1.6)}
.mb-left,.mb-right{display:flex;align-items:center;gap:2px;height:100%}
.mb-seal,.mb-item,.mb-app,.mb-home,.mb-clock{display:flex;align-items:center;height:22px;padding:0 9px;border-radius:5px;white-space:nowrap;font-weight:500}
.mb-seal img{width:16px;height:16px;border-radius:3px}
.mb-seal:hover,.mb-seal[aria-expanded=true]{background:rgba(255,255,255,.18)}
.mb-app{font-weight:700}
.mb-app .on-phone{display:none}  /* before labs.js names the front app: Terminal on a desktop, Notes on a phone */
.mb-item{opacity:.92}
.mb-home{color:#fff;text-decoration:none}
.mb-home:hover{background:rgba(255,255,255,.18)}
.menu{position:absolute;top:29px;left:46px;min-width:230px;padding:5px;border-radius:9px;background:rgba(246,246,246,.92);-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px);
  box-shadow:0 0 0 .5px rgba(0,0,0,.18),0 14px 36px -8px rgba(0,0,0,.45)}
.menu button,.menu a{display:block;width:100%;padding:4px 10px;border-radius:5px;text-align:left;color:rgba(0,0,0,.85);text-decoration:none}
.menu button:hover,.menu a:hover{background:var(--red);color:#fff}
.menu hr{border:0;height:1px;margin:4px 8px;background:rgba(0,0,0,.1)}

/* desktop icons, in columns from the right edge */
.desk{position:fixed;z-index:1;top:40px;right:12px;display:grid;grid-auto-flow:column;grid-template-rows:repeat(6,auto);gap:6px 4px;direction:rtl}
.icon{direction:ltr;width:96px;display:flex;flex-direction:column;align-items:center;gap:5px;padding:4px 2px;border-radius:7px}
.icon img{width:58px;height:58px;padding:3px;border-radius:12px;filter:drop-shadow(0 3px 5px rgba(80,30,10,.28))}
.icon img.round{border-radius:22%;padding:6px}
.icon span{max-width:92px;padding:1px 5px;border-radius:4px;text-align:center;font-size:12px;font-weight:500;line-height:1.25;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.6)}
.icon.sel img{background:rgba(255,255,255,.18)}
.icon.sel span{background:var(--red);color:#fff;text-shadow:none}

/* windows: macOS dark mode */
.windows{position:fixed;inset:0;z-index:10;pointer-events:none}
.win{position:absolute;display:flex;flex-direction:column;pointer-events:auto;overflow:hidden;border-radius:12px;background:var(--win);
  box-shadow:0 0 0 .5px rgba(0,0,0,.26),0 30px 70px -16px rgba(0,8,20,.6),0 10px 24px -10px rgba(0,8,20,.45);
  animation:pop .32s var(--ease)}  /* every time a window appears, on load too, in its final place */
.win[hidden],.win.min{display:none}
/* where Notes and Terminal open, in CSS alone so nothing jumps on load (labs.js leaves them here until dragged).
   100vh - 128px is the room between the menu bar and the dock. Terminal cascades off Notes' bottom-right corner, and on
   a screen tall enough (H - 148 - notes >= terminal + 40, from 1011px) it sits clear below Notes (Angelo's arrangement). */
:root{--nx:clamp(16px,4.5vw,72px);--nw:clamp(560px,55vw,800px);--nh:clamp(340px,calc((100vh - 128px) * .7),540px);
  --tw:clamp(420px,40vw,600px);--th:clamp(190px,calc((100vh - 128px) * .32),300px)}
#notes{left:var(--nx);top:58px;width:var(--nw);height:var(--nh)}
#terminal{left:min(calc(var(--nx) + var(--nw) * .5),calc(100vw - var(--tw) - 16px));top:min(calc(100vh - 90px - var(--th)),calc(14px + var(--nh)));width:var(--tw);height:var(--th)}
@media (min-height:1011px){
  #terminal{left:calc(var(--nx) + var(--nw) * .19);top:calc(58px + var(--nh) + clamp(40px,calc((100vh - 148px - var(--nh) - var(--th)) * .4),140px))}
}
@keyframes pop{from{opacity:0;transform:scale(.95) translateY(8px)}}
.tb{flex:none;position:relative;display:flex;align-items:center;height:38px;padding:0 13px;cursor:default;touch-action:none;border-bottom:1px solid var(--line)}
.tt{position:absolute;left:80px;right:80px;margin:0;text-align:center;font-weight:600;color:rgba(0,0,0,.85);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}
.lights{display:flex;gap:8px;position:relative;z-index:1}
.l{width:12px;height:12px;border-radius:50%;box-shadow:inset 0 0 0 .5px rgba(0,0,0,.25)}
.l.close{background:#ff5f57}.l.min{background:#febc2e}.l.zoom{background:#28c840}
.win:not(.active) .l{background:#dcdcdc}
.win:not(.active) .tt{color:rgba(0,0,0,.25)}

/* notes */
.notes .tb{position:absolute;top:0;left:0;right:0;border-bottom:0;z-index:2;background:transparent}
.notes-body{flex:1;display:flex;min-height:0;background:linear-gradient(90deg,var(--side) 259px,var(--line) 259px 260px,var(--win) 260px)}
.notes-side{flex:none;width:260px;margin-top:38px;padding:6px 8px 10px;overflow:auto}
.side-title{margin:0 10px 8px;font-size:11px;font-weight:600;color:var(--muted)}
.note-list{list-style:none;margin:0;padding:0}
.note-list a{display:block;padding:8px 12px;border-radius:7px;color:var(--text);text-decoration:none;border-bottom:1px solid transparent}
.note-list li+li a{border-top:1px solid #ececec}
.note-list b{display:block;font-weight:700;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.note-list small{display:block;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.note-list a.on{background:var(--pick);border-top-color:transparent}
.note-list a.on small{color:var(--muted)}
.note-list li:has(a.on)+li a{border-top-color:transparent}
.note-list .group{margin:16px 12px 6px;font-size:13px;font-weight:700;color:#000}  /* a section heading, as Notes groups by date */
.note-list .group+li a{border-top-color:transparent}
.notes-view{flex:1;min-width:0;margin-top:38px;overflow:auto;padding:10px 34px 40px;-webkit-user-select:text;user-select:text;cursor:auto}
.back{display:none}
.note{max-width:680px;margin:0 auto;scroll-margin-top:10px}  /* the browser's jump to #note lands on the padding, not past it */
.js .note:not(.on){display:none}
.note h1{margin:0 0 14px;font-size:26px;font-weight:700;letter-spacing:-.01em;color:#000}
.note h2{margin:20px 0 6px;font-size:17px;font-weight:700;color:#000}
.note p,.note li{font-size:14px;line-height:1.6;color:#454545}
.note p{margin:0 0 10px}
.note ul{margin:0 0 12px;padding-left:20px}
.note img{width:100%;max-width:560px;height:auto;margin:16px 0 4px;border-radius:8px}

/* scrollbars: thin, like macOS */
.notes-side,.notes-view,.term-body,.finder-grid{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.25) transparent}
.notes-side::-webkit-scrollbar,.notes-view::-webkit-scrollbar,.term-body::-webkit-scrollbar,.finder-grid::-webkit-scrollbar{width:10px;background:transparent}
.notes-side::-webkit-scrollbar-thumb,.notes-view::-webkit-scrollbar-thumb,.term-body::-webkit-scrollbar-thumb,.finder-grid::-webkit-scrollbar-thumb{border:3px solid transparent;border-radius:10px;background:rgba(0,0,0,.25) padding-box}

/* terminal */
.term{background:#fff}
.term-body{flex:1;overflow:auto;padding:10px 14px 16px;font:12.5px/1.55 var(--mono);color:#000;cursor:text;-webkit-user-select:text;user-select:text}
.term-out{margin:0;white-space:pre-wrap;word-break:break-word;font:inherit}
.term-line{display:flex;gap:7px}
.term-line span{color:#000;white-space:nowrap}
.term-line input{flex:1;min-width:0;border:0;padding:0;background:transparent;color:inherit;font:inherit;outline:0;caret-color:#7f7f7f}

/* finder and trash */
.finder-body{flex:1;display:flex;min-height:0}
.finder-side{width:170px;padding:12px 8px;background:#ededed;border-right:1px solid var(--line)}
.finder-side button{display:block;width:100%;padding:4px 10px;border-radius:6px;text-align:left}
.finder-side button.on{background:#d7d7d4;font-weight:600}
.finder-grid{flex:1;overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));align-content:start;gap:8px;padding:16px}
.finder-grid button{display:flex;flex-direction:column;align-items:center;gap:6px;padding:8px 4px;border-radius:8px}
.finder-grid button:hover{background:rgba(0,0,0,.05)}
.finder-grid img{width:56px;height:56px;border-radius:22%}
.finder-grid span{font-size:12px;text-align:center}
.trash-body{padding:18px 22px}
.trash-body .file{margin:0 0 10px;font-weight:600}
.trash-body pre{margin:0;font:13px/1.6 var(--mono);color:var(--muted)}
/* the Cemetery: a Finder window of graves, one per project i stopped working on. Each stone is the same generated
   granite (icons/grave.webp); the project's icon is carved into it in grey, with the years under it */
.graves{flex:1;overflow:auto;display:flex;flex-wrap:wrap;justify-content:center;align-content:flex-start;gap:14px;padding:22px 16px 10px;
  background:linear-gradient(180deg,#fff 0%,#fff 62%,#f1f6ec 100%)}
.grave{display:flex;flex-direction:column;align-items:center;gap:2px;width:150px;padding:4px 4px 8px;border-radius:10px}
.grave:hover{background:rgba(0,0,0,.035)}
.stone{position:relative;display:block;width:140px;height:140px;background:url(/labs/icons/grave.webp) center/contain no-repeat}
.stone .mark{position:absolute;left:47.4%;top:27%;width:34px;height:34px;transform:translateX(-50%);border-radius:22%;
  filter:grayscale(1) contrast(.85) brightness(1.08);opacity:.5;mix-blend-mode:multiply}
.stone .years{position:absolute;left:47.4%;top:57%;transform:translateX(-50%);white-space:nowrap;font:600 9.5px/1 var(--sys);letter-spacing:.04em;
  color:rgba(64,64,64,.72);text-shadow:0 1px 0 rgba(255,255,255,.75)}
.grave .name{padding:1px 6px;border-radius:4px;font-size:12px;text-align:center}
.grave.sel .name{background:var(--red);color:#fff}
.cemetery .status{flex:none;margin:0;padding:5px 12px;border-top:1px solid var(--line);background:#f6f6f6;text-align:center;font-size:11px;color:var(--muted)}
.about-body{display:grid;justify-items:center;text-align:center;gap:4px;padding:24px 22px}
.about-body img{width:80px;height:80px;margin-bottom:8px;border-radius:6px}
.about-body h2{margin:0;font-size:19px}
.about-body p{margin:0;font-size:12px;color:var(--muted)}
.about-body .built{margin-top:8px}

/* dock */
.dock{position:fixed;z-index:50;left:50%;bottom:8px;transform:translateX(-50%);height:68px;display:flex;align-items:flex-end;gap:6px;padding:0 8px 7px;border-radius:20px;
  background:rgba(255,255,255,.24);border:1px solid rgba(255,255,255,.38);-webkit-backdrop-filter:blur(24px) saturate(1.6);backdrop-filter:blur(24px) saturate(1.6);
  box-shadow:0 14px 34px -12px rgba(0,0,0,.35)}
.dock button{position:relative;flex:none;width:calc(54px * var(--s,1));height:calc(54px * var(--s,1));transition:width .14s ease-out,height .14s ease-out}
.dock.tracking button{transition:width .06s linear,height .06s linear}
.dock img{width:100%;height:100%;filter:drop-shadow(0 3px 4px rgba(0,0,0,.3))}
.dock button::before{content:attr(data-tip);position:absolute;left:50%;bottom:calc(100% + 10px);transform:translateX(-50%);padding:3px 10px;border-radius:6px;background:rgba(246,246,246,.95);color:rgba(0,0,0,.85);font-size:12px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .12s}
.dock button:hover::before{opacity:1}
.dock button.run::after{content:'';position:absolute;left:50%;bottom:-6px;width:4px;height:4px;margin-left:-2px;border-radius:50%;background:rgba(255,255,255,.85)}
.dock .sep{align-self:center;width:1px;height:42px;margin:0 3px 6px;background:rgba(255,255,255,.45)}

/* phones: Notes, full screen, list first */
@media (max-width:760px){
  .desk,.dock,.mb-item,#terminal,#finder,#trash,#cemetery,#about,.notes .tb{display:none!important}
  .koi,.pads{display:none}
  .notes{position:fixed!important;inset:28px 0 0 0!important;width:auto!important;height:auto!important;border-radius:0;animation:none}
  .notes-body{background:var(--side)}
  .notes-side{width:100%;margin-top:0;padding-top:12px}
  .notes-view{display:none;margin-top:0;padding:12px 18px 40px;background:var(--win)}
  .note{scroll-margin-top:12px}
  .notes.viewing .notes-side{display:none}
  .notes.viewing .notes-view{display:block}
  .back{display:inline-block;margin:0 0 6px;padding:6px 0;color:var(--link);font-size:16px}
  .note-list a.on{background:transparent}
  .mb-clock{display:none}
  .mb-app .on-desk{display:none}
  .mb-app .on-phone{display:inline}
}
@media (prefers-reduced-motion:reduce){
  .win{animation:none}
  .dock button{transition:none}
}
