:root {
  --bg: #0b0b0d;
  --panel: #111114;
  --line: #1f1f25;
  --border: #2a2a31;
  --border-strong: #3a3a44;
  --ink: #ececea;
  --body: #b4b4bb;
  --dim: #9a9aa3;
  --acc: #ffb454;
  --ok: #7ee0a1;
  --err: #ff8a80;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Space Grotesk', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); }
::-webkit-scrollbar-thumb:hover { background: #55555f; }
::selection { background: rgba(255, 180, 84, .3); }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--acc); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.acc { color: var(--acc); }
.dim { color: var(--dim); }
.ok { color: var(--ok); }

.wrap {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding-left: 48px;
  padding-right: 48px;
}

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 11, 13, .82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.menu-btn { display: none; }
.top-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.host { font-size: 15px; line-height: 44px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 44px;
  padding: 0 16px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border-strong);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.chip:hover { color: var(--acc); border-color: var(--acc); }

main { flex: 1; }

.hero {
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.eyebrow { margin: 0; font-size: 13px; letter-spacing: .08em; color: var(--dim); }
h1 {
  margin: 0;
  max-width: 980px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.05;
  letter-spacing: -.02em;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px;
  align-items: stretch;
  padding-bottom: 96px;
}

.bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--dim);
}

.term {
  scroll-margin-top: 88px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--panel);
  transition: border-color .2s;
}
.term:focus-within { border-color: #4a4a55; }
.term .bar { padding: 0 16px; }
.dots { display: flex; gap: 8px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.title { flex: 1; text-align: center; padding-right: 46px; }

.out {
  flex: 1 1 auto;
  height: 440px;
  overflow-y: auto;
  padding: 20px;
  font-size: 14px;
  line-height: 1.6;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  cursor: text;
}
.ln { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.6em; }
.ln.dim { color: var(--dim); }
.ln.acc { color: var(--acc); }
.ln.err { color: var(--err); }
.ln a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.ln a:hover { color: var(--acc); text-decoration-color: var(--acc); }
.ln.kv { display: flex; }
.ln.kv .key { flex: 0 0 15ch; }

.prompt { display: flex; align-items: center; gap: 8px; }
.prompt label { white-space: nowrap; }
.prompt input {
  flex: 1;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  caret-color: var(--acc);
  font: inherit;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  min-height: 40px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--dim);
}
.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.panel { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--border); }
.stack { margin: 0; padding: 4px 24px 12px; }
.stack div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 16px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--line); }
.stack div:last-child { border-bottom: 0; }
.stack dt { font-size: 12px; color: var(--acc); }
.stack dd { margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.45; }

.bottom { border-top: 1px solid var(--line); }
.bottom-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0 24px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 12px;
  color: var(--dim);
}
.links { display: flex; gap: 20px; }
.links a { padding: 12px 0; }

@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .out { height: 360px; }
}
@media (max-width: 600px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .stack div { grid-template-columns: minmax(0, 1fr); }
  .ln.kv { display: block; margin-bottom: 4px; }
  .ln.kv .key { display: block; color: var(--dim); }

  .top-row { flex-wrap: nowrap; }
  .menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 14px;
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--border-strong);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
  }
  .burger { position: relative; width: 14px; height: 8px; }
  .burger i {
    position: absolute;
    left: 0;
    width: 14px;
    height: 1.5px;
    background: currentColor;
    transition: transform .3s cubic-bezier(.65, 0, .35, 1), top .3s cubic-bezier(.65, 0, .35, 1);
  }
  .burger i:first-child { top: 0; }
  .burger i:last-child { top: 6.5px; }
  .open .menu-btn { color: var(--acc); border-color: var(--acc); }
  .open .burger i:first-child { top: 3.25px; transform: rotate(45deg); }
  .open .burger i:last-child { top: 3.25px; transform: rotate(-45deg); }

  .chips {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    padding: 4px 20px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .25s, transform .3s cubic-bezier(.65, 0, .35, 1), visibility 0s linear .3s;
  }
  .open .chips {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .25s, transform .3s cubic-bezier(.65, 0, .35, 1), visibility 0s;
  }
  .chips .chip {
    height: 56px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 16px;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity .3s, transform .3s cubic-bezier(.65, 0, .35, 1), color .2s;
  }
  .chips .chip:last-child { border-bottom: 0; }
  .chips .chip::before { content: '$ '; content: '$ ' / ''; color: var(--acc); }
  .open .chips .chip { opacity: 1; transform: none; }
  .open .chips .chip:nth-child(2) { transition-delay: .04s; }
  .open .chips .chip:nth-child(3) { transition-delay: .08s; }
  .open .chips .chip:nth-child(4) { transition-delay: .12s; }
}
@media (prefers-reduced-motion: reduce) {
  .blink { animation: none; }
  .chip, .chips, .term, .burger i { transition: none !important; }
}
