:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #111111;
  --dot: rgba(17, 17, 17, 0.085);
  --dot-soft: rgba(17, 17, 17, 0.045);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, "Courier New",
    monospace;
}

.stealth-stage {
  position: fixed;
  inset: 0;
  display: grid;
  overflow: hidden;
  background: #ffffff;
  place-items: center;
}

.stealth-stage::after {
  position: fixed;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, #ffffff 0, transparent 18%, transparent 82%, #ffffff 100%),
    linear-gradient(180deg, #ffffff 0, transparent 18%, transparent 82%, #ffffff 100%);
  opacity: 0.72;
  pointer-events: none;
}

.dot-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
}

h1 {
  position: relative;
  z-index: 2;
  margin: 0;
}

.stealth-trigger {
  padding: 8px 15px;
  color: var(--ink);
  background: #ffffff;
  border: 0;
  box-shadow: 0 0 0 1px #ffffff, 0 0 22px 14px rgba(255, 255, 255, 0.96);
  font: 500 14px/1 "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
    "Courier New", monospace;
  letter-spacing: 0;
  cursor: pointer;
  text-align: center;
  text-transform: lowercase;
}

.stealth-trigger:focus-visible,
.chat-form input:focus-visible,
.chat-form button:focus-visible,
.corner-nav a:focus-visible {
  outline: 1px solid rgba(17, 17, 17, 0.46);
  outline-offset: 3px;
}

.stealth-chat {
  position: fixed;
  top: calc(50% + 30px);
  left: 50%;
  z-index: 2;
  width: min(300px, calc(100vw - 44px));
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition:
    opacity 280ms ease,
    transform 280ms ease;
}

h1:hover + .stealth-chat,
h1:focus-within + .stealth-chat,
.stealth-chat:hover,
.stealth-chat:focus-within {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.chat-output {
  min-height: 0;
  margin: 0 0 10px;
  padding: 0 2px;
  color: rgba(17, 17, 17, 0.82);
  font: 12px/1.55 "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
    "Courier New", monospace;
  text-align: left;
  white-space: pre-wrap;
}

.chat-output:empty {
  display: none;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr 34px;
  gap: 0;
  padding: 6px;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 18px;
  box-shadow:
    0 0 22px 14px rgba(255, 255, 255, 0.96);
}

.chat-form input,
.chat-form button {
  min-width: 0;
  height: 30px;
  color: var(--ink);
  background: #ffffff;
  border: 0;
  border-radius: 0;
  font: 13px/1 "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
    "Courier New", monospace;
}

.chat-form input {
  padding: 0 8px 0 10px;
}

.chat-form input::placeholder {
  color: rgba(17, 17, 17, 0.42);
}

.chat-form button {
  padding: 0;
  cursor: pointer;
}

.corner-nav {
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 2;
  display: grid;
  gap: 6px;
  justify-items: end;
}

.corner-nav a {
  padding: 8px 10px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 0 0 1px #ffffff, 0 0 18px 10px rgba(255, 255, 255, 0.94);
  font: 500 11px/1 "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
    "Courier New", monospace;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: lowercase;
}
