:root {
  --bg: #101214;
  --panel: #17191c;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f6f5;
  --muted: #9aa39e;
  --mint: #38c79e;
  --purple: #7352f2;
  --git: #f26b48;
  color-scheme: dark;
  font-family: Outfit, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(720px 420px at 50% 0%, rgba(56, 199, 158, 0.22), transparent 62%),
    #0c0e10;
  color: var(--text);
}

button, input, a { font: inherit; color: inherit; }

a { text-decoration: none; }

button { cursor: pointer; }

.appbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
  padding: 0 22px;
  background: rgba(16, 18, 20, 0.86);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 -1px 0 var(--line);
}

.appnav {
  display: flex;
  gap: 6px;
}

.appnav a {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}

.appnav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.github {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--mint);
  color: #06281e;
  font-size: 14px;
  font-weight: 650;
}

.github:hover { filter: brightness(1.06); }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #16181a;
  box-shadow: inset 0 0 0 1px rgba(56, 199, 158, 0.35);
  color: var(--mint);
}

.mark svg { width: 16px; height: 16px; }

.github svg { width: 15px; height: 15px; }

.stage {
  min-height: calc(100vh - 64px);
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 36px 20px 56px;
}

.hero {
  width: min(860px, 100%);
  display: grid;
  gap: 22px;
  justify-items: center;
}

.hero h1 {
  margin: 0;
  max-width: 14ch;
  text-align: center;
  font-size: clamp(48px, 7vw, 84px);
  letter-spacing: -0.055em;
  font-weight: 640;
  line-height: 0.92;
}

.kicker {
  margin: 0;
  color: var(--mint);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lede {
  margin: -6px 0 8px;
  color: #c5cdc8;
  font-size: 18px;
}

.term {
  width: min(820px, 100%);
  height: 560px;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: #0c0d0f;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  background: #141618;
  color: #8b938e;
  font-size: 12px;
}

.dots { display: flex; gap: 6px; }
.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
}
.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }

.term-bar span.name { margin-left: 8px; }

.term-body {
  position: relative;
  flex: 1;
  min-height: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
}

.history {
  position: absolute;
  top: 18px;
  left: 22px;
  right: 22px;
  height: 44px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 6px;
}

