/* Cursy's home page: a Windows XP desktop, with Cursy living on it.
   The windows, taskbar, start menu and balloons are drawn here in CSS. The default wallpaper is the
   photograph in assets/bliss-*.webp; the others are gradients. home.js makes Cursy follow the
   visitor's mouse and runs the practice lesson. */

:root {
  --ui: Tahoma, "Segoe UI", Verdana, Geneva, sans-serif;
  --title-font: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
  --ink: #1d1d1f;
  --navy: #0b2a6f;
  --blue: #0a5ddb;
  --window: #ece9d8;
  --frame: #0831d9;
  --balloon: #ffffe1;
  --taskbar-h: 42px;

  --luna-title: linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0050ee 40%, #0066ff 88%, #0066ff 93%, #005bff 95%, #003dd7 96%, #003dd7 100%);
  --luna-taskbar: linear-gradient(180deg, #1f2f86 0%, #3165c4 3%, #3682e5 6%, #4490e6 10%, #3883e5 12%, #2b71e0 15%, #2663da 18%, #235bd6 20%, #2258d5 23%, #2157d6 38%, #245ddb 54%, #2562df 86%, #245fdc 89%, #2158d4 92%, #1d4ec0 95%, #1941a5 98%);
  --luna-tray: linear-gradient(180deg, #0c59b9 1%, #139ee9 6%, #18b5f2 10%, #139beb 14%, #1290e8 19%, #0d8dea 63%, #0d9ff1 81%, #0f9eed 88%, #119be9 91%, #1392e2 94%, #137ed7 97%, #095bc9 100%);

  /* The wallpapers the practice lesson can apply. "Hills" is the real photograph, sized to the screen. */
  --bliss: url("/assets/bliss-1920.webp");
  --wall-hills: var(--bliss) 50% 55% / cover no-repeat, #3b82df;
  --wall-sunset:
    radial-gradient(130% 55% at 25% 110%, #3b1d4f 0 54%, transparent 55%),
    radial-gradient(150% 60% at 85% 112%, #26123a 0 54%, transparent 55%),
    linear-gradient(180deg, #2a1b5c 0%, #7a3b8f 30%, #e0607e 58%, #ffb067 78%, #ffe0a3 100%);
  --wall-ocean:
    radial-gradient(160% 40% at 50% 115%, #0a3d6b 0 55%, transparent 56%),
    radial-gradient(120% 45% at 10% 112%, #0f5a8f 0 54%, transparent 55%),
    linear-gradient(180deg, #063a7a 0%, #0b6fb0 40%, #3fb4d8 70%, #a8e6f0 100%);
  --wall-aurora:
    radial-gradient(60% 40% at 30% 30%, rgba(80, 255, 170, 0.55), transparent 70%),
    radial-gradient(55% 45% at 75% 25%, rgba(170, 90, 255, 0.5), transparent 70%),
    radial-gradient(150% 50% at 50% 115%, #081226 0 55%, transparent 56%),
    linear-gradient(180deg, #050b1f 0%, #0d1b3d 60%, #1c2f5c 100%);
  --wall-lavender:
    radial-gradient(130% 55% at 25% 110%, #8f6fc4 0 54%, transparent 55%),
    radial-gradient(150% 60% at 85% 112%, #6d4fa8 0 54%, transparent 55%),
    linear-gradient(180deg, #5b4aa8 0%, #9a7fd6 35%, #d8b9ef 70%, #f5e6fb 100%);
  --wall: var(--wall-hills);
}

@media (min-width: 1921px), (min-width: 1100px) and (min-resolution: 1.5dppx) { :root { --bliss: url("/assets/bliss-2880.webp"); } }
@media (max-aspect-ratio: 4/5) { :root { --bliss: url("/assets/bliss-portrait.webp"); } }

html[data-wall="sunset"] { --wall: var(--wall-sunset); }
html[data-wall="ocean"] { --wall: var(--wall-ocean); }
html[data-wall="aurora"] { --wall: var(--wall-aurora); }
html[data-wall="lavender"] { --wall: var(--wall-lavender); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
@media (hover: none) { .real-keys { display: none; } }

html { scroll-behavior: smooth; scroll-padding-top: 16px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding-bottom: var(--taskbar-h);
  font: 15px/1.5 var(--ui);
  color: var(--ink);
  background: #3b82df;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
a { color: var(--blue); }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--title-font); }
.blue { color: var(--blue); }

.skip { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 8px 12px; background: var(--balloon); border: 1px solid #000; border-radius: 6px; color: #000; }
.skip:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px dotted #000; outline-offset: 2px; }

/* ------------------------------------------------------------------ wallpaper */
.wallpaper {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--wall);
  background-size: cover;
  overflow: hidden;
}
.wallpaper.changed { animation: wall-flash 0.6s ease-out; }
@keyframes wall-flash { from { filter: brightness(1.6); } to { filter: none; } }

.cloud {
  position: absolute;
  width: 380px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
  filter: blur(4px);
  animation: drift 90s linear infinite;
}
.c1 { top: 8%; left: -10%; }
.c2 { top: 18%; left: 40%; width: 520px; height: 150px; animation-duration: 130s; animation-delay: -40s; }
.c3 { top: 30%; left: 70%; width: 300px; animation-duration: 110s; animation-delay: -70s; }
.c4 { top: 4%; left: 85%; width: 260px; height: 90px; animation-duration: 150s; animation-delay: -20s; }
@keyframes drift { from { transform: translateX(-30vw); } to { transform: translateX(130vw); } }
html[data-wall="aurora"] .cloud, html[data-wall="ocean"] .cloud { opacity: 0.25; }
html:not([data-wall]) .cloud { display: none; }   /* the photograph has its own */
.hill { display: none; }

/* ------------------------------------------------------------------ rows */
.row { max-width: 1180px; margin: 0 auto; padding: 44px 16px; }
.row.two { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: start; }
.section-head { max-width: 760px; margin: 0 auto 22px; text-align: center; color: #fff; text-shadow: 0 1px 3px rgba(0, 20, 80, 0.9), 0 0 14px rgba(0, 30, 100, 0.65); }
.section-head h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; margin-bottom: 8px; }
.section-head .blue { color: #fff59d; }
.section-head p { margin: 0; font-size: 17px; }

/* ------------------------------------------------------------------ windows */
.window {
  background: var(--window);
  border: 3px solid var(--frame);
  border-top: 0;
  border-radius: 9px 9px 2px 2px;
  box-shadow: 0 10px 28px rgba(0, 20, 70, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 31px;
  padding: 0 5px 0 7px;
  margin: 0 -3px;
  background: var(--luna-title);
  border-radius: 8px 8px 0 0;
  color: #fff;
  font: bold 14px/1 var(--title-font);
  text-shadow: 1px 1px 0 #0f1089;
  user-select: none;
}
.title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-icon { width: 18px; height: 18px; flex: none; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.3)); }
.controls { display: flex; gap: 2px; flex: none; }
.controls i, .controls button {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 4px;
  background: linear-gradient(180deg, #3c8bff 0%, #1c5fe0 60%, #1450c8 100%);
  box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}
.controls .close { background: linear-gradient(180deg, #f08a64 0%, #e0461f 55%, #c43a14 100%); }
.controls .close::before, .controls .close::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2.4px; margin: -1.2px 0 0 -6px; background: #fff; border-radius: 1px; transform: rotate(45deg);
}
.controls .close::after { transform: rotate(-45deg); }
.controls .min::before { content: ""; position: absolute; left: 5px; bottom: 5px; width: 8px; height: 3px; background: #fff; }
.controls .max::before { content: ""; position: absolute; inset: 4px; border: 2px solid #fff; border-top-width: 3px; }
.controls .help::before { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; font: bold 13px var(--ui); color: #fff; }
.controls button:hover { filter: brightness(1.15); }

.window-body { padding: 20px 22px 22px; }
.window-body h2 { font-size: clamp(24px, 2.8vw, 32px); line-height: 1.15; color: var(--navy); margin-bottom: 10px; }
.lede { font-size: 16px; margin: 0 0 18px; }
.note { font-size: 13px; color: #555; margin: 14px 0 0; }

.window.minimized > :not(.titlebar) { display: none; }
.window.shaking { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Windows come up as they scroll into view. */
.js .row .window, .js .section-head { opacity: 0; transform: translateY(26px) scale(0.98); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(.2, .8, .3, 1.2); }
.js .row .seen, .js .row .seen .window { opacity: 1; transform: none; }
/* The film sits right under the first row and is there from the start. */
.row.film-row { padding-top: 0; }
.js .film-row .window { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ buttons and keys */
.xp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 78px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid #003c74;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff 0%, #ecebe6 86%, #d6d0c5 100%);
  color: #000;
  font: 13px var(--ui);
  text-decoration: none;
  cursor: pointer;
}
.xp-button:hover:not(:disabled) { box-shadow: inset 0 -2px 0 #fbc761, inset 0 2px 0 #fee5b6, inset 2px 0 0 #fdd889, inset -2px 0 0 #fdd889; }
.xp-button:active:not(:disabled) { background: linear-gradient(180deg, #cdcac3, #e3e3db 20%, #f2f2f1); }
.xp-button.default { box-shadow: inset 0 0 0 1px #98b8ea, inset 0 -1px 0 1px #7ba2e7; }
.xp-button:disabled { color: #aca899; border-color: #c9c7ba; cursor: default; }
.xp-button svg { width: 16px; height: 16px; }

.key {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #8d8d8d;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff, #e2e2e2);
  box-shadow: 0 3px 0 #9b9b9b, inset 0 1px 0 #fff;
  font: bold 14px var(--ui);
  color: #333;
}

.bars { display: inline-flex; align-items: center; gap: 2px; height: 14px; }
.bars i { display: block; width: 3px; height: 40%; border-radius: 2px; background: #6fd0ff; animation: bar 0.9s ease-in-out infinite; }
.bars i:nth-child(2) { animation-delay: -0.2s; }
.bars i:nth-child(3) { animation-delay: -0.45s; }
.bars i:nth-child(4) { animation-delay: -0.65s; }
@keyframes bar { 0%, 100% { height: 30%; } 50% { height: 100%; } }

/* ------------------------------------------------------------------ row 1: the desktop */
.desktop-row { position: relative; color: #fff; text-align: center; }
/* A little shorter than the screen, so the film's window shows below it from the start. */
.hero { min-height: calc(100vh - var(--taskbar-h) - 110px); min-height: calc(100svh - var(--taskbar-h) - 110px); display: grid; place-items: center; padding: 40px 16px 24px; }

.desktop-icons { position: absolute; left: 14px; top: 16px; display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; z-index: 2; }
.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 86px;
  padding: 4px 2px;
  border: 1px solid transparent;
  color: #fff;
  font: 13px var(--ui);
  text-decoration: none;
  text-shadow: 1px 1px 1px #000, 0 0 4px rgba(0, 0, 0, 0.6);
  cursor: default;
}
.desktop-icon svg { width: 46px; height: 46px; filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, 0.35)); }
.desktop-icon span { padding: 0 3px; border-radius: 2px; line-height: 1.25; }
.desktop-icon.selected span, .desktop-icon:focus-visible span { background: #0b61ff; text-shadow: none; }
.desktop-icon.selected svg { filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, 0.35)) sepia(1) hue-rotate(180deg) saturate(3) brightness(0.9); }
.desktop-icon:focus-visible { outline: 1px dotted #fff; }

.hero-title { position: relative; z-index: 1; max-width: 100%; }
.hero h1 {
  font-size: clamp(60px, 12vw, 176px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 0 rgba(8, 40, 130, 0.45), 0 0 26px rgba(0, 30, 100, 0.45), 0 14px 40px rgba(0, 20, 80, 0.4);
}
.hero .name { position: relative; display: inline-block; }
.name-glyph {
  position: absolute;
  right: -0.42em;
  top: -0.12em;
  width: 0.42em;
  height: 0.42em;
  transform: rotate(8deg);
  filter: drop-shadow(0 6px 10px rgba(0, 20, 80, 0.4));
  animation: bob 3.2s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(8deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
.tagline { margin: 18px 0 0; font: bold clamp(18px, 2.4vw, 28px)/1.3 var(--title-font); text-shadow: 0 2px 4px rgba(0, 20, 80, 0.85), 0 0 16px rgba(0, 30, 100, 0.6); }
/* The two ways in: the download, big and green like the Start button, and the film. */
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 18px; margin: 30px 0 0; }
.get-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 30px 14px 22px;
  border: 1px solid #1d5e1d;
  border-radius: 16px;
  background: linear-gradient(180deg, #5fd35b 0%, #3fae3c 18%, #34982f 55%, #2b8327 85%, #23701f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -3px 6px rgba(0, 0, 0, 0.25), 0 8px 22px rgba(0, 40, 0, 0.35);
  color: #fff;
  text-align: left;
  text-decoration: none;
  text-shadow: 1px 1px 2px #164a16;
  animation: beckon 2.8s ease-in-out 1.2s infinite;
  transition: transform 0.15s, filter 0.15s;
}
.get-button svg { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35)); }
.get-button b { display: block; font: italic bold clamp(24px, 2.6vw, 32px)/1.1 "Franklin Gothic Medium", "Trebuchet MS", sans-serif; }
.get-button small { display: block; margin-top: 4px; font: 13px var(--ui); opacity: 0.95; }
.get-button:hover { filter: brightness(1.08); transform: translateY(-2px); }
.get-button:active { transform: translateY(1px); filter: brightness(0.95); }
.get-button:focus-visible { outline: 2px dotted #fff; outline-offset: 4px; }
@keyframes beckon {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -3px 6px rgba(0, 0, 0, 0.25), 0 8px 22px rgba(0, 40, 0, 0.35), 0 0 0 0 rgba(120, 230, 110, 0.6); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -3px 6px rgba(0, 0, 0, 0.25), 0 8px 22px rgba(0, 40, 0, 0.35), 0 0 0 10px rgba(120, 230, 110, 0); }
}
.watch-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(60, 130, 240, 0.85), rgba(16, 70, 190, 0.85));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 6px 18px rgba(0, 20, 80, 0.3);
  color: #fff;
  font: bold 18px var(--title-font);
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 20, 80, 0.6);
  backdrop-filter: blur(4px);
  transition: transform 0.15s, background 0.15s;
}
.watch-button svg { width: 30px; height: 30px; flex: none; filter: drop-shadow(0 1px 2px rgba(0, 20, 80, 0.4)); }
.watch-button small { margin-left: 8px; font: 13px var(--ui); opacity: 0.85; }
.watch-button:hover { background: linear-gradient(180deg, rgba(80, 150, 250, 0.9), rgba(26, 86, 210, 0.9)); transform: translateY(-2px); }
.watch-button:focus-visible { outline: 2px dotted #fff; outline-offset: 4px; }

.hint {
  display: inline-block;
  margin: 22px 0 0;
  padding: 7px 12px;
  border: 1px solid #000;
  border-radius: 8px;
  background: var(--balloon);
  color: #000;
  font: 13px var(--ui);
  text-shadow: none;
  box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.25);
}

.popups { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.popup { position: absolute; width: min(430px, calc(100vw - 32px)); pointer-events: auto; text-align: left; color: var(--ink); animation: pop 0.18s ease-out; }
.popup .titlebar { cursor: move; touch-action: none; }
.popup.inactive .titlebar { filter: saturate(0.45) brightness(1.15); }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } }
.menubar { display: flex; gap: 14px; padding: 3px 8px; border-bottom: 1px solid #c8c4b0; font: 13px var(--ui); }
.notepad-text { margin: 0; padding: 10px 12px; min-height: 170px; background: #fff; border-top: 1px solid #fff; font: 14px/1.5 Consolas, "Lucida Console", monospace; white-space: pre-wrap; }
/* tutorial.avi: the real film, in a small Media Player of its own. */
.popup.mini-player { width: min(640px, calc(100vw - 32px)); }
.mini-screen { background: #000; border-top: 1px solid #fff; }
.mini-screen video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.message-body { display: flex; gap: 16px; align-items: center; padding: 20px 20px 10px; }
.message-body p { margin: 0; }
.message-icon { width: 42px; height: 42px; flex: none; }
.message-buttons { display: flex; justify-content: center; gap: 10px; padding: 10px 16px 18px; }

/* ------------------------------------------------------------------ row 2 */
.steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d0cbb5;
  border-radius: 6px;
  background: #fbfaf5;
}
.steps strong { display: block; color: var(--navy); font: bold 16px var(--title-font); }
.step-art { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; font-weight: bold; }
.talk { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: #1b2a4a; color: #fff; font: 13px var(--ui); }
.mini-glyph { width: 42px; height: 42px; animation: bob 3s ease-in-out infinite; }

.wizard-body { display: grid; grid-template-columns: 140px 1fr; padding: 0; }
.wizard-side { display: grid; place-items: center; background: linear-gradient(180deg, #2c62d8 0%, #4a8ff0 55%, #b9d9fb 100%); }
.wizard-side svg { width: 88px; height: 88px; filter: drop-shadow(0 6px 10px rgba(0, 20, 80, 0.4)); animation: bob 3.4s ease-in-out infinite; }
.wizard-main { padding: 22px 22px 16px; background: #fff; }
.wizard-main h2 { margin-bottom: 8px; }
.wizard-main p { margin: 0 0 12px; }
.checks { margin: 0 0 18px; padding: 0; list-style: none; }
.checks li { position: relative; padding-left: 24px; margin: 4px 0; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 12px; height: 7px; border-left: 3px solid #2e9b2e; border-bottom: 3px solid #2e9b2e; transform: rotate(-45deg); }
.store { display: inline-block; transition: transform 0.15s; }
.store:hover { transform: translateY(-2px); }
.wizard-buttons { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid #fff; box-shadow: 0 -1px 0 #aca899; }

/* ------------------------------------------------------------------ row 3: the film */
.player { margin: 0; }
.player-screen { background: #000; }
.player-screen video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.player-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  background: linear-gradient(180deg, #e9eef8 0%, #c5d0e6 45%, #a9b8d8 100%);
  border-top: 1px solid #fff;
}
.player-controls[hidden] { display: none; }
.film-credits { padding: 3px 14px 6px; background: #a9b8d8; color: #1d2a44; font: 12px/1.45 var(--ui); }
.film-credits summary { width: max-content; cursor: pointer; color: #0b2a6f; }
.film-credits summary:hover { text-decoration: underline; }
.film-credits p { margin: 4px 0 2px; }
.film-credits a { color: #0b2a6f; }
.round-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  padding: 0;
  border: 1px solid #0a3c8c;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #8fd0ff, #1f74e0 60%, #0a4bb5);
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  cursor: pointer;
}
.round-button svg { width: 18px; height: 18px; }
.seek { flex: 1; height: 8px; border: 1px solid #6b7fa8; border-radius: 4px; background: #fff; overflow: hidden; }
.seek-fill { display: block; height: 100%; width: 0; background: linear-gradient(180deg, #8fd0ff, #2a7de9); }
.film-controls .when-paused, .film-controls .when-ended, .film-controls .when-loud { display: none; }
.film-controls[data-state="paused"] .when-playing, .film-controls[data-state="ended"] .when-playing { display: none; }
.film-controls[data-state="paused"] .when-paused, .film-controls[data-state="ended"] .when-ended { display: block; }
.film-controls .sound[aria-pressed="true"] .when-muted { display: none; }
.film-controls .sound[aria-pressed="true"] .when-loud { display: block; }

/* ------------------------------------------------------------------ try it */
.try-grid { display: grid; grid-template-columns: 1.25fr 0.9fr; gap: 24px; align-items: start; }
.dialog-body { padding: 12px 12px 14px; }
.tabs { display: flex; gap: 2px; padding-left: 4px; }
.tabs button {
  position: relative;
  top: 1px;
  padding: 5px 12px 4px;
  border: 1px solid #919b9c;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #fff, #ecebe6);
  font: 13px var(--ui);
  cursor: pointer;
}
.tabs button:hover { box-shadow: inset 0 2px 0 #ffc83c; }
.tabs button[aria-selected="true"] { z-index: 1; padding-bottom: 6px; margin-top: -2px; background: #fcfcfe; box-shadow: inset 0 2px 0 #e68b2c; }
.tab-page { display: grid; grid-template-columns: 210px 1fr; gap: 16px; align-items: start; padding: 16px; border: 1px solid #919b9c; background: #fcfcfe; min-height: 230px; }
.tab-panel p { margin: 0 0 10px; font-size: 14px; }
.panel-label { font-weight: bold; }
.monitor { display: grid; justify-items: center; }
.monitor-screen { width: 190px; height: 130px; border: 10px solid #d9d6cb; border-bottom-width: 16px; border-radius: 6px; background: var(--preview, var(--wall-hills)); background-size: cover; box-shadow: inset 0 0 0 1px #777, 0 2px 4px rgba(0, 0, 0, 0.3); }
.monitor-stand { width: 70px; height: 14px; background: linear-gradient(180deg, #c9c5b8, #a8a496); border-radius: 0 0 8px 8px; }
.xp-select { display: grid; gap: 4px; font-size: 14px; }
.select-box { display: block; padding: 3px 8px; border: 1px solid #7f9db9; background: #fff; }
.wall-list { margin: 0; padding: 2px; list-style: none; border: 1px solid #7f9db9; background: #fff; max-height: 150px; overflow: auto; }
.wall-list li { display: flex; align-items: center; gap: 8px; padding: 3px 6px; font-size: 14px; cursor: pointer; }
.wall-list li i { width: 22px; height: 16px; border: 1px solid #666; background: var(--w); background-size: cover; }
.wall-list li[aria-selected="true"] { background: #316ac5; color: #fff; }
.dialog-buttons { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; }

.talk-panel { display: grid; gap: 12px; padding: 18px; border-radius: 10px; background: rgba(255, 255, 255, 0.86); box-shadow: 0 10px 28px rgba(0, 20, 70, 0.3); }
.hold {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18px 16px;
  border: 2px solid #0831d9;
  border-radius: 12px;
  background: linear-gradient(180deg, #e8f2ff, #c4dcfb);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: transform 0.1s, box-shadow 0.1s;
}
.hold-keys { display: flex; align-items: center; gap: 8px; font-weight: bold; }
.hold-label { font: bold 16px var(--title-font); color: var(--navy); }
.hold.held { transform: translateY(2px) scale(0.98); background: linear-gradient(180deg, #bfe0ff, #8fc2ff); box-shadow: 0 0 0 6px rgba(42, 147, 255, 0.3); }
.hold.held .key { box-shadow: 0 1px 0 #9b9b9b; transform: translateY(2px); }
.hold-help { margin: -4px 0 0; text-align: center; font-size: 13px; color: #444; }
.said-box { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid #aaa; border-radius: 8px; background: #fff; min-height: 52px; }
.said-box.cursy { background: var(--balloon); border-color: #000; }
.said-who { font: bold 11px var(--ui); letter-spacing: 0.06em; text-transform: uppercase; color: #666; }
.said-text { font-size: 15px; }
.again { justify-self: center; }

/* ------------------------------------------------------------------ what it does: Explorer */
.explorer-body { display: grid; grid-template-columns: 230px 1fr; min-height: 380px; }
.task-pane { display: grid; align-content: start; gap: 14px; padding: 14px 12px; background: linear-gradient(180deg, #7ba2e7, #6375d6); }
.task-group { border-radius: 4px; overflow: hidden; background: #d6dff7; }
.task-group-title { margin: 0; padding: 6px 10px; background: linear-gradient(90deg, #fff, #c6d3f7); color: #0c32a1; font: bold 13px var(--ui); }
.task-group a { display: block; padding: 4px 12px; font-size: 13px; color: #0c32a1; text-decoration: none; }
.task-group a:hover { text-decoration: underline; color: #2b6fe6; }
.details { margin: 0; padding: 8px 12px 12px; font-size: 13px; }
.details strong { display: block; color: #000; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; align-content: start; padding: 18px; background: #fff; }
.tiles-title { grid-column: 1 / -1; font-size: clamp(24px, 2.8vw, 32px); color: var(--navy); margin-bottom: 8px; }
.tile { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: start; padding: 10px; border: 1px solid transparent; border-radius: 3px; cursor: default; }
.tile svg { width: 48px; height: 48px; padding: 9px; border-radius: 10px; background: linear-gradient(180deg, #4f9cff, #0a5ddb); color: #fff; }
.tile h3 { font: bold 15px var(--ui); color: var(--ink); }
.tile p { margin: 2px 0 0; font-size: 13px; color: #5f5f5f; }
.tile:hover { background: #eef3fd; }
.tile.selected { background: #dbe6f9; border: 1px dotted #316ac5; }

/* ------------------------------------------------------------------ the apps */
.program-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px; margin: 8px 0 16px; padding: 4px; list-style: none; background: #fff; border: 1px solid #a5b6d6; }
.program-list li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 14px; cursor: default; }
.program-list li::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: 3px; background: linear-gradient(135deg, #8fcaff, #0a62e0); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); }
.program-list li:hover { background: #316ac5; color: #fff; }
.program-list li:last-child { font-style: italic; }
.questions { margin: 0; font: bold 18px var(--title-font); color: #444; }
.questions span { margin-right: 10px; }

/* ------------------------------------------------------------------ privacy */
.security { max-width: 860px; margin: 0 auto; }
.privacy-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 0; padding: 0; list-style: none; }
.privacy-list li { position: relative; padding: 12px 12px 12px 46px; border: 1px solid #d0cbb5; border-radius: 6px; background: #fbfaf5; font-size: 14px; }
.privacy-list li::before { content: "✓"; position: absolute; left: 12px; top: 12px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #8be27b, #2e9b2e); color: #fff; font-weight: bold; }
.privacy-list strong { display: block; color: var(--navy); }

/* ------------------------------------------------------------------ the end card */
.end { padding: 90px 16px 70px; text-shadow: 0 2px 8px rgba(0, 20, 80, 0.55); }
.stuck { margin: 0; font: bold clamp(26px, 4vw, 40px) var(--title-font); }
.lockup { display: inline-flex; align-items: center; gap: 18px; margin: 10px 0; }
.lockup svg { width: clamp(64px, 9vw, 110px); height: auto; filter: drop-shadow(0 8px 14px rgba(0, 20, 80, 0.45)); animation: bob 3.2s ease-in-out infinite; }
.lockup strong { font: bold clamp(64px, 11vw, 140px)/1 var(--title-font); letter-spacing: -0.02em; }
.sub { margin: 0 0 22px; font: bold 20px var(--title-font); }
.end .store { margin: 0 auto; }

/* ------------------------------------------------------------------ footer */
.site-footer { max-width: 1180px; margin: 0 auto; padding: 18px 16px 28px; color: #fff; text-align: center; font-size: 13px; text-shadow: 1px 1px 2px #000; }
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin-bottom: 8px; }
.site-footer a { color: #fff; }
.site-footer p { margin: 4px 0; }

/* ------------------------------------------------------------------ the taskbar */
.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  align-items: stretch;
  height: var(--taskbar-h);
  background: var(--luna-taskbar);
  box-shadow: 0 -1px 0 #0a2a8a;
}
.start {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 24px 0 10px;
  border: 0;
  border-radius: 0 14px 14px 0;
  background: linear-gradient(180deg, #3ba33b 0%, #52bd4f 10%, #3c9d3a 45%, #2f8a2e 80%, #26762a 100%);
  box-shadow: inset -2px 0 4px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  color: #fff;
  font: italic bold 21px/1 "Franklin Gothic Medium", "Trebuchet MS", sans-serif;
  text-shadow: 1px 1px 2px #1a4d1a;
  cursor: pointer;
}
.start svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4)); }
.start:hover { filter: brightness(1.1); }
.start[aria-expanded="true"] { background: linear-gradient(180deg, #2a7a2a, #2f8a2e 40%, #1f6a1f); }
.tasks { display: flex; flex: 1; min-width: 0; gap: 4px; align-items: center; padding: 0 8px; overflow: hidden; }
.task {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 170px;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border-radius: 3px;
  background: linear-gradient(180deg, #5ea1ff 0%, #3c81f3 12%, #3a7ced 90%, #2c66d6 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25), inset 1px 1px 0 rgba(255, 255, 255, 0.35);
  color: #fff;
  font: 13px var(--ui);
  text-decoration: none;
  white-space: nowrap;
}
.task span { overflow: hidden; text-overflow: ellipsis; }
.task svg { width: 18px; height: 18px; flex: none; }
.task:hover { filter: brightness(1.12); }
.task.active { background: linear-gradient(180deg, #1e52b7, #1a4aa8); box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.5); }
/* The download stays on the taskbar the whole way down. */
.taskbar-get {
  display: flex;
  align-items: center;
  gap: 7px;
  align-self: center;
  height: 32px;
  margin: 0 10px 0 4px;
  padding: 0 16px 0 12px;
  border: 1px solid #1d5e1d;
  border-radius: 6px;
  background: linear-gradient(180deg, #5fd35b 0%, #3fae3c 20%, #34982f 60%, #2b8327 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  color: #fff;
  font: bold 14px var(--ui);
  text-decoration: none;
  text-shadow: 1px 1px 1px #164a16;
  white-space: nowrap;
}
.taskbar-get svg { width: 18px; height: 18px; flex: none; }
.taskbar-get:hover { filter: brightness(1.1); }
.tray { display: flex; align-items: center; gap: 8px; padding: 0 14px; background: var(--luna-tray); border-left: 1px solid #092e9b; box-shadow: inset 1px 0 0 #18b8f0; color: #fff; font: 13px var(--ui); }
.tray svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------------ the start menu */
.start-menu {
  position: fixed;
  left: 0;
  bottom: var(--taskbar-h);
  z-index: 75;
  width: min(440px, 100vw);
  border: 2px solid #1c4dd1;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  overflow: hidden;
  background: #fff;
  box-shadow: 4px -4px 16px rgba(0, 0, 0, 0.35);
  animation: rise 0.15s ease-out;
}
.start-menu[hidden] { display: none; }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.start-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: linear-gradient(180deg, #1868ce 0%, #0e60cb 15%, #2b7ae0 60%, #2268d9 100%); color: #fff; font: bold 18px var(--title-font); text-shadow: 1px 1px 2px #0a2a6a; }
.avatar { display: grid; place-items: center; width: 46px; height: 46px; border: 2px solid #fff; border-radius: 6px; background: #fff; }
.avatar svg { width: 34px; height: 34px; }
.start-columns { display: grid; grid-template-columns: 1.15fr 1fr; border-top: 2px solid #e48a2c; }
.start-columns ul { margin: 0; padding: 8px 0; list-style: none; }
.start-left li a { display: flex; align-items: center; gap: 10px; padding: 7px 12px; color: #000; text-decoration: none; }
.start-left svg { width: 30px; height: 30px; flex: none; }
.start-left b { display: block; font-size: 14px; }
.start-left small { display: block; color: #666; font-size: 12px; }
.start-right { background: #d3e5fa; border-left: 1px solid #95bdee; }
.start-right a { display: block; padding: 7px 14px; color: #0a246a; font: bold 13px var(--ui); text-decoration: none; }
.start-menu a:hover, .start-menu a:focus-visible { background: #316ac5; color: #fff; }
.start-menu a:hover small { color: #dce8ff; }
.start-foot { display: flex; justify-content: flex-end; padding: 8px 12px; background: linear-gradient(180deg, #1868ce, #2268d9); }
.start-foot a { color: #fff; font-size: 13px; text-decoration: none; padding: 2px 6px; }

/* ------------------------------------------------------------------ the tray balloon */
.balloon {
  position: fixed;
  right: 10px;
  bottom: calc(var(--taskbar-h) + 12px);
  z-index: 72;
  width: min(320px, calc(100vw - 20px));
  padding: 10px 30px 10px 12px;
  border: 1px solid #000;
  border-radius: 8px;
  background: var(--balloon);
  box-shadow: 3px 4px 10px rgba(0, 0, 0, 0.3);
  font-size: 13px;
  animation: rise 0.25s ease-out;
}
.balloon[hidden] { display: none; }
.balloon::after { content: ""; position: absolute; right: 34px; bottom: -11px; border: 6px solid transparent; border-top: 6px solid #000; border-left-width: 0; border-right-width: 14px; }
.balloon p { margin: 0; }
.balloon-title { display: flex; align-items: center; gap: 6px; margin-bottom: 4px !important; font-weight: bold; }
.balloon-title svg { width: 16px; height: 16px; }
.balloon-close { position: absolute; right: 6px; top: 6px; width: 18px; height: 18px; padding: 0; border: 1px solid #888; border-radius: 3px; background: #fff; font-size: 13px; line-height: 1; cursor: pointer; }

/* ------------------------------------------------------------------ Cursy on the page */
.buddy {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
  will-change: transform;
}
.buddy.shown { opacity: 1; }
.buddy-glyph { width: 40px; height: 40px; filter: drop-shadow(0 4px 6px rgba(0, 20, 80, 0.35)); transition: transform 0.2s; }
.buddy.pointing .buddy-glyph { transform: scale(1.15); }
.buddy-balloon {
  position: absolute;
  left: 34px;
  top: 34px;
  width: max-content;
  max-width: 250px;
  padding: 7px 11px;
  border: 1px solid #000;
  border-radius: 8px;
  background: var(--balloon);
  color: #000;
  font: 13px/1.35 var(--ui);
  box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: scale(0.9);
  transform-origin: top left;
  transition: opacity 0.15s, transform 0.15s;
}
.buddy.talking .buddy-balloon { opacity: 1; transform: none; }
.buddy.flip .buddy-balloon { left: auto; right: 34px; transform-origin: top right; }
.buddy.up .buddy-balloon { top: auto; bottom: 30px; }
.buddy-pill { position: absolute; left: 34px; top: 4px; display: none; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 999px; background: #1b2a4a; color: #fff; font: 12px var(--ui); white-space: nowrap; }
.buddy.listening .buddy-pill { display: inline-flex; }
.buddy.listening .buddy-balloon { opacity: 0; }

.ring {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 79;
  border: 3px solid #2a93ff;
  border-radius: 10px;
  box-shadow: 0 0 0 5px rgba(42, 147, 255, 0.25);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.ring.shown { opacity: 1; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(42, 147, 255, 0.12); } }
.ring-label { position: absolute; left: -3px; top: -28px; padding: 3px 9px; border-radius: 999px; background: #0a5ddb; color: #fff; font: bold 12px var(--ui); white-space: nowrap; }

/* ------------------------------------------------------------------ the other pages */
.page-row { padding-top: clamp(28px, 5vw, 56px); }
.page-row + .row { padding-top: 0; }

/* Download: Cursy Setup, the three steps, and good to know */
.setup-window { max-width: 900px; margin: 0 auto; }
.setup-window .wizard-body { grid-template-columns: 170px 1fr; }
.setup-window .wizard-side svg { width: 110px; height: 110px; }
.wizard-main h1 { font-size: clamp(32px, 4.4vw, 46px); line-height: 1.05; color: var(--navy); margin-bottom: 10px; }
.setup-window .get-button { margin: 4px 0 2px; animation: none; }
.setup-window .note { margin-top: 12px; }

.install-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 6px 0 0; padding: 0; list-style: none; counter-reset: step; }
.install-steps li { display: grid; align-content: start; gap: 10px; padding: 12px; border: 1px solid #d0cbb5; border-radius: 6px; background: #fbfaf5; }
.install-steps .step-art { display: grid; place-items: center; min-height: 92px; border-radius: 4px; background: linear-gradient(180deg, #e3ecfc, #c4d6f5); }
.install-steps h3 { font-size: 17px; color: var(--navy); }
.install-steps h3::before { counter-increment: step; content: counter(step) ". "; color: var(--blue); }
.install-steps p { margin: 0; font-size: 14.5px; }
.listing { display: inline-flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #b9c6dd; border-radius: 6px; background: #fff; box-shadow: 0 2px 6px rgba(0, 30, 90, 0.15); font: 13px var(--ui); }
.listing svg { width: 30px; height: 30px; }
.listing span { display: grid; text-align: left; font-weight: bold; }
.listing small { font-weight: normal; color: #666; }
.listing b { padding: 4px 12px; border-radius: 4px; background: var(--blue); color: #fff; font-size: 12px; }
.listing b.open { background: #2e9b2e; }

/* XP's group boxes: a title sitting on the line */
.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px 16px; margin-top: 18px; }
.group { position: relative; margin: 0; padding: 18px 14px 12px; border: 1px solid #c5c2b2; border-radius: 5px; box-shadow: inset 1px 1px 0 #fff; }
.group h3 { position: absolute; top: -10px; left: 9px; padding: 0 5px; background: var(--window); color: #0046d5; font: bold 14px var(--ui); }
.group p, .group ul { margin: 0; font-size: 14.5px; }
.group ul { padding-left: 18px; }
.group li { margin: 3px 0; }
.page-note { margin: 20px 0 0; font-size: 14px; }

/* The privacy policy and the terms: a WordPad document on the desktop */
.document { max-width: 1000px; margin: 0 auto; }
.document .menubar { background: var(--window); }
.ruler { height: 16px; border-bottom: 1px solid #aca899; background: repeating-linear-gradient(90deg, transparent 0 11px, #9a968a 11px 12px) left bottom / 100% 5px no-repeat, #fbfaf5; }
.doc-page { padding: clamp(10px, 3vw, 30px); background: #b9b6aa; }
.doc-paper { max-width: 820px; margin: 0 auto; padding: clamp(22px, 5vw, 60px); background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); color: #222; font: 15.5px/1.65 var(--ui); }
.doc-paper h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.1; color: var(--navy); margin-bottom: 6px; }
.doc-paper .updated { margin: 0 0 26px; color: #666; font-size: 14px; }
.doc-paper h2 { margin: 34px 0 10px; padding-bottom: 4px; border-bottom: 2px solid #c3d3f3; color: #0046d5; font-size: clamp(20px, 2.6vw, 24px); }
.doc-paper ul { padding-left: 22px; }
.doc-paper li { margin: 6px 0; }
.doc-paper table { width: 100%; border-collapse: collapse; margin: 14px 0; border: 1px solid #aca899; font-size: 14px; }
.doc-paper th { padding: 6px 10px; text-align: left; vertical-align: bottom; background: linear-gradient(180deg, #fff, #ebeadb); border-bottom: 2px solid #d6d2c2; border-right: 1px solid #d6d2c2; font: bold 13px var(--ui); }
.doc-paper td { padding: 9px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid #e3e1d5; }
.doc-paper tbody tr:nth-child(even) { background: #f5f8fe; }

/* Page not found: an error dialog */
.error-row { display: grid; place-items: center; min-height: calc(100vh - var(--taskbar-h) - 90px); min-height: calc(100svh - var(--taskbar-h) - 90px); }
.error-dialog { width: min(540px, 100%); }
.error-dialog h1 { font-size: 22px; line-height: 1.2; color: var(--navy); margin-bottom: 6px; }
.error-dialog .message-body { align-items: flex-start; padding: 22px 22px 12px; }
.error-dialog .message-icon { width: 54px; height: 54px; }

/* ------------------------------------------------------------------ the desktop's icons (desktop.js)
   With a mouse on a wide screen they sit on a grid and move; on phones they stay a row. */
.desktop-icons.free { inset: 0; display: block; pointer-events: none; }
.desktop-icons.free > li { position: absolute; pointer-events: auto; transition: left 0.14s ease, top 0.14s ease; }
.desktop-icons.free > li.dragging { z-index: 5; opacity: 0.75; transition: none; }
.desktop-icons.icons-hidden > li, .desktop-icons.refreshing > li { visibility: hidden; }
.hero.free-desktop { -webkit-user-select: none; user-select: none; }
.desktop-icon { position: relative; }
.desktop-icon span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.desktop-icon.selected span { -webkit-line-clamp: unset; }
.desktop-icon.cut svg { opacity: 0.45; }
.desktop-icon.drop-target svg { filter: drop-shadow(0 0 6px #fff) brightness(1.15); }
.desktop-icon .shortcut-arrow { position: absolute; left: calc(50% - 23px); top: 34px; width: 16px; height: 16px; filter: none; }
.rename-box { width: 92px; margin: 0 -4px; padding: 1px 2px; border: 1px solid #000; background: #fff; color: #000; font: 13px/1.25 var(--ui); text-align: center; text-shadow: none; resize: none; overflow: hidden; outline: none; }
.tip-balloon { position: absolute; left: 0; top: 100%; z-index: 6; width: 250px; margin-top: 6px; padding: 8px 10px; border: 1px solid #000; border-radius: 6px; background: var(--balloon); color: #000; font: 12px/1.45 var(--ui); text-align: left; text-shadow: none; white-space: pre-line; box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.3); }
.marquee { position: absolute; z-index: 4; border: 1px solid #3169c6; background: rgba(49, 106, 197, 0.25); pointer-events: none; }

/* XP's right-click menu */
.context-menu { position: fixed; z-index: 90; min-width: 184px; padding: 2px; border: 1px solid #aca899; background: #fff; color: #000; font: 12px var(--ui); text-align: left; box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.35); }
.context-menu .submenu { position: absolute; top: -3px; left: calc(100% - 2px); display: none; }
.menu-row { position: relative; }
.menu-row.open > .submenu { display: block; }
.menu-row.flip > .submenu { left: auto; right: calc(100% - 2px); }
.menu-item { position: relative; display: block; width: 100%; padding: 4px 26px 4px 24px; border: 0; background: none; color: inherit; font: inherit; text-align: left; white-space: nowrap; cursor: default; }
.menu-item.default { font-weight: bold; }
.menu-item:hover:not(:disabled), .menu-item:focus-visible, .menu-row.open > .menu-item { background: #316ac5; color: #fff; outline: none; }
.menu-item:disabled { color: #aca899; }
.menu-item.has-sub::after { content: ""; position: absolute; right: 9px; top: 50%; margin-top: -4px; border: 4px solid transparent; border-left-color: currentColor; border-right-width: 0; }
.menu-item[aria-checked="true"]::before { content: "✓"; position: absolute; left: 8px; }
.menu-sep { height: 1px; margin: 3px 1px; background: #aca899; }

/* Properties */
.popup.properties { width: min(390px, calc(100vw - 32px)); }
.prop-tabs { display: flex; padding: 8px 8px 0; }
.prop-tabs span { padding: 4px 12px 3px; border: 1px solid #919b9c; border-bottom: 0; border-radius: 3px 3px 0 0; background: #fcfcfe; box-shadow: inset 0 2px 0 #e68b2c; font: 12px var(--ui); }
.prop-page { margin: -1px 8px 0; padding: 12px 14px; border: 1px solid #919b9c; background: #fcfcfe; font: 12px/1.4 var(--ui); }
.prop-head { display: flex; align-items: center; gap: 16px; }
.prop-head svg { width: 34px; height: 34px; flex: none; }
.prop-head input { flex: 1; min-width: 0; padding: 3px 5px; border: 1px solid #7f9db9; font: 12px var(--ui); }
.prop-page hr { margin: 10px 0; border: 0; border-top: 1px solid #d0d0bf; }
.prop-page dl { display: grid; grid-template-columns: 100px 1fr; gap: 6px 8px; margin: 0; }
.prop-page dd { margin: 0; overflow-wrap: anywhere; }
.prop-page label { display: flex; align-items: center; gap: 6px; }
.prop-buttons { display: flex; justify-content: flex-end; gap: 6px; padding: 10px 8px; }

/* The Recycle Bin, folders and Notepad */
.popup.recycle { width: min(540px, calc(100vw - 32px)); }
.recycle-body { display: grid; grid-template-columns: 170px 1fr; min-height: 230px; background: #fff; }
.recycle-tasks { padding: 10px; background: linear-gradient(180deg, #7ba2e7, #6375d6); }
.task-link { display: block; width: 100%; padding: 4px 12px; border: 0; background: none; color: #0c32a1; font: 12px var(--ui); text-align: left; cursor: pointer; }
.task-link:hover { text-decoration: underline; color: #2b6fe6; }
.recycle-list { display: grid; align-content: start; gap: 4px; margin: 0; padding: 8px; list-style: none; color: #000; font: 12px var(--ui); }
.recycle-list li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 4px; }
.recycle-list svg { width: 32px; height: 32px; }
.recycle-list small { display: block; color: #666; }
.popup.folder-window { width: min(440px, calc(100vw - 32px)); }
.folder-body { display: grid; place-items: center; min-height: 170px; background: #fff; color: #666; font: 12px var(--ui); }
.notepad-edit { display: block; width: 100%; min-height: 200px; border: 0; outline: none; resize: vertical; }

/* Maximise: the window swells, and Cursy says it's too big for you */
.window.bulging { animation: bulge 0.5s ease; }
@keyframes bulge { 35% { transform: scale(1.035); } 70% { transform: scale(0.992); } }

/* ------------------------------------------------------------------ the start-up screen
   Black boot screen with the sliding blocks, then "welcome", then the desktop: about 3 seconds,
   played by CSS alone, so it ends even if the script never runs. boot.js turns it on. */
.boot { display: none; }
.booting .boot {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: block;
  background: #000;
  color: #fff;
  cursor: progress;
  animation: boot-out 0.45s ease 2.75s forwards;
}
@keyframes boot-out { to { opacity: 0; visibility: hidden; } }
.boot-screen { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 48px; animation: boot-in 0.4s ease both; }
@keyframes boot-in { from { opacity: 0; } }
.boot-logo { display: flex; align-items: center; gap: 14px; font: italic bold clamp(40px, 7vw, 58px)/1 "Franklin Gothic Medium", "Trebuchet MS", sans-serif; letter-spacing: -0.01em; }
.boot-logo svg { width: clamp(48px, 8vw, 66px); height: clamp(48px, 8vw, 66px); filter: drop-shadow(0 4px 10px rgba(40, 120, 255, 0.45)); }
.boot-bar { position: relative; width: 124px; height: 20px; border: 2px solid #b5b5b5; border-radius: 5px; overflow: hidden; background: #000; }
.boot-bar span { position: absolute; top: 3px; left: -40px; display: flex; gap: 3px; animation: boot-run 1.5s linear infinite; }
.boot-bar i { width: 9px; height: 10px; border-radius: 2px; background: linear-gradient(180deg, #a5b9ff 0%, #3a5cf0 45%, #1d3bc4 100%); }
@keyframes boot-run { from { transform: translateX(0); } to { transform: translateX(170px); } }
.boot-copy, .boot-brand { position: absolute; bottom: 22px; margin: 0; }
.boot-copy { left: 26px; color: #cfcfcf; font: 13px var(--ui); }
.boot-brand { right: 26px; font: italic bold 20px "Franklin Gothic Medium", "Trebuchet MS", sans-serif; }

.boot-welcome {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(55% 50% at 20% 25%, rgba(170, 196, 255, 0.55), transparent 70%), #5a7edc;
  opacity: 0;
  animation: boot-welcome 0.3s ease 1.9s forwards;
}
@keyframes boot-welcome { to { opacity: 1; } }
.boot-welcome::before, .boot-welcome::after { content: ""; position: absolute; left: 0; right: 0; height: 12%; background: #00309c; }
.boot-welcome::before { top: 0; border-bottom: 2px solid transparent; border-image: linear-gradient(90deg, transparent, #9db9eb 50%, transparent) 1; }
.boot-welcome::after { bottom: 0; border-top: 2px solid transparent; border-image: linear-gradient(90deg, transparent, #f59d4c 50%, transparent) 1; }
.boot-welcome span { font: italic bold clamp(52px, 9vw, 92px)/1 "Franklin Gothic Medium", "Trebuchet MS", sans-serif; text-shadow: 3px 3px 5px rgba(0, 0, 50, 0.5); animation: welcome-slide 0.6s ease-out 1.9s both; }
@keyframes welcome-slide { from { transform: translateX(-24px); opacity: 0; } }
.boot.skipped { display: none !important; }

/* ------------------------------------------------------------------ small screens */
@media (max-width: 900px) {
  .row.two, .try-grid, .install-steps { grid-template-columns: 1fr; }
  .explorer-body { grid-template-columns: 1fr; }
  .task-pane { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .recycle-body { grid-template-columns: 1fr; }
  .tip-balloon { width: 200px; }
  :root { --taskbar-h: 44px; }
  body { font-size: 15px; }
  .hero { padding-top: 120px; }
  .desktop-icons { left: 0; right: 0; top: 10px; flex-direction: row; justify-content: center; flex-wrap: wrap; gap: 4px; }
  .desktop-icon { width: 70px; font-size: 12px; }
  .desktop-icon svg { width: 36px; height: 36px; }
  .popup { left: 16px !important; right: 16px; top: 110px !important; width: auto; }
  .steps li { grid-template-columns: 1fr; gap: 8px; text-align: center; }
  .wizard-body { grid-template-columns: 1fr; }
  .wizard-side { display: none; }
  .tab-page { grid-template-columns: 1fr; justify-items: center; }
  .tabs button { padding: 5px 8px 4px; font-size: 12px; }
  .task-pane { grid-template-columns: 1fr; }
  .privacy-list { grid-template-columns: 1fr; }
  .tasks .task span { display: none; }
  .tasks .task { flex: none; width: 38px; justify-content: center; padding: 0; }
  .tasks .task:nth-child(n+4) { display: none; }
  .doc-paper table, .doc-paper thead, .doc-paper tbody, .doc-paper tr, .doc-paper th, .doc-paper td { display: block; }
  .doc-paper table { border: 0; }
  .doc-paper thead { display: none; }
  .doc-paper td { border-bottom: none; padding: 3px 0; }
  .doc-paper td:first-child { font-weight: bold; }
  /* With the header row hidden, the last column says what it answers. */
  .doc-paper td[data-label]::before { content: attr(data-label) " "; font-weight: bold; }
  .doc-paper tr { padding: 10px 8px; border-bottom: 1px solid #e3e1d5; }
  .setup-window .wizard-body { grid-template-columns: 1fr; }
  .error-dialog .message-body { flex-direction: column; align-items: center; text-align: center; }
  .tray time { display: none; }
  .tray { padding: 0 10px; }
  .taskbar-get { margin: 0 6px 0 0; padding: 0 12px 0 10px; }
  .start { padding-right: 18px; font-size: 19px; }
  .hero-actions { flex-direction: column; gap: 12px; margin-top: 24px; }
  .get-button { padding: 13px 22px 13px 16px; }
  .get-button svg { width: 28px; height: 28px; }
  .get-button small { font-size: 12px; }
  .watch-button { font-size: 16px; padding: 9px 18px 9px 12px; }
  .buddy-balloon { max-width: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .booting .boot { display: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .row .window, .js .section-head { opacity: 1; transform: none; }
}
