:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #d6dbd2;
  background: #171a17;
  font-synthesis: none;
  color-scheme: dark;
}
* { box-sizing: border-box; }
::selection { background: #d9e3d2; color: #364530; }
html { scrollbar-gutter: stable; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.curiosity {
  min-height: 100vh;
  min-height: 100svh;
  /* Keep the form anchored while results grow below it. */
  padding: 32svh 24px 32px;
}
.workspace { position: relative; width: min(100%, 640px); margin-inline: auto; }
.input-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 11px 10px 24px;
  background: #222722;
  border: 1px solid #3b4439;
  border-radius: 10px;
  box-shadow: 0 4px 8px #333b2603, 0 16px 45px #333b2605;
  transition: border-color 650ms ease-in-out;
}
.input-box::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 1px #a6bca306;
  opacity: 0;
  transition: opacity 650ms ease-in-out;
}
.input-box:focus-within {
  border-color: #4a5547;
}
.input-box:focus-within::after { opacity: 1; }
input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d6dbd2;
  font-size: 16px;
  outline: none;
}
input::placeholder { color: #9aa594; opacity: .6; }
.icon-button, .submit-button {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  transition: background 150ms ease, color 150ms ease;
}
.icon-button { background: transparent; color: #a6b29e; }
.icon-button:hover { color: #d4dfcc; }
.submit-button { background: #364530; color: #c1d5b3; }
.submit-button:hover { background: #465a3d; }
button:focus-visible, a:focus-visible { outline: 2px solid #66835b; outline-offset: 4px; }
button:disabled { opacity: .5; cursor: wait; }
.result { padding: 32px 24px 6px; }
#fact-title, #fact-text { position: relative; }
#fact-title.is-scrambling, #fact-text.is-scrambling { color: transparent; }
.ascii-character {
  position: absolute;
  overflow: hidden;
  color: #9caf92;
  font-family: inherit;
  line-height: 1;
  white-space: pre;
  pointer-events: none;
}
h1 {
  font-size: clamp(25px, 4vw, 32px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -.6px;
  margin: 0 0 15px;
  color: #d9e3d2;
}
.fact-text { margin: 0; color: #b8c2b0; font-size: 18px; line-height: 1.8; }
.result-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 20px;
  margin-top: 25px;
  padding-top: 16px;
  border-top: 1px solid #384134;
}
.result-footer a, .result-footer button {
  position: relative;
  font-size: 11px;
  line-height: 1.5;
  color: #a6b99a;
  text-decoration: none;
}
.result-footer a::after, .result-footer button::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: #384134;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 120ms ease-out;
  pointer-events: none;
}
.result-footer a:hover::after, .result-footer button:enabled:hover::after {
  transform: scaleX(1);
}
.result-footer button::after { left: 8px; bottom: 3px; }
.result-footer button { border: 0; padding: 5px 0 5px 8px; background: transparent; flex-shrink: 0; }
.result-footer button:hover { color: #d0e2c4; }
.result-footer button span { margin-left: 7px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.suggestions button {
  padding: 7px 12px;
  border: 1px solid #43513b;
  border-radius: 20px;
  font-size: 12px;
  color: #b8cda9;
  background: #273023;
}
.status { padding: 0 24px; margin: 16px 0 0; font-size: 12px; line-height: 1.6; color: #a8b19f; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 480px) {
  .curiosity { padding: 32svh 16px 24px; }
  .input-box { padding-left: 16px; gap: 4px; }
  input { font-size: 16px; }
  .icon-button, .submit-button { width: 36px; height: 40px; }
  .result { padding: 28px 12px 4px; }
  .fact-text { font-size: 16px; }
  .status { padding: 0 12px; }
}
.attribution { display: contents; }
#source { display: inline-flex; align-items: center; gap: 5px; grid-area: 1 / 1; justify-self: start; }
.result-footer .license { grid-area: 2 / 1; justify-self: start; font-size: 9px; color: #949c8b; }
