:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --soft: #f8fafc;
  --text: #111827;
  --muted: #667085;
  --line: #dbe3ee;
  --blue: #2457d6;
  --green: #16865a;
  --red: #c13d3d;
  --amber: #ad6908;
  --shadow: 0 10px 28px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden],
.utility-hidden {
  display: none !important;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

button,
input,
select,
label {
  font: inherit;
}

.app {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 42px;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

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

.brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(14, 31, 27, 0.2);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  line-height: 1.2;
}

.lede {
  max-width: 740px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.hero-actions,
.tools,
.pro-key,
.feedback-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.quick-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  overflow-x: auto;
}

.quick-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  color: var(--text);
  background: var(--soft);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.quick-nav a:hover {
  color: #fff;
  background: var(--blue);
}

.novice-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.novice-toggle input {
  width: auto;
  min-height: auto;
}

button,
.hero-actions a {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: var(--panel);
  text-decoration: none;
  cursor: pointer;
}

.pager {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pager button {
  min-height: 34px;
  padding: 0 10px;
}

.novice-guide {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.novice-guide article {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.novice-guide strong {
  font-size: 15px;
}

.novice-guide span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

button:hover,
.hero-actions a:hover {
  border-color: #b8c5d8;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(173, 105, 8, 0.14);
}

.status-dot.ok {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 134, 90, 0.14);
}

.status-dot.bad {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(193, 61, 61, 0.14);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.metrics article,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metrics article {
  min-height: 118px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px;
}

.metrics span,
.metrics small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metrics strong {
  color: var(--text);
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1;
}

.bands {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 12px;
  margin-bottom: 12px;
}

.panel {
  min-width: 0;
  padding: 14px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #0f5135;
  background: rgba(22, 134, 90, 0.12);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.pill.muted {
  color: var(--muted);
  background: #eef2f7;
}

.pill.pro {
  color: #643b00;
  background: rgba(173, 105, 8, 0.14);
}

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

.flywheel-grid div,
.list-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.flywheel-grid strong {
  font-size: 26px;
}

.flywheel-grid span,
.list-item span,
.subtle {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.progress {
  height: 12px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf5;
}

.progress div {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--blue);
}

canvas {
  width: 100%;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

input,
select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
}

.wallet-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.suffix-input {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.suffix-input input {
  border: 0;
  min-height: 38px;
}

.suffix-input input:focus {
  outline: none;
}

.suffix-input span {
  padding: 0 12px 0 4px;
  color: var(--muted);
  font-weight: 900;
}

.field-help {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  color: var(--muted);
  background: var(--soft);
  font-size: 12px;
}

tr:last-child td {
  border-bottom: 0;
}

.token-cell {
  display: grid;
  gap: 3px;
}

.token-cell strong {
  font-size: 14px;
}

.token-cell a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.positive {
  color: var(--green);
  font-weight: 900;
}

.negative {
  color: var(--red);
  font-weight: 900;
}

.score,
.signal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}

.score {
  min-width: 34px;
  color: #fff;
  background: var(--blue);
}

.score.mid {
  background: var(--amber);
}

.score.low {
  background: var(--red);
}

.signal {
  color: var(--text);
  background: #eef2f7;
}

.signal.good {
  color: #0f5135;
  background: rgba(22, 134, 90, 0.12);
}

.signal.watch {
  color: #733f00;
  background: rgba(173, 105, 8, 0.14);
}

.signal.hot {
  color: #7a1f1f;
  background: rgba(193, 61, 61, 0.12);
}

.list {
  display: grid;
  gap: 8px;
}

.list-item strong {
  font-size: 14px;
}

.list-item.good {
  border-left: 4px solid var(--green);
}

.list-item.watch,
.list-item.locked {
  border-left: 4px solid var(--amber);
}

.list-item.hot {
  border-left: 4px solid var(--red);
}

.pro-key {
  margin-bottom: 10px;
}

.pro-key input {
  flex: 1;
}

.feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.feedback p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.mechanism-panel {
  margin-bottom: 12px;
}

.insight-list,
.match-timeline,
.launch-monitor,
.contract-result,
.notification-list {
  display: grid;
  gap: 8px;
}

.insight-item,
.match-item,
.launch-item,
.contract-card,
.notification-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.insight-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.insight-item.good,
.contract-card.official,
.notification-item.good {
  border-left: 4px solid var(--green);
}

.insight-item.watch,
.contract-card.dex-found,
.notification-item.watch {
  border-left: 4px solid var(--amber);
}

.insight-item.hot,
.contract-card.unknown,
.notification-item.hot {
  border-left: 4px solid var(--red);
}

.notification-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.notification-panel {
  margin-bottom: 12px;
}

.contract-checker {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 10px 0;
}

.contract-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contract-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.launch-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf5;
}

.launch-progress div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.match-timeline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.match-item strong,
.launch-item strong,
.insight-item strong {
  font-size: 14px;
}

.position-stack {
  display: flex;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf5;
}

.position-stack div {
  height: 100%;
}

.stack-main {
  background: var(--blue);
}

.stack-team {
  background: var(--green);
}

.stack-cash {
  background: #f3b23c;
}

.stack-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mechanism-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
}

.mechanism-flow article {
  display: grid;
  gap: 8px;
  min-height: 158px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.mechanism-flow p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.mechanism-node {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  min-height: 30px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 1000;
}

.main-node {
  background: var(--blue);
}

.team-node {
  background: var(--green);
}

.vault-node {
  color: #0e1f1b;
  background: #f3b23c;
}

.flow-arrow {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 28px;
  font-weight: 1000;
}

.mechanism-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.mechanism-notes div {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mechanism-notes span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-link:hover {
  background: #1d49b4;
}

.panel-note {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.team-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.team-card {
  display: grid;
  gap: 9px;
  min-height: 220px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.team-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.team-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.team-flag {
  width: 34px;
  height: 24px;
  border-radius: 5px;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}

.team-card h3 {
  margin: 0;
  font-size: 17px;
}

.team-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--muted);
  background: #eef2f7;
  font-size: 12px;
  font-weight: 800;
}

.catalyst {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.catalyst strong {
  font-size: 13px;
}

.heat-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf5;
}

.heat-bar div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22a06b, #f3b23c);
}

.pro-only {
  display: none;
}

body.table-pro .pro-only {
  display: table-cell;
}

.wallet-panel {
  margin: 12px 0;
}

.wallet-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) minmax(130px, 0.5fr) minmax(110px, 0.35fr) minmax(120px, 0.35fr) auto;
  gap: 9px;
  margin-bottom: 12px;
}

.wallet-output {
  display: grid;
  gap: 12px;
}

.wallet-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}

.wallet-metrics div,
.empty-state,
.wallet-signal,
.cash-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.wallet-metrics span,
.cash-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wallet-metrics strong {
  font-size: 20px;
}

.health-card strong {
  color: var(--blue);
}

.health-gauge {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf5;
}

.health-gauge div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--amber), var(--green));
}

.wallet-sections {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.5fr);
  gap: 12px;
}

.wallet-signals,
.cash-grid {
  display: grid;
  gap: 8px;
}

.wallet-signal.good {
  border-left: 4px solid var(--green);
}

.wallet-signal.watch,
.wallet-signal.locked {
  border-left: 4px solid var(--amber);
}

.wallet-signal.hot {
  border-left: 4px solid var(--red);
}

.mini-table {
  width: 100%;
  min-width: 720px;
}

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

  .insight-list,
  .match-timeline,
  .notification-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .novice-guide,
  .team-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .wallet-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wallet-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app {
    width: min(100% - 20px, 1480px);
    padding-top: 16px;
  }

  .hero,
  .feedback,
  .panel-head,
  .mechanism-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .mechanism-flow,
  .mechanism-notes {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    min-height: 22px;
    transform: rotate(90deg);
  }

  .brand-block {
    align-items: flex-start;
  }

  .metrics,
  .flywheel-grid,
  .novice-guide,
  .team-cards,
  .insight-list,
  .match-timeline,
  .notification-list,
  .contract-checker {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .tools,
  .feedback-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .wallet-controls,
  .wallet-metrics {
    grid-template-columns: 1fr;
  }
}
