
:root {
  --desktop: #008080;
  --win-gray: #c0c0c0;
  --win-dark: #808080;
  --win-light: #ffffff;
  --win-blue: #000080;
  --win-blue-light: #1084d0;
  --text: #111;
  --panel-gap: 12px;
  --shadow-raised: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  --shadow-sunken: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(45deg, rgba(255,255,255,.03) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.03) 25%, transparent 25%),
    var(--desktop);
  background-size: 16px 16px;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 10;
  padding: 8px 12px;
  background: #ffffcc;
  color: #000;
  border: 2px solid #000;
}

.skip-link:focus {
  top: 12px;
}

.desktop {
  min-height: 100vh;
  padding: 24px 24px 56px 116px;
  position: relative;
}

.desktop-icons {
  position: fixed;
  top: 24px;
  left: 16px;
  display: grid;
  gap: 22px;
  width: 78px;
}

.desktop-icon {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: #fff;
  text-decoration: none;
  text-align: center;
  font-size: 12px;
  text-shadow: 1px 1px #000;
}

.desktop-icon:focus span:last-child,
.desktop-icon:hover span:last-child {
  outline: 1px dotted #fff;
  background: var(--win-blue);
}

.app-window {
  width: min(1180px, 100%);
  margin: 0 auto;
  box-shadow: 10px 10px 0 rgba(0,0,0,.25);
}

.title-bar {
  align-items: center;
}

.title-bar-text {
  letter-spacing: .1px;
}

.title-bar-controls button {
  min-width: 16px;
  min-height: 14px;
}

.menu-bar {
  display: flex;
  gap: 18px;
  padding: 4px 8px;
  border-bottom: 1px solid var(--win-dark);
}

.menu-bar span::first-letter {
  text-decoration: underline;
}

.hero {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: center;
  padding: 22px;
  border-top: 1px solid var(--win-light);
  border-bottom: 2px groove #fff;
  background:
    linear-gradient(90deg, #d7d7d7 0%, #efefef 100%);
}

.hero h1 {
  margin: 4px 0 6px;
  font-size: clamp(24px, 5vw, 44px);
  line-height: 1;
}

.hero p {
  max-width: 760px;
  margin: 0;
}

.eyebrow {
  margin: 0;
  font-weight: 700;
  color: var(--win-blue);
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: var(--panel-gap);
  padding: var(--panel-gap);
}

.toc-panel {
  position: sticky;
  top: 12px;
  align-self: start;
  max-height: calc(100vh - 108px);
  overflow: auto;
  padding: 8px;
  background: var(--win-gray);
  box-shadow: var(--shadow-sunken);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 4px 6px;
  color: #fff;
  background: linear-gradient(90deg, var(--win-blue), var(--win-blue-light));
  font-weight: 700;
}

.toc-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-panel li {
  margin: 1px 0;
}

.toc-panel a {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 4px;
  padding: 4px;
  color: #000;
  text-decoration: none;
}

.toc-panel a:hover,
.toc-panel a:focus {
  color: #fff;
  background: var(--win-blue);
  outline: 1px dotted #fff;
}

.toc-h3 a {
  padding-left: 22px;
  font-size: 12px;
}

.content-panel {
  min-width: 0;
  padding: clamp(16px, 3vw, 34px);
  background: #fff;
  box-shadow: var(--shadow-sunken);
  font-size: 16px;
  line-height: 1.58;
}

.content-panel > *:first-child {
  margin-top: 0;
}

.content-panel h1 {
  display: none;
}

.content-panel h2 {
  position: relative;
  margin-top: 34px;
  padding: 6px 8px;
  color: #fff;
  background: linear-gradient(90deg, var(--win-blue), var(--win-blue-light));
  font-size: 24px;
  line-height: 1.2;
}

.content-panel h3 {
  margin-top: 26px;
  font-size: 19px;
  border-bottom: 2px solid var(--win-gray);
}

.content-panel h4 {
  font-size: 16px;
}

.anchor {
  display: inline-block;
  width: 0;
  transform: translateX(-18px);
  opacity: 0;
  color: inherit;
  text-decoration: none;
}

h2:hover .anchor,
h3:hover .anchor,
h2:focus-within .anchor,
h3:focus-within .anchor {
  opacity: 1;
}

.content-panel p,
.content-panel li {
  max-width: 78ch;
}

.content-panel ul,
.content-panel ol {
  padding-left: 28px;
}

.content-panel li + li {
  margin-top: 6px;
}

.content-panel strong {
  background: #ffffcc;
  padding: 0 2px;
}

.content-panel code {
  padding: 1px 4px;
  background: #f5f5f5;
  border: 1px solid #c0c0c0;
  font-family: "Lucida Console", Monaco, monospace;
  font-size: .92em;
}

.content-panel pre {
  padding: 12px;
  overflow-x: auto;
  background: #000;
  color: #00ff66;
  box-shadow: var(--shadow-sunken);
}

.content-panel pre code {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
}

.content-panel blockquote {
  margin: 18px 0;
  padding: 14px 16px 14px 42px;
  background: #ffffe1;
  border: 2px solid #000;
  box-shadow: 4px 4px 0 #808080;
  position: relative;
}

.content-panel blockquote::before {
  content: "!";
  position: absolute;
  top: 13px;
  left: 13px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #000;
  background: #ff0;
  border: 1px solid #000;
  font-weight: 700;
}

.content-panel table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  background: #fff;
  box-shadow: var(--shadow-sunken);
}

