:root {
  --bg: #97a1a1;
  --panel: #c7c7c7;
  --panel-dark: #9c9c9c;
  --panel-light: #d9d9d9;
  --panel-soft: #d2d2d2;
  --text: #aaaeb4;
  --link: #b0a9b1;
  --link-visited: #a7a2ad;
  --shadow: #8a8a8a;
  --blue-1: #000080;
  --blue-2: #1084d0;
  --desktop-pattern:
    linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(78, 82, 88, 0.1) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(78, 82, 88, 0.1) 75%);
  --panel-noise:
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 3px),
    linear-gradient(rgba(84, 88, 94, 0.08) 0 1px, transparent 1px 4px),
    linear-gradient(135deg, rgba(238, 238, 238, 0.18), rgba(160, 165, 171, 0.12));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--desktop-pattern);
  background-size: 8px 8px;
  font-family: "Trebuchet MS", "Verdana", "Tahoma", sans-serif;
  line-height: 1.5;
  cursor: none;
}

a {
  color: var(--link);
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.12);
}

a:visited {
  color: var(--link-visited);
}

a,
button,
.title-btn,
.nav-button,
.filter-button {
  cursor: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.desktop {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 18px 72px;
}

.ad-rail {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 30;
  width: 236px;
  padding: 8px 6px;
  overflow-y: auto;
  background:
    linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    linear-gradient(90deg, rgba(72, 76, 82, 0.28), rgba(168, 172, 178, 0.2));
  border-left: 2px solid #d6d6d6;
  border-right: 2px solid #7d7d7d;
}

.ad-rail-left {
  left: 0;
}

.ad-rail-right {
  right: 0;
}

.ad-rail img {
  display: block;
  width: 220px;
  max-width: none;
  margin-bottom: 12px;
  border-top: 2px solid #dadada;
  border-left: 2px solid #dadada;
  border-right: 2px solid #818181;
  border-bottom: 2px solid #818181;
  image-rendering: auto;
}

.window {
  margin-bottom: 18px;
  border-top: 2px solid var(--panel-light);
  border-left: 2px solid var(--panel-light);
  border-right: 2px solid var(--shadow);
  border-bottom: 2px solid var(--shadow);
  background-color: var(--panel);
  background-image: var(--panel-noise);
  background-size: 3px 3px, 4px 4px, auto;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.inset-window {
  margin-top: 18px;
}

.title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 6px;
  background: linear-gradient(90deg, var(--blue-1) 0%, var(--blue-2) 100%);
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  font-weight: 700;
  text-shadow: 1px 1px 0 rgba(16, 24, 65, 0.5);
}

.title-bar.small {
  justify-content: flex-start;
}

.title-bar-text,
.title-bar-controls {
  display: flex;
  align-items: center;
}

.title-bar-text {
  gap: 8px;
}

.title-bar-controls {
  gap: 2px;
}

.title-bar-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #404040;
  border-bottom: 1px solid #404040;
  background: var(--panel);
  color: #6d7177;
  font-size: 10px;
}

.title-btn,
.nav-button,
.filter-button,
button {
  appearance: none;
  border-top: 2px solid var(--panel-light);
  border-left: 2px solid var(--panel-light);
  border-right: 2px solid var(--shadow);
  border-bottom: 2px solid var(--shadow);
  background: var(--panel);
  color: #8a8e95;
  font: inherit;
}

.title-btn {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 11px;
  line-height: 1;
}

.nav-button,
.filter-button,
button {
  padding: 6px 12px;
}

.title-btn:active,
.nav-button:active,
.filter-button:active,
button:active,
.nav-button.is-active,
.filter-button.is-active {
  border-top: 2px solid var(--shadow);
  border-left: 2px solid var(--shadow);
  border-right: 2px solid var(--panel-light);
  border-bottom: 2px solid var(--panel-light);
}

.window-body {
  padding: 14px;
}

.nav-strip,
.filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-strip {
  margin-bottom: 12px;
}

.subsite {
  display: none;
}

.subsite.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 8px;
  border: 1px solid var(--panel-dark);
  background: #d6d6d6;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #989ca3;
}

.hero-grid,
.section-grid,
.news-grid,
.resource-grid,
.gallery-grid,
.check-grid {
  display: grid;
  gap: 14px;
}

.hero-grid,
.section-grid,
.news-grid,
.resource-grid,
.check-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.section-grid {
  margin-top: 18px;
}

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
}

.status-box,
.info-card,
.mini-panel,
.article-box,
.resource-box,
.gallery-card,
.notes-panel {
  border-top: 2px solid var(--panel-light);
  border-left: 2px solid var(--panel-light);
  border-right: 2px solid var(--panel-dark);
  border-bottom: 2px solid var(--panel-dark);
  background-color: var(--panel-soft);
  background-image: var(--panel-noise);
  background-size: 3px 3px, 4px 4px, auto;
}

.status-box,
.info-card,
.mini-panel,
.article-box,
.resource-box,
.notes-panel {
  padding: 12px;
}

.notes-panel {
  margin-top: 14px;
}

.sidebar-list {
  margin: 8px 0 0;
  padding-left: 22px;
  list-style: square;
}

.table-shell {
  overflow-x: auto;
  margin-top: 12px;
  border: 2px inset #b8b8b8;
  background: #dbdbdb;
}

table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 8px;
  border: 1px solid #7f7f7f;
  text-align: left;
  color: #9498a0;
}

th {
  background: #cbcbcb;
}

.gallery-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.gallery-card {
  overflow: hidden;
}

.gallery-card.is-hidden {
  display: none;
}

