:root {
  color-scheme: dark;
  --canvas: #0b0e11;
  --surface: #151a21;
  --surface-2: #1d232c;
  --surface-3: #252d38;
  --ink: #f4f6f8;
  --body: #d7dce3;
  --muted: #8c96a3;
  --muted-2: #677180;
  --line: #2b3440;
  --accent: #f5c84c;
  --accent-active: #e8b52e;
  --green: #17b26a;
  --orange: #f79009;
  --blue: #4da3ff;
  --gray: #8c96a3;
  --red: #f04438;
  --violet: #a78bfa;
  --cyan: #22d3ee;
  --amber: #f59e0b;
  --radius: 8px;
  --ease: cubic-bezier(0.22, 0.72, 0, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--canvas);
  background-size: 72px 72px;
  color: var(--ink);
  font-family:
    "Plus Jakarta Sans",
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(1280px, calc(100% - 28px));
  margin: 0 auto;
  padding-bottom: 42px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 10px 0 18px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(11, 14, 17, 0.88);
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #161616;
  font-size: 13px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.nav-links a {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  transition:
    color 260ms var(--ease),
    background 260ms var(--ease);
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.nav-links .author-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-links .author-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.x-logo {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: #ffffff;
}

.x-logo rect {
  fill: #050505;
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 1.25;
}

.x-logo path {
  fill: currentColor;
}

.query-dock {
  display: grid;
  grid-template-columns: minmax(210px, 0.32fr) minmax(460px, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(21, 26, 33, 0.82);
}

.query-copy {
  display: flex;
  min-height: 96px;
  flex-direction: column;
  justify-content: center;
  padding: 4px 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

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

h1 {
  margin-bottom: 0;
  font-size: 26px;
  line-height: 1.14;
}

h2 {
  margin-bottom: 6px;
  font-size: 24px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.search-workbench {
  position: relative;
  align-self: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.search-workbench label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 10px;
}

.search-row input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  background: #0e1319;
  color: var(--ink);
  padding: 0 15px;
  transition:
    border-color 240ms var(--ease),
    box-shadow 240ms var(--ease),
    transform 240ms var(--ease);
}

.search-row input:focus {
  border-color: rgba(245, 200, 76, 0.82);
  box-shadow: 0 0 0 4px rgba(245, 200, 76, 0.12);
}

.primary-action {
  min-height: 46px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #181a20;
  font-weight: 800;
  transition:
    background 240ms var(--ease),
    transform 160ms var(--ease);
}

.primary-action:hover {
  background: var(--accent-active);
}

.primary-action:active {
  transform: translateY(1px) scale(0.99);
}

.suggestions {
  position: absolute;
  right: 0;
  left: 0;
  top: 76px;
  z-index: 12;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111821;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.38);
}

.suggestion {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.suggestion:last-child {
  border-bottom: 0;
}

.suggestion:hover,
.suggestion:focus {
  background: rgba(245, 200, 76, 0.08);
}

.suggestion small {
  color: var(--muted);
}

.quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.quick-picks button,
.segmented button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--body);
  padding: 7px 12px;
  font-size: 13px;
  transition:
    border-color 240ms var(--ease),
    background 240ms var(--ease),
    color 240ms var(--ease);
}

.quick-picks button:hover,
.segmented button:hover {
  border-color: rgba(245, 200, 76, 0.5);
  color: var(--ink);
}

.result-section,
.support-panels {
  padding: 12px 0;
}

.result-section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11, 14, 17, 0.62);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.section-head p:not(.eyebrow),
.asset-profile {
  max-width: 860px;
  color: var(--muted);
}

.asset-profile {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
  margin-bottom: 0;
  font-size: 13px;
}

.asset-profile span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.asset-profile .asset-intro {
  flex-basis: 100%;
  justify-content: flex-start;
  border-radius: var(--radius);
  line-height: 1.45;
}

.asset-profile strong {
  color: var(--body);
  font-weight: 700;
}

.section-head.compact {
  align-items: start;
}

.freshness {
  display: grid;
  gap: 4px;
  min-width: 178px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

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

.freshness strong {
  color: var(--body);
  font-size: 13px;
}

.research-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.research-panel article {
  min-height: 112px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(21, 26, 33, 0.74);
}

.research-panel strong,
.research-panel small,
.research-panel span,
.research-panel em,
.evidence-links a {
  display: block;
}

.research-panel strong {
  margin: 3px 0;
  font-size: 18px;
}

.research-panel small,
.research-panel span,
.research-panel em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.panel-label {
  color: var(--accent) !important;
  font-size: 12px;
  font-weight: 800;
}

.evidence-links {
  display: grid;
  gap: 4px;
  margin-top: 5px;
}

.evidence-links a {
  overflow: hidden;
  color: var(--body);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-links a:hover {
  color: var(--accent);
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(21, 26, 33, 0.72);
}

.filter-panel > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.filter-label {
  color: var(--muted);
  font-size: 13px;
}

.filter-note {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.segmented .is-active {
  border-color: var(--accent);
  background: rgba(245, 200, 76, 0.12);
  color: var(--accent);
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot.tradable {
  background: var(--green);
}

.dot.conditional {
  background: var(--orange);
}

.dot.tokenized {
  background: var(--blue);
}

.dot.perp {
  background: var(--cyan);
}

.dot.wallet {
  background: var(--violet);
}

.dot.unverified {
  background: var(--orange);
}

.dot.not-found {
  background: var(--muted-2);
}

.dot.discovery {
  background: var(--amber);
}

.dot.view {
  background: var(--gray);
}

.dot.unavailable {
  background: var(--red);
}

.dot.unknown {
  background: var(--violet);
}

.result-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.result-table-head,
.result-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.25fr) minmax(116px, 0.72fr) minmax(220px, 1.35fr) minmax(170px, 0.95fr) minmax(164px, 0.82fr);
  align-items: center;
  gap: 12px;
}

.result-table-head {
  min-height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #10151c;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.results-grid {
  display: grid;
}

.result-row {
  position: relative;
  min-height: 66px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  animation: card-in 420ms var(--ease) both;
}

.result-row:last-child {
  border-bottom: 0;
}

.result-row::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--muted-2);
  content: "";
}

.result-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.result-row.tokenized::before {
  background: var(--blue);
}

.result-row.market-scope::before,
.result-row.confirmed::before,
.result-row.verified-tradable::before {
  background: var(--green);
}

.result-row.route-candidate::before {
  background: var(--amber);
}

.result-row.official-snapshot::before {
  background: var(--blue);
}

.result-row.perp::before {
  background: var(--cyan);
}

.result-row.wallet::before {
  background: var(--violet);
}

.result-row.discovery::before {
  background: var(--amber);
}

.result-row.unverified::before {
  background: var(--orange);
}

.result-row.not-found::before {
  background: var(--muted-2);
}

.result-row.requires-login::before,
.result-row.not-checked::before,
.result-row.verification-pending::before {
  background: var(--orange);
}

.result-row.unsupported-market::before {
  background: var(--muted-2);
}

.result-cell {
  min-width: 0;
}

.platform {
  display: flex;
  gap: 10px;
  min-width: 0;
}

.platform-logo {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: #0f141b;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
}

.platform-logo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.platform-logo span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.platform strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform small {
  color: var(--muted);
}

.status-pill {
  display: inline-grid;
  min-width: 76px;
  padding: 5px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.status-pill.tradable {
  color: var(--green);
}

.status-pill.market-scope,
.status-pill.confirmed,
.status-pill.verified-tradable {
  color: var(--green);
}

.status-pill.route-candidate {
  color: var(--amber);
}

.status-pill.official-snapshot {
  color: var(--blue);
}

.status-pill.conditional {
  color: var(--orange);
}

.status-pill.tokenized {
  color: var(--blue);
}

.status-pill.perp {
  color: var(--cyan);
}

.status-pill.wallet {
  color: var(--violet);
}

.status-pill.unverified {
  color: var(--orange);
}

.status-pill.not-found {
  color: var(--muted);
}

.status-pill.discovery {
  color: var(--amber);
}

.status-pill.requires-login,
.status-pill.not-checked,
.status-pill.verification-pending {
  color: var(--orange);
}

.status-pill.unsupported-market {
  color: var(--muted);
}

.status-pill.view {
  color: var(--gray);
}

.status-pill.unavailable {
  color: var(--red);
}

.status-pill.unknown {
  color: var(--violet);
}

.status-cell small,
.evidence-cell small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
}

.route-line span {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--body);
  font-size: 12px;
}