.content-panel th,
.content-panel td {
  padding: 8px 10px;
  border: 1px solid #808080;
  text-align: left;
  vertical-align: top;
}

.content-panel th {
  background: var(--win-gray);
  box-shadow: inset 1px 1px #fff, inset -1px -1px #808080;
}

.content-panel a {
  color: #0000ee;
}

.external-link::after {
  content: " ↗";
  font-size: .8em;
}

.status-bar {
  gap: 4px;
  padding: 4px;
}

.status-bar-field {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 86px;
  gap: 6px;
  align-items: center;
  padding: 4px;
  background: var(--win-gray);
  box-shadow: inset 0 1px #fff;
  z-index: 5;
}

.start-button,
.task-button,
.tray {
  height: 27px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  background: var(--win-gray);
  box-shadow: var(--shadow-raised);
  font-weight: 700;
}

.task-button {
  justify-content: flex-start;
  box-shadow: var(--shadow-sunken);
  overflow: hidden;
}

.tray {
  justify-content: center;
  font-weight: 400;
  box-shadow: var(--shadow-sunken);
}

.pixel-icon,
.mini-icon {
  display: inline-block;
  image-rendering: pixelated;
  position: relative;
  flex: 0 0 auto;
}

.pixel-icon {
  width: 40px;
  height: 40px;
}

.pixel-icon.computer {
  background:
    linear-gradient(#e5e5e5 0 0) 8px 6px / 25px 19px no-repeat,
    linear-gradient(#000080 0 0) 11px 9px / 19px 12px no-repeat,
    linear-gradient(#808080 0 0) 14px 26px / 13px 5px no-repeat,
    linear-gradient(#c0c0c0 0 0) 9px 32px / 25px 5px no-repeat;
  border: 2px solid #000;
  background-color: #c0c0c0;
}

.pixel-icon.disk {
  background:
    linear-gradient(#111 0 0) 8px 6px / 24px 7px no-repeat,
    linear-gradient(#fff 0 0) 12px 20px / 16px 13px no-repeat,
    linear-gradient(#808080 0 0) 24px 22px / 4px 8px no-repeat;
  background-color: #1f4fbf;
  border: 2px solid #000;
  box-shadow: inset -3px -3px #08266e, inset 3px 3px #7aa1ff;
}

.pixel-icon.toolbox {
  background:
    linear-gradient(#804000 0 0) 11px 8px / 18px 6px no-repeat,
    linear-gradient(#f4b400 0 0) 6px 14px / 28px 20px no-repeat,
    linear-gradient(#000 0 0) 6px 23px / 28px 2px no-repeat,
    linear-gradient(#fff 0 0) 10px 18px / 8px 3px no-repeat;
  border: 2px solid #000;
}

.pixel-icon.harddrive {
  background:
    linear-gradient(#e5e5e5 0 0) 5px 10px / 48px 35px no-repeat,
    radial-gradient(circle at 40px 33px, #00aa00 0 4px, transparent 5px),
    linear-gradient(#808080 0 0) 10px 17px / 32px 4px no-repeat,
    linear-gradient(#808080 0 0) 10px 25px / 25px 4px no-repeat;
  width: 58px;
  height: 58px;
  border: 2px solid #000;
  background-color: #c0c0c0;
  box-shadow: inset -3px -3px #808080, inset 3px 3px #fff;
}

.mini-icon {
  width: 14px;
  height: 14px;
}

.mini-icon.folder,
.mini-icon.doc,
.mini-icon.tool,
.mini-icon.search,
.mini-icon.disk,
.mini-icon.restore,
.mini-icon.programs,
.mini-icon.brush,
.mini-icon.globe,
.mini-icon.broom,
.mini-icon.calendar,
.mini-icon.chart,
.mini-icon.start {
  border: 1px solid #000;
  background: #ffcc33;
  box-shadow: inset -1px -1px #a07000, inset 1px 1px #fff;
}

.mini-icon.doc { background: #fff; }
.mini-icon.search { border-radius: 50%; background: #e6f2ff; }
.mini-icon.disk { background: #315ec7; }
.mini-icon.restore { background: #00aa55; }
.mini-icon.programs { background: #c0c0c0; }
.mini-icon.brush { background: #ff6699; }
.mini-icon.globe { border-radius: 50%; background: #2f80ed; }
.mini-icon.broom { background: #996633; }
.mini-icon.calendar { background: #fff; }
.mini-icon.chart { background: linear-gradient(90deg, #00aa55 30%, #ffcc33 30% 65%, #cc3333 65%); }
.mini-icon.tool { background: #999; }
.mini-icon.start { background: conic-gradient(#f00 0 25%, #0a0 0 50%, #00f 0 75%, #ff0 0); }

@media (max-width: 860px) {
  .desktop {
    padding: 10px 10px 48px;
  }

  .desktop-icons {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .toc-panel {
    position: static;
    max-height: 280px;
  }

  .content-panel {
    font-size: 15px;
  }

  .content-panel h2 {
    font-size: 21px;
  }

  .status-bar {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
