/* Windows 7 window chrome, common controls and the programs that run on the
   desktop. Metrics follow the Aero theme: 23px buttons, 19px progress bars,
   17px caption buttons and a translucent 8px frame. */

:root {
  --w7-face: #f0f0f0;
  --w7-text: #000;
  --w7-link: #06c;
  --w7-line: #dfdfdf;
  --w7-field-label: #444;
  --eth: 98, 126, 234;
}

/* ---------- Window layer ---------- */

.layer {
  position: absolute;
  inset: 0 0 var(--taskbar-height);
  overflow: hidden;
  pointer-events: none;
  z-index: 4;
}

/* Windows steps the screen back when it wants an answer before anything else
   happens. Light enough that the wallpaper can keep rotting behind it. */
.dim {
  position: absolute;
  inset: 0;
  z-index: 7;
  background: #000;
  opacity: 0;
  transition: opacity 400ms ease-out;
}

.dim.is-on {
  opacity: 0.52;
}

body.is-alerting .layer {
  z-index: 8;
}

/* ---------- Aero frame ---------- */

.win {
  --frame: 8px;
  --caption: 30px;
  position: absolute;
  pointer-events: auto;
  padding: 0 var(--frame) var(--frame);
  border-radius: 8px 8px 4px 4px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.5),
      rgba(255, 255, 255, 0.16) 30px,
      rgba(255, 255, 255, 0.08)
    ),
    rgba(198, 221, 243, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    0 0 0 1px rgba(41, 76, 110, 0.55),
    0 12px 34px rgba(0, 16, 38, 0.4),
    0 2px 6px rgba(0, 16, 38, 0.28);
  animation: win-open 150ms ease-out;
}

.win--dialog {
  --frame: 5px;
}

/* Nothing gets stacked over the security alert. */
.win--top {
  z-index: 900 !important;
}

.win.is-closing {
  animation: win-close 130ms ease-in forwards;
  pointer-events: none;
}

.win.is-minimized {
  display: none;
}

.win.is-maximized {
  inset: 0 !important;
  width: auto !important;
  border-radius: 0;
}

.win.is-maximized .win-body {
  height: calc(100vh - var(--taskbar-height) - var(--caption) - var(--frame)) !important;
}

@keyframes win-open {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}

@keyframes win-close {
  to {
    opacity: 0;
    transform: scale(0.96);
  }
}

.win:not(.is-active) {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.34),
      rgba(255, 255, 255, 0.1) 30px,
      rgba(255, 255, 255, 0.06)
    ),
    rgba(220, 231, 242, 0.66);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    0 0 0 1px rgba(80, 110, 140, 0.4),
    0 8px 22px rgba(0, 16, 38, 0.28);
}

/* ---------- Caption ---------- */

.win-caption {
  height: var(--caption);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 1px 96px 0 4px;
}

.win--dialog .win-caption {
  padding-right: 52px;
}

.win-caption img {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.win-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  color: #16344f;
  text-shadow:
    0 0 4px #fff,
    0 0 4px #fff,
    0 0 8px rgba(255, 255, 255, 0.9),
    0 1px 0 rgba(255, 255, 255, 0.8);
}

.win:not(.is-active) .win-title {
  color: #567791;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.85);
}

.win-controls {
  position: absolute;
  top: 1px;
  right: 1px;
  display: flex;
  gap: 1px;
}

.win-ctl {
  width: 26px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.66),
    rgba(255, 255, 255, 0.24) 47%,
    rgba(228, 240, 250, 0.4) 52%,
    rgba(255, 255, 255, 0.5)
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.62),
    0 0 0 1px rgba(65, 100, 134, 0.5);
}

.win-ctl--close {
  width: 44px;
  border-radius: 2px 5px 2px 2px;
  background: linear-gradient(
    180deg,
    rgba(255, 226, 220, 0.72),
    rgba(255, 190, 178, 0.34) 47%,
    rgba(246, 158, 142, 0.42) 52%,
    rgba(255, 204, 194, 0.55)
  );
}

