:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --ink: #111813;
  --muted: #66736c;
  --line: #d8dfda;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --wash: #edf4ef;
  --green: #0d7c66;
  --blue: #2646b8;
  --wine: #8c2454;
  --amber: #a85f00;
  --danger: #b42318;
  --shadow: 0 22px 58px rgba(26, 37, 31, 0.1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(245, 247, 244, 0.78), rgba(245, 247, 244, 0.96) 58%),
    var(--bg);
  color: var(--ink);
}

#flow-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  padding: 0 16px;
  cursor: pointer;
  white-space: nowrap;
}

button:hover {
  background: var(--green);
}

button:disabled {
  cursor: not-allowed;
  background: #c6d0ca;
  color: #59655e;
}

button:disabled:hover {
  background: #c6d0ca;
  color: #59655e;
}

button.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

button.secondary:hover {
  border-color: var(--green);
  color: var(--green);
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 9px 11px;
}

code {
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

pre {
  overflow: auto;
  min-height: 270px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: #101714;
  color: #eaf5ef;
  padding: 16px;
  font-size: 13px;
  line-height: 1.5;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 650;
}

.site-shell {
  width: min(1220px, calc(100vw - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin: 12px 0 0;
  border: 1px solid rgba(216, 223, 218, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 10px 12px;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 28px rgba(26, 37, 31, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.brand-logo {
  width: 34px;
  height: 34px;
  display: block;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
}

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow-x: auto;
}

nav a,
.text-link {
  border-radius: 7px;
  color: var(--muted);
  padding: 9px 11px;
  text-decoration: none;
}

nav a:hover,
.text-link:hover {
  background: var(--wash);
  color: var(--ink);
}

main {
  display: grid;
  gap: 24px;
  padding: 18px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(440px, 1.05fr);
  align-items: end;
  gap: 24px;
  min-height: 76vh;
  padding: 52px 0 12px;
}

.hero-copy {
  display: grid;
  gap: 20px;
  align-content: center;
  min-height: 420px;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  max-width: 780px;
  font-size: clamp(58px, 12vw, 136px);
  line-height: 0.88;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

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

.lede {
  max-width: 610px;
  margin: 0;
  color: #3f4a44;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.landing-view,
.dashboard-view {
  display: grid;
  gap: 28px;
}

.landing-view[hidden],
.dashboard-view[hidden] {
  display: none;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.72fr);
  align-items: center;
  gap: 34px;
  align-content: center;
  min-height: calc(100vh - 92px);
  padding: 56px 0 24px;
}

.landing-hero .hero-copy {
  max-width: 900px;
}

.landing-hero .lede {
  max-width: 760px;
}

.hero-visual {
  display: grid;
  gap: 16px;
  width: 100%;
  border: 1px solid rgba(216, 223, 218, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 26px 70px rgba(26, 37, 31, 0.13);
  padding: 18px;
  backdrop-filter: blur(16px);
}

.visual-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.visual-header img {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
}

.visual-header div {
  display: grid;
  gap: 3px;
}

.visual-header span,
.visual-node span,
.visual-stats span {
  color: var(--muted);
  font-size: 13px;
}

.visual-header strong {
  font-size: 22px;
}

.visual-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr) 32px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.visual-node {
  display: grid;
  gap: 5px;
  min-height: 84px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.visual-node strong {
  font-size: 15px;
}

.tv-node {
  border-color: rgba(38, 70, 184, 0.28);
}

.pinex-node {
  border-color: rgba(13, 124, 102, 0.32);
  background: #f4fbf8;
}

.hl-node {
  border-color: rgba(168, 95, 0, 0.3);
}

.visual-line {
  height: 2px;
  background: linear-gradient(90deg, rgba(38, 70, 184, 0.34), rgba(13, 124, 102, 0.74), rgba(168, 95, 0, 0.4));
}

.visual-code {
  min-height: auto;
  border-color: rgba(16, 23, 20, 0.1);
  background: #101714;
  color: #eaf5ef;
  font-size: 12px;
}

.visual-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.brand-banner {
  border: 1px solid rgba(216, 223, 218, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 50px rgba(26, 37, 31, 0.1);
  overflow: hidden;
}

.brand-banner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.signal-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding-block: 8px 18px;
}

.signal-rail span {
  display: grid;
  min-height: 52px;
  place-items: center;
  border: 1px solid rgba(216, 223, 218, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: #405048;
  font-size: 13px;
  font-weight: 760;
  text-align: center;
}

.presentation-band,
.market-band,
.creator-section,
.landing-cta,
.flow-section {
  padding: 44px 0;
}

.presentation-band,
.market-band,
.creator-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 34px;
  align-items: center;
}

.section-copy,
.market-copy,
.creator-copy,
.dashboard-copy {
  display: grid;
  gap: 14px;
}

.section-copy h2,
.market-copy h2,
.creator-copy h2,
.landing-cta h2 {
  max-width: 760px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
}

.section-copy p,
.market-copy p,
.creator-copy p,
.landing-cta p,
.dashboard-copy p {
  max-width: 680px;
  margin: 0;
  color: #435049;
  font-size: 17px;
  line-height: 1.55;
}

.feature-grid,
.flow-grid {
  display: grid;
  gap: 14px;
}

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

.feature-card,
.flow-card {
  display: grid;
  gap: 10px;
  min-height: 190px;
  border: 1px solid rgba(216, 223, 218, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  padding: 18px;
  box-shadow: 0 14px 36px rgba(26, 37, 31, 0.07);
}

.feature-card span,
.flow-card span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--wash);
  color: var(--green);
  font-weight: 850;
}

.feature-card p,
.flow-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.market-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.market-board span {
  display: grid;
  min-height: 104px;
  place-items: center;
  border: 1px solid rgba(216, 223, 218, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: clamp(22px, 4vw, 44px);
  font-weight: 900;
}

.flow-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
}

.creator-section {
  border-block: 1px solid var(--line);
}

.creator-copy a {
  color: var(--green);
  font-weight: 800;
}

.creator-token {
  display: grid;
  place-items: center;
  gap: 14px;
  min-height: 320px;
  border: 1px solid rgba(140, 36, 84, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(240, 248, 244, 0.76)),
    #fff;
  text-align: center;
}

.creator-token span {
  color: var(--wine);
  font-size: clamp(36px, 8vw, 86px);
  font-weight: 950;
  line-height: 0.9;
}

.creator-token strong {
  color: var(--green);
  font-size: 20px;
}

.creator-token small {
  color: var(--muted);
  font-size: 14px;
}

.landing-cta {
  display: grid;
  gap: 18px;
  min-height: 360px;
  align-content: center;
  border-top: 1px solid var(--line);
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(440px, 1fr);
  gap: 24px;
  align-items: end;
  padding: 44px 0 10px;
}

.dashboard-copy h2 {
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.96;
}

.wallet-actions,
.key-form {
  display: grid;
  grid-template-columns: auto repeat(3, auto);
  gap: 10px;
  justify-content: end;
}

.language-control {
  grid-template-columns: auto auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  color: var(--muted);
  font-size: 12px;
}

.language-control select {
  width: auto;
  min-width: 74px;
  min-height: 38px;
  padding-inline: 9px;
}

.key-form.compact {
  grid-template-columns: minmax(220px, 360px) auto;
  justify-content: start;
  width: min(540px, 100%);
}

.metrics,
.workspace,
.access-grid,
.admin-contract-grid,
.grid-form,
.checkout-grid,
.plan-grid {
  display: grid;
  gap: 16px;
}

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

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

.setup-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px;
  color: var(--muted);
}

.setup-step span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--wash);
  color: var(--muted);
  font-weight: 800;
}

.setup-step strong {
  font-size: 13px;
}

.setup-step.done {
  border-color: rgba(13, 124, 102, 0.38);
  background: rgba(230, 243, 238, 0.76);
  color: var(--green);
}

.setup-step.done span {
  background: var(--green);
  color: #fff;
}

.metric,
.panel,
.plan,
.crypto-checkout {
  border: 1px solid rgba(216, 223, 218, 0.9);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.metric {
  display: grid;
  gap: 9px;
  min-height: 128px;
  padding: 18px;
}

.metric span,
.panel-head span,
.section-head span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  font-size: 28px;
}

.workspace {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
}

.panel,
.crypto-checkout,
.plan {
  display: grid;
  gap: 18px;
  padding: 20px;
}

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

.service-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.service-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 7px;
}

.service-mark svg {
  width: 25px;
  height: 25px;
}

.tradingview-mark {
  background: #e9efff;
  color: var(--blue);
}

.tradingview-mark svg {
  fill: currentColor;
}

.tradingview-mark path:last-child {
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-width: 2.2;
}

.hyperliquid-mark {
  background: #f2f7ee;
  color: var(--green);
}

.hyperliquid-mark svg path:first-child {
  fill: currentColor;
}

.hyperliquid-mark svg path:nth-child(2) {
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-width: 2;
}

.hyperliquid-mark svg circle {
  fill: #fff;
}

.setup-guide {
  display: grid;
  gap: 10px;
  border-block: 1px solid var(--line);
  background: rgba(237, 244, 239, 0.58);
  margin-inline: -20px;
  padding: 14px 20px;
}

.setup-guide strong {
  font-size: 14px;
}

.setup-guide ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: #4e5d55;
  font-size: 13px;
  line-height: 1.45;
}

.access-grid,
.admin-contract-grid,
.grid-form,
.checkout-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.access-actions,
.checkout-actions,
.item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.grid-form button {
  align-self: end;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.check input {
  width: 18px;
  min-height: 18px;
}

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

.list-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.76);
  padding: 12px;
}

