@font-face {
  font-family: 'ABC Diatype';
  src: url('../assets/fonts/ABCDiatype-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'ABC Diatype';
  src: url('../assets/fonts/ABCDiatype-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'ABC Diatype';
  src: url('../assets/fonts/ABCDiatype-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'ABC Diatype Semi-Mono';
  src: url('../assets/fonts/ABCDiatypeSemi-Mono-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'ABC Diatype Semi-Mono';
  src: url('../assets/fonts/ABCDiatypeSemi-Mono-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --void: #07070c;
  --ink: #f4f7f5;
  --mist: #9aa3b5;
  --sol-green: #14f195;
  --sol-purple: #9945ff;
  --glass: rgba(10, 12, 18, 0.72);
  --hairline: rgba(255, 255, 255, 0.1);
  --intended-width: 1280px;
  --intended-height: 800px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--void);
  color: var(--ink);
  font-family: 'ABC Diatype', system-ui, sans-serif;
  font-weight: 400;
  height: 100%;
}
body { min-height: 100vh; }

a { color: var(--sol-green); text-decoration: none; }
a:hover { text-decoration: underline; }

#stage {
  position: relative;
  width: 100%;
  min-width: 320px;
  height: 100vh;
  min-height: 800px;
  overflow: auto;
  background-color: var(--void);
  background-image: url('../assets/solanaGradient.png');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
#stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 7, 12, 0.28) 0%, rgba(7, 7, 12, 0.78) 55%, rgba(7, 7, 12, 0.92) 100%);
  pointer-events: none;
  z-index: 0;
}
#stage > * { position: relative; z-index: 1; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 12px;
  top: 12px;
  background: var(--void);
  color: var(--sol-green);
  padding: 8px 12px;
  z-index: 20;
}

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px 8px;
  border-bottom: 1px solid var(--hairline);
}
.mark {
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 15px;
}
.mark em {
  font-style: normal;
  color: var(--sol-green);
}
.nav {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: var(--mist);
}
.nav a { color: var(--mist); }
.nav a:hover { color: var(--ink); text-decoration: none; }

.hero {
  padding: 48px 28px 28px;
  max-width: 920px;
}
.kicker {
  font-family: 'ABC Diatype Semi-Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sol-purple);
  margin: 0 0 14px;
}
h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 700;
}
h1 span { color: var(--sol-green); }
.lede {
  margin: 18px 0 0;
  max-width: 42rem;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--mist);
}

.banner {
  margin: 0 28px 16px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--sol-purple) 55%, transparent);
  background: rgba(153, 69, 255, 0.12);
  color: var(--ink);
  font-size: 13px;
}
.banner[hidden] { display: none; }
.banner code {
  font-family: 'ABC Diatype Semi-Mono', ui-monospace, monospace;
  color: var(--sol-green);
}

.layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr minmax(280px, 360px);
  gap: 16px;
  padding: 8px 28px 40px;
  align-items: start;
}

.panel {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 18px 18px 20px;
  min-height: 420px;
}
.panel h2 {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sol-green);
  font-weight: 500;
}

.understand p {
  margin: 0 0 12px;
  color: var(--mist);
  font-size: 14px;
  line-height: 1.55;
}
.understand dt {
  font-family: 'ABC Diatype Semi-Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--sol-purple);
  margin-top: 12px;
}
.understand dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.tab, button, .field input, .field select {
  font-family: inherit;
  font-size: 13px;
}
.tab {
  background: transparent;
  color: var(--mist);
  border: 1px solid var(--hairline);
  padding: 6px 10px;
  cursor: pointer;
}
.tab[aria-selected="true"] {
  color: var(--void);
  background: var(--sol-green);
  border-color: var(--sol-green);
}
.tab:active, button:active { transform: scale(0.98); }

#search {
  flex: 1;
  min-width: 140px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--hairline);
  color: var(--ink);
  padding: 6px 10px;
  font-family: 'ABC Diatype Semi-Mono', ui-monospace, monospace;
}
#search:focus, .field input:focus, .field select:focus, button:focus-visible, .tab:focus-visible {
  outline: 2px solid var(--sol-purple);
  outline-offset: 2px;
}

#catalog-count {
  font-family: 'ABC Diatype Semi-Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--mist);
  margin-left: auto;
  align-self: center;
}

#catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  max-height: 62vh;
  overflow: auto;
}
.card {
  text-align: left;
  background: rgba(7, 7, 12, 0.45);
  border: 1px solid var(--hairline);
  color: var(--ink);
  padding: 12px;
  cursor: pointer;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card:hover { border-color: color-mix(in srgb, var(--sol-green) 70%, transparent); }
.card[aria-pressed="true"] {
  border-color: var(--sol-green);
  box-shadow: inset 0 0 0 1px var(--sol-green);
}
.card .id {
  font-family: 'ABC Diatype Semi-Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--sol-green);
  word-break: break-all;
}
.card .name { font-weight: 500; font-size: 14px; }
.card .meta {
  font-size: 12px;
  color: var(--mist);
  margin-top: auto;
}

.ticket h2 { color: var(--sol-purple); }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
}
.field input, .field select {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--hairline);
  color: var(--ink);
  padding: 8px 10px;
}
.actions { display: flex; gap: 8px; margin: 12px 0; }
button.primary, button.ghost {
  cursor: pointer;
  padding: 9px 12px;
  border: 1px solid var(--sol-green);
}
button.primary {
  background: var(--sol-green);
  color: var(--void);
  font-weight: 500;
}
button.ghost {
  background: transparent;
  color: var(--sol-green);
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#ticket-board {
  border: 1px dashed color-mix(in srgb, var(--sol-purple) 60%, transparent);
  padding: 14px;
  min-height: 160px;
  font-family: 'ABC Diatype Semi-Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.6;
}
#ticket-board.empty { color: var(--mist); }
#quote-amount { color: var(--sol-green); font-size: 22px; font-weight: 500; letter-spacing: -0.03em; }
.note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--mist);
  line-height: 1.45;
}

.chat {
  margin: 0 28px 24px;
  min-height: 280px;
}
#chat-log {
  min-height: 140px;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--hairline);
  padding: 12px;
  font-size: 14px;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.28);
  margin-bottom: 10px;
}
.chat-line { margin: 0 0 10px; }
.chat-line .who {
  font-family: 'ABC Diatype Semi-Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sol-purple);
}
.chat-line.assistant .who { color: var(--sol-green); }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--hairline); color: var(--ink); padding: 8px 10px; font-family: inherit; }

.foot {
  padding: 8px 28px 28px;
  font-size: 12px;
  color: var(--mist);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  html, body { height: auto; }
  #stage { height: auto; min-height: 100vh; }
  .layout { grid-template-columns: 1fr; }
  .panel { min-height: 0; }
  #catalog { max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tab, button { transition: none; }
  .tab:active, button:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .panel { background: #101218; backdrop-filter: none; }
}
