:root {
  color-scheme: light;
  font: 16px/1.45 "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #171717;
  background: #a8a8a8;
  --ink: #171717;
  --paper: #f9f9f7;
  --rule: #b8b8b8;
  --mono: "Courier New", "Microsoft YaHei", monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: conic-gradient(#a3a3a3 25%, #b3b3b3 0 50%, #a3a3a3 0 75%, #b3b3b3 0) 0 0 / 4px 4px;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px dotted currentColor; outline-offset: 3px; }
.menu-bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  gap: .35rem 1.3rem;
  padding: .3rem max(1rem, calc((100% - 55rem) / 2));
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  font-size: .875rem;
}
.menu-bar nav { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; }
.menu-bar a:hover { text-decoration: underline; }
.menu-brand { display: inline-flex; align-items: center; gap: .5rem; font: 700 1.05rem/1.2 var(--mono); }
.menu-icon {
  position: relative;
  width: 13px;
  height: 13px;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px var(--ink);
}
.menu-icon::after { content: ""; position: absolute; inset: 2px 2px 3px; background: var(--ink); }
.menu-tools {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-left: auto;
}
.theme-picker { display: flex; align-items: center; gap: .35rem; white-space: nowrap; }
.theme-picker select {
  min-height: 1.65rem;
  padding: .15rem .25rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  box-shadow: 1px 1px var(--ink);
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.menu-action {
  min-height: 1.65rem;
  padding: .15rem .65rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  box-shadow: 1px 1px var(--ink);
  background: #fff;
  color: var(--ink);
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.menu-action:hover:not(:disabled) { color: #fff; background: var(--ink); }
.menu-action:disabled { color: #656565; cursor: wait; }

main { width: min(55rem, calc(100% - 2.5rem)); margin: 0 auto; padding: clamp(1.5rem, 5vw, 3.4rem) 0 3rem; }
.window {
  scroll-margin-top: 4.5rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px var(--ink);
}
.window-bar {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 2.15rem;
  padding: .25rem .65rem;
  border-bottom: 2px solid var(--ink);
  background: #fff;
}
.window-bar::before, .window-bar::after {
  content: "";
  flex: 1;
  height: 11px;
  background: repeating-linear-gradient(var(--ink) 0 1px, transparent 1px 3px);
}
h1, h2, p { margin: 0; }
.window-bar h1, .window-bar h2 { font-size: 1rem; font-weight: 700; white-space: nowrap; }
.overview {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
}
.computer {
  display: grid;
  place-items: start center;
  position: relative;
  width: 36px;
  height: 42px;
  padding-top: 5px;
  border: 2px solid var(--ink);
  border-radius: 4px 4px 2px 2px;
  box-shadow: 2px 2px var(--ink);
  background: #fff;
}
.computer span {
  width: 23px;
  height: 20px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: repeating-linear-gradient(0deg, #1c1c1c 0 2px, #565656 2px 3px);
}
.computer::before { content: ""; position: absolute; width: 10px; height: 2px; right: 4px; bottom: 6px; background: var(--ink); }
.computer::after { content: ""; position: absolute; width: 3px; height: 3px; left: 5px; bottom: 6px; background: var(--ink); }
.site-name { font-size: clamp(1.3rem, 4vw, 1.8rem); font-weight: 750; line-height: 1.2; }
.subtitle { margin-top: .25rem; font-size: .875rem; color: #424242; }
.health {
  display: flex;
  gap: .45rem;
  align-items: center;
  padding: .2rem .55rem;
  border: 1px solid var(--ink);
  background: #fff;
  font-size: .875rem;
  white-space: nowrap;
}
.health::before { content: ""; flex: 0 0 8px; height: 8px; border: 1px solid currentColor; }
.health[data-state="ok"] { color: #fff; background: var(--ink); }
.health[data-state="ok"]::before { background: currentColor; }
.health[data-state="stale"] { border-style: dashed; }
.health[data-state="stale"]::before { background: repeating-linear-gradient(135deg, currentColor 0 1px, transparent 1px 3px); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; padding: 0 1.2rem 1.15rem; }
article { border: 1px solid var(--ink); background: #fff; }
article h2 { padding: .3rem .7rem; border-bottom: 1px solid var(--ink); background: #e7e7e7; font-size: .9rem; }
.metric-body { padding: .65rem .7rem .7rem; }
.value { font: 700 clamp(1.45rem, 4vw, 2rem)/1.15 var(--mono); }
article p { margin-top: .43rem; color: #404040; font-size: .875rem; }
progress {
  appearance: none;
  display: block;
  width: 100%;
  height: .75rem;
  margin-top: .4rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: #fff;
}
progress::-webkit-progress-bar { background: #fff; }
progress::-webkit-progress-value { background: repeating-linear-gradient(135deg, #1b1b1b 0 2px, #626262 2px 3px); }
progress::-moz-progress-bar { background: repeating-linear-gradient(135deg, #1b1b1b 0 2px, #626262 2px 3px); }
dl { margin: 0; }
dl div { display: flex; justify-content: space-between; gap: .6rem; }
article dl { margin-top: .35rem; font-size: .875rem; }
article dl div + div { margin-top: .2rem; }
.rates { margin-top: .2rem; }
.rates dd { font-size: 1rem; }
dd { margin: 0; text-align: right; font: 700 .95rem/1.4 var(--mono); font-variant-numeric: tabular-nums; }
.status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem 1.15rem;
  padding: .4rem .7rem;
  border-top: 1px solid var(--ink);
  background: #e7e7e7;
  font-size: .875rem;
}
.details { margin-top: 1.1rem; }
.details dl div { align-items: baseline; padding: .6rem .85rem; }
.details dl div + div { border-top: 1px solid var(--rule); }
.details dl div:nth-child(even) { background: #eee; }

/* Rounded enamel frames and raised controls inspired by early-2000s desktops. */
:root[data-theme="xp"] {
  --ink: #172444;
  --paper: #ece9d8;
  --rule: #d5d2c2;
  --mono: Tahoma, Verdana, "Microsoft YaHei", sans-serif;
  background: #5aa5e8;
  font-family: Tahoma, Verdana, "Microsoft YaHei", "PingFang SC", sans-serif;
}
[data-theme="xp"] body {
  background:
    radial-gradient(ellipse 66% 24% at 14% 102%, #84ba23 0 96%, transparent 97%),
    radial-gradient(ellipse 78% 30% at 94% 112%, #3d8121 0 97%, transparent 98%),
    radial-gradient(ellipse 16rem 3.2rem at 83% 32%, #fff8, transparent 86%),
    radial-gradient(ellipse 11rem 2.7rem at 18% 48%, #f7fdff9c, transparent 82%),
    linear-gradient(#174c9d, #348dea 15%, #a7daff 70%, #d9ecda 94%);
  background-attachment: fixed;
}
[data-theme="xp"] .menu-bar {
  border-bottom-color: #0a3f9b;
  background: linear-gradient(#91beff 0, #438be9 13%, #245dc4 53%, #15439f 55%, #1e57c1 100%);
  box-shadow: 0 2px 4px #15306755, inset 0 1px #ffffff99;
  color: #fff;
}
[data-theme="xp"] .menu-brand {
  padding: .25rem .65rem;
  border: 1px solid #196627;
  border-radius: 5px 11px 11px 5px;
  background: linear-gradient(#94ce57, #4f9c38 46%, #2f7e26 56%, #378a2b);
  box-shadow: inset 0 1px #ffffffa0, 0 1px 2px #183a6b;
  text-shadow: 1px 1px #2b5620;
  font-size: .95rem;
}
[data-theme="xp"] .menu-icon { border-color: #fff; box-shadow: 1px 1px #204f26; border-radius: 2px; }
[data-theme="xp"] .menu-icon::after { background: #dcf6c8; }
[data-theme="xp"] .menu-action,
[data-theme="xp"] .theme-picker select {
  border: 1px solid #23477e;
  border-radius: 4px;
  background: linear-gradient(#fff 0, #f6f5ef 58%, #ddd9c5 100%);
  box-shadow: inset 0 0 0 1px #fff9, 0 1px 2px #1739767d;
  color: #172444;
}
[data-theme="xp"] .menu-action:hover:not(:disabled) { background: linear-gradient(#fff8ea, #ffdd93); }
[data-theme="xp"] .menu-action:disabled { color: #63666c; }
[data-theme="xp"] .window {
  border: 3px solid #1954b8;
  border-radius: 8px 8px 3px 3px;
  box-shadow: 0 4px 14px #123f765c, 0 1px 1px #153f77;
}
[data-theme="xp"] .window-bar {
  min-height: 2.1rem;
  gap: .45rem;
  margin: -1px -1px 0;
  padding-inline: .65rem;
  border: 0;
  border-bottom: 1px solid #15479a;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(#8ebfff, #4b93f4 15%, #266bd1 55%, #205cbe 60%, #215fce);
  box-shadow: inset 0 1px 0 #ffffffa0;
  color: #fff;
  text-shadow: 1px 1px #163d82;
}
[data-theme="xp"] .window-bar::before {
  flex: 0 0 13px;
  height: 12px;
  border: 1px solid #173d84;
  border-radius: 2px;
  background: linear-gradient(#7dbeff 33%, #f4faff 33%);
  box-shadow: 0 1px 1px #11346f;
}
[data-theme="xp"] .window-bar::after { display: none; }
[data-theme="xp"] .computer {
  border: 1px solid #496387;
  border-radius: 5px;
  background: linear-gradient(135deg, #fefefe, #b6c2ce);
  box-shadow: inset 0 0 0 1px #fff, 2px 2px 3px #54658a60;
}
[data-theme="xp"] .computer span { border-color: #293f58; background: linear-gradient(155deg, #c8eeff, #74b6f1 42%, #2c65be 64%); }
[data-theme="xp"] .computer::after { background: #32832a; }
[data-theme="xp"] .health { border-color: #8797ab; border-radius: 5px; box-shadow: inset 0 1px 2px #8a96a744; }
[data-theme="xp"] .health::before { border-radius: 50%; }
[data-theme="xp"] .health[data-state="ok"] { border-color: #7a9d55; color: #215624; background: linear-gradient(#fff, #e1edcc); }
[data-theme="xp"] .health[data-state="ok"]::before { background: linear-gradient(#a9d873, #3e911d); }
[data-theme="xp"] .health[data-state="stale"] { background: #fff3d8; color: #86420d; }
[data-theme="xp"] article {
  border-color: #aab9d0;
  border-radius: 5px;
  background: linear-gradient(120deg, #fff, #f4f8ff);
  box-shadow: 0 1px 2px #204b8120;
}
[data-theme="xp"] article h2 {
  border-color: #bacce6;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(#fbfdff, #d5e5fa);
  color: #183b76;
}
[data-theme="xp"] .value { color: #173c79; }
[data-theme="xp"] progress { border-color: #8b9eae; border-radius: 3px; overflow: hidden; }
[data-theme="xp"] progress::-webkit-progress-bar { background: linear-gradient(#e1e8ea, #fff 50%, #edf2f2); }
[data-theme="xp"] progress::-webkit-progress-value {
  background: repeating-linear-gradient(90deg, transparent 0 7px, #f5ffe8 7px 8px), linear-gradient(#bde977, #68ad30 55%, #3e8b18 56%, #60a92c);
}
[data-theme="xp"] progress::-moz-progress-bar {
  background: repeating-linear-gradient(90deg, transparent 0 7px, #f5ffe8 7px 8px), linear-gradient(#bde977, #68ad30 55%, #3e8b18 56%, #60a92c);
}
[data-theme="xp"] .status-bar { border-color: #c8c3af; background: linear-gradient(#f7f5e9, #e3dfcc); }
[data-theme="xp"] .details dl { background: #fff; }
[data-theme="xp"] .details dl div:nth-child(even) { background: #edf4ff; }

@media (max-width: 37rem) {
  .menu-bar { flex-wrap: wrap; gap: .35rem .7rem; padding-inline: .65rem; }
  .menu-bar nav { gap: .55rem; }
  main { width: calc(100% - 1.5rem); }
  .window { scroll-margin-top: 5.5rem; }
  .overview { gap: .6rem; padding: .8rem .65rem; }
  .grid { gap: .55rem; padding: 0 .65rem .7rem; }
  .metric-body { padding: .5rem; }
  .details dl div { flex-wrap: wrap; gap: .13rem .6rem; }
}
@media (max-width: 30rem) {
  .menu-tools { width: 100%; justify-content: space-between; }
}
@media (max-width: 23rem) {
  .grid { grid-template-columns: 1fr; }
  .overview { grid-template-columns: auto 1fr; }
  .health { grid-column: 2; justify-self: start; }
}