.list-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.list-item-head button {
  min-height: 34px;
  padding-inline: 12px;
}

.item-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.item-actions button {
  min-height: 34px;
  padding-inline: 12px;
}

.inline-copy {
  margin-top: 4px;
}

.inline-copy input {
  min-height: 38px;
  font-size: 12px;
}

.list-item strong,
input {
  overflow-wrap: anywhere;
}

.list-item span {
  color: var(--muted);
  font-size: 13px;
}

.account-test {
  display: block;
  margin-top: 4px;
}

.account-ok {
  color: var(--green) !important;
  font-weight: 700;
}

.account-warning {
  color: var(--amber) !important;
  font-weight: 700;
}

.account-failed {
  color: var(--danger) !important;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

.pricing {
  display: grid;
  gap: 16px;
}

.pricing-note {
  max-width: 920px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.pricing-note a {
  color: var(--green);
  font-weight: 750;
}

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

.plan {
  min-height: 300px;
}

.plan strong {
  font-size: 38px;
}

.plan-source,
.plan-warning {
  color: var(--muted);
  font-size: 13px;
}

.plan-warning {
  color: var(--danger);
  line-height: 1.35;
}

.plan p {
  margin-bottom: 0;
  color: var(--muted);
}

.plan ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.badge {
  width: fit-content;
  border-radius: 999px;
  background: #e6f3ee;
  color: var(--green);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 850;
}

.status-dry_run {
  color: var(--blue);
  font-weight: 750;
}

.status-sent {
  color: var(--green);
  font-weight: 750;
}

.status-failed {
  color: var(--danger);
  font-weight: 750;
}

.crypto-checkout[hidden] {
  display: none;
}

.contract-admin[hidden] {
  display: none;
}

.admin-tier-list {
  display: grid;
  gap: 12px;
}

.admin-tier-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(160px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  padding: 14px;
}

.admin-tier-name {
  display: grid;
  gap: 5px;
  align-self: center;
}

.admin-tier-name strong {
  font-size: 16px;
}

.admin-tier-name span,
.admin-tier-status {
  color: var(--muted);
  font-size: 13px;
}

.admin-tier-status.warning {
  color: #9a5a00;
}

.admin-tier-row .check {
  align-self: center;
}

.admin-tier-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-tier-tx {
  grid-column: 1 / -1;
}

.admin-tier-tx input {
  font-size: 12px;
}

#toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 40px));
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(12px);
  transition: 160ms ease;
  pointer-events: none;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .site-header,
  .hero,
  .landing-hero,
  .workspace,
  .presentation-band,
  .market-band,
  .creator-section,
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .site-header {
    position: static;
  }

  nav {
    justify-content: start;
  }

  .wallet-actions {
    justify-content: start;
  }

  .panel-head {
    align-items: flex-start;
  }

  .hero {
    min-height: auto;
    padding-top: 38px;
  }

  .hero-copy {
    min-height: auto;
  }

  .metrics,
  .plan-grid,
  .setup-flow,
  .signal-rail,
  .flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-hero {
    min-height: auto;
  }

  .hero-visual {
    max-width: 720px;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100vw - 20px, 1220px);
  }

  .plan-grid,
  .setup-flow,
  .signal-rail,
  .feature-grid,
  .flow-grid,
  .market-board,
  .access-grid,
  .admin-contract-grid,
  .admin-tier-row,
  .grid-form,
  .checkout-grid,
  .key-form.compact,
  .wallet-actions {
    grid-template-columns: 1fr;
  }

  .access-actions,
  .checkout-actions,
  .admin-tier-actions,
  .copy-row,
  .item-actions {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }

  .list-item-head {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: 58px;
  }

  .hero {
    padding-top: 26px;
  }

  .landing-hero {
    padding-top: 32px;
  }

  .hero-visual {
    padding: 14px;
  }

  .visual-flow {
    grid-template-columns: 1fr;
  }

  .visual-line {
    width: 2px;
    height: 22px;
    justify-self: center;
  }

  .visual-node {
    min-height: 68px;
  }

  .visual-stats {
    align-items: flex-start;
    flex-direction: column;
  }

  .presentation-band,
  .market-band,
  .creator-section,
  .landing-cta,
  .flow-section {
    padding: 32px 0;
  }

  .metric {
    min-height: 96px;
    padding: 14px;
  }

  .metric strong {
    font-size: 22px;
  }
}
