:root {
  --bg: #EEF3EC;
  --fg: #173B2A;
  --muted: #587061;
  --line: #D3DDD1;
  --leaf: #3F8F3A;
  --stem: #173B2A;
  --grid: rgba(23, 59, 42, 0.07);
  --hover: rgba(63, 143, 58, 0.14);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D1611; --fg: #D6F5DF; --muted: #7E9A88; --line: #23342A;
    --leaf: #5BD47A; --stem: #D6F5DF; --grid: rgba(214, 245, 223, 0.05); --hover: rgba(91, 212, 122, 0.14);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D1611; --fg: #D6F5DF; --muted: #7E9A88; --line: #23342A;
  --leaf: #5BD47A; --stem: #D6F5DF; --grid: rgba(214, 245, 223, 0.05); --hover: rgba(91, 212, 122, 0.14);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; }
body {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  display: grid;
  place-items: center;
  padding: calc(72px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
    calc(64px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  -webkit-font-smoothing: antialiased;
}
/* The favicon's 16 x 16 grid, faded out toward the edges. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center center;
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
}
main {
  width: min(100%, 34rem);
  display: grid;
  justify-items: center;
  text-align: center;
}
.sprout {
  /* Whole CSS pixels per grid cell, so the rows meet without seams. */
  width: 128px;
  height: 80px;
  image-rendering: pixelated;
  shape-rendering: crispEdges;
  margin-bottom: 2.25rem;
}
@media (min-width: 600px) { .sprout { width: 160px; height: 100px; } }
.sprout .l { fill: var(--leaf); }
.sprout .s { fill: var(--stem); }
/* The sprout grows one pixel row at a time, soil first. */
.sprout g {
  animation: px 1ms steps(1) both;
  animation-delay: calc(120ms + var(--i) * 70ms);
}
@keyframes px { from { opacity: 0; } to { opacity: 1; } }
h1 {
  font-weight: 600;
  font-size: clamp(2.4rem, 11vw, 4.4rem);
  letter-spacing: -0.04em;
  line-height: 1;
}
h1 .dot { color: var(--leaf); }
.cursor {
  display: inline-block;
  width: 0.5em;
  height: 0.12em;
  margin-left: 0.06em;
  background: var(--leaf);
  vertical-align: -0.02em;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.card {
  width: 100%;
  margin-top: 2.75rem;
  border-top: 1px dashed var(--line);
  padding-top: 1.5rem;
}
.label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
#ip {
  display: inline-block;
  margin-top: 0.6rem;
  font: inherit;
  font-size: clamp(1.05rem, 4.6vw, 1.6rem);
  color: var(--fg);
  background: none;
  border: 0;
  padding: 0.25rem 0.5rem;
  border-radius: 2px;
  cursor: copy;
  overflow-wrap: anywhere;
  transition: background-color 0.15s ease;
}
#ip:hover, #ip:focus-visible { background: var(--hover); outline: none; }
#ip[data-state="loading"] { color: var(--muted); cursor: default; }
#hint {
  display: block;
  height: 1rem;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: var(--muted);
}
/* Theme switch: system (default), light, dark. */
.theme {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: max(14px, env(safe-area-inset-right, 0px));
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg);
}
.theme button {
  font: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 2px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}
.theme button:hover { color: var(--fg); }
.theme button[aria-checked="true"] { color: var(--bg); background: var(--fg); }
.assistants {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-top: 1rem;
}
.assistants a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 3px;
  color: var(--fg);
}
.assistants a:hover, .assistants a:focus-visible { background: var(--hover); }
.theme button:focus-visible, #ip:focus-visible, .assistants a:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 2px;
}
.skynet {
  position: absolute;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
@media (prefers-reduced-motion: reduce) {
  .cursor, .sprout g { animation: none; }
  #ip { transition: none; }
}