.ran { color: #6f7873; }

.line {
  position: absolute;
  top: 70px;
  left: 22px;
  right: 22px;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prompt { color: #c9d0cb; white-space: nowrap; }
.prompt b { color: var(--mint); font-weight: 600; }
.prompt em { color: var(--git); font-style: normal; }

#cmd {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  caret-color: var(--mint);
  font: inherit;
  padding: 0;
}

.popup {
  position: absolute;
  top: 108px;
  left: 22px;
  width: min(520px, calc(100% - 44px));
  max-height: calc(100% - 128px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: rgba(28, 28, 32, 0.96);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.popup[hidden] { display: none; }

#list {
  list-style: none;
  margin: 8px 8px 0;
  padding: 0;
  flex: 1;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 2px;
  overflow: auto;
}

#list li {
  display: grid;
  grid-template-columns: 18px auto 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 9px;
  color: #ececec;
}

#list li.on { background: var(--purple); }

.ico { display: grid; place-items: center; color: #c8c8d0; }
#list li.on .ico,
#list li.on .desc,
#list li.on .ret { color: white; }
.ico svg { width: 14px; height: 14px; }

.name { font-weight: 600; }
.desc {
  color: #9a9aa3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ret {
  color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
}
#list li.on .ret { color: white; }

.hints {
  display: flex;
  flex: 0 0 36px;
  gap: 14px;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #b7b7c0;
  font-size: 12px;
  white-space: nowrap;
}

.hints b {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-right: 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  font-weight: 650;
  font-size: 11px;
}

.seeds {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.seeds button {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
}

.seeds button:hover { color: var(--text); background: rgba(56, 199, 158, 0.1); }

.band {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto 88px;
}

.band h2 {
  margin: 0 0 18px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.window {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: #141618;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 52px;
  padding: 0 14px;
  background: #1a1c1f;
  box-shadow: inset 0 -1px 0 var(--line);
}

.toolbar strong {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.toolbar-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-pill {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--line);
}

.tool-btn {
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  background: #2a2d31;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.window-body {
  display: grid;
  grid-template-columns: 220px 1fr;
}

.side {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 12px 14px;
  background: #121416;
  box-shadow: inset -1px 0 0 var(--line);
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 6px 14px;
  font-weight: 680;
  letter-spacing: -0.03em;
}

.side-brand small,
.engine small {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
}

.side-label {
  margin: 12px 10px 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  color: #b7beb9;
  font-size: 13px;
}

.side button.on {
  background: rgba(56, 199, 158, 0.16);
  color: var(--text);
}

.engine {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 14px 6px 4px;
  padding: 10px;
  border-radius: 12px;
  background: #1b1e21;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 12px;
  font-weight: 650;
}

.engine i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(56, 199, 158, 0.16);
}

.canvas {
  padding: 22px 22px 18px;
  background: #101214;
  display: flex;
  flex-direction: column;
}

.panel { display: grid; align-content: start; gap: 0; }
.panel[hidden] { display: none; }

.panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel h3 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.pill, .rows span {
  font-size: 12px;
  color: var(--muted);
}

.pill.ok, .rows span.ok { color: var(--mint); }

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metrics article, .rows {
  background: #1b1e21;
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 14px;
}

.metrics article {
  padding: 16px;
  display: grid;
  gap: 6px;
}

.metrics b { font-size: 22px; letter-spacing: -0.03em; }
.metrics span { color: var(--muted); font-size: 12px; }

.rows {
  list-style: none;
  margin: 0;
  padding: 6px;
}

.rows li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
}

.rows b { font-weight: 600; }

.switch {
  width: 40px;
  height: 24px;
  border-radius: 999px;
  background: var(--mint);
  position: relative;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
}

.about-line { margin: 0 0 6px; font-size: 16px; }
.muted { margin: 0; color: var(--muted); }

.featurebar,
.bento {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
}

.bento article {
  padding: 22px;
  border-radius: 20px;
  background: #16181b;
  box-shadow: inset 0 0 0 1px var(--line);
}

.bento h2 {
  margin: 8px 0 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.045em;
  line-height: 1;
}

.bento .wide { grid-column: 1 / -1; }
.bento .accent {
  background:
    radial-gradient(400px 180px at 0% 100%, rgba(56, 199, 158, 0.28), transparent 70%),
    #14211c;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
}

.shot {
  margin-top: 14px;
  padding: 8px;
  border-radius: 14px;
  background: #1c1c20;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.shot-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 9px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
}

.shot-row em { color: #9a9aa3; font-style: normal; }
.shot-row.on { background: var(--purple); }
.shot-row.on em { color: rgba(255, 255, 255, 0.8); }

@media (max-width: 800px) {
  .appbar { grid-template-columns: auto 1fr; height: auto; padding: 12px; gap: 10px; }
  .appnav { grid-column: 1 / -1; order: 3; overflow: auto; }
  .github { justify-self: end; }
  .window-body { grid-template-columns: 1fr; }
  .toolbar { grid-template-columns: auto 1fr auto; gap: 10px; }
  .side { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .side-label, .engine { display: none; }
  .metrics, .bento { grid-template-columns: 1fr; }
  .bento .wide { grid-column: auto; }
  .term { height: 420px; }
  .hints { gap: 8px; font-size: 11px; overflow: hidden; }
}

@media (max-width: 640px) {
  .desc { display: none; }
  #list li { grid-template-columns: 18px 1fr auto; }
  .history, .line { left: 14px; right: 14px; }
  .popup { left: 14px; width: calc(100% - 28px); }
  .prompt { font-size: 12px; }
}
