/* NuAmp Desktop '99 — an ode to late-90s desktops. System fonts only; no external requests. */
:root {
  --sky-top: #0b0f33;
  --sky-mid: #2a1f63;
  --sky-low: #0f4f86;
  --ink: #111;
  --paper: #fff;
  --aqua-1: #bfe3ff;
  --aqua-2: #6ab6f5;
  --aqua-3: #1f7fe0;
  --aqua-4: #58b6ff;
  --luna-1: #0997ff;
  --luna-2: #0053ee;
  --luna-3: #003dd7;
  --luna-body: #ece9d8;
  --w9x-face: #c0c0c0;
  --w9x-light: #fff;
  --w9x-shade: #808080;
  --w9x-dark: #000;
  --navy: #000080;
  --lcd: #0c101c;
  --lcd-ink: #7dff9e;
  --orange: #ff9f0a;
  --font-ui: Tahoma, Verdana, "Segoe UI", system-ui, sans-serif;
  --font-aqua: "Lucida Grande", -apple-system, "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "Fixedsys", "Lucida Console", Monaco, "Courier New", monospace;
  --taskbar-h: 42px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.45 var(--font-ui);
  color: var(--ink);
  background: radial-gradient(120% 90% at 50% 110%, var(--sky-low) 0%, var(--sky-mid) 45%, var(--sky-top) 100%) fixed;
  overflow: hidden;
}
a { color: #0645ad; }
button { font: inherit; }
:focus-visible { outline: 2px dotted #fff; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
.crt {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.10) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.45) 100%);
  mix-blend-mode: multiply;
}

