:root {
  color-scheme: dark;
  --bg: #010302;
  --bg-soft: #030805;
  --panel: #07110b;
  --panel-strong: #0b1810;
  --panel-hover: #102519;
  --line: rgba(126, 255, 123, 0.2);
  --line-strong: rgba(126, 255, 123, 0.44);
  --text: #eaffea;
  --muted: #9abb9c;
  --faint: #617d65;
  --cyan: #9cff9b;
  --violet: #dde8cf;
  --green: #7cff6b;
  --amber: #d8ff87;
  --danger: #ff6d6d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48), 0 0 34px rgba(124, 255, 107, 0.06);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(124, 255, 107, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 255, 107, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 18% 0%, rgba(124, 255, 107, 0.16), transparent 28rem),
    radial-gradient(circle at 92% 18%, rgba(222, 232, 207, 0.08), transparent 28rem),
    linear-gradient(145deg, #010302 0%, #030604 52%, #000 100%);
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.025) 0,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 4px
  );
  content: "";
  opacity: 0.42;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 2rem;
}

.terminal-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 27rem);
  align-items: center;
  gap: 1.5rem;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(7, 17, 11, 0.92), rgba(3, 8, 5, 0.84));
  box-shadow: var(--shadow);
  padding: 1.15rem 1.15rem 0.9rem;
}

.brand-block {
  display: flex;
  min-width: 0;
}

.brand-copy {
  min-width: 0;
  padding: 0.35rem 0 0.25rem;
}

.hero-machine {
  display: flex;
  justify-content: flex-end;
  align-self: end;
  min-width: 0;
  margin: -1.8rem -0.75rem -1rem 0;
}

.hero-machine img {
  width: min(100%, 25rem);
  max-height: 18rem;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 34px rgba(124, 255, 107, 0.18)) drop-shadow(0 28px 32px rgba(0, 0, 0, 0.5));
}

.hero-command-strip {
  display: flex;
  min-width: 0;
  gap: 0.65rem;
  align-items: flex-start;
  width: min(100%, 58rem);
  margin-top: 1rem;
  border: 1px solid rgba(124, 255, 107, 0.3);
  border-radius: 8px;
  background: rgba(1, 4, 2, 0.84);
  padding: 0.75rem;
  box-shadow: inset 0 0 28px rgba(124, 255, 107, 0.08);
}

.hero-command-strip span {
  flex: 0 0 auto;
  color: var(--amber);
  font-weight: 900;
}

.hero-command-strip code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--green);
  font-size: 0.88rem;
  line-height: 1.45;
}

.terminal-header > *,
.workspace > *,
.primary-column,
.launchpad-board,
.hook-browser,
.identity-panel,
.chat-panel,
.selected-panel,
.hash-panel,
.rules-panel,
.custom-hook-panel {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 28rem;
  margin-bottom: 0.55rem;
  font-size: 2.4rem;
  line-height: 1.05;
  letter-spacing: 0;
  text-shadow: 0 0 18px rgba(124, 255, 107, 0.25);
}

