/* ================================================================
   V2 — WINDOWS 98  ·  Pixel-art OS chrome, same single-scroll IA
================================================================ */
:root {
  --teal:        #008080;
  --teal-shade:  #006666;
  --gray:        #c3c7cb;
  --gray-light:  #e4e7ea;
  --gray-dark:   #828790;
  --gray-darker: #555a62;
  --black:       #0a0a0a;
  --white:       #ffffff;
  --blue:        #000080;
  --blue-2:      #1084d0;
  --magenta:     #ff00ff;
  --lime:        #00ff66;
  --yellow:      #fff200;
  --red:         #ff2a2a;
  --select:      #316ac5;

  --pad-x: clamp(1rem, 3vw, 2.5rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*::selection { background: var(--select); color: var(--white); }

html, body {
  background: var(--teal);
  /* Dithered Win98 desktop pattern (checker) */
  background-image:
    repeating-conic-gradient(rgba(255,255,255,0.04) 0% 25%, transparent 0% 50%);
  background-size: 4px 4px;
  color: var(--black);
  /* Tahoma-first for readability; Pixelify only when explicitly requested */
  font-family: "Tahoma", "MS Sans Serif", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
/* Allow pixel rendering only on the cover thumbnails */
.win-player__cover, .file__icon-frame--cover, .pixel-only { image-rendering: pixelated; }

a { color: inherit; text-decoration: none; }
em { font-style: italic; }

/* Variant nav (kept consistent across variants) */
.vnav {
  position: sticky; top: 0; z-index: 100;
  background: #131211; color: #f1ecde;
  display: flex; align-items: center; gap: 0;
  padding: 0 1.25rem;
  font: 600 11px "VT323", monospace;
  font-size: 14px;
  letter-spacing: 0.08em;
  border-bottom: 2px solid var(--magenta);
}
.vnav__brand { padding: 0.5rem 1rem 0.5rem 0; color: var(--lime); font-weight: 700; }
.vnav a { padding: 0.55rem 1rem; color: #f1ecde; border-left: 1px solid #2a2620; }
.vnav a:hover { background: var(--magenta); color: var(--black); }
.vnav a.is-active { background: var(--lime); color: var(--black); }
.vnav__meta { margin-left: auto; color: #8a8470; }

/* =================================================================
   WIN98 PRIMITIVES  —  beveled chrome
================================================================= */
.win {
  background: var(--gray);
  /* outset bevel: light on top-left, dark on bottom-right */
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--gray-darker);
  border-right: 2px solid var(--gray-darker);
  box-shadow:
    inset -1px -1px 0 0 var(--black),
    inset  1px  1px 0 0 var(--gray);
  padding: 2px;
  margin-bottom: 1.5rem;
}

.win__title {
  background: linear-gradient(90deg, var(--blue), var(--blue-2));
  color: var(--white);
  display: flex; align-items: center; gap: 0.4rem;
  padding: 4px 6px;
  font: 700 15px "Tahoma", "MS Sans Serif", sans-serif;
  letter-spacing: 0.02em;
}
.win__title__icon { width: 16px; height: 16px; flex-shrink: 0; display: inline-grid; place-items: center; font-size: 13px; line-height: 1; }
.win__title__text { flex: 1; }
.win__title__btns { display: flex; gap: 2px; }
.win__title__btn {
  width: 18px; height: 16px;
  background: var(--gray);
  border-top: 1px solid var(--white);
  border-left: 1px solid var(--white);
  border-bottom: 1px solid var(--gray-darker);
  border-right: 1px solid var(--gray-darker);
  font: 700 11px "Pixelify Sans", sans-serif;
  color: var(--black);
  display: inline-grid; place-items: center;
  cursor: pointer;
  padding-bottom: 2px;
}

.win__menubar {
  background: var(--gray);
  padding: 3px 6px;
  display: flex; gap: 1rem;
  border-bottom: 1px solid var(--gray-dark);
  font: 400 14px "Tahoma", sans-serif;
}
.win__menubar span { padding: 1px 6px; }
.win__menubar span:first-letter { text-decoration: underline; }
.win__menubar span:hover { background: var(--select); color: var(--white); }

.win__body {
  background: var(--gray);
  padding: 12px 14px;
}

/* Inset/sunken panel (like a textarea) */
.sunken {
  background: var(--white);
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  padding: 10px 12px;
  box-shadow: inset 1px 1px 0 0 var(--black);
}

.btn-9x {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--gray-darker);
  border-right: 2px solid var(--gray-darker);
  padding: 7px 16px;
  font: 700 15px "Tahoma", sans-serif;
  color: var(--black);
  text-decoration: none;          /* so <a class="btn-9x"> matches <button class="btn-9x"> */
  cursor: pointer;
  min-height: 34px;
  position: relative;
}
.btn-9x:active {
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  padding-top: 6px; padding-left: 15px;
  padding-bottom: 4px; padding-right: 13px;
}
.btn-9x--primary {
  outline: 1px dotted var(--black);
  outline-offset: -4px;
}
.btn-9x--big { padding: 12px 24px; font-size: 18px; }
.btn-9x__icon { font-size: 16px; line-height: 1; }

input[type=email].field-9x, input[type=text].field-9x {
  width: 100%;
  background: var(--white);
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  padding: 8px 10px;
  font: 400 15px "Tahoma", sans-serif;
  color: var(--black);
}
input[type=email].field-9x:focus { outline: 1px dotted var(--black); }

/* =================================================================
   DESKTOP SHELL
================================================================= */
.desktop {
  padding: 1.5rem var(--pad-x) 60px;
  max-width: 1200px;
  margin: 0 auto;
}

/* =================================================================
   WIN 01  —  MEDIA PLAYER (HERO)
================================================================= */
.win--player .win__title { background: linear-gradient(90deg, var(--blue), #6a0080); }
.win-player__body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  background: var(--gray);
  padding: 14px;
}
.win-player__cover-frame {
  width: 220px; aspect-ratio: 1/1;
  background: var(--black);
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  position: relative;
  overflow: hidden;
}
.win-player__cover {
  width: 100%; height: 100%; object-fit: cover;
  image-rendering: pixelated;
  /* Force chunky pixels by downscale-then-upscale via filter */
  filter: contrast(1.2) saturate(1.1);
}
.win-player__cover-frame::after {
  /* dither overlay */
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-conic-gradient(rgba(0,0,0,0.25) 0% 25%, transparent 0% 50%);
  background-size: 2px 2px;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.win-player__main { display: grid; gap: 10px; align-content: start; }
.win-player__eyebrow {
  font: 400 20px "VT323", monospace;
  color: var(--gray-darker);
  letter-spacing: 0.04em;
}
.win-player__title {
  font-family: "Press Start 2P", "Pixelify Sans", sans-serif;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  color: var(--black);
  text-shadow: 2px 2px 0 var(--magenta), 4px 4px 0 var(--lime);
  margin: 4px 0 2px;
}
.win-player__sub {
  font: 400 16px "Tahoma", sans-serif;
  color: var(--black);
  max-width: 44ch;
  margin-top: 6px;
  line-height: 1.55;
}

.lcd {
  background: #0a1a0a;
  color: var(--lime);
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  padding: 10px 12px;
  font: 400 20px "VT323", monospace;
  letter-spacing: 0.08em;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  margin-top: 10px;
}
.lcd__bar {
  height: 12px;
  background: #002211;
  border: 1px solid var(--gray-darker);
  position: relative;
}
.lcd__fill { position: absolute; left: 2px; right: 70%; top: 2px; bottom: 2px; background: var(--lime); background-image: repeating-linear-gradient(90deg, transparent 0 4px, rgba(0,0,0,0.5) 4px 5px); }
.lcd__time { color: var(--lime); }
.lcd__tag { color: var(--yellow); }

/* Live Spotify embed — V2 stays script-free (iframe, not script) */
.lcd--live { grid-template-columns: 1fr; color-scheme: dark; }
.spotify-embed { display: block; width: 100%; border: 0; }

.player-ctas {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center;
}
.player-ctas .also {
  font: 400 15px "Tahoma", sans-serif;
  color: var(--gray-darker); margin-left: 8px;
}
.player-ctas .also a { color: var(--blue); border-bottom: 1px dotted var(--blue); }
.player-ctas .also a:hover { color: var(--magenta); }

/* dialog status footer */
.win-status {
  background: var(--gray);
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  padding: 6px 10px;
  font: 400 13px "Tahoma", sans-serif;
  color: var(--black);
  margin: 4px;
  display: flex; gap: 10px;
}
.win-status__cell { padding: 0 8px; border-right: 1px solid var(--gray-dark); }
.win-status__cell:last-child { border-right: 0; margin-left: auto; }

/* =================================================================
   WIN 02  —  CALENDAR (SHOW)  +  WIN 03 — OUTLOOK (MAIL)
================================================================= */
.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 1.5rem;
}
.two-up > .win { margin-bottom: 0; }

.cal-header {
  display: flex; justify-content: space-between; padding: 6px 10px;
  background: var(--gray);
  font: 700 15px "Tahoma", sans-serif;
  border-bottom: 1px solid var(--gray-dark);
}
.cal {
  background: var(--white);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font: 400 14px "Tahoma", sans-serif;
  text-align: center;
}
.cal__h { background: var(--gray); padding: 6px 0; font-weight: 700; font-size: 12px; }
.cal__d { background: var(--white); padding: 8px 0; color: var(--black); border: 1px solid transparent; }
.cal__d--out { color: var(--gray-dark); }
.cal__d--14 {
  background: var(--magenta) !important; color: var(--white) !important;
  font-weight: 700;
  outline: 2px solid var(--yellow); outline-offset: -3px;
  position: relative;
}
.cal__d--14::after {
  content: "★"; position: absolute; top: -2px; right: 2px; font-size: 9px; color: var(--yellow);
}
.cal__d--today { background: var(--gray); font-weight: 700; }
.cal__d--evt2 {
  background: var(--blue-2) !important; color: var(--white) !important;
  font-weight: 700;
  outline: 2px solid var(--lime); outline-offset: -3px;
}

.cal-event {
  margin-top: 12px;
  padding: 10px 12px;
  background: #ffffe1;
  border: 1px solid var(--black);
  font: 400 14px "Tahoma", sans-serif;
  display: grid; gap: 6px;
  line-height: 1.5;
}
.cal-event strong { font-weight: 700; }
.cal-event .when {
  font-family: "VT323", monospace;
  font-size: 19px;
  color: var(--magenta);
  letter-spacing: 0.02em;
}

.cal-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* OUTLOOK / MAIL */
.outlook__head {
  background: var(--gray);
  padding: 6px 10px;
  font: 400 14px "Tahoma", sans-serif;
  border-bottom: 1px solid var(--gray-dark);
  display: flex; gap: 1rem;
}
.outlook__head span:first-letter { text-decoration: underline; }
.mail-body { background: var(--white); padding: 16px 18px; display: grid; gap: 12px; }
.mail-body__head {
  font: 700 20px "Tahoma", sans-serif;
  color: var(--black);
  line-height: 1.3;
}
.mail-body__head em { color: var(--blue); font-style: italic; }
.mail-body__sub {
  font: 400 15px "Tahoma", sans-serif;
  color: var(--black);
  line-height: 1.6;
  max-width: 40ch;
}
.mail-form { display: grid; gap: 10px; align-items: end; grid-template-columns: 1fr auto; margin-top: 4px; }
.mail-consent {
  grid-column: 1 / -1;
  display: flex; align-items: flex-start; gap: 7px; margin-top: 2px;
  font: 400 15px "VT323", monospace; color: var(--gray-darker);
  line-height: 1.3; cursor: pointer;
}
.mail-consent input { margin: 3px 0 0; flex: none; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.mail-result { display: block; width: 100%; height: 44px; border: 0; background: var(--white); } /* 1-line confirmation; bumped to 2 lines under 900px (see media query) */

/* =================================================================
   WIN 04  —  FILE EXPLORER (RELEASES)  +  NOTEPAD + CER
================================================================= */
.win--explorer .win__title { background: linear-gradient(90deg, #3a4f8f, var(--blue-2)); }

.explorer__pathbar {
  padding: 6px 10px;
  background: var(--gray);
  font: 400 14px "Tahoma", sans-serif;
  border-bottom: 1px solid var(--gray-dark);
  display: flex; align-items: center; gap: 8px;
}
.explorer__pathbar::before {
  content: "Address:";
  font-weight: 400;
  margin-right: 2px;
}
.path-field {
  background: var(--white);
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  padding: 4px 8px;
  flex: 1;
  font: 400 14px "Tahoma", sans-serif;
}

.explorer__body {
  background: var(--white);
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.file {
  display: grid;
  justify-items: center;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
}
.file:hover { background: var(--select); color: var(--white); }
.file:hover .file__t { color: var(--white); }
.file__icon-frame {
  width: 80px; height: 80px;
  background: var(--gray);
  border: 1px solid var(--gray-darker);
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.file__icon-frame--cover {
  background-size: cover;
  background-position: center;
  image-rendering: pixelated;
}
.file__icon-frame--cover::after {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-conic-gradient(rgba(0,0,0,0.2) 0% 25%, transparent 0% 50%);
  background-size: 3px 3px;
  mix-blend-mode: multiply;
}
.file__art-mono {
  font-family: "Press Start 2P", monospace;
  font-size: 18px;
  color: var(--white);
}
.file__chip {
  position: absolute; top: 3px; left: 3px;
  background: var(--magenta); color: var(--white);
  padding: 2px 5px;
  font: 400 10px "Press Start 2P", monospace;
  z-index: 2;
}
.file__name {
  font: 400 14px "Tahoma", sans-serif;
  margin-top: 8px;
  text-align: center;
  line-height: 1.3;
}
.file__t { color: var(--black); font-weight: 700; font-size: 14px; }
.file__m { color: var(--gray-darker); font-size: 12px; margin-top: 3px; }

/* NOTEPAD (about) */
.win--note { width: 100%; }
.win--note .win__title { background: linear-gradient(90deg, #1d6f60, #11a98f); }
.note {
  background: var(--white);
  padding: 24px 28px;
  font: 400 19px "VT323", monospace;
  line-height: 1.6;
  color: var(--black);
}
.note h2 {
  font-family: "Press Start 2P", monospace;
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  color: var(--blue);
}
.note__decl {
  font-family: "Tahoma", sans-serif;
  font-weight: 800;
  font-size: 30px;
  line-height: 1.15;
  margin: 24px 0;
  color: var(--black);
}
.note__decl em { color: var(--magenta); font-style: italic; font-weight: 400; }
.note p { margin-bottom: 12px; max-width: 60ch; }
.note strong { color: var(--blue); }
.note em { color: var(--magenta); }

/* CERTIFICATE (credential) */
.cer {
  margin-top: 14px;
  background: var(--gray);
  padding: 14px 16px;
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--gray-darker);
  border-right: 2px solid var(--gray-darker);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}
.cer__icon {
  width: 64px; height: 64px;
  background: var(--white);
  border: 2px solid var(--black);
  display: grid; place-items: center;
  font-size: 38px;
}
.cer__body {
  display: grid; gap: 2px;
}
.cer__t {
  font-family: "Press Start 2P", monospace;
  font-size: 14px;
  color: var(--blue);
}
.cer__sub {
  font-family: "Tahoma", sans-serif;
  font-size: 16px;
  color: var(--black);
  line-height: 1.5;
}
.cer__sub em { color: var(--magenta); font-style: italic; }
.cer__sub small {
  display: block;
  font-family: "VT323", monospace;
  font-size: 17px;
  color: var(--gray-darker);
  margin-top: 4px;
}
.cer__verify {
  font: 400 16px "VT323", monospace;
  color: var(--gray-darker);
}
.cer__verify .ok { color: #008000; font-weight: 700; }

/* =================================================================
   TASKBAR
================================================================= */
.taskbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--gray);
  border-top: 2px solid var(--white);
  height: 36px;
  display: flex; align-items: center;
  padding: 2px 4px;
  z-index: 90;
  box-shadow: 0 -1px 0 var(--gray-darker);
}
.start {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--gray-darker);
  border-right: 2px solid var(--gray-darker);
  padding: 4px 12px;
  font: 700 15px "Tahoma", sans-serif;
  height: 30px;
  color: var(--black);
}
.start__flag {
  display: inline-grid; place-items: center;
  width: 18px; height: 18px;
  background: linear-gradient(135deg, var(--red) 0 50%, var(--lime) 50% 100%);
  border: 1px solid var(--black);
}
.taskbar__sep {
  width: 1px; height: 24px; background: var(--gray-darker);
  margin: 0 4px;
}
.task-tab {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--gray-darker);
  border-right: 2px solid var(--gray-darker);
  padding: 4px 12px;
  margin-right: 4px;
  font: 400 14px "Tahoma", sans-serif;
  height: 30px;
  color: var(--black);
}
.task-tab--active {
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  background: var(--gray-light);
}
.tray {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gray);
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  padding: 4px 12px;
  height: 30px;
  font: 400 14px "Tahoma", sans-serif;
}
.tray .icon { font-size: 13px; }
.tray .clock { color: var(--black); letter-spacing: 0.04em; }

@media (max-width: 900px) {
  .two-up { grid-template-columns: 1fr; }
  .win-player__body { grid-template-columns: 1fr; }
  .win-player__cover-frame { width: 100%; max-width: 280px; margin: 0 auto; }
  .explorer__body { grid-template-columns: repeat(2, 1fr); }
  .cer { grid-template-columns: auto 1fr; }
  .cer__verify { grid-column: 1 / -1; }
  .mail-result { height: 72px; } /* narrow iframe wraps the confirmation to 2 lines */
}
