html,
body {
  padding: 0;
  margin: 0;
  height: 100%;
}

body {
  background-color: #050505;
  color: #d7ffe9;
  transition: background-color 0.25s ease, color 0.25s ease;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  overflow-x: hidden;
}

body.light-mode {
  background-color: #eceffc;
  color: #111;
}

body.dark-mode {
  background-color: #050505;
  color: #f5f5f5;
}

.screen {
  min-height: 100%;
  padding: 22px 18px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  isolation: isolate;
}

.screen:before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(
      rgba(0, 0, 0, 0.18),
      rgba(0, 0, 0, 0.18)
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.03),
      rgba(255, 255, 255, 0.03) 1px,
      rgba(0, 0, 0, 0) 3px,
      rgba(0, 0, 0, 0) 6px
    );
  mix-blend-mode: overlay;
  opacity: 0.45;
  z-index: 0;
}

.screen > * {
  position: relative;
  z-index: 1;
}

.section-header {
  color: rgba(215, 255, 233, 0.9);
  font-size: 12px;
  letter-spacing: 0.06em;
  margin: 2px 0 8px;
  text-transform: uppercase;
}

.panel {
  border: 1px solid rgba(120, 255, 200, 0.22);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 0 30px rgba(120, 255, 200, 0.06);
  padding: 10px 10px 12px;
  position: relative;
  overflow: hidden;
}

.panel-hero {
  --hero-unit: clamp(4.4px, 0.56vw, 6.4px);
  --hero-lines: 7;
  padding: 10px 10px 12px;
  min-height: unset;
  border-color: rgba(120, 255, 200, 0.34);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 0 50px rgba(120, 255, 200, 0.12);
  overflow: hidden;
  position: relative;
}

.hero-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.hero-banner {
  display: block;
  max-width: 100%;
  margin: 0;
  white-space: pre;
  pointer-events: auto;
  user-select: none;
  min-width: 0;
  color: rgba(235, 245, 255, 0.16);
  text-shadow: 0 0 16px rgba(240, 250, 255, 0.12);
  font-size: var(--hero-unit);
  line-height: var(--hero-unit);
  letter-spacing: 0.01em;
  opacity: 0.65;
  filter: saturate(0) contrast(1.15);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}

.hero-head .hero-banner {
  max-width: none;
  width: 100%;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-banner {
    background-image: radial-gradient(
      circle,
      rgba(255, 255, 255, 0.72) 0 0.75px,
      rgba(255, 255, 255, 0.12) 0.8px 1.35px,
      rgba(0, 0, 0, 0) 1.4px
    );
    background-size: 3px 3px;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 16px rgba(240, 250, 255, 0.1);
  }
}

.hero-mark {
  display: block;
  height: clamp(46px, 5.2vw, 70px);
  width: auto;
  max-width: clamp(34px, 4.1vw, 54px);
  object-fit: contain;
  opacity: 0.94;
  filter: brightness(1.05) contrast(1.02);
}

.panel:before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 30%,
    rgba(120, 255, 200, 0.11),
    rgba(0, 0, 0, 0) 60%
  );
  z-index: 0;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel-header {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(215, 255, 233, 0.9);
  margin-bottom: 10px;
}

.panel-footer {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(215, 255, 233, 0.82);
}

.panel-hint {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(215, 255, 233, 0.7);
  text-align: center;
}

.kbd {
  display: inline-block;
  padding: 1px 6px;
  margin: 0 1px;
  border: 1px solid rgba(120, 255, 200, 0.25);
  background: rgba(0, 0, 0, 0.4);
  color: rgba(215, 255, 233, 0.9);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.product-grid .panel-link {
  min-height: clamp(320px, 42vh, 460px);
}

.logo-wrap {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
}

.product-grid .ascii-grid {
  margin-left: auto;
  margin-right: auto;
}

.product-grid .logo-wrap {
  align-self: stretch;
  margin-top: -10px;
  margin-left: -10px;
  margin-right: -10px;
  margin-bottom: -12px;
  background: #000;
  padding: 0;
}

.panel-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.panel-link .panel-header {
  width: 100%;
}

.panel-link:hover {
  transform: translateY(-1px);
  border-color: rgba(120, 255, 200, 0.44);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 0 40px rgba(120, 255, 200, 0.1);
}

.panel-link:focus-visible {
  outline: 2px solid rgba(120, 255, 200, 0.6);
  outline-offset: 3px;
}

.ascii-grid {
  --width: 60;
  --height: 20;
  --cell-w: 5.41px;
  --cell-h: 10px;

  display: grid;
  grid-template-columns: repeat(var(--width), 1fr);
  width: calc(var(--width) * var(--cell-w));
  height: calc(var(--height) * var(--cell-h));
  font-size: 9px;
  line-height: 10px;
  user-select: none;
  position: relative;
  filter: saturate(1.05);
}

.ascii-grid--dense {
  --cell-w: 4.06px;
  --cell-h: 7.5px;
  font-size: 7px;
  line-height: 7.5px;
}

.ascii-cell {
  width: var(--cell-w);
  height: var(--cell-h);
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 0 10px rgba(120, 255, 200, 0.12);
}

.ascii-grid--tiles .ascii-cell {
  text-shadow: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28) inset;
}

.ascii-grid--tiles {
  --cell-w: 3.8px;
  --cell-h: 7.2px;
  font-size: 7px;
  line-height: 7.2px;
}

.ascii-grid--palette-color .ascii-cell {
  text-shadow: none;
}

body.light-mode .panel {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset,
    0 0 20px rgba(0, 0, 0, 0.06);
}

body.light-mode .ascii-cell {
  text-shadow: none;
}

.boot-status {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 9999;
  padding: 6px 10px;
  border: 1px solid rgba(120, 255, 200, 0.22);
  background: rgba(0, 0, 0, 0.55);
  color: rgba(215, 255, 233, 0.85);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.boot-status--noscript {
  right: auto;
  left: 12px;
}

@media screen and (max-width: 800px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .ascii-grid {
    --cell-w: 5.15px;
    --cell-h: 9.6px;
    font-size: 8.8px;
    line-height: 9.6px;
  }
}

@media screen and (max-width: 520px) {
  .screen {
    padding: 14px 10px 28px;
    gap: 12px;
  }

  .panel {
    padding: 8px 8px 10px;
  }

  .panel-hero {
    --hero-unit: 3.1px;
    padding: 8px 8px 10px;
    min-height: unset;
    background: rgba(0, 0, 0, 0.22);
  }

  .product-grid .panel-link {
    min-height: clamp(260px, 38vh, 380px);
  }

  .product-grid .logo-wrap {
    margin-top: -8px;
    margin-left: -8px;
    margin-right: -8px;
    margin-bottom: -10px;
  }

  .ascii-grid--dense {
    --cell-w: 3.2px;
    --cell-h: 5.9px;
    font-size: 5.5px;
    line-height: 5.9px;
  }

  .ascii-grid--tiles {
    --cell-w: 3px;
    --cell-h: 5.6px;
    font-size: 5.2px;
    line-height: 5.6px;
  }

  .boot-status {
    font-size: 11px;
  }
}

@media screen and (max-width: 380px) {
  .ascii-grid--dense {
    --cell-w: 2.9px;
    --cell-h: 5.3px;
    font-size: 5px;
    line-height: 5.3px;
  }

  .ascii-grid--tiles {
    --cell-w: 2.7px;
    --cell-h: 5px;
    font-size: 4.7px;
    line-height: 5px;
  }
}