h2 {
  margin-bottom: 0;
  font-size: 1.08rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.intro {
  max-width: 56rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.section-copy {
  max-width: 42rem;
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.network-pill,
.wallet-button,
.sort-tab,
.ghost-button,
.url-row button,
.launch-button {
  min-height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
}

.network-pill {
  display: inline-flex;
  align-items: center;
  padding: 0 0.9rem;
  color: var(--green);
  text-transform: uppercase;
}

.wallet-button {
  padding: 0 1rem;
}

.wallet-button.connected,
.x-login-button.connected {
  border-color: rgba(101, 227, 170, 0.5);
  color: var(--green);
}

.x-login-button.needs-config {
  border-color: rgba(216, 255, 135, 0.45);
  color: var(--amber);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24rem;
  gap: 1rem;
  align-items: start;
}

.primary-column {
  display: grid;
  gap: 1rem;
}

.launchpad-board,
.hook-browser,
.explainer-panel,
.custom-hook-panel,
.identity-panel,
.chat-panel,
.selected-panel,
.hash-panel,
.rules-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 17, 11, 0.93);
  box-shadow: var(--shadow);
}

.launchpad-board,
.hook-browser,
.explainer-panel,
.custom-hook-panel,
.identity-panel,
.chat-panel,
.selected-panel,
.hash-panel,
.rules-panel {
  padding: 1.15rem;
}

.section-heading,
.custom-hook-heading,
.hook-toolbar,
.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.status-chip {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.status-chip.valid {
  border-color: rgba(124, 255, 107, 0.6);
  color: var(--green);
}

.status-chip.invalid {
  border-color: rgba(255, 111, 145, 0.5);
  color: var(--danger);
}

.url-form {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 800;
}

.launchpad-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.launch-button.compact {
  width: auto;
  min-width: 12rem;
  padding: 0 1rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.metric-grid article,
.market-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 0.9rem;
}

.metric-grid span,
.market-card span {
  display: block;
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-grid strong {
  display: block;
  margin-top: 0.4rem;
  color: var(--green);
  font-size: 1.15rem;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.market-card {
  display: grid;
  gap: 0.75rem;
}

.market-card strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
}

.market-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.market-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin: 0;
}

.market-card div {
  min-width: 0;
}

.market-card dt {
  color: var(--faint);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.market-card dd {
  margin: 0.15rem 0 0;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
}

.market-card button,
.quick-prompts button,
.chat-form button {
  min-height: 2.35rem;
  border: 1px solid rgba(124, 255, 107, 0.42);
  border-radius: 4px;
  background: rgba(124, 255, 107, 0.08);
  color: var(--green);
  font-weight: 800;
}

.chat-panel {
  display: grid;
  gap: 0.9rem;
}

.chat-log {
  display: grid;
  gap: 0.75rem;
  max-height: 22rem;
  overflow: auto;
  padding-right: 0.2rem;
}

.chat-message {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #010402;
  padding: 0.75rem;
}

.chat-message.user {
  border-color: rgba(216, 255, 135, 0.38);
  background: rgba(216, 255, 135, 0.05);
}

.chat-message span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.chat-message p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.quick-prompts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.chat-form input {
  min-width: 0;
  min-height: 2.65rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #020603;
  color: var(--text);
  outline: none;
  padding: 0 0.75rem;
}

.chat-form input:focus {
  border-color: rgba(124, 255, 107, 0.75);
  box-shadow: 0 0 0 3px rgba(124, 255, 107, 0.12);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.url-form label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
}

.url-row input,
.search-wrap input,
.custom-hook-form input,
.custom-hook-form select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  outline: none;
  background: #020603;
  color: var(--text);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.url-row input {
  min-height: 2.8rem;
  border-radius: 8px;
  padding: 0 0.9rem;
}

.url-row input:focus,
.search-wrap:focus-within input,
.custom-hook-form input:focus,
.custom-hook-form select:focus {
  border-color: rgba(124, 255, 107, 0.75);
  box-shadow: 0 0 0 3px rgba(124, 255, 107, 0.12);
}

.url-row button {
  padding: 0 1rem;
  border-color: rgba(124, 255, 107, 0.42);
  color: var(--cyan);
}

.command-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
  border: 1px solid rgba(124, 255, 107, 0.3);
  border-radius: 8px;
  background: #010402;
  padding: 0.75rem;
  box-shadow: inset 0 0 28px rgba(124, 255, 107, 0.07);
}

.command-line {
  display: flex;
  min-width: 0;
  gap: 0.65rem;
  align-items: flex-start;
  color: var(--green);
}

.command-line span {
  flex: 0 0 auto;
  color: var(--amber);
  font-weight: 900;
}

.command-line code {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--green);
  font-size: 0.88rem;
  line-height: 1.45;
}

.form-note,
.launch-status,
.selected-panel > p,
.identity-copy,
.wallet-summary p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.derived-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.derived-card {
  min-width: 0;
  min-height: 5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 0.9rem;
}

.derived-card.wide {
  grid-column: span 2;
}

.derived-card span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--faint);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.derived-card strong,
.hash-list dd {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
}

.mono {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
}

.wallet-summary {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.9rem;
  border: 1px solid rgba(124, 255, 107, 0.28);
  border-radius: 8px;
  background: #010402;
  padding: 0.75rem;
}

.wallet-summary span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.wallet-summary strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.84rem;
}

.wallet-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.78);
  padding: 1rem;
}

.wallet-modal-card {
  width: min(100%, 39rem);
  border: 1px solid rgba(124, 255, 107, 0.55);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(7, 17, 11, 0.98), rgba(1, 4, 2, 0.98));
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.7), 0 0 48px rgba(124, 255, 107, 0.14);
  padding: 1.2rem;
}

.wallet-modal-card h2 {
  margin-bottom: 0.55rem;
  font-size: 1.35rem;
}