.gallery-art {
  position: relative;
  height: 180px;
  border-bottom: 2px solid var(--panel-dark);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent),
    linear-gradient(135deg, #9fa8ad, #707a82);
}

.gallery-copy {
  padding: 12px;
}

.crt-art::before {
  position: absolute;
  inset: 24px 26px;
  border-radius: 8px;
  background: linear-gradient(180deg, #052012, #0b482f);
  box-shadow: inset 0 0 0 10px #3e4447;
  content: "";
}

.screen-glow {
  position: absolute;
  inset: 48px 52px;
  background: radial-gradient(circle, rgba(113, 255, 168, 0.75), rgba(0, 0, 0, 0) 65%);
}

.window-art {
  padding: 24px;
  background: linear-gradient(180deg, #6e7881, #9099a1);
}

.window-art span {
  display: block;
  height: 24px;
  margin-bottom: 10px;
  border: 2px solid #888;
  background: #dcdcdc;
}

.window-art span:first-child {
  height: 32px;
  border-color: #22497d;
  background: linear-gradient(90deg, #000080, #1084d0);
}

.keyboard-art::before {
  position: absolute;
  inset: 34px 20px 28px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.14) 4%, transparent 4%, transparent 8%, rgba(0, 0, 0, 0.14) 8%, rgba(0, 0, 0, 0.14) 12%, transparent 12%),
    linear-gradient(180deg, #d7d1c4, #b8b09e);
  background-size: 24px 18px, auto;
  box-shadow: inset 0 -12px 0 rgba(0, 0, 0, 0.08);
  content: "";
}

.floppy-art::before {
  position: absolute;
  inset: 22px 52px;
  border-radius: 6px 6px 10px 10px;
  background: linear-gradient(180deg, #222e58, #172041);
  content: "";
}

.floppy-art::after {
  position: absolute;
  top: 30px;
  left: 74px;
  width: 72px;
  height: 34px;
  background: #b9c6d0;
  content: "";
}

.floppy-label {
  position: absolute;
  left: 74px;
  right: 74px;
  bottom: 34px;
  height: 50px;
  background: #f4f4f4;
}

.toolbar-art {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 24px;
  background: linear-gradient(180deg, #ced4d7, #b4bdc2);
}

.toolbar-art span {
  width: 48px;
  height: 48px;
  border: 2px solid #8b8b8b;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent),
    #e5e5e5;
}

.sticker-art::before {
  position: absolute;
  inset: 26px;
  background: linear-gradient(180deg, #d5cfbf, #aba38f);
  content: "";
}

.sticker {
  position: absolute;
  top: 38px;
  left: 40px;
  width: 120px;
  height: 70px;
  transform: rotate(-7deg);
  border: 2px solid #5f2400;
  background: linear-gradient(135deg, #ffd05a, #ff9148);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.15);
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  align-items: start;
}

.timeline-year {
  display: inline-block;
  padding: 6px 8px;
  border: 1px solid var(--panel-dark);
  background: #d6d6d6;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 13px;
  font-weight: 500;
  color: #8e9298;
}

.archive-notes {
  margin-top: 14px;
}

.footer-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.status-left {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pill {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid #808080;
  background: #d4d4d4;
  color: #8f939a;
}

.mono {
  font-family: "Lucida Console", "Courier New", monospace;
}

.fake-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 19px;
  height: 27px;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  clip-path: polygon(
    0 0,
    0 82%,
    21% 63%,
    35% 100%,
    49% 94%,
    35% 59%,
    66% 59%
  );
  background: linear-gradient(135deg, #f5f5f5 0 58%, #8c8c8c 58% 100%);
  filter: drop-shadow(1px 1px 0 #4f4f4f);
}

.roaming-popup {
  position: fixed;
  top: 120px;
  left: 120px;
  z-index: 8500;
  display: none;
  width: min(25vw, 280px);
  min-width: 190px;
  max-width: 320px;
  border-top: 2px solid #dcdcdc;
  border-left: 2px solid #dcdcdc;
  border-right: 2px solid #747474;
  border-bottom: 2px solid #747474;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    #c7c7c7;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
  color: #8d9299;
}

.roaming-popup.is-visible {
  display: block;
}

.roaming-popup-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 5px 4px 8px;
  background: linear-gradient(90deg, #2d4e94, #7f94ba);
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-weight: 700;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.roaming-popup-close {
  width: 14px;
  height: 14px;
  padding: 0;
  border-top: 1px solid #f2f2f2;
  border-left: 1px solid #f2f2f2;
  border-right: 1px solid #5f5f5f;
  border-bottom: 1px solid #5f5f5f;
  background: #d5d5d5;
  color: #676b73;
  font-size: 9px;
  line-height: 1;
}

.roaming-popup-body {
  padding: 10px;
  font-size: 12px;
  line-height: 1.3;
}

.roaming-popup-body p {
  margin-bottom: 8px;
}

@media (max-width: 920px) {
  .hero,
  .layout,
  .gallery-header,
  .gallery-grid,
  .hero-grid,
  .section-grid,
  .news-grid,
  .resource-grid,
  .check-grid {
    grid-template-columns: 1fr;
  }

  .gallery-header {
    align-items: stretch;
  }

  .ad-rail {
    width: 188px;
  }

  .ad-rail img {
    width: 180px;
  }
}

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

  .title-bar {
    font-size: 12px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .gallery-art {
    height: 150px;
  }

  .ad-rail {
    width: 158px;
    padding: 6px 4px;
  }

  .ad-rail img {
    width: 150px;
  }
}