.summary-line {
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--body);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-cell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.details-toggle {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111821;
  color: var(--body);
  text-align: center;
  transition:
    border-color 240ms var(--ease),
    color 240ms var(--ease);
}

.details-toggle:hover {
  border-color: rgba(245, 200, 76, 0.48);
  color: var(--accent);
}

.trade-link {
  display: grid;
  min-height: 34px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent);
  color: #181a20;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  transition:
    background 240ms var(--ease),
    transform 160ms var(--ease);
}

.trade-link:hover {
  background: var(--accent-active);
}

.trade-link:active {
  transform: translateY(1px) scale(0.99);
}

.trade-disabled {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.details {
  display: grid;
  grid-column: 1 / -1;
  grid-template-rows: 0fr;
  transition: grid-template-rows 280ms var(--ease);
}

.details.is-open {
  grid-template-rows: 1fr;
}

.details-inner {
  overflow: hidden;
}

.details-content {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.18);
}

.details-content p {
  margin-bottom: 8px;
  color: var(--body);
  font-size: 13px;
}

.details-content small {
  color: var(--muted);
}

.empty-state {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.empty-state p {
  color: var(--muted);
}

.collapsed-unavailable {
  width: 100%;
  min-height: 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #10151c;
  color: var(--muted);
  font-weight: 700;
}

.collapsed-unavailable:hover {
  color: var(--accent);
}

.support-panels {
  display: grid;
  gap: 10px;
}

.info-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.info-panel summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  cursor: pointer;
  list-style: none;
}

