/* itspricedin.lol — Windows 95 on acid. 98.css does the chrome; this does the drugs. */
:root {
  --acid-1: #ff00cc; --acid-2: #00ffcc; --acid-3: #ffee00; --acid-4: #3300ff; --acid-5: #ff6600;
  --win-bg: #c0c0c0; --taskbar-h: 30px;
  /* the idle clock: every always-on animation steps on this grid (durations are multiples of it, timing is steps()),
     so the compositor has a few frames a second to draw instead of sixty; a longer tick is cheaper and choppier */
  --tick: 250ms;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: "Pixelated MS Sans Serif", "MS Sans Serif", Arial, sans-serif; font-size: 12px; color: #000; background: #008080; overflow-x: hidden; }
a { color: #0000ee; }
a:visited { color: #551a8b; }
/* the wallpaper: painted once, then only the compositor moves it, four times a second. The rainbow is a layer three
   viewports wide that slides (transform) instead of scrolling a 500% background-position; the old filter: saturate(1.5)
   contrast(1.05) is baked into its stops. The rays are one pre-painted conic gradient the size of the viewport diagonal
   (soft wedges, plain alpha, no blend mode) rotating around the centre. ::after is the static dot screen. */
#wallpaper { position: fixed; inset: 0; z-index: 0; overflow: hidden; contain: layout paint; }
#wallpaper .wp-rainbow { position: absolute; top: 0; bottom: 0; left: 0; width: 300%;
  background: linear-gradient(124deg, #ff0800 0%, #ff0101 12.5%, #ffba00 25%, #eef500 37.5%, #00ff02 50%, #00f7ff 62.5%, #250fff 75%, #ff00ff 87.5%, #ff0800 100%);
  animation: rainbow-slide calc(var(--tick) * 96) steps(48) infinite; will-change: transform; }
#wallpaper .wp-rays { position: absolute; left: 50%; top: 50%; width: max(142vw, 142vh); height: max(142vw, 142vh); width: hypot(100vw, 100vh); height: hypot(100vw, 100vh);
  translate: -50% -50%; background: repeating-conic-gradient(from 0deg, rgba(255,255,255,0) 0deg, rgba(255,255,255,.13) 7.5deg, rgba(255,255,255,0) 15deg, rgba(255,255,255,0) 30deg);
  animation: spin calc(var(--tick) * 240) steps(240) infinite; will-change: transform; }
#wallpaper::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(0,0,0,.35) 1px, transparent 1px);
  background-size: 4px 4px; opacity: .55;
}
body.ultra-acid #wallpaper { filter: saturate(2) contrast(1.35) hue-rotate(90deg); }
body.ultra-acid #wallpaper .wp-rainbow { animation-duration: calc(var(--tick) * 12); animation-timing-function: steps(24); }   /* the frantic mode keeps 8 frames a second */
body.ultra-acid .desk-win { animation: wobble 1.2s ease-in-out infinite; }
@keyframes rainbow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes rainbow-slide { 0% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(-66.667%, 0, 0); } 100% { transform: translate3d(0, 0, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide { to { background-position: 300% 0; } }
@keyframes acid-crawl { to { background-position: 133.333% 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes wobble { 0%,100% { transform: rotate(-.6deg); } 50% { transform: rotate(.6deg); } }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes stripes { to { background-position: 40px 0; } }
@keyframes hue { to { filter: hue-rotate(360deg); } }

#desktop { position: relative; z-index: 1; min-height: 100vh; padding: 8px 8px calc(var(--taskbar-h) + 90px) 8px; display: grid; grid-template-columns: 84px 1fr; grid-template-rows: auto 1fr; gap: 8px; }
#icons { grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.dicon { display: flex; flex-direction: column; align-items: center; width: 76px; color: #fff; text-decoration: none; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; font-size: 11px; text-align: center; }
.dicon span { font-size: 30px; line-height: 1; margin-bottom: 4px; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.6)); }
.dicon:hover span { animation: hue 1.5s linear infinite; }
.dicon:hover { text-decoration: underline; }
#ticker { background: #000; color: #0f0; font-family: "Courier New", monospace; font-size: 13px; padding: 3px 0; border: 2px solid; border-color: #dfdfdf #0a0a0a #0a0a0a #dfdfdf; min-width: 0; overflow: clip; white-space: nowrap; }   /* clip, not hidden: focusing a link in the run must not scroll the strip */
#ticker a { color: #0f0; text-decoration: none; }
#ticker a:hover { color: #ff0; text-decoration: underline; }
#ticker .sep { color: #f0f; }
/* the ticker scrolls like a <marquee behavior=scroll> without being one: Firefox drives the real element off a layout timer
   and repaints the whole strip every tick, most of a core while the page just sits there. Here the text is one run moved
   by a transform keyframe, which the compositor plays on its own; nothing is laid out or painted while it scrolls. The run
   starts with a pad of one strip width, so it enters from the right edge and travels its own width (pad + text) before
   it repeats, seamlessly. It moves in steps, 6px every 85ms as scrollamount=6 did: the compositor has a new position
   to show 12 times a second, not 60, and the look is the one the marquee had. The values here are the no-script pace;
   tape.js sets the duration and the step count from the run's width so the speed is ~70px/s in 6px steps whatever the
   text and the viewport, and keeps the strip in place across a rebuild. */
.ticker-run { display: inline-block; padding-left: 100%; white-space: nowrap; will-change: transform; animation: ticker-scroll 200s steps(2400) infinite; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }
#ticker:hover .ticker-run { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .ticker-run { animation: none; padding-left: 0; } }
#windows { position: relative; display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; gap: 14px; }

/* windows */
.desk-win { width: 440px; max-width: 100%; box-shadow: 4px 4px 0 rgba(0,0,0,.35); transition: box-shadow .1s; }
.desk-win.w-hero { width: 760px; }
.desk-win.w-wide { width: 100%; }
.desk-win.w-mid { width: 620px; }
.desk-win.w-narrow { width: 420px; }
.desk-win.maximized { position: fixed !important; inset: 0 0 var(--taskbar-h) 0; width: auto !important; max-width: none; transform: none !important; z-index: 900 !important; overflow: auto; }
.desk-win.maximized .window-body { max-height: none; }
.desk-win .window-body { max-height: 70vh; overflow: auto; }
.desk-win.maximized .window-body { max-height: calc(100vh - 70px); }
/* the acid stripe slides a period every 6s in steps on the tick (a repaint of one 22px bar four times a second, on
   its own layer). Only the focused page window's bar moves: the others hold their gradient still, as they do once one
   is focused; before anything is focused the first window of the page is the one that moves. Toasts, PAYOUT, the
   achievement toast and client-made windows keep their own rules below. */
.title-bar { cursor: move; user-select: none; background: linear-gradient(90deg, var(--acid-4), var(--acid-1), var(--acid-5), var(--acid-2), var(--acid-4)); background-size: 300% 100%; animation: slide calc(var(--tick) * 48) steps(48) infinite; }
#windows .pgroup .desk-win .title-bar { animation-play-state: paused; }
#windows:has(.pgroup .desk-win.inactive) .pgroup .desk-win:not(.inactive) .title-bar,
#windows:not(:has(.pgroup .desk-win.inactive)) .pgroup .desk-win:first-child .title-bar { animation-play-state: running; will-change: transform; }
.desk-win.inactive .title-bar { animation-play-state: paused; filter: grayscale(.6); }
.title-bar-text { text-shadow: 1px 1px 0 #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title-bar .ico { text-shadow: 1px 1px 0 #000; }
.toast { width: 460px; }
/* while any window is maximized its menus drop down where the toasts mount; the toasts dock bottom-right above the
   taskbar instead (desktop.js syncDock stacks them with --dock-y), in their overlay z band, and move back when it is not */
#windows.dock-toasts .toast { position: fixed; left: auto; top: auto; right: 12px; bottom: calc(var(--taskbar-h) + 10px + var(--dock-y, 0px)); margin: 0; max-width: calc(100vw - 24px); transform: none !important; }
.toast-ok .title-bar { background: linear-gradient(90deg, #008000, #00ff00, #008000); }
.toast-err .title-bar { background: linear-gradient(90deg, #800000, #ff0000, #800000); }

/* content */
.hero { text-align: center; padding: 8px 4px; }
.acid-text { font-family: "Comic Sans MS", "Comic Neue", "Chalkboard SE", cursive; font-size: 46px; line-height: 1; margin: 6px 0 10px; letter-spacing: -1px;
  background: linear-gradient(90deg, #ff0000, #ff9900, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000); background-size: 400% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: acid-crawl calc(var(--tick) * 24) steps(24) infinite; filter: drop-shadow(3px 3px 0 #000); will-change: transform; }
.acid-text .tm { font-size: 20px; color: #fff; -webkit-text-fill-color: #fff; }
.tagline { font-size: 13px; max-width: 620px; margin: 0 auto 8px; }
.warn { color: #a00000; font-weight: bold; }
.blink { animation: blink calc(var(--tick) * 4) step-end infinite; }
.hero-actions { justify-content: center; margin: 10px 0; flex-wrap: wrap; }
.btn { display: inline-block; background: silver; color: #000; text-decoration: none; padding: 0 12px; min-height: 23px; line-height: 23px; min-width: 75px; text-align: center; border: none;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf; }
.btn:active { box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey; }
.btn:visited { color: #000; }
.btn-primary, button.btn-primary { font-weight: bold; outline: 1px dotted #000; outline-offset: -5px; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 10px 0 4px; }
.stat { background: #000; color: #0f0; font-family: "Courier New", monospace; padding: 6px 12px; min-width: 120px; text-align: center; border: 2px solid; border-color: #dfdfdf #0a0a0a #0a0a0a #dfdfdf; }
.stat b { display: block; font-size: 20px; color: #ff0; }
.stat span { font-size: 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.card { display: block; background: #fff; padding: 8px; text-decoration: none; color: #000; min-height: 100px; }
.card:hover { background: #ffffe0; }
.card-q { font-weight: bold; margin-bottom: 6px; }
.card-p { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.card-meta { font-size: 10px; color: #444; }
.chip { display: inline-block; background: #e8e8e8; border: 1px solid #888; padding: 0 5px; font-size: 11px; line-height: 16px; white-space: nowrap; }
.chip-win, .chip-ok { background: #b6ffb6; border-color: #060; }
.chip-err { background: #ffb6b6; border-color: #600; }
.chip-new { background: #ffe600; border-color: #806000; color: #000; font-weight: bold; font-size: 9px; letter-spacing: 1px; animation: blink calc(var(--tick) * 6) steps(1) infinite; }
/* ranks + honors (derived, worthless, non-transferable) */
.rank-tag { display: inline-block; font-family: "Courier New", monospace; font-size: 10px; line-height: 14px; padding: 0 4px; background: #000080; color: #fff; white-space: nowrap; vertical-align: middle; }
.rank-tag:empty { display: none; }
.rank-tag[data-rank="hunter"] { background: #006400; }
.rank-tag[data-rank="redteam"] { background: #a00000; }
.rank-tag[data-rank="apt"] { background: #4b0082; }
.rank-tag[data-rank="nation"] { background: #000; color: var(--acid-3); }
.stat-title b { font-size: 15px; }
.rank-next { background: #fff; border: 1px solid #888; padding: 6px 8px; margin: 4px 0 8px; font-size: 11px; }
.rank-bar { height: 14px; margin-top: 6px; background: #dcdcdc; border: 1px solid #777; box-shadow: inset 1px 1px 0 #999; }
.rank-fill { height: 100%; background: repeating-linear-gradient(90deg, #000080 0 8px, #fff 8px 10px); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.badge { display: flex; gap: 8px; align-items: flex-start; background: #fff; border: 1px solid #888; padding: 6px; min-width: 0; }
.badge .b-ico { font-size: 26px; line-height: 1; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.35)); }
.badge b { display: block; }
.badge small { display: block; font-size: 10px; color: #444; }
.badge em { display: block; font-size: 10px; font-style: normal; font-family: "Courier New", monospace; color: #006400; margin-top: 2px; }
.badge.locked { background: #e8e8e8; color: #666; }
.badge.locked .b-ico { filter: grayscale(1); opacity: .45; }
.badge.locked em { color: #888; }
.badge.earned:hover .b-ico { animation: bounce .8s ease-in-out infinite; }
.tbl-wrap { overflow-x: auto; background: #fff; border: 2px solid; border-color: grey #fff #fff grey; }
table.interactive { width: 100%; }
table.interactive th { text-align: left; }
td.num, th.num { text-align: right; white-space: nowrap; }
.up { color: #007700; font-weight: bold; }
.down { color: #cc0000; font-weight: bold; }
.price { font-family: "Courier New", monospace; font-weight: bold; }
.muted { color: #444; font-size: 11px; }
.pad { padding: 8px; background: #fff; }
.desc { margin-top: 8px; white-space: pre-wrap; }
.mkt-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; font-size: 11px; }
.outcomes { display: grid; gap: 6px; margin: 8px 0; }
.outcome { display: grid; grid-template-columns: 160px 1fr 64px 110px; gap: 8px; align-items: center; background: #fff; padding: 6px; border: 1px solid #888; }
.outcome-win { background: #d8ffd8; border-color: #060; }
.o-label { font-weight: bold; overflow: hidden; text-overflow: ellipsis; }
.o-bar { height: 16px; background: #dcdcdc; border: 1px solid #777; box-shadow: inset 1px 1px 0 #999; }
.o-fill { height: 100%; background: repeating-linear-gradient(45deg, #00cc66 0 10px, #33ff99 10px 20px); background-size: 40px 40px; animation: stripes 1s linear infinite; }
.o-price { font-family: "Courier New", monospace; font-weight: bold; font-size: 15px; text-align: right; }
.quote { margin: 8px 0; min-height: 34px; }
.quick button { min-width: 48px; }
.pos-table th.num { text-align: right; }
.pos-table tfoot th, .pos-table tfoot td { border-top: 2px solid #888; font-weight: bold; }
.pos-actions { white-space: nowrap; }
.pos-actions button { min-width: 0; padding: 0 6px; font-size: 11px; }
.legend { margin-top: 6px; font-family: "Courier New", monospace; font-size: 11px; }
.legend span { margin-right: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 4px; border: 1px solid #000; }
#chart { width: 100%; height: 220px; background: #000; border: 2px solid; border-color: grey #fff #fff grey; image-rendering: pixelated; }
.comments { list-style: none; padding: 0; margin: 8px 0 0; }
.comments li { background: #fff; border: 1px solid #888; padding: 6px; margin-bottom: 6px; white-space: pre-wrap; word-break: break-word; }
.intel-list { padding-left: 16px; margin: 4px 0; }
.intel-list li { margin-bottom: 3px; }
.filters { flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

/* markets: one Explorer-style toolbar, then rows you can actually scan */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 3px 4px; margin-bottom: 6px; border-top: 1px solid grey; border-bottom: 1px solid #fff; box-shadow: inset 0 1px #fff, inset 0 -1px grey; }
.tb-group { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.tb-group label { white-space: nowrap; }
.tb-sep { width: 0; height: 20px; border-left: 1px solid grey; border-right: 1px solid #fff; }
.tb-search { flex: 1 1 150px; }
.tb-search input { flex: 1 1 80px; min-width: 0; width: 100%; }
.toolbar select { height: 21px; max-width: 110px; }
.toolbar button, .toolbar .btn { min-width: 0; min-height: 21px; line-height: 21px; padding: 0 8px; white-space: nowrap; }
.tb-view.pressed { background: #e8e8e8; box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey; }
.tb-new { margin-left: auto; font-weight: bold; }
input[type=search] { -webkit-appearance: none; appearance: none; border: none; border-radius: 0; background: #fff; height: 21px; padding: 3px 4px; font-family: inherit; font-size: 12px;
  box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; }
.mlist { background: #fff; padding: 0; overflow: hidden; }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) 130px 84px 78px 96px 108px; gap: 10px; align-items: center; min-width: 0; padding: 5px 8px; color: #000; text-decoration: none; border-bottom: 1px dotted #aaa; }
.mrow:visited { color: #000; }
.mrow:hover, .mrow:focus { background: #ffffe0; outline: none; }
.mrow:hover .mq, .mrow:focus .mq { text-decoration: underline; }
.mrow-hot { background: #fff3b0; }
.mq { font-weight: bold; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot-badge { display: inline-block; vertical-align: middle; margin-right: 6px; padding: 0 4px; font-size: 9px; color: #000; border: 1px solid #000;
  background: linear-gradient(90deg, var(--acid-5), var(--acid-1), var(--acid-3), var(--acid-5)); background-size: 300% 100%; animation: slide 3s linear infinite; }
.pill { display: inline-flex; align-items: center; justify-content: space-between; gap: 6px; max-width: 100%; min-width: 0; padding: 1px 6px; background: #000; color: #0f0;
  font-family: "Courier New", monospace; white-space: nowrap; border: 2px solid; border-color: #dfdfdf #0a0a0a #0a0a0a #dfdfdf; }
.pill-label { font-size: 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pill-price { font-size: 16px; color: #ff0; }
.pill-win { background: #b6ffb6; color: #030; }
.pill-win .pill-price { color: #060; }
.spark { display: block; width: 80px; height: 20px; background: #f4f4f4; border: 1px solid #999; }
.spark polyline { fill: none; stroke: #555; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.spark-up polyline { stroke: #007700; }
.spark-down polyline { stroke: #cc0000; }
.chg { font-family: "Courier New", monospace; white-space: nowrap; }
.chg.flat { color: #666; }
.chg small, .vol small { margin-left: 2px; font-size: 9px; font-weight: normal; color: #666; }
.vol { font-family: "Courier New", monospace; text-align: right; white-space: nowrap; }
.closes { font-size: 11px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-line { margin: 6px 0 0; }
@media (max-width: 1000px) {
  .mrow { display: flex; flex-wrap: wrap; gap: 4px 10px; }
  .mq { flex: 1 0 100%; }
  .pill { max-width: 200px; }
  .spark { width: 72px; }
  .vol { text-align: left; }
}
/* the same rows live in narrower windows on the index (Featured, Market Watch, each Hot column): the list sizes its
   columns to its own box, drops the volume when it gets tight and wraps like the phone layout when it gets tighter */
.mlist { container-type: inline-size; }
@container (max-width: 720px) {
  .mrow { grid-template-columns: minmax(0, 1fr) 112px 72px 68px 92px; gap: 8px; padding: 5px 6px; }
  .mrow .vol { display: none; }
  .mrow .spark { width: 72px; }
}
@container (max-width: 430px) {
  .mrow { display: flex; flex-wrap: wrap; gap: 4px 10px; }
  .mrow .mq { flex: 1 0 100%; }
  .mrow .pill { max-width: 200px; }
  .mrow .vol { display: inline; text-align: left; }
}
/* category chips over the Markets list: links, so the router handles them; the pressed one is the current folder */
.cats { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
.cat-chip { text-decoration: none; color: #000; }
.cat-chip:visited { color: #000; }
.cat-chip:hover, .cat-chip:focus { background: #ffffe0; border-color: #000; outline: none; }
.cat-chip.chip-on { background: #000080; border-color: #000; color: #fff; font-weight: bold; }
.cat-chip.chip-on:hover, .cat-chip.chip-on:focus { background: #000080; outline: 1px dotted #fff; outline-offset: -3px; }
/* the Hot window: two lists side by side when there is room */
.hot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.hot-col { min-width: 0; }
.hot-h { font-size: 12px; font-weight: bold; margin: 0 0 4px; }
.hot-h small { font-weight: normal; color: #444; font-size: 10px; margin-left: 4px; }
.hot-foot { margin: 6px 0 0; }
@media (max-width: 1000px) { .hot { grid-template-columns: minmax(0, 1fr); } }
/* the Markets folder: Explorer, 1995, nine folders and no toolbar worth the pixels */
#folder { position: fixed; left: 130px; top: 96px; width: 560px; max-width: calc(100vw - 146px); }
.folder-addr { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; }
.folder-path { flex: 1; min-width: 0; background: #fff; padding: 2px 4px; font-family: "Courier New", monospace; font-size: 12px; line-height: 17px;
  box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; }
.folder { display: grid; grid-template-columns: repeat(auto-fill, 92px); justify-content: start; gap: 8px 2px; padding: 10px 6px; background: #fff; min-height: 150px;
  box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; }
.ficon { display: flex; flex-direction: column; align-items: center; width: 92px; padding: 4px 2px; color: #000; text-decoration: none; font-size: 11px; text-align: center; line-height: 1.2; }
.ficon:visited { color: #000; }
.ficon span { font-size: 30px; line-height: 1; margin-bottom: 4px; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.3)); }
.ficon small { font-size: 9px; color: #444; }
.ficon:hover, .ficon:focus { background: #000080; color: #fff; outline: 1px dotted #ff0; outline-offset: -2px; }
.ficon:hover small, .ficon:focus small { color: #ddd; }
.ficon:hover span { animation: hue 1.5s linear infinite; }
.folder-status { margin: 6px 0 0; }
.wizard { display: flex; gap: 12px; }
.wiz-side { width: 70px; background: linear-gradient(180deg, #000080, #1084d0); color: #fff; font-size: 28px; text-align: center; padding-top: 10px; }
.wiz-body { flex: 1; }
.notepad { background: #fff; border: 2px solid; border-color: grey #fff #fff grey; padding: 8px; overflow: auto; }
.notepad pre { font-family: "Courier New", monospace; font-size: 12px; margin: 0; white-space: pre-wrap; }
textarea, input[type=text], input[type=number], input[type=password], input[type=date], input:not([type]) { font-family: inherit; font-size: 12px; }
textarea { width: 100%; }
.field-row-stacked input:not([type=checkbox]):not([type=radio]) { width: 100%; }

/* vulny */
#vulny { position: fixed; right: 14px; bottom: calc(var(--taskbar-h) + 10px); z-index: 50; width: 220px; cursor: pointer; }
#vulny .bubble { background: #ffffe1; border: 1px solid #000; padding: 6px 8px; font-size: 11px; box-shadow: 2px 2px 0 rgba(0,0,0,.4); position: relative; margin-bottom: 8px; }
#vulny .bubble::after { content: ""; position: absolute; right: 24px; bottom: -8px; border: 8px solid transparent; border-top-color: #000; border-bottom: 0; }
#vulny .clip { font-size: 44px; text-align: right; animation: bounce calc(var(--tick) * 10) steps(10) infinite; text-shadow: 2px 2px 0 rgba(0,0,0,.5); will-change: transform; }

/* taskbar */
#taskbar { position: fixed; left: 0; right: 0; bottom: 0; height: var(--taskbar-h); background: var(--win-bg); border-top: 2px solid; border-color: #fff; box-shadow: 0 -1px 0 #dfdfdf; display: flex; align-items: center; gap: 4px; padding: 0 4px; z-index: 1000; }
#start-btn { font-weight: bold; min-width: 0; padding: 0 8px; height: 22px; display: flex; align-items: center; gap: 4px; }
#start-btn .flag { color: #f0f; font-size: 14px; }
#tasks { flex: 1; display: flex; gap: 3px; overflow: hidden; }
#tasks .task { height: 22px; min-width: 0; max-width: 160px; flex: 0 1 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 6px; text-align: left; }
#tasks .task.active { font-weight: bold; box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey; background: repeating-conic-gradient(#fff 0 25%, var(--win-bg) 0 50%) 0 0 / 2px 2px; }
#tasks .task.min { font-weight: normal; }
/* a page group's button: icon + title, a count when it holds more than one window, a chevron for the flyout */
#tasks .task-group { display: inline-flex; align-items: center; gap: 3px; }
#tasks .task-group .task-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tasks .task-count { flex: none; font-size: 10px; line-height: 12px; min-width: 8px; padding: 0 3px; border: 1px solid #0a0a0a; background: #fff; color: #000; text-align: center; font-weight: normal; }
#tasks .task-chev { flex: none; font-size: 9px; line-height: 1; padding: 0 1px; }
#tasks .task.partial .task-label { font-style: italic; }
.task-flyout { position: absolute; bottom: var(--taskbar-h); left: 4px; z-index: 1001; min-width: 170px; max-width: min(320px, calc(100vw - 8px)); padding: 3px; display: flex; flex-direction: column; background: var(--win-bg); box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf; }
.task-flyout .task-item { display: block; width: 100%; text-align: left; padding: 5px 10px; color: #000; background: none; border: none; box-shadow: none; font: inherit; cursor: pointer; min-height: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-flyout .task-item.min { color: #444; font-style: italic; }
.task-flyout .task-item.active { font-weight: bold; }
.task-flyout .task-item:hover, .task-flyout .task-item:focus { background: #000080; color: #fff; outline: none; }
.task-flyout .task-divider { border-top: 1px solid grey; border-bottom: 1px solid #fff; margin: 3px 0; }
/* a page group is a set of windows mounted together by the router; it has no box of its own, so the flex flow is unchanged */
.pgroup { display: contents; }
#tray { display: flex; gap: 6px; align-items: center; height: 22px; padding: 0 6px; box-shadow: inset -1px -1px #fff, inset 1px 1px grey; font-size: 11px; }
.tray-item { text-decoration: none; color: #000; white-space: nowrap; }
#sound-btn { background: none; border: none; box-shadow: none; min-width: 0; min-height: 0; padding: 0 2px; font-size: 13px; line-height: 1; cursor: pointer; }
#sound-btn:hover { box-shadow: inset -1px -1px #fff, inset 1px 1px grey; }
#sound-btn:active { box-shadow: inset 1px 1px #fff, inset -1px -1px grey; }
#start-menu { position: fixed; left: 2px; bottom: var(--taskbar-h); z-index: 1001; background: var(--win-bg); display: flex; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf; padding: 3px; min-width: 210px; }
#start-menu .side { width: 24px; background: linear-gradient(180deg, #000080, #ff00cc); color: #fff; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 16px; padding: 6px 2px; letter-spacing: 1px; }
#start-menu .side b { color: #ff0; font-weight: bold; }
#start-menu ul { list-style: none; margin: 0; padding: 0; flex: 1; }
#start-menu li a, #start-menu li .linkish { display: block; width: 100%; text-align: left; padding: 6px 10px; text-decoration: none; color: #000; background: none; border: none; box-shadow: none; font: inherit; cursor: pointer; min-height: 0; min-width: 0; }
#start-menu li a:hover, #start-menu li .linkish:hover { background: #000080; color: #fff; }
#start-menu li.divider { border-top: 1px solid grey; border-bottom: 1px solid #fff; margin: 3px 0; }
#start-menu form { margin: 0; }

/* bsod */
#bsod, .bsod-page { position: fixed; inset: 0; background: #0000aa; color: #fff; font-family: "Courier New", monospace; font-size: 15px; z-index: 5000; display: flex; align-items: center; justify-content: center; padding: 24px; cursor: pointer; }
.bsod-page { position: static; min-height: 100vh; }
.bsod-inner { max-width: 720px; line-height: 1.5; }
.bsod-title { display: inline-block; background: #aaaaaa; color: #0000aa; padding: 0 6px; font-weight: bold; }
.bsod-center { text-align: center; }
.bsod-center a { color: #fff; text-decoration: none; }
/* the kernel-panic flavour of the error page: #panic's look, server-rendered (main.bsod_flavour) */
.bsod-page.panic-page { display: block; background: #000; color: #ddd; font-size: 13px; line-height: 1.3; padding: 16px; }
.panic-page .panic-log { margin: 0; padding: 0; background: none; box-shadow: none; color: inherit; white-space: pre-wrap; word-break: break-word; font: inherit; }
.panic-page .panic-hint { margin: 4px 0 0; animation: blink 1s step-end infinite; }
.panic-page .panic-hint a { color: inherit; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .panic-page .panic-hint { animation: none; } }

@media (max-width: 820px) {
  #desktop { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; padding-bottom: calc(var(--taskbar-h) + 20px); }
  .field-row { flex-wrap: wrap; row-gap: 4px; }
  #icons { grid-row: auto; flex-direction: row; flex-wrap: wrap; gap: 6px; justify-content: center; }
  .dicon { width: 64px; font-size: 10px; }
  .dicon span { font-size: 24px; }
  .desk-win, .desk-win.w-hero, .desk-win.w-wide, .desk-win.w-mid, .desk-win.w-narrow { width: 100%; max-width: 100%; }
  .acid-text { font-size: 32px; }
  .outcome { grid-template-columns: 1fr 70px; }
  .o-bar { grid-column: 1 / -1; }
  .o-pos { grid-column: 1 / -1; }
  #vulny { display: none; }
  .title-bar { cursor: default; }
}
@media (prefers-reduced-motion: reduce) {
  #wallpaper, #wallpaper .wp-rainbow, #wallpaper .wp-rays, .title-bar, .acid-text, .o-fill, #vulny .clip, .dicon:hover span, .ficon:hover span, .badge.earned:hover .b-ico, .hot-badge, .chip-new { animation: none !important; }
}

/* xterm: for the people who alt-tabbed here from a real terminal */
.dicon-btn { background: none; border: 0; box-shadow: none; min-height: 0; min-width: 0; padding: 0; cursor: pointer; font-family: inherit; }
.dicon-btn:focus-visible { outline: 1px dotted #fff; outline-offset: 2px; }
#xterm { position: fixed; left: 120px; top: 84px; width: 680px; max-width: calc(100vw - 136px); }
#xterm .window-body { background: #000; color: #0f0; padding: 0; max-height: none; overflow: hidden; }
#xterm-screen { font-family: "Courier New", monospace; font-size: 13px; line-height: 1.25; height: 380px; max-height: 60vh; overflow: auto; padding: 6px; cursor: text; }
/* the #xterm id outranks .desk-win.maximized, so the maximized geometry is restated at id specificity;
   the window becomes a flex column and the screen takes whatever the title bar leaves, at any viewport */
#xterm.maximized { left: 0; top: 0; right: 0; bottom: var(--taskbar-h); max-width: none; display: flex; flex-direction: column; overflow: hidden; }
#xterm.maximized .window-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#xterm.maximized #xterm-screen { flex: 1; min-height: 0; height: auto; max-height: none; }
#xterm-out { margin: 0; padding: 0; background: none; box-shadow: none; font: inherit; white-space: pre-wrap; word-break: break-word; }
#xterm-form { display: flex; margin: 0; }
#xterm-ps1 { white-space: pre; display: inline; font: inherit; color: inherit; }
input[type=text]#xterm-in { flex: 1; min-width: 0; height: auto; background: transparent; border: 0; box-shadow: none; padding: 0; color: #0f0; font: inherit; caret-color: #0f0; outline: none; }
#xterm-screen ::selection { background: #0f0; color: #000; }
.sl { position: fixed; left: 0; top: 36%; z-index: 4000; margin: 0; padding: 0; background: none; box-shadow: none; color: #fff; text-shadow: 2px 2px 0 #000; font-family: "Courier New", monospace; font-size: 13px; line-height: 1.1; white-space: pre; pointer-events: none; animation: sl-run 4s linear forwards; }
@keyframes sl-run { from { transform: translateX(100vw); } to { transform: translateX(-100%); } }
#panic { position: fixed; inset: 0; z-index: 5001; background: #000; color: #ddd; font-family: "Courier New", monospace; font-size: 13px; line-height: 1.3; padding: 16px; overflow: auto; cursor: pointer; outline: none; }
#panic pre { margin: 0; padding: 0; background: none; box-shadow: none; color: inherit; white-space: pre-wrap; word-break: break-word; font: inherit; }
#panic .panic-hint { margin: 4px 0 0; animation: blink 1s step-end infinite; }
@media (max-width: 820px) {
  #folder { left: 8px; right: 8px; top: 8px; width: auto; max-width: none; }
  #xterm { left: 8px; right: 8px; top: 8px; width: auto; max-width: none; }
  #xterm-screen { height: 50vh; }
  .sl { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .sl { animation: none; display: none; }
  #panic .panic-hint { animation: none; }
}

/* order ticket: the Trade window grew up. Radios wear 98.css tab and button clothes so the keyboard still drives everything. */
.ticket .ticket-tabs { display: flex; flex-wrap: wrap; align-items: flex-end; padding-left: 3px; margin: 0 0 -2px; position: relative; z-index: 2; }
.ticket .ticket-tabs input[type=radio] + label { margin: 0; padding: 5px 10px 6px; line-height: 13px; position: relative; cursor: pointer; background: silver; color: #222; max-width: 220px;
  border-top-left-radius: 3px; border-top-right-radius: 3px; box-shadow: inset -1px 0 #0a0a0a, inset 1px 1px #dfdfdf, inset -2px 0 grey, inset 2px 2px #fff; }
.ticket .ticket-tabs input[type=radio] + label::before, .ticket .ticket-tabs input[type=radio] + label::after,
.ticket .ticket-side input[type=radio] + label::before, .ticket .ticket-side input[type=radio] + label::after { display: none; content: none; }
.ticket .ticket-tabs input[type=radio]:checked + label { margin-top: -2px; padding-bottom: 8px; z-index: 8; font-weight: bold; }
.ticket .ticket-tabs input[type=radio]:focus + label { outline: 1px dotted #000; outline-offset: -4px; }
.ticket .tab-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.ticket .tab-price { font-family: "Courier New", monospace; color: #000080; margin-left: 4px; }
.ticket .ticket-panel { position: relative; z-index: 1; background: silver; padding: 10px; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff; }
.ticket .ticket-side { display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; }
.ticket .ticket-side input[type=radio] + label { margin: 0; min-width: 84px; min-height: 23px; justify-content: center; padding: 0 12px; cursor: pointer; background: silver; color: #222;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf; }
.ticket .ticket-side input[type=radio] + label + input + label { margin-left: -1px; }
.ticket .ticket-side input[type=radio]:checked + label { font-weight: bold; box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='2' height='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h1v1H0zM1 1h1v1H1z' fill='%23fff'/%3E%3C/svg%3E"); }
.ticket #side-buy:checked + label { color: #006400; }
.ticket #side-sell:checked + label { color: #a00000; }
.ticket .ticket-side input[type=radio]:focus + label { outline: 1px dotted #000; outline-offset: -4px; }
.ticket .ticket-held { margin-left: auto; }
.ticket .ticket-amount { margin-top: 8px; }
.ticket input[type=number]#amount { font-family: "Courier New", monospace; font-size: 15px; font-weight: bold; height: 28px; }
.ticket input[type=number]:focus-visible { outline: 1px dotted #000; outline-offset: 1px; }
.ticket input[aria-invalid=true] { box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #a00000; }
.ticket .ticket-slider { margin: 10px 2px 2px; }
.ticket input[type=range] { display: block; height: 21px; margin: 0; cursor: pointer; }
.ticket input[type=range]:focus-visible { outline: 1px dotted #000; outline-offset: 3px; }
.ticket .ticket-range-ends { display: flex; justify-content: space-between; font-family: "Courier New", monospace; font-size: 10px; margin-top: 2px; }
.ticket .ticket-presets { margin-top: 6px; }
.ticket .ticket-err { margin: 6px 0 0; color: #a00000; font-weight: bold; }
.ticket .ticket-err:empty { display: none; }
.ticket .quote { font-size: 11px; }
.ticket .quote.pending { color: #666; }
.ticket .ticket-sum { font-weight: bold; margin: 0 0 6px; }
.ticket .ticket-break { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; margin: 0; font-family: "Courier New", monospace; }
.ticket .ticket-break dt { color: #444; }
.ticket .ticket-break dd { margin: 0; text-align: right; font-weight: bold; white-space: nowrap; }
.ticket .ticket-break .arrow { color: #000080; }
.ticket .ticket-pool { margin: 6px 0 0; color: #333; }
.ticket .ticket-go { display: block; width: 100%; min-height: 36px; font-size: 14px; font-weight: bold; margin-top: 8px; }
.ticket .ticket-go.confirming { background: #ffe600; color: #000; animation: blink 1s step-end infinite; }
.ticket .ticket-go:focus-visible { outline: 2px dotted #000; outline-offset: -6px; }
.ticket .ticket-foot { margin: 8px 0 0; }
@media (prefers-reduced-motion: reduce) { .ticket .ticket-go.confirming { animation: none; } }
@media (max-width: 820px) {
  .ticket .ticket-tabs input[type=radio] + label { max-width: 100%; }
  .ticket .ticket-held { margin-left: 0; flex-basis: 100%; margin-top: 4px; }
}
/* the Tape: fills roll in at the top; whales get a blue title bar and the modem */
.tape-when { white-space: nowrap; }
.tape-foot { margin: 6px 0 0; }
.tape-row.tape-new > td { animation: tape-flash 2.4s ease-out forwards; }
@keyframes tape-flash { 0% { background: #ffee00; } 60% { background: #ffee00; } 100% { background: transparent; } }
.tape-row.tape-whale td:first-child::before { content: "🐋 "; }
.toast-whale .title-bar { background: linear-gradient(90deg, #000080, #0000ff, #00ccff, #000080); }
.toast-whale .whale-text { margin: 0; font-weight: bold; }
@media (prefers-reduced-motion: reduce) {
  .tape-row.tape-new > td { animation: none; background: #ffee00; }
}
/* resolution moments: the tray balloon, the PAYOUT window, the loser's blue screen */
#notify-btn { background: none; border: none; box-shadow: none; min-width: 0; min-height: 0; padding: 0 2px; font-size: 13px; line-height: 1; cursor: pointer; position: relative; }
#notify-btn:hover { box-shadow: inset -1px -1px #fff, inset 1px 1px grey; }
.tray-badge { position: absolute; top: -4px; right: -6px; min-width: 14px; height: 14px; line-height: 14px; padding: 0 3px; border-radius: 7px; background: #f00; color: #fff; font-size: 9px; font-weight: bold; text-align: center; font-family: Arial, sans-serif; }
#notify.desk-win { position: fixed; right: 244px; bottom: calc(var(--taskbar-h) + 10px); width: 380px; z-index: 950; }
#notify .window-body { background: #ffffe1; max-height: 50vh; }
.notify-list { list-style: none; margin: 0 0 6px; padding: 0; }
.notify-list li { padding: 5px 4px; border-bottom: 1px dotted #888; line-height: 1.4; }
.notify-list li:last-child { border-bottom: 0; }
.notify-actions { justify-content: flex-end; margin: 0; }
#payout.desk-win { position: fixed; left: calc(50% - 230px); top: 110px; width: 460px; z-index: 960; }
/* windows made client-side (desk95.spawn): over the desktop at x/y like the balloon, in the overlay band, never saved */
.desk-win.w-loose { position: absolute; left: 0; top: 0; }
/* system toasts (desk95.toast): the classic navy; the achievement one borrows PAYOUT's gold */
.toast-sys .title-bar { background: linear-gradient(90deg, #000080, #1084d0, #000080); }
.toast-egg .title-bar { background: linear-gradient(90deg, #ffd700, #fff8b0, #ffd700, #ff9900, #ffd700); background-size: 300% 100%; animation: slide calc(var(--tick) * 24) steps(24) infinite; }
.toast-egg .title-bar-text { color: #000; text-shadow: 1px 1px 0 #fff; }
.toast-egg .window-body .egg-toast { margin: 0; }
#payout .title-bar { background: linear-gradient(90deg, #ffd700, #fff8b0, #ffd700, #ff9900, #ffd700); background-size: 300% 100%; animation: slide calc(var(--tick) * 24) steps(24) infinite; }
#payout .title-bar-text { color: #000; text-shadow: 1px 1px 0 #fff; }
.payout-body { text-align: center; }
.payout-amt { font-family: "Courier New", monospace; font-size: 34px; font-weight: bold; color: #006000; margin: 6px 0 8px; text-shadow: 2px 2px 0 #b6ffb6; }
.payout-list { text-align: left; margin: 6px 0; padding-left: 18px; }
.confetti { position: fixed; inset: 0; z-index: 4500; pointer-events: none; overflow: hidden; }
.confetti span { position: absolute; top: -32px; font-family: "Courier New", monospace; font-size: 12px; font-weight: bold; white-space: nowrap; text-shadow: 1px 1px 0 #000; animation: cve-fall 4s linear 3; will-change: transform; }
@keyframes cve-fall { from { transform: translateY(0) rotate(-20deg); opacity: 1; } 90% { opacity: 1; } to { transform: translateY(110vh) rotate(380deg); opacity: 0; } }
#bsod-loss { position: fixed; inset: 0; background: #0000aa; color: #fff; font-family: "Courier New", monospace; font-size: 15px; z-index: 5002; display: flex; align-items: center; justify-content: center; padding: 24px; cursor: pointer; outline: none; }
.bsod-big { text-align: center; font-size: 30px; font-weight: bold; letter-spacing: 3px; margin: 10px 0 14px; }
.bsod-list { margin: 0 0 12px; padding-left: 20px; }
@media (max-width: 820px) {
  .desk-win.w-loose:not(.maximized) { max-width: min(100%, calc(100vw - 16px)); }
  #notify.desk-win { left: 8px; right: 8px; width: auto; }
  #windows.dock-toasts .toast { left: 8px; right: 8px; width: auto; max-width: none; }
  #payout.desk-win { left: 8px; right: 8px; width: auto; top: 60px; }
  .bsod-big { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .confetti { display: none; }
  #payout .title-bar { animation: none; }
  .toast-egg .title-bar { animation: none; }
}

/* boot: the BIOS POST and the splash, once per browser session (boot.js adds html.booting before the first paint) */
#boot { display: none; position: fixed; inset: 0; z-index: 6000; background: #000; color: #aaa; font-family: "Courier New", monospace; font-size: 15px; line-height: 1.5; cursor: pointer; }
html.booting #boot { display: block; }
html.booting body { overflow: hidden; }
#boot.out { opacity: 0; transition: opacity .3s ease-out; }
#boot .bios { padding: 20px 28px; white-space: pre-wrap; word-break: break-word; }
#boot .bios div { min-height: 1.5em; }
#boot .bar { color: #fff; }
#boot .splash { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; padding: 16px;
  background: linear-gradient(124deg, #ff2400, #e81d1d, #e8b71d, #e3e81d, #1de840, #1ddde8, #2b1de8, #dd00f3, #ff2400); background-size: 500% 500%; animation: rainbow 4s ease infinite; }
#boot.splash .bios { display: none; }
#boot.splash .splash { display: flex; }
.splash-box { background: #000; color: #fff; padding: 28px 40px; border: 2px solid #fff; box-shadow: 8px 8px 0 rgba(0,0,0,.45); text-align: center; max-width: 100%;
  font-family: "Pixelated MS Sans Serif", "MS Sans Serif", Arial, sans-serif; }
.splash-logo { font-size: 40px; font-weight: bold; letter-spacing: -1px; line-height: 1.1; }
.splash-logo .flag { color: #f0f; }
.splash-logo b { color: #ff0; }
.splash-sub { margin: 10px 0 20px; font-size: 12px; color: #ccc; }
.splash-bar { height: 10px; border: 1px solid #fff; background: linear-gradient(90deg, var(--acid-1), var(--acid-2), var(--acid-3), var(--acid-4), var(--acid-5), var(--acid-1)); background-size: 300% 100%; animation: slide 1s linear infinite; }

/* shut down: the dialog, then the orange screen; Reboot clears the boot flag so the BIOS plays again */
#shutdown-dlg { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); width: 380px; max-width: calc(100vw - 16px); z-index: 1002; box-shadow: 4px 4px 0 rgba(0,0,0,.35); }
#shutdown-dlg .window-body p { margin: 2px 0 10px; }
#shutdown-dlg .field-row { margin: 5px 0; }
#shutdown-dlg .sd-actions { justify-content: flex-end; margin-top: 14px; }
#shutdown { display: flex; position: fixed; inset: 0; z-index: 6000; background: #000; color: #ffa500; font-family: "Courier New", monospace; font-size: 22px; font-weight: bold; line-height: 1.6; align-items: center; justify-content: center; text-align: center; padding: 24px; }
#shutdown .sd-small { font-size: 13px; font-weight: normal; color: #d08800; }
#shutdown a { color: #ffa500; }
#shutdown.wait .sd-safe, #shutdown:not(.wait) .sd-wait { display: none; }
@media (max-width: 820px) {
  .splash-logo { font-size: 28px; }
  #shutdown { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  #boot .splash, .splash-bar { animation: none; }
  #boot.out { transition: none; }
}

/* trade feedback: the receipt, the counting tray, the price flash (feedback.js) */
#tray-balance { font-variant-numeric: tabular-nums; display: inline-block; text-align: right; }
#tray-balance.counting { color: #000080; }
.receipt { position: relative; margin: 0 auto 10px; max-width: 300px; background: #fffdf5; color: #222; font-family: "Courier New", monospace; font-size: 11px; line-height: 1.35; padding: 10px 12px 14px;
  box-shadow: 2px 2px 0 #0a0a0a, inset 0 0 0 1px #ddd; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), 96% 100%, 92% calc(100% - 6px), 88% 100%, 84% calc(100% - 6px), 80% 100%, 76% calc(100% - 6px), 72% 100%, 68% calc(100% - 6px), 64% 100%, 60% calc(100% - 6px), 56% 100%, 52% calc(100% - 6px), 48% 100%, 44% calc(100% - 6px), 40% 100%, 36% calc(100% - 6px), 32% 100%, 28% calc(100% - 6px), 24% 100%, 20% calc(100% - 6px), 16% 100%, 12% calc(100% - 6px), 8% 100%, 4% calc(100% - 6px), 0 100%);
  background-image: repeating-linear-gradient(0deg, rgba(0,0,0,0.035) 0 1px, transparent 1px 3px); }
.receipt .rc-line { opacity: 0; animation: rc-print 80ms steps(1) forwards; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes rc-print { to { opacity: 1; } }
.receipt .rc-head { text-align: center; font-weight: bold; letter-spacing: 2px; }
.receipt .rc-sub { letter-spacing: 1px; }
.receipt .rc-market { text-align: center; margin: 4px 0; font-weight: bold; white-space: normal; }
.receipt .rc-rule { color: #999; text-align: center; }
.receipt .rc-row { display: flex; justify-content: space-between; gap: 8px; }
.receipt .rc-k { color: #555; }
.receipt .rc-v { font-weight: bold; font-variant-numeric: tabular-nums; }
.receipt .rc-buy .rc-v { color: #006400; }
.receipt .rc-sell .rc-v { color: #a00000; }
.receipt .rc-total { font-size: 13px; margin-top: 2px; }
.receipt .rc-code { text-align: center; margin: 8px 0 2px; }
.receipt .rc-barcode { display: block; height: 28px; line-height: 0; margin: 0 auto; }
.receipt .rc-barcode i { display: inline-block; height: 28px; background: #000; vertical-align: top; }
.receipt .rc-id { display: block; letter-spacing: 3px; font-size: 10px; margin-top: 2px; }
.receipt .rc-foot { text-align: center; font-size: 9px; color: #666; white-space: normal; margin-top: 4px; }
.receipt .rc-actions { text-align: right; margin-top: 8px; }
.receipt.torn { animation: rc-tear 0.3s ease-in forwards; pointer-events: none; }
@keyframes rc-tear { to { transform: translateY(40px) rotate(-6deg); opacity: 0; } }
.o-price.flash-up, .tab-price.flash-up { animation: flash-up 1.2s ease-out; }
.o-price.flash-down, .tab-price.flash-down { animation: flash-down 1.2s ease-out; }
.o-fill.flash-up { box-shadow: 0 0 0 2px #00ff66, 0 0 12px #00ff66; }
.o-fill.flash-down { background: repeating-linear-gradient(45deg, #cc0033 0 10px, #ff3366 10px 20px); background-size: 40px 40px; box-shadow: 0 0 0 2px #ff3366, 0 0 12px #ff3366; }
@keyframes flash-up { 0% { background: #00ff66; color: #000; } 60% { background: #b6ffb6; color: #000; } 100% { background: transparent; } }
@keyframes flash-down { 0% { background: #ff3366; color: #fff; } 60% { background: #ffb6c6; color: #000; } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) {
  .receipt .rc-line { animation: none; opacity: 1; }
  .receipt.torn { animation: none; display: none; }
  .o-price.flash-up, .tab-price.flash-up { animation: none; background: #b6ffb6; }
  .o-price.flash-down, .tab-price.flash-down { animation: none; background: #ffb6c6; }
  .o-fill.flash-up, .o-fill.flash-down { box-shadow: none; }
}

/* liquid: the motion system (liquid.js). The tokens every motion shares; the chrome that moves with it. Windows keep
   the Win95 bevel (the 1px inner highlight) under one shadow recipe: a 2px hard edge plus one soft acid-tinted drop,
   deeper on the focused window. The title bar is 22px, the body sits on the 8px grid, and the clock never reflows. */
:root { --liquid-fast: 160ms; --liquid: 300ms; --liquid-slow: 450ms; --ease-out-liquid: cubic-bezier(.2,.9,.25,1.08); --ease-in-liquid: cubic-bezier(.6,0,.9,.3); }
.liquid-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.desk-win { min-height: 56px; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff, 2px 2px 0 rgba(0,0,0,.6), 8px 12px 24px -6px rgba(255,0,204,.38);
  transition: box-shadow var(--liquid-fast) var(--ease-out-liquid); }
.desk-win.inactive { box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff, 2px 2px 0 rgba(0,0,0,.45), 4px 6px 12px -4px rgba(51,0,255,.22); }
.desk-win .title-bar { position: relative; z-index: 1; height: 22px; padding: 0 2px 0 3px; overflow: hidden; }
.desk-win .window-body { margin: 8px; }
/* a faint liquid sheen sweeps the title bar once when the pointer arrives */
.desk-win .title-bar::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; pointer-events: none; transform: translateX(-130%);
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent); }
.desk-win:hover .title-bar::after { animation: sheen .6s var(--ease-out-liquid) 1 forwards; }
@keyframes sheen { to { transform: translateX(380%); } }
/* the taskbar: the active button sinks a pixel; buttons slide (liquid.js FLIPs them) when a neighbour comes or goes */
#tasks .task { transition: transform 90ms var(--ease-out-liquid), box-shadow 90ms var(--ease-out-liquid); }
#tasks .task.active { transform: translateY(1px); }
#clock { font-variant-numeric: tabular-nums; }
/* desktop icons sit on an 8px grid (64px pitch) and lift a touch under the pointer; folder icons too */
@media (min-width: 821px) { #icons { display: grid; grid-auto-rows: 56px; gap: 8px 0; align-content: start; } }
.dicon, .ficon { transition: translate var(--liquid-fast) var(--ease-out-liquid); }
.dicon:hover, .ficon:hover { translate: 0 -2px; }
/* the gooey layer: half resolution scaled up, under every window, filtered through #liquid-goo (base.html) */
#goo { position: absolute; left: 0; top: 0; width: 50%; height: 50%; transform: scale(2); transform-origin: 0 0; z-index: 0; pointer-events: none; filter: url(#liquid-goo); contain: layout paint; }
.goo-blob { position: absolute; background: rgba(40, 0, 60, .42); border-radius: 2px; }
@media (prefers-reduced-motion: reduce) {
  .desk-win, #tasks .task, .dicon, .ficon { transition: none !important; }
  .desk-win:hover .title-bar::after { animation: none; }
  #goo { display: none; }
}