.wallet-warning {
  margin-bottom: 1rem;
  color: var(--amber);
  font-size: 0.96rem;
  line-height: 1.55;
}

.wallet-secret {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #010402;
  padding: 0.8rem;
}

.wallet-secret.critical {
  border-color: rgba(216, 255, 135, 0.44);
}

.wallet-secret span {
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.wallet-secret code {
  overflow-wrap: anywhere;
  color: var(--green);
  font-size: 0.86rem;
  line-height: 1.45;
}

.x-pin-card {
  max-width: 34rem;
}

.x-pin-link {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border: 1px solid rgba(124, 255, 107, 0.48);
  border-radius: 8px;
  color: var(--green);
  padding: 0 1rem;
  text-decoration: none;
  font-weight: 900;
}

.x-pin-form {
  display: grid;
  gap: 0.9rem;
}

.x-pin-form label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.x-pin-form input {
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #020603;
  color: var(--text);
  padding: 0 0.85rem;
  font: 900 1.05rem/1 "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

.x-pin-form input:focus {
  border-color: rgba(124, 255, 107, 0.75);
  box-shadow: 0 0 0 3px rgba(124, 255, 107, 0.12);
}

.x-pin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.custom-hook-panel {
  display: grid;
  gap: 1rem;
}

.builder-status {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  white-space: nowrap;
  border: 1px solid rgba(124, 255, 107, 0.34);
  border-radius: 4px;
  color: var(--green);
  padding: 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.builder-status.saved {
  border-color: rgba(216, 255, 135, 0.55);
  color: var(--amber);
}

.custom-hook-form {
  display: grid;
  gap: 0.85rem;
}

.builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 0.75fr);
  gap: 0.75rem;
}

.custom-hook-form label,
.builder-options legend {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.custom-hook-form input,
.custom-hook-form select {
  min-height: 2.65rem;
  margin-top: 0.45rem;
  border-radius: 4px;
  background: #020603;
  color: var(--text);
  outline: none;
  padding: 0 0.75rem;
}

.custom-hook-form select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--green) 50%), linear-gradient(135deg, var(--green) 50%, transparent 50%);
  background-position: calc(100% - 1rem) 1.1rem, calc(100% - 0.65rem) 1.1rem;
  background-repeat: no-repeat;
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
}

.builder-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 0.85rem;
}

.builder-options legend {
  padding: 0 0.35rem;
  color: var(--green);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  border: 1px solid rgba(124, 255, 107, 0.18);
  border-radius: 4px;
  background: rgba(124, 255, 107, 0.045);
  padding: 0.6rem;
}

.checkbox-row input {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--green);
}

.builder-actions {
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.custom-hook-preview {
  min-width: 0;
  margin: 0;
  border: 1px solid rgba(124, 255, 107, 0.24);
  border-radius: 8px;
  background: #010402;
  color: var(--muted);
  padding: 0.75rem;
  font-size: 0.88rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.explainer-panel {
  display: grid;
  gap: 1rem;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.flow-grid article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 0.9rem;
}

.flow-grid span {
  display: inline-flex;
  margin-bottom: 0.6rem;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
}

.flow-grid strong {
  display: block;
  margin-bottom: 0.45rem;
}

.flow-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.hook-toolbar {
  align-items: center;
}

.sort-tabs {
  display: flex;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.25rem;
  background: #020603;
}

.sort-tab {
  min-height: 2rem;
  padding: 0 0.8rem;
  border-color: transparent;
  background: transparent;
  color: var(--faint);
  font-size: 0.88rem;
}

.sort-tab.active {
  border-color: rgba(124, 255, 107, 0.8);
  background: rgba(124, 255, 107, 0.11);
  color: var(--text);
}

.search-wrap {
  position: relative;
  display: block;
  margin: 1rem 0;
}

.search-wrap input {
  min-height: 2.6rem;
  border-radius: 8px;
  padding: 0 0.9rem 0 2.25rem;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid var(--faint);
  border-radius: 999px;
  transform: translateY(-56%);
}

.search-icon::after {
  position: absolute;
  right: -0.38rem;
  bottom: -0.32rem;
  width: 0.45rem;
  height: 2px;
  border-radius: 999px;
  background: var(--faint);
  content: "";
  transform: rotate(45deg);
}

.hook-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(17rem, 1fr));
  gap: 0.85rem;
}