.info-panel summary::-webkit-details-marker {
  display: none;
}

.info-panel summary::after {
  color: var(--accent);
  content: "+";
  font-size: 20px;
  font-weight: 700;
}

.info-panel[open] summary::after {
  content: "-";
}

.info-panel summary strong,
.info-panel summary small {
  display: block;
}

.info-panel summary small {
  color: var(--muted);
  font-size: 12px;
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0 16px 16px;
}

.reason-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.reason-grid article {
  padding: 18px;
}

.reason-grid span {
  display: block;
  margin-bottom: 20px;
  color: var(--accent);
  font-weight: 800;
}

.reason-grid p,
.source-list p {
  color: var(--muted);
}

.source-list {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.source-list p {
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.source-list p:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 960px) {
  .page-shell {
    width: min(100% - 24px, 760px);
  }

  .topbar {
    align-items: center;
    border-radius: var(--radius);
  }

  .query-dock {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 24px;
  }

  .research-panel,
  .reason-grid {
    grid-template-columns: 1fr;
  }

  .result-table-head {
    display: none;
  }

  .result-table {
    border: 0;
    background: transparent;
  }

  .results-grid {
    gap: 10px;
  }

  .result-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .result-row::before {
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .status-cell,
  .evidence-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .status-cell small,
  .evidence-cell small {
    margin-top: 0;
    text-align: right;
  }

  .section-head {
    display: grid;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 18px, 520px);
  }

  .topbar {
    top: 8px;
    margin-top: 8px;
  }

  .brand small {
    display: none;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 24px;
  }

  .search-workbench {
    position: relative;
    top: auto;
    z-index: 1;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .action-cell {
    grid-template-columns: 1fr;
  }

  .suggestions {
    top: 128px;
  }

  .filter-panel,
  .filter-panel > div {
    align-items: stretch;
  }

  .filter-panel > div,
  .segmented {
    width: 100%;
  }

  .segmented {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .segmented button {
    flex: 0 0 auto;
  }

  .asset-profile .asset-intro {
    flex-basis: auto;
  }

  .result-row {
    min-height: 0;
  }
}