.win-ctl svg {
  width: 11px;
  height: 11px;
  stroke: #123249;
  stroke-width: 1.6;
  fill: none;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.75));
}

.win-ctl:hover {
  background: linear-gradient(
    180deg,
    rgba(228, 246, 255, 0.95),
    rgba(178, 226, 250, 0.6) 47%,
    rgba(150, 213, 246, 0.66) 52%,
    rgba(206, 240, 255, 0.8)
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.85),
    0 0 0 1px rgba(58, 122, 168, 0.7),
    0 0 7px rgba(140, 214, 250, 0.9);
}

.win-ctl--close:hover {
  background: linear-gradient(
    180deg,
    rgba(255, 148, 128, 0.95),
    rgba(238, 84, 58, 0.85) 47%,
    rgba(214, 54, 30, 0.9) 52%,
    rgba(240, 116, 92, 0.9)
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.6),
    0 0 0 1px rgba(150, 32, 16, 0.75),
    0 0 7px rgba(255, 130, 100, 0.8);
}

.win-ctl--close:hover svg {
  stroke: #fff;
}

.win-ctl:active {
  background: linear-gradient(180deg, rgba(120, 180, 216, 0.9), rgba(160, 210, 238, 0.8));
}

/* ---------- Client area ---------- */

.win-body {
  position: relative;
  background: var(--w7-face);
  color: var(--w7-text);
  font-size: 12px;
  box-shadow: 0 0 0 1px rgba(86, 118, 148, 0.55);
  overflow: hidden;
}

/* ---------- Common controls ---------- */

