/* Nemo — a classic desktop that happens to be a market */
*{box-sizing:border-box;margin:0;padding:0;}
:root{
  --ink:#000;
  --chrome:#dcdcdc;
  --sel:#c8d8f0;
  --up:#1d6b3a;
  --down:#a3312b;
}
html,body{height:100%;}
body{
  font-family:"Geneva","Verdana",-apple-system,sans-serif;
  font-size:15px;color:var(--ink);
  background:#2c5aa6;
  overflow:hidden;
  user-select:none;
  -webkit-user-select:none;
}
#wall{position:fixed;inset:0;width:100%;height:100%;display:block;}

/* DESKTOP */
#desktop{position:fixed;inset:0;}
#landing-modal{
  position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);
  width:380px;max-width:88vw;z-index:2000;resize:none;min-height:auto;
}
.landing-body{
  padding:18px 16px;text-align:center;line-height:1.35;
  font-size:15px;color:#000;background:#fff;
  display:flex;flex-direction:column;align-items:center;gap:18px;
}
.landing-body p{margin:0;}
.landing-ctas{display:flex;gap:12px;}
.landing-ctas button,.btn{
  font-family:inherit;font-size:14px;font-weight:bold;color:#000;
  padding:10px 18px;border:1px solid #000;border-radius:4px;
  background:#fff;cursor:pointer;appearance:none;-webkit-appearance:none;
}
.landing-ctas button:hover,.btn:hover{background:#f0f0f0;}
.landing-ctas button:active,.btn:active{background:#e0e0e0;}
.btn.primary{background:#000;color:#fff;}
.btn.primary:hover{background:#222;}
.btn.small{font-size:12px;padding:5px 10px;}
.btn[disabled]{opacity:.45;cursor:default;}

/* DESKTOP ICONS */
.icon{
  position:absolute;width:96px;text-align:center;cursor:default;
  display:flex;flex-direction:column;align-items:center;gap:3px;
  padding:4px;
}
.icon .glyph{
  font-size:34px;line-height:1;width:57px;height:51px;
  display:flex;align-items:center;justify-content:center;
}
.folder-svg{width:53px;height:44px;display:block;filter:drop-shadow(0 1px 1px rgba(0,0,0,0.3));}
.icon .lbl{
  font-size:13px;color:#fff;
  padding:0 3px;max-width:96px;line-height:1.25;
  text-shadow:0 1px 2px rgba(0,0,0,.45);
}
.icon.selected .lbl{background:#000;color:#fff;text-shadow:none;}
.icon.dragging{opacity:0.6;}

/* WINDOWS (dynamic, multiple) */
.window{
  position:fixed;background:var(--chrome);
  border-radius:4px;
  display:flex;flex-direction:column;overflow:hidden;
  min-width:300px;min-height:200px;
  resize:both;
  filter:brightness(1);
  transition:filter 0.15s ease;
  box-shadow:0 10px 30px rgba(0,0,0,.28);
}
.window:not(.active){filter:brightness(0.88);}
.title-bar{
  height:28px;border-bottom:1px solid #000;
  display:flex;align-items:center;gap:8px;padding:0 8px;
  background:#000;
  cursor:move;flex:none;
}
.close-box{
  order:3;
  width:20px;height:20px;border:1px solid #666;border-radius:4px;
  background:#fff;
  padding:0;cursor:pointer;flex:none;margin-left:auto;
  display:flex;align-items:center;justify-content:center;
}
.close-box::before{
  content:"\00d7";color:#000;font-weight:bold;
  font-size:15px;line-height:1;
}
.close-box:hover{background:#e0e0e0;}
.title-text{
  order:1;font-weight:bold;font-size:14px;color:#fff;
  background:transparent;padding:0 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.title-count{
  order:2;margin-left:auto;color:#ccc;background:transparent;
  padding:0 4px;white-space:nowrap;font-size:13px;
}
.title-count + .close-box{margin-left:0;}

/* FOLDER WINDOW */
.window-body{flex:1;overflow:hidden;background:#fff;border-top:1px solid #888;min-height:0;}
.folder-main{flex:1;overflow-y:auto;height:100%;}
.filegrid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(113px,1fr));
  gap:6px;padding:10px 10px 18px;
}
.file{
  display:flex;flex-direction:column;align-items:center;gap:3px;
  text-decoration:none;color:#000;padding:6px 4px;cursor:pointer;
}
.file img{width:32px;height:32px;}
.file .glyph{font-size:30px;line-height:1;height:37px;display:flex;align-items:center;justify-content:center;}
.file .glyph svg{width:44px;height:37px;}
.file .fname{
  font-size:12px;text-align:center;line-height:1.25;word-break:break-word;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.file .fsub{font-size:11px;color:#666;font-variant-numeric:tabular-nums;}
.file:hover .fname{color:#1c5fd6;text-decoration:underline;}
.favicon-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center;}
.favicon-wrap img.broken{visibility:hidden;}
.folder-empty{padding:30px;text-align:center;color:#888;font-size:13px;line-height:1.5;}

/* README window */
.readme-body{background:#fff;overflow:auto;}
.readme{padding:14px 16px;line-height:1.5;font-size:14px;user-select:text;-webkit-user-select:text;}
.readme p{margin-bottom:9px;}
.readme h3{font-size:14px;margin:14px 0 4px;}
.readme h3:first-child{margin-top:0;}
.readme code{font-family:Monaco,Menlo,monospace;font-size:12px;background:#f0f0f0;padding:1px 4px;border-radius:3px;}
.readme a{color:#1c5fd6;}
.readme .acts{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px;}

/* SPREADSHEET */
.sheet-body{background:#fff;overflow:auto;}
.sheet-toolbar{
  position:sticky;top:0;background:#ececec;border-bottom:1px solid #000;
  display:flex;gap:10px;align-items:center;padding:6px 8px;flex-wrap:wrap;z-index:2;
}
.search{font-family:inherit;font-size:14px;padding:4px 7px;border:1px solid #000;border-radius:4px;width:220px;background:#fff;}
.sheet-filters,.pills{display:flex;gap:4px;flex-wrap:wrap;}
.cat-pill{font-family:inherit;color:#000;font-size:12px;padding:3px 8px;border:1px solid #000;border-radius:4px;cursor:pointer;background:#fff;}
.cat-pill.active{background:#000;color:#fff;}
table{width:100%;border-collapse:collapse;font-size:13px;}
thead th{
  position:sticky;top:0;background:#dcdcdc;border-bottom:1px solid #000;border-right:1px solid #aaa;
  text-align:left;padding:6px 8px;font-weight:bold;white-space:nowrap;
}
.sheet-body thead th{top:41px;cursor:pointer;}
td{padding:5px 8px;border-bottom:1px solid #eee;border-right:1px solid #f0f0f0;vertical-align:middle;white-space:nowrap;}
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums;}
tbody tr:nth-child(even){background:#f7f7f7;}
tbody tr:hover{background:var(--sel);}
tr.rowlink{cursor:pointer;}
td.c-site{display:flex;align-items:center;gap:6px;}
td.c-site img{width:14px;height:14px;}
td.c-site small{color:#777;font-size:12px;}
.empty{padding:30px;text-align:center;color:#888;white-space:normal;}
.up{color:var(--up);} .down{color:var(--down);}
.masked{letter-spacing:1px;color:#555;}

/* TRADE WINDOW */
.trade-body{background:#fff;overflow:hidden;}
.trade{display:flex;height:100%;}
.trade-main{flex:1;min-width:0;display:flex;flex-direction:column;border-right:1px solid #000;}
.trade-head{display:flex;align-items:baseline;gap:8px;padding:9px 10px 6px;flex-wrap:wrap;}
.trade-head .favicon-wrap{align-self:center;}
.trade-head img{width:18px;height:18px;}
.trade-head .t-name{color:#666;font-size:13px;}
.trade-head .t-price{font-size:22px;font-weight:bold;margin-left:auto;font-variant-numeric:tabular-nums;}
.trade-head .t-chg{font-size:13px;font-variant-numeric:tabular-nums;}
.tf-row{display:flex;align-items:center;gap:8px;padding:0 10px 6px;font-size:12px;}
.tf-row .ohlc{margin-left:auto;color:#555;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.chart-wrap{flex:1;min-height:120px;position:relative;border-top:1px solid #ccc;border-bottom:1px solid #000;}
.chart-wrap canvas{position:absolute;inset:0;width:100%;height:100%;cursor:crosshair;}
.mypos{flex:none;max-height:38%;overflow:auto;font-size:13px;}
.mypos .none{padding:10px;color:#777;line-height:1.4;}
.ticket{width:262px;flex:none;background:#ececec;padding:10px;display:flex;flex-direction:column;gap:9px;overflow-y:auto;}
.ticket .pills{flex-wrap:nowrap;}
.ticket .pills .cat-pill{flex:1;text-align:center;padding:5px 4px;}
.field{display:flex;align-items:center;border:1px solid #000;border-radius:4px;background:#fff;}
.field input{flex:1;min-width:0;border:0;outline:0;background:transparent;font-family:inherit;font-size:16px;padding:7px 8px;font-variant-numeric:tabular-nums;}
.field span{padding:0 8px;font-size:12px;color:#555;}
.lab{font-size:12px;color:#333;margin-bottom:-5px;display:flex;justify-content:space-between;}
.lab a{color:#1c5fd6;cursor:pointer;text-decoration:underline;}
.lines{font-size:12px;border-top:1px solid #bbb;}
.lines div{display:flex;justify-content:space-between;gap:8px;padding:4px 0;border-bottom:1px solid #d2d2d2;}
.lines div span:last-child{font-variant-numeric:tabular-nums;text-align:right;}
.ticket .btn{width:100%;}
.ticket .msg{font-size:12px;line-height:1.35;color:#444;min-height:16px;}
.ticket .msg.err{color:var(--down);}
.ticket .msg.ok{color:var(--up);}

/* PORTFOLIO */
.folio-body{background:#fff;overflow:auto;}
.folio-top{display:flex;align-items:center;gap:12px;padding:12px;border-bottom:1px solid #000;background:#ececec;flex-wrap:wrap;}
.folio-top .bal{font-size:24px;font-weight:bold;font-variant-numeric:tabular-nums;}
.folio-top .sub{font-size:12px;color:#555;}
.folio-top .sp{margin-left:auto;display:flex;gap:6px;}
.sect{font-size:12px;font-weight:bold;padding:8px 8px 5px;background:#fff;}

/* RECEIPT */
.receipt-body{background:#fff;overflow:auto;}
.receipt{padding:16px 18px;font-family:Monaco,Menlo,"Courier New",monospace;font-size:12px;line-height:1.5;user-select:text;-webkit-user-select:text;}
.receipt h4{font-family:"Geneva","Verdana",sans-serif;font-size:14px;text-align:center;margin-bottom:2px;}
.receipt .when{text-align:center;color:#666;margin-bottom:10px;}
.receipt .row{display:flex;justify-content:space-between;gap:10px;padding:4px 0;border-bottom:1px dashed #bbb;}
.receipt .foot{margin-top:12px;text-align:center;color:#666;font-family:"Geneva","Verdana",sans-serif;line-height:1.35;}

/* WHO'S LOOKING */
.look{padding:12px;display:flex;flex-direction:column;gap:10px;font-size:13px;line-height:1.4;}
.look .pills .cat-pill{font-size:13px;padding:5px 10px;}

/* CALCULATORS */
.calc{padding:12px;display:flex;flex-direction:column;gap:12px;font-size:13px;}
.calc input[type=range]{width:100%;accent-color:#000;}
.calc .big{font-size:20px;font-weight:bold;font-variant-numeric:tabular-nums;}
.cards{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.card{border:1px solid #000;border-radius:4px;padding:10px;display:flex;flex-direction:column;gap:5px;}
.card .k{font-weight:bold;}
.card small{color:#555;line-height:1.35;}
.card .btn{margin-top:auto;}
.note{font-size:12px;color:#666;line-height:1.4;}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;}

@media(max-width:640px){
  .window{left:0!important;top:0!important;width:100vw!important;height:100dvh!important;border-radius:0;resize:none;}
  #landing-modal{left:50%!important;top:50%!important;width:88vw!important;height:auto!important;border-radius:4px;}
  .title-bar{height:40px;}
  .close-box{width:28px;height:28px;}
  .trade{flex-direction:column;overflow-y:auto;}
  .trade-main{border-right:0;flex:none;}
  .chart-wrap{flex:none;height:230px;}
  .ticket{width:auto;overflow:visible;border-top:1px solid #000;}
  .mypos{max-height:none;}
  .cards{grid-template-columns:1fr;}
}

/* PROOF OF GAIN */
.proof{padding:16px;display:flex;flex-direction:column;gap:10px;font-size:13px;}
.proof .p-big{font:400 76px/1 Baskerville,Georgia,serif;letter-spacing:-.02em;text-align:center;margin-top:6px;}
.proof .p-sub{text-align:center;font-size:15px;color:#333;}
.proof .acts{display:flex;gap:6px;flex-wrap:wrap;}
.proof a.btn{text-decoration:none;display:inline-block;}

/* SEALED: lock screen */
#lock{position:fixed;inset:0;z-index:4000;background:rgba(0,0,20,.35);display:flex;align-items:center;justify-content:center;}
#lock .field{border:1px solid #000;border-radius:4px;background:#fff;display:flex;}
#lock .field input{flex:1;border:0;outline:0;font-size:16px;padding:8px;background:transparent;font-family:inherit;}
#lock .msg{font-size:12px;min-height:15px;margin:-8px 0;} .msg.err{color:var(--down);}
.calc input[type=password]{flex:1;min-width:0;border:0;outline:0;background:transparent;font-family:inherit;font-size:16px;padding:7px 8px;}
.calc .msg{font-size:12px;min-height:15px;}
.readme label{display:flex;gap:8px;align-items:center;}
/* BOSS KEY */
#boss{display:none;position:fixed;inset:0;z-index:5000;background:#fff;font-family:"Geneva","Verdana",sans-serif;font-size:13px;color:#000;overflow:hidden;}
#boss .b-bar{height:28px;background:#000;color:#fff;font-weight:bold;font-size:14px;display:flex;align-items:center;padding:0 8px;}
#boss .b-menu{display:flex;gap:18px;padding:5px 10px;background:#ececec;border-bottom:1px solid #000;}
#boss .b-fx{display:flex;gap:10px;padding:4px 10px;border-bottom:1px solid #999;align-items:center;}
#boss .b-fx b{width:54px;border:1px solid #000;border-radius:3px;text-align:center;padding:2px 0;font-weight:normal;}
#boss .b-grid{position:absolute;top:87px;left:0;right:0;bottom:0;overflow:auto;}
#boss table{width:auto;min-width:100%;}
#boss th{position:static;background:#dcdcdc;border:1px solid #aaa;text-align:center;font-weight:normal;padding:3px 8px;min-width:34px;}
#boss td{border:1px solid #ddd;padding:3px 10px;min-width:118px;height:22px;background:#fff;}
#boss tr.b-tot td{font-weight:bold;}
#boss td.sel{outline:2px solid #000;outline-offset:-2px;}

/* REAL WALLET */
.wal .field input,.wal .field select{flex:1;min-width:0;border:0;outline:0;background:transparent;font-family:inherit;font-size:14px;padding:7px 8px;}
.wal .field input[readonly]{font-family:Monaco,Menlo,monospace;font-size:12px;}
.wal .msg{font-size:12px;line-height:1.35;min-height:15px;}
.msg a{color:#1c5fd6;} .msg.ok{color:var(--up);}

.wal .lab{margin-bottom:2px;}

/* ── LIVED-IN DESKTOP ── */
#boot{position:fixed;inset:0;z-index:6000;background:#3d74cf;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;transition:opacity .45s ease;}
#boot.out{opacity:0;pointer-events:none;}
#boot img{width:150px;height:150px;}
#boot .b-name{font:400 34px/1 Baskerville,Georgia,serif;color:#fff;letter-spacing:-.01em;}
#boot .b-bar{width:170px;height:6px;border:1px solid rgba(255,255,255,.85);border-radius:4px;overflow:hidden;margin-top:6px;}
#boot .b-bar i{display:block;height:100%;width:0;background:#fff;transition:width 1.35s cubic-bezier(.3,.1,.2,1);}
#boot.go .b-bar i{width:100%;}
#menubar{position:fixed;top:0;left:0;right:0;height:26px;z-index:3000;background:#fff;border-bottom:1px solid #000;display:flex;align-items:stretch;font-size:13px;padding:0 6px;white-space:nowrap;}
#menubar button{font-family:inherit;font-size:13px;color:#000;background:transparent;border:0;padding:0 10px;cursor:default;}
#menubar .mb-logo{padding:0 8px 0 4px;display:flex;align-items:center;}
#menubar .mb-logo img{width:18px;height:18px;border-radius:4px;display:block;}
#menubar .mb-item{font-weight:bold;}
#menubar .mb-item.on,#menubar .mb-item:active{background:#000;color:#fff;}
#menubar .mb-right{margin-left:auto;display:flex;align-items:center;gap:14px;padding-right:4px;color:#333;}
#menubar .mb-bal{font-variant-numeric:tabular-nums;border:1px solid #000;border-radius:4px;padding:1px 8px;height:20px;cursor:pointer;white-space:pre;}
#menubar .mb-clock{font-variant-numeric:tabular-nums;min-width:58px;text-align:right;}
#menudrop{display:none;position:fixed;top:26px;z-index:3001;min-width:210px;background:#fff;border:1px solid #000;box-shadow:2px 3px 0 rgba(0,0,0,.35);padding:3px 0;}
#menudrop .md-item{display:flex;justify-content:space-between;gap:24px;width:100%;font-family:inherit;font-size:13px;color:#000;background:transparent;border:0;padding:4px 14px;text-align:left;cursor:default;}
#menudrop .md-item em{font-style:normal;color:#666;font-variant-numeric:tabular-nums;}
#menudrop .md-item:hover{background:#000;color:#fff;} #menudrop .md-item:hover em{color:#ddd;}
#menudrop .md-sep{border-top:1px dotted #888;margin:3px 0;}
#strip{position:fixed;left:12px;bottom:10px;z-index:50;display:flex;background:var(--chrome);border:1px solid #000;border-radius:5px;overflow:hidden;box-shadow:0 4px 14px rgba(0,0,0,.25);max-width:calc(100vw - 24px);overflow-x:auto;}
#strip .st-item{display:flex;align-items:center;gap:6px;font-family:inherit;font-size:12px;color:#000;background:transparent;border:0;border-right:1px solid #999;padding:6px 11px;cursor:pointer;white-space:nowrap;font-variant-numeric:tabular-nums;}
#strip .st-item:last-child{border-right:0;}
#strip .st-item:hover{background:#fff;}
#strip img{width:14px;height:14px;display:block;}
.about{padding:20px 18px;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;font-size:13px;}
.about img{width:120px;height:120px;border-radius:14px;}
.about .a-name{font:400 40px/1 Baskerville,Georgia,serif;letter-spacing:-.02em;margin-top:4px;}
.about .a-tag{font:italic 16px Baskerville,Georgia,serif;color:#333;margin-bottom:10px;}
.about .lines{width:100%;text-align:left;}
.news{padding:14px 16px 16px;user-select:text;-webkit-user-select:text;}
.news .n-mast{font:400 30px/1 Baskerville,Georgia,serif;letter-spacing:-.02em;text-align:center;}
.news .n-ed{font-size:11px;line-height:1.45;color:#555;text-align:center;padding:7px 0 9px;border-bottom:3px double #000;margin-bottom:4px;}
.news .n-item{display:block;padding:10px 0;border-bottom:1px solid #ddd;color:#000;text-decoration:none;}
.news .n-tags{display:block;font-size:10px;font-weight:bold;letter-spacing:.06em;margin-bottom:3px;}
.news .n-title{display:block;font:400 17px/1.22 Baskerville,Georgia,serif;}
.news .n-item:hover .n-title{text-decoration:underline;}
.news .n-meta{display:block;font-size:11px;color:#777;margin-top:4px;}
.news .n-next{font-size:11px;color:#777;text-align:center;padding-top:10px;}
@media(max-width:640px){
  #menubar{overflow-x:auto;} #menubar .mb-status,#menubar .mb-clock{display:none;} #menubar button{padding:0 7px;}
  #strip{left:0;right:0;bottom:0;border-radius:0;border-left:0;border-right:0;max-width:none;}
  .window{top:26px!important;height:calc(100dvh - 58px)!important;}
  #strip{z-index:3000;}
  #landing-modal{top:50%!important;height:auto!important;}
}

/* NEWS FLASH */
#flash{background:var(--chrome);border-radius:4px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,.32);position:fixed;right:16px;bottom:54px;width:340px;max-width:calc(100vw - 32px);min-height:0;min-width:0;resize:none;z-index:2500;transform:translateY(24px);opacity:0;pointer-events:none;transition:transform .35s cubic-bezier(.2,.8,.2,1),opacity .25s ease;cursor:pointer;}
#flash.on{transform:none;opacity:1;pointer-events:auto;}
#flash .title-bar{cursor:default;}
#flash .window-body{padding:11px 13px 12px;overflow:visible;}
#flash .f-item{display:block;color:#000;text-decoration:none;}
#flash .n-tags{display:block;font-size:10px;font-weight:bold;letter-spacing:.06em;margin-bottom:3px;}
#flash .n-title{display:block;font:400 17px/1.22 Baskerville,Georgia,serif;}
#flash .f-item:hover .n-title{text-decoration:underline;}
#flash .n-meta{display:block;font-size:11px;color:#777;margin-top:5px;}
.news .n-since{font-size:11px;font-weight:bold;letter-spacing:.06em;text-transform:uppercase;padding:12px 0 2px;border-bottom:1px solid #000;margin-top:6px;}
@media(max-width:640px){ #flash{right:8px;left:8px;width:auto;bottom:44px;} }
