* {
  box-sizing: border-box;
}

html {
  min-block-size: 100%;
}

.terminal-layout {
  min-block-size: calc(100vh - var(--grid-border) * 2);
  margin: 0;
  padding: 0;
}

.title-panel {
  position: fixed;
  inset-block-start: var(--grid-border);
  inset-inline-start: var(--grid-border);
  display: grid;
  place-items: center;
  inline-size: calc(var(--grid-major-x) * min(2, var(--grid-major-count-x, 2)));
  min-block-size: calc(var(--grid-major-y) * 2);
  border: 1px solid var(--accent);
  border-radius: 0;
  background: color-mix(in srgb, var(--celadon) 2.5%, transparent);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  box-shadow: inset 0 1px 0 hsl(0 0% 100% / 0.08), 0 8px 22px hsl(0 0% 0% / 0.08);
  padding: calc(var(--grid-gap-y) * 0.75) calc(var(--grid-gap-x) * 0.75);
  text-align: center;
}

.hero-title {
  color: var(--title-fg);
  margin: 0;
  font-family: "TT2020 Style F", ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(1rem, calc(var(--grid-major-x) * 0.22), 1.55rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.92;
  max-inline-size: 100%;
  overflow-wrap: anywhere;
  text-wrap: balance;
  white-space: normal;
}

.metro-nav {
  position: fixed;
  inset: var(--grid-border);
  z-index: 3;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.metro-map {
  display: block;
  inline-size: min(100%, calc((100vh - var(--grid-border) * 2) * 1.0195));
  block-size: min(100%, calc((100vw - var(--grid-border) * 2) / 1.0195));
  overflow: visible;
}

.metro-link {
  cursor: pointer;
  pointer-events: auto;
}

.metro-line {
  fill: none;
  stroke-linecap: round;
  stroke-miterlimit: 10;
  stroke-width: 3px;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: draw 5s infinite alternate;
}

.metro-line-shadow,
.metro-line-static {
  opacity: 0.25;
  animation: none;
  stroke-dasharray: none;
  stroke-dashoffset: 0;
}

.green-line {
  stroke: #0aa848;
}

.yellow-line {
  stroke: #fcd000;
}

.orange-line {
  stroke: #f49506;
}

.silver-line {
  stroke: #9fa5a4;
}

.blue-line {
  stroke: #1076c4;
  opacity: 0.25;
}

.red-line {
  stroke: #e72434;
}

.metro-link:hover .metro-line,
.metro-link:focus-visible .metro-line {
  stroke-width: 4px;
  filter: drop-shadow(0 0 5px hsl(0 0% 100% / 0.22));
}

@keyframes draw {
  from {
    stroke-dashoffset: 400;
  }

  to {
    stroke-dashoffset: 0;
  }
}

.glitch-title,
.glitch-body {
  position: relative;
}

.glitch-layout-text {
  visibility: hidden;
}

.title-panel .glitch-layout-text {
  display: block;
  max-inline-size: 6.5ch;
  overflow-wrap: anywhere;
  white-space: normal;
}

.glitch-animated-text {
  inset: 0;
  position: absolute;
}

.title-panel .glitch-animated-text {
  align-items: center;
  align-content: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  line-height: inherit;
  padding: inherit;
  text-align: center;
  white-space: normal;
}

.title-panel .space-char {
  flex-basis: 100%;
  inline-size: 0;
}
.type-char {
  display: inline-block;
  opacity: 0;
  transition: opacity 45ms ease-in;
}

.space-char {
  inline-size: 0.5em;
}

.type-char.visible {
  opacity: 1;
}

.typing-caret {
  animation: blink-caret 0.75s step-end infinite;
  border-inline-end: 0.12em solid currentColor;
  display: inline-block;
  block-size: 1em;
  inline-size: 0;
  margin-inline-end: -0.12em;
  vertical-align: bottom;
}

@keyframes blink-caret {
  from,
  to {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  block-size: 1px;
  inline-size: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
}

@media (max-width: 44rem) {
  .title-panel .glitch-animated-text {
    flex-wrap: wrap;
  }
}