.w7-btn {
  min-width: 75px;
  height: 23px;
  padding: 0 10px;
  font-size: 12px;
  color: #000;
  border-radius: 3px;
  background: linear-gradient(180deg, #fdfdfd, #f4f4f4 46%, #e9e9e9 47%, #dcdcdc);
  box-shadow:
    inset 0 0 0 1px #fff,
    0 0 0 1px #707070;
}

.w7-btn:hover {
  background: linear-gradient(180deg, #eaf6fd, #dcf0fa 46%, #c4e5f6 47%, #a7d9f5);
  box-shadow:
    inset 0 0 0 1px #fff,
    0 0 0 1px #3c7fb1;
}

.w7-btn:active {
  background: linear-gradient(180deg, #e5f4fc, #c9e7f7 46%, #9ed3ee 47%, #68b3db);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    0 0 0 1px #2c628b;
}

.w7-btn:disabled {
  color: #838383;
  background: #f4f4f4;
  box-shadow:
    inset 0 0 0 1px #fff,
    0 0 0 1px #adb2b5;
}

.w7-btn--wide {
  min-width: 116px;
}

.w7-btn.is-default {
  box-shadow:
    inset 0 0 0 1px #fff,
    0 0 0 1px #3c7fb1,
    0 0 5px rgba(60, 127, 177, 0.75);
}

.w7-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.w7-check input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #2c628b;
}

.w7-link {
  color: var(--w7-link);
  text-decoration: none;
  cursor: default;
}

.w7-link:hover {
  text-decoration: underline;
}

.w7-progress {
  position: relative;
  height: 19px;
  border-radius: 3px;
  overflow: hidden;
  background: linear-gradient(180deg, #bcbcbc, #d8d8d8 8%, #f4f4f4 60%, #fdfdfd);
  box-shadow: 0 0 0 1px #9a9a9a;
}

.w7-progress-fill {
  height: 100%;
  width: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(180deg, #b6e8a8, #7ddc68 45%, #34c11f 46%, #2ba81a 82%, #7ce069);
  transition: width 120ms linear;
}

/* The glossy band that keeps sweeping across a Windows 7 progress bar. */
.w7-progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 90px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.55),
    rgba(255, 255, 255, 0)
  );
  animation: progress-shine 2.4s linear infinite;
}

@keyframes progress-shine {
  from {
    transform: translateX(-90px);
  }
  to {
    transform: translateX(calc(100% + 90px));
  }
}

/* ---------- Dialog layout ---------- */

.dlg {
  padding: 12px 11px 0;
}

.dlg-main {
  display: flex;
  gap: 12px;
}

.dlg-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.dlg-copy {
  flex: 1;
  min-width: 0;
}

.dlg--padded {
  padding-bottom: 13px;
}

.dlg-head {
  font-size: 12px;
  line-height: 1.35;
}

.dlg-head + .dlg-head {
  margin-top: 9px;
}

.dlg-fields {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 3px 10px;
  margin-top: 14px;
}

.dlg-fields dt {
  color: var(--w7-field-label);
}

.dlg-fields dd {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dlg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 18px;
}

.dlg-check {
  margin-top: 14px;
  padding-left: 2px;
}

.dlg-note {
  display: flex;
  gap: 9px;
  margin-top: 12px;
  padding: 10px 11px 12px;
  border-top: 1px solid var(--w7-line);
  color: #333;
  line-height: 1.4;
}

.dlg-note img {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
}

/* ---------- Security Essentials alert ---------- */

.mse {
  background: #fff;
}

.mse-band {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  color: #fff;
  background: linear-gradient(180deg, #d8483a, #c22d1e 52%, #a81b0d);
  border-bottom: 1px solid #8d1608;
}

.mse-shield {
  width: 36px;
  height: 40px;
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.mse-band-text strong {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.mse-band-text span {
  display: block;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
}

.mse-pane {
  padding: 15px 16px 17px;
}

.mse-rows {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 14px;
}

.mse-row {
  display: contents;
}

.mse-row > span:first-child {
  color: var(--w7-field-label);
}

.mse-item {
  font-weight: bold;
}

.mse-level {
  font-weight: bold;
  color: #c1170a;
}

.mse-note {
  margin-top: 13px;
  line-height: 1.45;
}

.mse-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding: 12px 16px 13px;
  background: var(--w7-face);
  border-top: 1px solid #dcdcdc;
}

/* ---------- Installer ---------- */

.setup {
  padding: 15px 14px 14px;
}

.setup-phase {
  min-height: 15px;
  margin-bottom: 9px;
}

.setup-detail {
  min-height: 15px;
  margin-top: 9px;
  color: #555;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.setup-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.setup.is-done .setup-phase {
  font-weight: 600;
}

/* ---------- Task Manager ---------- */

.taskmgr {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--w7-face);
}

.taskmgr-menu {
  display: flex;
  gap: 2px;
  padding: 2px 2px 3px;
}

.taskmgr-menu span {
  padding: 2px 7px;
  border-radius: 2px;
}

.taskmgr-menu span:hover {
  background: linear-gradient(180deg, #eaf6fd, #c4e5f6);
  box-shadow: 0 0 0 1px #7da2ce;
}

.taskmgr-tabs {
  display: flex;
  gap: 2px;
  margin: 2px 4px -1px;
  position: relative;
  z-index: 1;
}

.taskmgr-tab {
  padding: 4px 9px 5px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #f6f6f6, #eaeaea 60%, #dedede);
  box-shadow: 0 0 0 1px #8d9297;
  color: #1a1a1a;
}

.taskmgr-tab.is-active {
  padding-bottom: 6px;
  background: linear-gradient(180deg, #fdfdfd, #f4f4f4);
  box-shadow: 0 0 0 1px #8d9297;
}

.taskmgr-pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0 4px;
  padding: 4px;
  background: #f4f4f4;
  box-shadow: 0 0 0 1px #8d9297;
}

.proc {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 0 0 1px #a0a0a0;
}

.proc-head,
.proc-row {
  display: grid;
  grid-template-columns: 1fr 84px 40px 104px 96px;
}

.proc-head {
  flex: 0 0 auto;
  background: linear-gradient(180deg, #fdfdfd, #f1f1f1 60%, #e4e4e4);
  box-shadow: 0 1px 0 #d0d0d0;
}

.proc-head span {
  padding: 3px 6px 4px;
  border-right: 1px solid #dcdcdc;
  color: #1a1a1a;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.proc-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.proc-row span {
  padding: 2px 6px 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.proc-row span:nth-child(3),
.proc-row span:nth-child(4) {
  text-align: right;
}

.proc-row.is-selected {
  background: linear-gradient(180deg, #dcebfc, #c1dbf7);
  box-shadow: inset 0 0 0 1px #b0d1f3;
}

.taskmgr-actions {
  display: flex;
  justify-content: flex-end;
  padding: 8px 1px 2px;
}

.taskmgr-status {
  display: flex;
  gap: 0;
  padding: 3px 5px 4px;
  color: #1a1a1a;
}

.taskmgr-status span {
  padding: 1px 8px;
  border-left: 1px solid #cfcfcf;
  box-shadow: -1px 0 0 #fff;
}

.taskmgr-status span:first-child {
  border-left: none;
  box-shadow: none;
  padding-left: 2px;
  margin-right: auto;
}

/* ---------- Notepad and console programs ---------- */

.pad {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.pad-menu {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: var(--w7-face);
  box-shadow: 0 1px 0 #d6d6d6;
}

.pad-menu span {
  padding: 2px 7px;
  border-radius: 2px;
}

.pad-text {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 3px 5px;
  font-family: "Lucida Console", "DejaVu Sans Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  -webkit-user-select: text;
  user-select: text;
}

.console {
  height: 100%;
  padding: 4px 6px;
  overflow-y: auto;
  background: #000;
  color: #c0c0c0;
  font-family: "Lucida Console", "DejaVu Sans Mono", monospace;
  font-size: 12px;
  line-height: 1.35;
  white-space: pre-wrap;
  -webkit-user-select: text;
  user-select: text;
}

.console b {
  color: #fff;
  font-weight: 400;
}

.console-caret {
  display: inline-block;
  width: 7px;
  height: 12px;
  vertical-align: -2px;
  background: #c0c0c0;
  animation: caret 1.1s steps(1) infinite;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

/* ---------- Report pane used by the site's own programs ---------- */

.report {
  padding: 13px 14px 15px;
  line-height: 1.5;
}

.report h2 {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #003399;
}

.report p + h2,
.report-rows + h2 {
  margin-top: 15px;
}

.report-rows {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 14px;
  margin-top: 4px;
}

.report-rows dt {
  color: var(--w7-field-label);
}

/* ---------- Taskbar window buttons ---------- */

.taskbar-windows {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 0 3px 2px;
}

.tb-win {
  max-width: 158px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 3px;
  color: #fff;
  font-size: 12px;
  text-shadow: 0 1px 1px rgba(0, 20, 45, 0.7);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.16),
    rgba(255, 255, 255, 0.04) 50%,
    rgba(255, 255, 255, 0.12)
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(0, 22, 48, 0.2);
}

.tb-win img {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.tb-win span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tb-win:hover {
  background: linear-gradient(
    180deg,
    rgba(219, 243, 255, 0.4),
    rgba(147, 205, 247, 0.24) 52%,
    rgba(181, 226, 253, 0.34)
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    inset 0 0 8px rgba(255, 255, 255, 0.28);
}

.tb-win.is-active {
  background: linear-gradient(
    180deg,
    rgba(226, 245, 255, 0.5),
    rgba(160, 210, 245, 0.34) 52%,
    rgba(196, 232, 253, 0.44)
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    inset 0 0 10px rgba(255, 255, 255, 0.3),
    0 0 0 1px rgba(0, 22, 48, 0.25);
}

/* ---------- Tray notification ---------- */

.balloons {
  position: absolute;
  right: 12px;
  bottom: calc(var(--taskbar-height) + 9px);
  z-index: 6;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
}

.balloon {
  position: relative;
  width: 278px;
  padding: 11px 12px 13px;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff, #f7fafd 55%, #eef4fa);
  box-shadow:
    0 0 0 1px #7f9dba,
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 8px 22px rgba(0, 20, 45, 0.35);
  animation: balloon-in 220ms ease-out;
}

.balloon.is-closing {
  animation: balloon-out 200ms ease-in forwards;
}

/* Callout tail pointing down at the notification area. */
.balloon::before,
.balloon::after {
  content: "";
  position: absolute;
  right: 26px;
  bottom: -9px;
  border: 9px solid transparent;
  border-top-color: #7f9dba;
  border-bottom: 0;
}

.balloon::after {
  bottom: -8px;
  border-width: 8px;
  border-top-color: #eff5fa;
  right: 27px;
}

.balloon-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}

.balloon-head img {
  width: 16px;
  height: 16px;
}

.balloon-head strong {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: #003399;
}

.balloon-close {
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  color: #4a5a6a;
  font-size: 11px;
}

.balloon-close:hover {
  background: linear-gradient(180deg, #eaf6fd, #c4e5f6);
  box-shadow: 0 0 0 1px #7da2ce;
}

.balloon p {
  font-size: 12px;
  line-height: 1.4;
  color: #1a1a1a;
}

@keyframes balloon-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes balloon-out {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------- Menus ---------- */

.menus {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.menu {
  position: absolute;
  min-width: 176px;
  padding: 2px;
  pointer-events: auto;
  background: linear-gradient(90deg, #f1f1f1 0 24px, #fff 24px);
  box-shadow:
    inset 0 0 0 1px #fff,
    0 0 0 1px #a5a5a5,
    3px 3px 10px rgba(0, 12, 30, 0.22);
  animation: menu-in 80ms ease-out;
}

@keyframes menu-in {
  from {
    opacity: 0;
  }
}

.menu-item {
  display: grid;
  grid-template-columns: 22px 1fr 14px;
  align-items: center;
  height: 22px;
  padding-right: 6px;
  border-radius: 3px;
  font-size: 12px;
  white-space: nowrap;
}

.menu-item.is-strong .menu-label {
  font-weight: 600;
}

.menu-item.is-disabled {
  color: #6d6d6d;
}

.menu-item:not(.is-disabled):hover,
.menu-item.is-open {
  background: linear-gradient(180deg, #eaf6fd, #d6effc 47%, #bee6fd 48%, #a7d9f5);
  box-shadow: 0 0 0 1px #92c9e8;
}

.menu-gutter {
  display: grid;
  place-items: center;
  color: #303030;
}

.menu-mark {
  width: 9px;
  height: 8px;
  fill: #303030;
}

.menu-arrow {
  width: 4px;
  height: 7px;
  justify-self: end;
  fill: #4a4a4a;
}

.menu-rule {
  height: 1px;
  margin: 3px 2px 3px 24px;
  background: #e2e2e2;
  box-shadow: 0 1px 0 #fff;
}

/* ---------- Tooltip ---------- */

.tooltip {
  position: absolute;
  z-index: 9;
  max-width: 320px;
  padding: 3px 6px 4px;
  background: #fff;
  color: #000;
  font-size: 11px;
  line-height: 1.4;
  pointer-events: none;
  box-shadow:
    0 0 0 1px #767676,
    1px 1px 4px rgba(0, 12, 30, 0.2);
}

.tooltip span {
  display: block;
}

/* ---------- Properties ---------- */

.props {
  padding: 6px 0 0;
}

.props-tabs {
  display: flex;
  gap: 2px;
  position: relative;
  z-index: 1;
  margin: 0 7px -1px;
}

.props-tab {
  padding: 4px 9px 5px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #f6f6f6, #eaeaea 60%, #dedede);
  box-shadow: 0 0 0 1px #8d9297;
}

.props-tab.is-active {
  padding-bottom: 6px;
  background: linear-gradient(180deg, #fdfdfd, #f4f4f4);
}

.props-pane {
  margin: 0 7px;
  padding: 12px 12px 11px;
  background: var(--w7-face);
  box-shadow: 0 0 0 1px #8d9297;
}

.props-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 11px;
  border-bottom: 1px solid #d7d7d7;
}

.props-title img {
  width: 32px;
  height: 32px;
}

.w7-field {
  flex: 1;
  min-width: 0;
  height: 20px;
  padding: 0 4px;
  background: #fff;
  font-size: 12px;
  color: #000;
  box-shadow: 0 0 0 1px #a0a0a0;
}

.props-rows {
  display: grid;
  gap: 5px;
  padding: 11px 0;
  border-bottom: 1px solid #d7d7d7;
}

.props-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px;
}

.props-row span:first-child {
  color: var(--w7-field-label);
}

.props-attrs {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 12px;
}

.props-attrs > span {
  color: var(--w7-field-label);
}

.props-attrs .w7-btn {
  min-width: 86px;
  height: 21px;
  margin-left: auto;
}

.props-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding: 12px 7px 9px;
}

.dlg-icon--mid {
  width: 32px;
  height: 32px;
}

.dlg-detail {
  margin-top: 10px;
  color: #333;
}

/* ---------- Explorer ---------- */

.ex {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
}

.ex-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 6px;
  background: linear-gradient(180deg, #f8fafc, #edf1f5);
  box-shadow: 0 1px 0 #dde2e8;
}

.ex-arrow {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 32%, #fff, #e3edf7 62%, #c4d8ea);
  box-shadow:
    inset 0 0 0 1px #fff,
    0 0 0 1px #9db2c6;
}

.ex-arrow::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  height: 0;
  margin: auto;
  border: 5px solid transparent;
  border-right-color: #21618f;
  transform: translateX(-2px);
}

.ex-arrow--fwd::before {
  border-right-color: transparent;
  border-left-color: #21618f;
  transform: translateX(3px);
}

.ex-arrow:disabled {
  opacity: 0.4;
}

.ex-path {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  overflow: hidden;
  white-space: nowrap;
  background: #fff;
  box-shadow: 0 0 0 1px #a4b5c5;
}

.ex-path span + span::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin: 0 7px;
  vertical-align: 1px;
  border: 3.5px solid transparent;
  border-left-color: #8a99a8;
}

.ex-find {
  width: 132px;
  flex: 0 0 auto;
  height: 22px;
  padding: 3px 7px;
  overflow: hidden;
  white-space: nowrap;
  color: #8b8b8b;
  background: #fff;
  box-shadow: 0 0 0 1px #a4b5c5;
}

.ex-command {
  display: flex;
  gap: 2px;
  padding: 4px 6px;
  overflow: hidden;
  background: linear-gradient(180deg, #fcfdfe, #f1f4f7);
  box-shadow: 0 1px 0 #dde2e8;
}

.ex-command span {
  padding: 3px 8px 4px;
  border-radius: 3px;
  white-space: nowrap;
}

.ex-command span:hover {
  background: linear-gradient(180deg, #eaf6fd, #c4e5f6);
  box-shadow: 0 0 0 1px #7da2ce;
}

.ex-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 156px 1fr;
}

.ex-tree {
  overflow: auto;
  padding: 6px 0;
  box-shadow: inset -1px 0 0 #e6e6e6;
}

.ex-branch,
.ex-leaf {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 21px;
  padding-right: 8px;
  white-space: nowrap;
}

.ex-branch {
  padding-left: 4px;
}

.ex-leaf {
  padding-left: 34px;
}

.ex-branch img,
.ex-leaf img {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.ex-branch:hover,
.ex-leaf:hover {
  background: linear-gradient(180deg, #f7fbfe, #e9f4fd);
  box-shadow: inset 0 0 0 1px #d8ecfa;
}

.ex-twist {
  position: relative;
  width: 12px;
  height: 16px;
  flex: 0 0 auto;
}

.ex-twist:not(.is-empty)::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  height: 0;
  margin: auto;
  border: 4px solid transparent;
  border-left-color: #9aa5ae;
  transform: translateX(1px);
}

.ex-branch.is-open .ex-twist::before {
  border-left-color: #4c565e;
  transform: rotate(45deg) translate(-1px, 1px);
}

.ex-kids {
  display: none;
}

.ex-kids.is-open {
  display: block;
}

.ex-view {
  overflow: auto;
  padding: 9px 11px 12px;
}

.ex-group {
  padding: 3px 2px 5px;
  color: #1e3d63;
  box-shadow: inset 0 -1px 0 #e7edf3;
}

.ex-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 9px 0 14px;
}

.ex-tile {
  display: flex;
  gap: 9px;
  width: 212px;
  padding: 4px;
  border-radius: 3px;
}

.ex-tile:hover {
  background: linear-gradient(180deg, #f6fbfe, #e8f4fd);
  box-shadow: 0 0 0 1px #d6ebfa;
}

.ex-tile img {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.ex-tile-text {
  flex: 1;
  min-width: 0;
}

.ex-tile-name {
  margin: 1px 0 5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ex-gauge {
  height: 11px;
  border-radius: 2px;
  overflow: hidden;
  background: linear-gradient(180deg, #e4e4e4, #f2f2f2);
  box-shadow: 0 0 0 1px #b4b4b4;
}

.ex-gauge i {
  display: block;
  height: 100%;
  background: linear-gradient(180deg, #b5ddf5, #58a9df 48%, #2f8ccb 52%, #66b6e4);
}

.ex-gauge.is-full i {
  background: linear-gradient(180deg, #f7aca4, #e06554 48%, #cb3d2c 52%, #ea7a68);
}

.ex-tile-note {
  margin-top: 4px;
  font-size: 11px;
  color: #555;
}

.ex-list-head,
.ex-row {
  display: grid;
  grid-template-columns: 1fr 120px 110px 74px;
}

.ex-list-head {
  box-shadow: 0 1px 0 #dde2e8;
}

.ex-list-head span {
  padding: 3px 7px 4px;
  border-right: 1px solid #e5e9ee;
  background: linear-gradient(180deg, #fdfdfd, #f2f5f8);
  overflow: hidden;
  white-space: nowrap;
}

.ex-row span {
  padding: 2px 7px 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ex-cell-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ex-cell-name img {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.ex-row:hover {
  background: linear-gradient(180deg, #f7fbfe, #e9f4fd);
  box-shadow: inset 0 0 0 1px #d8ecfa;
}

.ex-row.is-selected {
  background: linear-gradient(180deg, #dcebfc, #c1dbf7);
  box-shadow: inset 0 0 0 1px #b0d1f3;
}

.ex-empty {
  padding: 10px 2px;
  color: #555;
}

.ex-details {
  padding: 5px 11px 6px;
  background: linear-gradient(180deg, #f7f9fb, #eef1f5);
  box-shadow: 0 -1px 0 #dde2e8;
  white-space: pre;
  overflow: hidden;
}

/* ---------- Infection ---------- */

.infection {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.icon-grid,
.icon--virus {
  z-index: 2;
}

/* A dropped frame: the icon shifts by a pixel and loses a little colour, the
   way a stalled shell redraw looks. */
.icon.is-glitched .icon-art img {
  transform: translate(1px, -1px);
  filter: drop-shadow(0 1px 2px rgba(0, 20, 45, 0.45)) saturate(0.55)
    drop-shadow(0 0 3px rgba(var(--eth), 0.5));
}

.icon.is-glitched .icon-label {
  transform: translateX(-1px);
  color: rgba(226, 231, 255, 0.92);
}

.ghost {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  opacity: 0;
  animation: ghost 1600ms ease-in-out;
}

.ghost img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 1px 2px rgba(0, 20, 45, 0.45));
}

.ghost span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.86);
  text-shadow: 0 1px 2px rgba(0, 12, 30, 0.9);
}

@keyframes ghost {
  25%,
  70% {
    opacity: 0.72;
  }
}

body.is-busy,
body.is-busy * {
  cursor: progress !important;
}

/* ---------- Small screens ---------- */

@media (max-width: 720px) {
  .win {
    max-width: calc(100vw - 16px);
  }

  .proc-head,
  .proc-row {
    grid-template-columns: 1fr 46px 66px 90px;
  }

  .proc-head span:nth-child(2),
  .proc-row span:nth-child(2) {
    display: none;
  }

  .taskbar-windows {
    display: none;
  }
}
