:root {
  --win-teal: #008080;
  --win-face: silver;
  --win-navy: navy;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  background: var(--win-teal);
  min-height: 100vh;
  padding-bottom: 40px; /* clear the taskbar */
  display: flex;
  flex-direction: column;
}

/* Desktop */
.desktop {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
  padding: 28px 16px;
  flex-wrap: wrap;
}

/* Desktop icons */
.desktop-icons {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex-shrink: 0;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 78px;
  text-decoration: none;
  color: #fff;
  text-align: center;
}

.desktop-icon .icon-glyph {
  font-size: 30px;
  line-height: 1;
  filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.6));
}

.desktop-icon .icon-label {
  font-size: 11px;
  padding: 1px 3px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.7);
}

.desktop-icon:hover .icon-label,
.desktop-icon:focus .icon-label {
  background: var(--win-navy);
  outline: 1px dotted #fff;
  text-shadow: none;
}

/* Main window */
.main-window {
  width: 100%;
  max-width: 780px;
}

.title-bar-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Menu bar */
.menu-bar {
  display: flex;
  gap: 14px;
  padding: 3px 8px;
  border-bottom: 1px solid #808080;
  font-size: 11px;
}

.menu-bar span {
  cursor: default;
  padding: 2px 5px;
}

.menu-bar span:hover {
  background: var(--win-navy);
  color: #fff;
}

/* Toolbar */
.toolbar {
  gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px solid #808080;
  flex-wrap: wrap;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--win-face);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
  padding: 4px 12px;
  min-height: 23px;
  text-decoration: none;
  color: #000;
  font-size: 11px;
}

.toolbar-btn:active,
.toolbar-btn.active {
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
}

/* Address bar */
.address-bar {
  padding: 6px 8px;
  border-bottom: 1px solid #808080;
  gap: 8px;
}

.address-bar label {
  font-size: 11px;
  flex-shrink: 0;
}

.address-value {
  flex: 1;
  min-width: 0;
  padding: 3px 6px;
  background: #fff;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Window body content */
.page-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.paper {
  padding: 14px 16px;
}

.paper p {
  margin-bottom: 0.9em;
  line-height: 1.5;
}

.paper h1, .paper h2, .paper h3 {
  margin: 1em 0 0.4em;
  font-weight: bold;
}

.paper img {
  max-width: 100%;
  margin: 0.5em 0;
}

.lead {
  font-size: 13px;
  line-height: 1.5;
}

fieldset {
  margin-top: 14px;
  font-size: 11px;
}

legend {
  padding: 0 4px;
  font-weight: bold;
}

/* File-explorer style listing */
.section-label {
  font-size: 11px;
  font-weight: bold;
  margin: 14px 0 6px;
}

table.explorer {
  width: 100%;
}

table.explorer a {
  text-decoration: none;
  color: #000;
}

table.explorer a:hover {
  text-decoration: underline;
}

/* Taskbar */
.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38px;
  background: var(--win-face);
  box-shadow: inset 0 1px #fff, inset 0 2px #dfdfdf, 0 -1px #000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px;
  z-index: 1000;
}

.start-button {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: bold;
  background: var(--win-face);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
  padding: 2px 10px;
  height: 28px;
  font-size: 11px;
}

.taskbar .vertical-bar {
  height: 24px;
}

.task-button {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--win-face);
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
  padding: 2px 10px;
  height: 28px;
  min-width: 140px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  text-align: left;
}

.tray {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 24px;
  padding: 2px 10px;
  box-shadow: inset -1px -1px #fff, inset 1px 1px grey;
  font-size: 11px;
}

/* Responsive */
@media (max-width: 700px) {
  .desktop {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .desktop-icons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .task-button {
    min-width: 90px;
  }
}
