/* Asciimood: what the home page and the Lab share. Dark only: it lives in a terminal. */
:root {
  --bg: #09090b;
  --bg-2: #0e0e11;
  --panel: #121215;
  --panel-2: #17171b;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.15);
  --ink: #f3f0e9;
  --muted: #a19d94;
  --faint: #67645d;
  --accent: #f0a24a;
  --accent-hot: #f2733a;
  --accent-soft: rgba(240, 162, 74, 0.12);
  --tty: #0b0b0e;
  --err: #f87171;
  --ok: #86efac;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --spring: cubic-bezier(0.34, 1.5, 0.64, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
pre, code, kbd { margin: 0; font-family: var(--mono); font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
::selection { background: rgba(240, 162, 74, 0.35); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: var(--bg); padding: 6px 10px; z-index: 99; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  font: 600 15px/1 var(--sans); letter-spacing: -0.01em; text-decoration: none; cursor: pointer;
  padding: 13px 20px; border-radius: 10px; border: 1px solid transparent;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s, box-shadow .2s, color .2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.32); background: rgba(255, 255, 255, 0.03); }
.btn-sm { padding: 9px 14px; font-size: 14px; border-radius: 9px; }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.brand-mark { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: #151517; border: 1px solid var(--line-strong); color: var(--accent); font: 700 14px/1 var(--mono); }
.brand-word { font: 700 15px/1 var(--mono); letter-spacing: -0.02em; }

/* ---------- the command bar: one line to copy ---------- */
.cmdbar {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 7px 7px 7px 16px; border-radius: 13px; background: #101013; border: 1px solid var(--line-strong);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 50px -30px rgba(0, 0, 0, 0.9);
  transition: border-color .25s, box-shadow .25s;
}
.cmdbar:hover { border-color: rgba(255, 255, 255, 0.26); }
.cmdbar.copied { border-color: rgba(134, 239, 172, 0.55); box-shadow: 0 0 0 4px rgba(134, 239, 172, 0.08); }
.cmd-prompt { color: var(--accent); font: 600 14px var(--mono); flex: none; }
.cmd-text { flex: 1; min-width: 0; font-size: 14px; color: var(--ink); white-space: nowrap; overflow-x: auto; scrollbar-width: none; padding: 6px 0; cursor: text; user-select: all; }
.cmd-text::-webkit-scrollbar { display: none; }
.cmd-text .nb { white-space: nowrap; }
.cmdbar { text-align: left; }
.btn-copy { flex: none; padding: 10px 16px; min-width: 84px; font-size: 14px; }
.cmdbar.copied .btn-copy { background: var(--ok); }

/* ---------- a Claude Code terminal ---------- */
.tty { position: relative; border-radius: 14px; background: var(--tty); border: 1px solid var(--line-strong); overflow: hidden; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 50px 120px -50px rgba(0, 0, 0, 1); }
.tty-bar { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px 0 14px; background: #121215; border-bottom: 1px solid var(--line); }
.lights { display: flex; gap: 7px; flex: none; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #2c2c31; }
.tty-title { font: 12px var(--mono); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; text-align: center; }
.tty-body { padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 8px; font: 13px/1.5 var(--mono); }
.tty-body pre { white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.tty-head .a, .tty-input .a { color: var(--accent); }
.tty-head .d { color: var(--faint); }
.tty-user { color: var(--muted); }
.mood { position: relative; border-radius: 10px; border: 1px solid #3b3b42; transition: border-color .5s var(--ease); }
.mood-canvas { display: block; width: 100%; height: 100%; border-radius: 9px; }
.mood-label { position: absolute; top: -9px; left: 14px; padding: 0 6px; background: var(--tty); color: var(--accent); font: 600 12px/18px var(--mono); transition: opacity .4s; }
.tty.is-error .mood { border-color: var(--err); }
.tty.is-error .mood-label { color: var(--err); }
.tty-status { font-size: 12.5px; color: var(--muted); }
.tty-status .st-dot { transition: color .3s; }
.tty-status .st-detail, .tty-status .st-name { color: var(--faint); }
.caret { color: var(--muted); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* the on/off switch */
.switch { all: unset; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 5px 8px; border-radius: 8px; flex: none; }
.switch:hover { background: rgba(255, 255, 255, 0.04); }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.switch-track { width: 32px; height: 18px; border-radius: 99px; background: #2a2a30; position: relative; transition: background-color .3s var(--ease); }
.switch-knob { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #8d8a84; transition: transform .35s var(--spring), background-color .3s; }
.switch[aria-checked="true"] .switch-track { background: var(--accent); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(14px); background: #1a1206; }
.switch-label { font: 600 12px var(--mono); color: var(--faint); transition: color .3s; }
.switch[aria-checked="true"] .switch-label { color: var(--accent); }

/* ---------- chips ---------- */
.chip { font: 500 12px var(--sans); color: var(--muted); background: transparent; border: 1px solid var(--line); padding: 5px 11px; border-radius: 99px; cursor: pointer; transition: color .2s, border-color .2s, background-color .2s; white-space: nowrap; }
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip.on { color: var(--ink); border-color: rgba(240, 162, 74, 0.6); background: var(--accent-soft); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 11px 16px; border-radius: 11px; background: #f3f0e9; color: #0b0b0e; font: 500 14px var(--sans);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9); transition: opacity .25s, transform .35s var(--spring); max-width: calc(100vw - 32px);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast b { font-family: var(--mono); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
