@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-VF-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bg: #FAFAF9; --text: #111827; --muted: #6B7280; --line: #E5E7EB;
  --term: #FFFFFF; --term-text: #1F2937; --term-bar: #F3F4F6;
  --green: #16A34A; --warn: #B45309; --shadow: 0 10px 30px rgba(17, 24, 39, .08);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0F19; --text: #F3F4F6; --muted: #9CA3AF; --line: #1F2937;
    --term: #0F172A; --term-text: #E5E7EB; --term-bar: #1E293B;
    --green: #22C55E; --warn: #FBBF24; --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); font-family: var(--mono);
}
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { width: min(100%, 780px); margin: 0 auto; padding: 48px 16px 24px; }
.lockup { display: inline-block; margin-bottom: 24px; border-radius: 8px; }
.lockup img { display: block; height: 40px; width: auto; }

/* ---------- terminal window ---------- */
.term {
  background: var(--term); color: var(--term-text); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
}
.bar { background: var(--term-bar); padding: 10px 14px; display: flex; align-items: center; gap: 7px; }
.bar i { width: 11px; height: 11px; border-radius: 50%; background: #F87171; }
.bar i:nth-child(2) { background: #FBBF24; }
.bar i:nth-child(3) { background: #34D399; }
.bar span { margin-left: 8px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.body { padding: 18px 20px 22px; font-size: 14px; line-height: 1.7; }
.line { margin: 0; overflow-wrap: anywhere; }
.out { margin-bottom: 10px; }
.p { color: var(--green); margin-right: .6em; user-select: none; }
.good { color: var(--green); }
.muted { color: var(--muted); }
.body code { font: inherit; color: var(--green); }
.links a {
  margin-right: 1.1em; text-decoration: underline; text-decoration-color: var(--green);
  text-underline-offset: 3px; display: inline-block;
}
.links a:hover { color: var(--green); }

/* lines appear one after another, like typing */
.line { opacity: 0; animation: show .01s forwards; }
.d1 { animation-delay: .2s; }  .d2 { animation-delay: .6s; }  .d3 { animation-delay: 1.1s; }
.d4 { animation-delay: 1.5s; } .d5 { animation-delay: 2s; }   .d6 { animation-delay: 2.4s; }
.d7 { animation-delay: 2.9s; } .d8 { animation-delay: 3.2s; } .d9 { animation-delay: 3.6s; }
.instant .line, #history .line { animation: none; opacity: 1; }
@keyframes show { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .line { animation: none; opacity: 1; }
  .cursor { animation: none !important; }
}

/* ---------- sign-up ---------- */
.signup .field-row { display: flex; gap: 8px; align-items: center; }
.signup input[type="email"] {
  flex: 1; min-width: 0; font: inherit; color: var(--term-text); background: transparent;
  border: 0; border-bottom: 1px dashed var(--green); padding: 4px 2px; border-radius: 0;
}
.signup input[type="email"]:focus { outline: none; border-bottom-style: solid; }
.signup button {
  font: 600 12px var(--mono); background: var(--green); color: #fff; border: 0; border-radius: 6px;
  padding: 6px 11px; cursor: pointer; white-space: nowrap;
}
@media (prefers-color-scheme: dark) { .signup button { color: #052E16; } }
.signup button:disabled { opacity: .6; cursor: wait; }
.signup button:focus-visible, .lockup:focus-visible, .links a:focus-visible, .foot a:focus-visible {
  outline: 2px solid var(--green); outline-offset: 3px;
}
.note { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.note[data-state="ok"] { color: var(--green); }
.note[data-state="invalid"], .note[data-state="retry"], .note[data-state="limited"], .note[data-state="error"] { color: var(--warn); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- prompt you can type into ---------- */
.prompt { display: flex; align-items: center; }
.cmd {
  flex: 1; min-width: 0; font: inherit; color: var(--term-text); background: transparent;
  border: 0; padding: 0; caret-color: var(--green);
}
.cmd:focus { outline: none; }
.cmd::placeholder { color: var(--muted); opacity: .6; }
.cursor {
  display: inline-block; width: 9px; height: 17px; background: var(--green);
  animation: blink 1.1s steps(1) infinite;
}
.prompt.live .cursor { display: none; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- footer ---------- */
.foot {
  margin-top: auto; padding: 20px 16px 28px; display: flex; gap: 16px; justify-content: center;
  flex-wrap: wrap; font: 12px system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--muted);
}
.foot a { text-decoration: none; }
.foot a:hover { color: var(--green); }

/* ---------- plain text pages (privacy, 404) ---------- */
.doc h1 { font-size: 16px; margin: 0 0 12px; }
.doc h2 { font-size: 14px; margin: 18px 0 6px; color: var(--green); }
.doc p, .doc li { font-size: 14px; line-height: 1.7; margin: 0 0 8px; }
.doc ul { padding-left: 1.2em; margin: 0 0 8px; }
.doc a { text-decoration-color: var(--green); text-underline-offset: 3px; }
.muted-date { color: var(--muted); font-size: 12px !important; margin-top: 16px !important; }

@media (max-width: 520px) {
  .wrap { padding-top: 28px; }
  .lockup img { height: 30px; }
  .body { padding: 14px 14px 18px; font-size: 13px; }
}