/* ---------- Desktop ---------- */
.desk { position: fixed; inset: 0 0 var(--taskbar-h) 0; z-index: 2; }
.icons { position: absolute; left: 14px; top: 16px; display: grid; gap: 14px; }
.icon {
  width: 84px; padding: 6px 2px; border: 1px dotted transparent; background: none; cursor: default;
  display: grid; justify-items: center; gap: 4px; color: #fff; text-decoration: none; font-size: 12px;
  text-shadow: 1px 1px 1px #000, 0 0 4px #000;
}
.icon img, .icon svg { width: 44px; height: 44px; filter: drop-shadow(1px 2px 1px rgba(0,0,0,.6)); }
.icon:focus-visible, .icon.is-selected { border-color: #fff; }
.icon.is-selected span, .icon:focus-visible span { background: #0b61ff; }

/* ---------- Windows ---------- */
.win {
  position: absolute; left: var(--x); top: var(--y); width: var(--w);
  box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.4);
  animation: pop-in .45s cubic-bezier(.2,1.4,.4,1) both; animation-delay: var(--d, 0s);
}
.win[hidden] { display: none; }
.win.is-dragging { cursor: grabbing; }
.bar { display: flex; align-items: center; gap: 8px; user-select: none; touch-action: none; cursor: grab; }
.bar h2 { margin: 0; font-size: inherit; font-weight: inherit; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes pop-in { from { opacity: 0; transform: scale(.92) translateY(14px); } }

/* Aqua (2000-era Mac) */
.aqua {
  font-family: var(--font-aqua); border-radius: 9px; overflow: hidden;
  background: repeating-linear-gradient(0deg, #f4f4f4 0 2px, #e9e9e9 2px 4px);
  border: 1px solid #8a8a8a;
}
.aqua .bar {
  height: 24px; padding: 0 8px; font-size: 13px; color: #222; text-shadow: 0 1px 0 #fff;
  background: linear-gradient(#f7f7f7, #d6d6d6); border-bottom: 1px solid #9a9a9a;
}
.aqua .bar h2 { text-align: center; margin-right: 54px; }
.lights { display: flex; gap: 7px; }
.light {
  width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(0,0,0,.35); padding: 0; cursor: pointer;
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,.95) 0 18%, transparent 45%), var(--c);
  box-shadow: inset 0 -2px 3px rgba(0,0,0,.25);
}
.light.close { --c: radial-gradient(circle at 50% 75%, #ff8a80, #d7261b); }
.light.min { --c: radial-gradient(circle at 50% 75%, #ffe082, #d8a100); }
.light.max { --c: radial-gradient(circle at 50% 75%, #a5e59a, #2c9a2c); }
.aqua .body { padding: 18px 22px 16px; }

.hero { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; }
.hero img { width: 96px; height: 96px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-2deg); } }
.chrome {
  margin: 0; font: 800 54px/1 var(--font-aqua); letter-spacing: -1px;
  background: linear-gradient(#fdfdfd 0%, #b9c3cf 46%, #5d6b7c 50%, #9fb4c9 72%, #eaf4ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1px rgba(20,40,70,.55); filter: drop-shadow(0 2px 1px rgba(0,0,0,.25));
}
.tagline { margin: 4px 0 0; color: #333; font-size: 13px; }
.lead { margin: 14px 0 10px; }
.features { margin: 0 0 16px; padding-left: 20px; }
.features li { margin: 2px 0; }
.features li::marker { content: "◆ "; color: var(--aqua-3); }

.gel {
  position: relative; display: inline-block; padding: 9px 22px; border-radius: 999px; border: 1px solid #1b5fae;
  font: 700 14px var(--font-aqua); color: #06284f; text-decoration: none; text-shadow: 0 1px 0 rgba(255,255,255,.6);
  background: linear-gradient(var(--aqua-1) 0%, var(--aqua-2) 48%, var(--aqua-3) 52%, var(--aqua-4) 100%);
  box-shadow: 0 3px 6px rgba(0,60,140,.4), inset 0 -3px 6px rgba(255,255,255,.35);
  overflow: hidden; cursor: pointer; isolation: isolate;
}
.gel::before {
  content: ""; position: absolute; z-index: -1; left: 8%; right: 8%; top: 2px; height: 45%; border-radius: 999px;
  background: linear-gradient(rgba(255,255,255,.95), rgba(255,255,255,.1)); pointer-events: none;
}
.gel.is-soon { cursor: default; }
.gel.is-soon::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%) -200% 0 / 200% 100% no-repeat;
  animation: shine 3.2s ease-in-out infinite;
}
@keyframes shine { 60%, 100% { background-position: 200% 0; } }
.gel.small { padding: 5px 14px; font-size: 12px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta a:not(.gel) { font-size: 13px; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.badge {
  width: 88px; height: 31px; display: grid; place-items: center; text-align: center;
  font: 700 9px/1.1 var(--font-ui); letter-spacing: .5px; text-transform: uppercase;
  border: 1px solid #000; box-shadow: inset 1px 1px 0 rgba(255,255,255,.5), inset -1px -1px 0 rgba(0,0,0,.4);
}
.badge.b1 { background: linear-gradient(#ffe45c, #ffc400); color: #000; }
.badge.b2 { background: #3a6ea5; color: #fff; }
.badge.b3 { background: repeating-linear-gradient(45deg, #111 0 6px, #ffd400 6px 12px); color: #fff; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000; }
.badge.b4 { background: linear-gradient(#c0c0c0, #9a9a9a); color: #000080; }

/* NuAmp Glass player (the real app render) */
.player { background: transparent; box-shadow: none; }
.player .shot { position: relative; filter: drop-shadow(0 18px 30px rgba(0,0,0,.6)); border-radius: 3px; }
.player .shot img { display: block; width: 100%; height: auto; }
.player .bar { position: absolute; left: 6%; right: 12%; top: 0; height: 12%; }
.hot { position: absolute; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 6px; }
.hot:hover { background: rgba(255,255,255,.12); }
.hot:active { background: rgba(255,159,10,.28); }
.player .lcd {
  position: absolute; left: 39.3%; top: 20.5%; width: 58.5%; height: 10.4%; overflow: hidden;
  background: var(--lcd); border-radius: 2px; color: #e4ecff;
  font: 700 clamp(9px, 1.05vw, 15px)/1 var(--font-mono); letter-spacing: 1px; text-transform: uppercase;
  display: flex; align-items: center; white-space: nowrap;
}
.player .lcd span { display: inline-block; padding-left: 100%; animation: ticker 18s linear infinite; }
@keyframes ticker { to { transform: translateX(-100%); } }

.balloon {
  position: absolute; width: 230px; padding: 10px 12px 10px 12px; font-size: 12px;
  background: #ffffe1; border: 1px solid #000; border-radius: 8px; box-shadow: 3px 3px 6px rgba(0,0,0,.35);
  left: calc(var(--x) + 40px); top: calc(var(--y) + var(--h, 250px));
}
.balloon::before {
  content: ""; position: absolute; top: -12px; left: 40px; border: 6px solid transparent; border-bottom-color: #000;
}
.balloon::after {
  content: ""; position: absolute; top: -10px; left: 41px; border: 5px solid transparent; border-bottom-color: #ffffe1;
}
.balloon b { display: block; margin-bottom: 2px; }
.balloon button { position: absolute; top: 4px; right: 6px; border: 0; background: none; cursor: pointer; font-size: 12px; }

/* Classic 9x chrome (IRC client) */
.w9x { background: var(--w9x-face); border: 2px solid; border-color: var(--w9x-light) var(--w9x-dark) var(--w9x-dark) var(--w9x-light); padding: 2px; font-size: 12px; }
.w9x .bar { height: 20px; padding: 0 3px; color: #fff; font-weight: 700; background: linear-gradient(90deg, var(--navy), #1084d0); }
.w9x .ctl {
  width: 16px; height: 14px; padding: 0; font: 700 10px/1 var(--font-ui); cursor: pointer; background: var(--w9x-face);
  border: 1px solid; border-color: var(--w9x-light) var(--w9x-dark) var(--w9x-dark) var(--w9x-light);
}
.menu9x { display: flex; gap: 12px; padding: 3px 6px; }
.menu9x span::first-letter { text-decoration: underline; }
.irc { display: grid; grid-template-columns: 1fr 104px; grid-template-rows: auto 220px auto; gap: 2px; }
.irc .topic { grid-column: 1 / -1; padding: 2px 4px; background: #fff; border: 2px inset #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.irc .log, .irc .nicks {
  background: #fff; border: 2px solid; border-color: var(--w9x-shade) var(--w9x-light) var(--w9x-light) var(--w9x-shade);
  overflow-y: auto; font: 12px/1.35 var(--font-mono); padding: 3px 5px; margin: 0; list-style: none;
}
.irc .log li { word-wrap: break-word; }
.irc .log .ts { color: #7f7f7f; }
.irc .log .sys { color: #009300; }
.irc .log .me { color: #9c009c; }
.n1 { color: #fc0000; } .n2 { color: #00007f; } .n3 { color: #009300; } .n4 { color: #fc7f00; } .n5 { color: #9c009c; } .n6 { color: #007f7f; }
.irc form { grid-column: 1 / -1; display: flex; }
.irc input {
  flex: 1; font: 12px var(--font-mono); padding: 3px 4px; border: 2px solid;
  border-color: var(--w9x-shade) var(--w9x-light) var(--w9x-light) var(--w9x-shade);
}

/* Luna (2001-era XP) */
.luna { background: var(--luna-body); border: 3px solid var(--luna-3); border-top: 0; border-radius: 8px 8px 0 0; font-size: 12px; }
.luna .bar {
  height: 28px; margin: 0 -3px; padding: 0 5px 0 9px; border-radius: 8px 8px 0 0;
  color: #fff; font: 700 13px "Trebuchet MS", var(--font-ui); text-shadow: 1px 1px 1px #0a1883;
  background: linear-gradient(var(--luna-1), var(--luna-2) 10%, #0050ee 40%, #06f 88%, #005bff 94%, var(--luna-3));
}
.xp {
  width: 21px; height: 21px; padding: 0; border: 1px solid #fff; border-radius: 3px; color: #fff; cursor: pointer;
  font: 700 12px/1 var(--font-ui); background: linear-gradient(#3c8cff, #1b5fe0); box-shadow: inset 0 0 3px rgba(255,255,255,.6);
}
.xp.x { background: linear-gradient(#f08b6e, #d8401e); }
.luna .body { padding: 10px; }
.luna figure { margin: 0 0 10px; }
.luna figure img { width: 100%; height: auto; display: block; border: 1px solid #7f9db9; }
.luna figcaption { margin-top: 4px; color: #333; }
.luna .tabs { display: flex; gap: 2px; margin-bottom: -1px; }
.luna .tabs button {
  padding: 3px 10px; border: 1px solid #919b9c; border-bottom: 0; border-radius: 3px 3px 0 0; cursor: pointer;
  background: linear-gradient(#fff, #ecebe5); font-size: 12px;
}
.luna .tabs button[aria-selected="true"] { background: #fcfcfe; border-top: 2px solid #ffc83c; font-weight: 700; }
.shots .body { max-height: calc(100vh - 150px); overflow: auto; }
.cta .link { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: #0645ad; text-decoration: underline; cursor: pointer; }
.luna .pane { background: #fcfcfe; border: 1px solid #919b9c; padding: 10px; }

/* ---------- Taskbar ---------- */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--taskbar-h); z-index: 50; display: flex; align-items: stretch;
  background: linear-gradient(#3168d5, #4993e6 5%, #2f6ad8 15%, #245edb 50%, #2157d6 80%, #1941a5);
  border-top: 1px solid #0c2a86; font-family: var(--font-ui);
}
.start {
  display: flex; align-items: center; gap: 6px; padding: 0 20px 0 10px; border: 0; cursor: pointer;
  border-radius: 0 12px 12px 0; color: #fff; font: italic 700 19px/1 "Trebuchet MS", var(--font-ui);
  text-shadow: 1px 1px 2px rgba(0,0,0,.6);
  background: radial-gradient(ellipse at 50% 0, #7fd87f 0, transparent 60%), linear-gradient(#3c9a3c, #2d8a2d 50%, #1f6b1f);
  box-shadow: inset -2px 0 4px rgba(0,0,0,.35), 2px 0 4px rgba(0,0,0,.3);
}
.start img { width: 24px; height: 24px; }
.start[aria-expanded="true"] { filter: brightness(.85); }
.tasks { flex: 1; display: flex; gap: 3px; padding: 5px 8px; overflow: hidden; }
.task {
  min-width: 0; max-width: 170px; flex: 1 1 170px; padding: 0 10px; border: 1px solid #1c4fbf; border-radius: 3px; cursor: pointer;
  color: #fff; font-size: 12px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(#3c81f3, #2a6ae8);
}
.task[aria-pressed="true"] { background: linear-gradient(#1e52b7, #2b62d3); box-shadow: inset 1px 1px 3px rgba(0,0,0,.5); }
.tray {
  display: flex; align-items: center; gap: 10px; padding: 0 12px; color: #fff; font-size: 12px;
  background: linear-gradient(#0f8fea, #0b77da 50%, #0a64c6); border-left: 1px solid #0a3fa8; box-shadow: inset 1px 0 1px rgba(255,255,255,.35);
}
.tray button { border: 0; background: none; color: #fff; cursor: pointer; padding: 2px; font-size: 12px; }

.startmenu {
  position: fixed; left: 0; bottom: var(--taskbar-h); z-index: 60; width: 340px; border-radius: 8px 8px 0 0; overflow: hidden;
  background: #fff; border: 1px solid #0b3daa; box-shadow: 4px -4px 16px rgba(0,0,0,.45); font-size: 12px;
}
.startmenu[hidden] { display: none; }
.startmenu header {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: #fff; font: 700 15px "Trebuchet MS", var(--font-ui);
  background: linear-gradient(#1868ce, #0e60cb 20%, #0f5ec8 70%, #0d57c0); text-shadow: 1px 1px 1px #0a1883;
}
.startmenu header img { width: 42px; height: 42px; border: 2px solid #fff; border-radius: 4px; background: #d8e4f8; }
.startmenu .cols { display: grid; grid-template-columns: 1fr 1fr; }
.startmenu ul { list-style: none; margin: 0; padding: 6px 0; }
.startmenu .right { background: #d3e5fa; border-left: 1px solid #95bdee; }
.startmenu li a, .startmenu li button {
  display: block; width: 100%; padding: 6px 12px; border: 0; background: none; text-align: left; color: #000; text-decoration: none; cursor: pointer;
}
.startmenu li a:hover, .startmenu li button:hover, .startmenu li a:focus-visible, .startmenu li button:focus-visible { background: #316ac5; color: #fff; outline: none; }
.startmenu footer { padding: 6px 10px; text-align: right; color: #fff; background: linear-gradient(#4282d6, #3b77cc); }

/* ---------- Document pages (privacy/support) ---------- */
body.doc { overflow: auto; }
.doc-wrap { position: relative; z-index: 2; max-width: 760px; margin: 40px auto calc(var(--taskbar-h) + 40px); padding: 0 16px; }
.doc-wrap .win { position: relative; left: auto; top: auto; width: auto; }
.doc-wrap .body { background: #fff; padding: 22px 28px 28px; font: 15px/1.6 var(--font-aqua); max-height: none; }
.doc-wrap h1 { font: 700 26px/1.2 var(--font-aqua); margin: 0 0 4px; }
.doc-wrap h2.sec { font: 700 17px/1.3 var(--font-aqua); margin: 22px 0 6px; color: #1b3f7a; }
.doc-wrap .meta { color: #555; font-size: 13px; margin: 0 0 16px; }
.doc-wrap .lead { font-size: 16px; }
.menu-note { font-size: 12px; color: #555; }
.static-bg { position: fixed; inset: 0; z-index: 0; background:
  radial-gradient(60% 40% at 30% 100%, #2f8f2f 0 60%, transparent 61%),
  radial-gradient(90% 50% at 80% 110%, #3fa13f 0 60%, transparent 61%),
  linear-gradient(#1c5fd8, #6fb2f2 60%, #bfe0fb); }

.fine { margin: 12px 0 0; font-size: 11px; color: #666; }

/* ---------- Small screens: stack windows ---------- */
@media (max-width: 899px) {
  body:not(.doc) { overflow: auto; }
  .desk { position: relative; inset: auto; display: flex; flex-direction: column; gap: 22px; padding: 16px 16px calc(var(--taskbar-h) + 24px); }
  .icons, .balloon { display: none; }
  .win { position: relative; left: auto; top: auto; width: 100%; }
  .shots .body { max-height: none; }
  .bar { cursor: default; }
  .chrome { font-size: 42px; }
  .hero { grid-template-columns: 72px 1fr; }
  .hero img { width: 72px; height: 72px; }
  .irc { grid-template-columns: 1fr; }
  .irc .nicks { display: none; }
  .task { display: none; }
  .startmenu { width: min(340px, 100vw); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .player .lcd span { padding-left: 4px; }
}
body.motion-off *, body.motion-off *::before, body.motion-off *::after { animation: none !important; }
body.motion-off .player .lcd span { padding-left: 4px; }

a.start { text-decoration: none; }