.hook-card {
  display: grid;
  min-width: 0;
  min-height: 7.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 1rem;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.hook-card:hover,
.hook-card:focus-visible {
  border-color: rgba(124, 255, 107, 0.6);
  background: var(--panel-hover);
  transform: translateY(-1px);
}

.hook-card.selected {
  border-color: rgba(124, 255, 107, 0.88);
  box-shadow: inset 0 0 0 1px rgba(124, 255, 107, 0.28), 0 0 22px rgba(124, 255, 107, 0.08);
}

.hook-card:focus-visible,
.wallet-button:focus-visible,
.sort-tab:focus-visible,
.url-row button:focus-visible,
.launch-button:focus-visible,
.ghost-button:focus-visible {
  outline: 3px solid rgba(124, 255, 107, 0.28);
  outline-offset: 2px;
}

.hook-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.hook-name {
  overflow-wrap: anywhere;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.2;
}

.hook-rate {
  flex: 0 0 auto;
  color: var(--amber);
  font-size: 0.92rem;
  font-weight: 800;
}

.hook-tags {
  min-height: 1.4rem;
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.hook-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-top: 0.9rem;
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
  color: var(--faint);
  font-size: 0.8rem;
}

.hook-action {
  flex: 0 0 auto;
  color: var(--cyan);
  font-weight: 800;
}

.execution-panel {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 1rem;
}

.panel-title-row span {
  color: var(--amber);
  font-weight: 800;
}

.intent-list {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
}

.intent-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 0.45rem 0.65rem;
}

.intent-list span {
  color: var(--muted);
  font-size: 0.86rem;
}

.intent-list strong {
  white-space: nowrap;
  color: var(--text);
  font-size: 0.9rem;
}

.launch-button {
  width: 100%;
  min-height: 2.85rem;
  border-color: rgba(124, 255, 107, 0.55);
  background: linear-gradient(135deg, rgba(124, 255, 107, 0.19), rgba(216, 255, 135, 0.12));
  color: var(--text);
}

.launch-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  border-color: var(--line);
  background: #07110b;
  color: var(--faint);
}

.launch-status {
  margin-top: 0.75rem;
}

.ghost-button {
  min-height: 2rem;
  padding: 0 0.75rem;
  color: var(--cyan);
  font-size: 0.84rem;
}

.hash-list {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0 0;
}

.hash-list div {
  min-width: 0;
}

.hash-list dt {
  margin-bottom: 0.25rem;
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hash-list dd {
  margin: 0;
  color: #cdfed0;
}

.rules-panel h2 {
  margin-bottom: 0.75rem;
}

.rules-panel ul {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 5rem;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

@media (max-width: 1120px) {
  .terminal-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-machine {
    justify-content: center;
    margin: -0.75rem 0 -0.6rem;
  }

  .hero-machine img {
    width: min(100%, 24rem);
    max-height: 16rem;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .execution-panel {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .identity-panel,
  .selected-panel,
  .hash-panel,
  .rules-panel,
  .custom-hook-panel {
    min-width: 0;
  }
}

@media (max-width: 860px) {
  .shell {
    width: 100%;
    padding: 1rem;
  }

  .terminal-header,
  .section-heading,
  .custom-hook-heading,
  .hook-toolbar {
    display: grid;
  }

  h1 {
    max-width: none;
    font-size: 1.55rem;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .url-row,
  .derived-grid,
  .execution-panel,
  .flow-grid,
  .builder-grid,
  .builder-options,
  .builder-actions,
  .metric-grid,
  .market-grid,
  .command-console {
    grid-template-columns: 1fr;
  }

  .launchpad-heading,
  .chat-form {
    display: grid;
  }

  .launch-button.compact {
    width: 100%;
  }

  .hero-machine img {
    max-height: 14rem;
  }

  .derived-card.wide {
    grid-column: span 1;
  }

  .hook-grid {
    grid-template-columns: 1fr;
  }

  .sort-tabs {
    width: 100%;
  }

  .sort-tab {
    flex: 1;
  }
}

@media (max-width: 600px) {
  .shell {
    max-width: 390px;
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 460px) {
  .launchpad-board,
  .hook-browser,
  .custom-hook-panel,
  .identity-panel,
  .chat-panel,
  .selected-panel,
  .hash-panel,
  .rules-panel {
    padding: 0.9rem;
  }

  .hook-card-header,
  .hook-footer,
  .panel-title-row,
  .quick-prompts,
  .intent-list div {
    display: grid;
  }

  .hook-rate,
  .hook-action,
  .panel-title-row span,
  .intent-list strong {
    justify-self: start;
  }
}
