/* astocks — stocks on Arc. Dark-blue, airy, keeta-style. */
:root {
  --bg: #0A1630;
  --surface: #122448;
  --elevated: #16294F;
  --navy: #1B3158;
  --blue: #2F578C;
  --light: #ACC6E9;
  --line: rgba(172, 198, 233, 0.16);
  --line-strong: rgba(172, 198, 233, 0.4);
  --text: #F3F6FB;
  --muted: rgba(172, 198, 233, 0.72);
  --muted-2: rgba(172, 198, 233, 0.5);
  --success: #4FD1A1;
  --danger: #FF6B6B;
  --radius: 12px;
  --display: "Space Grotesk", "DM Sans", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --shadow: 0 10px 30px rgba(3, 9, 26, 0.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.success { color: var(--success); }
.danger { color: var(--danger); }
.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; padding: 14px 0; }
.topbar-in {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(10, 22, 48, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px 8px 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  max-width: 1088px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand .mark { flex: none; }
.brand-name { font-family: var(--display); font-weight: 500; font-size: 20px; letter-spacing: -0.02em; }
.brand-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--muted); margin-left: 2px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; transition: color .15s, background .15s; display: inline-flex; align-items: center; }
.nav a:hover, .nav a.active { color: var(--text); background: rgba(172, 198, 233, 0.08); }
.nav #connect { margin-left: 6px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; white-space: nowrap; transition: transform .12s, background .15s, border-color .15s, opacity .15s;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:not(:disabled):active { transform: translateY(1px); }
.btn-primary { background: #fff; color: var(--bg); }
.btn-primary:not(:disabled):hover { background: #E9F0FA; }
.btn-secondary { background: var(--blue); color: #fff; }
.btn-secondary:not(:disabled):hover { background: #386AA8; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-ghost:not(:disabled):hover { border-color: var(--light); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 999px; }
.btn-wide { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; }

/* ---------- hero ---------- */
.hero {
  position: relative; margin: 32px -16px 0; padding: 96px 16px 72px;
  background: radial-gradient(60% 50% at 50% 110%, rgba(47, 87, 140, 0.55) 0%, rgba(47, 87, 140, 0) 70%),
              linear-gradient(180deg, #0A1630 0%, #1B3158 100%);
  border-radius: 24px;
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; max-width: 1088px; margin: 0 auto; }
.hero h1, .h-display {
  font-family: var(--display); font-weight: 300; font-size: 64px; line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 18px;
}
.hero p.lead { color: var(--muted); font-size: 17px; max-width: 460px; margin: 0 0 26px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stat-cards { display: grid; gap: 16px; }
.stat-card { background: rgba(18, 36, 72, 0.6); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; backdrop-filter: blur(6px); }
.stat-card .value { font-family: var(--mono); font-size: 40px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; margin-top: 8px; }
.stat-card .value small { font-size: 16px; color: var(--muted); margin-left: 8px; font-weight: 400; }
.stat-card .sub { color: var(--muted); font-size: 13px; margin-top: 8px; }

/* ---------- sections ---------- */
.section { padding: 80px 0 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2 { font-family: var(--display); font-weight: 300; font-size: 40px; letter-spacing: -0.03em; line-height: 1.05; margin: 8px 0 0; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 24px 0 16px; }
.search { flex: 1 1 280px; position: relative; }
.search input { width: 100%; height: 44px; padding: 0 16px 0 42px; }
.search svg { position: absolute; left: 14px; top: 14px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; padding: 3px; background: var(--surface); }
.seg button { height: 36px; padding: 0 14px; border-radius: 9px; background: transparent; border: 0; color: var(--muted); font-weight: 500; }
.seg button.active { background: var(--blue); color: #fff; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 500; font-size: 13px; transition: border-color .15s, color .15s;
}
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip.active { background: var(--light); color: var(--bg); border-color: var(--light); }
.chip .count { font-family: var(--mono); font-size: 11px; opacity: .75; }
.chip img, .logo { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; background: var(--navy); padding: 1px; }
.logo-lg { width: 28px; height: 28px; }

/* ---------- cards / grid ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.card:hover { border-color: var(--line-strong); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.token-card { display: flex; flex-direction: column; gap: 14px; }
.token-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.token-card .avatar { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.avatar-fallback {
  display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 14px;
  background: var(--navy); color: var(--light); font-family: var(--display); font-weight: 500; font-size: 20px; letter-spacing: -0.02em;
}
.token-card .name { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.token-card .ticker { font-family: var(--mono); color: var(--muted); font-size: 13px; }
.token-card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.token-card .row .label { font-size: 10px; }
.token-card .mcap { font-family: var(--mono); font-weight: 500; }
.paired { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.paired img { width: 16px; height: 16px; }
.empty { padding: 56px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.load-more { display: flex; justify-content: center; margin: 32px 0 0; }
.skeleton { height: 180px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 25%, var(--elevated) 50%, var(--surface) 75%); background-size: 200% 100%; animation: sk 1.4s infinite; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- inputs ---------- */
input[type="text"], input[type="number"], input[type="url"], input[type="search"], textarea, select {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; height: 44px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 84px; }
input:focus, textarea:focus, select:focus { border-color: var(--light); box-shadow: 0 0 0 3px rgba(172, 198, 233, 0.18); }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 500; color: var(--muted); display: flex; justify-content: space-between; }
.field small { color: var(--muted-2); font-size: 12px; }
.field.error input, .field.error textarea { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.amount-box { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.amount-box:focus-within { border-color: var(--light); box-shadow: 0 0 0 3px rgba(172, 198, 233, 0.18); }
.amount-box .top, .amount-box .bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.amount-box input { background: transparent; border: 0; height: 40px; padding: 0; font-family: var(--mono); font-size: 26px; box-shadow: none !important; }
.amount-box .asset { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-weight: 500; font-size: 14px; white-space: nowrap; }
.amount-box .mid { display: flex; align-items: center; gap: 12px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--light); font-weight: 600; font-size: 12px; letter-spacing: 0.06em; }
.link-btn:hover { text-decoration: underline; }

/* ---------- chain chips / badges ---------- */
.chain { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; font-weight: 500; }
.chain-arc { background: var(--light); color: var(--bg); }
.chain-rh { border: 1px solid #fff; color: #fff; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--muted); }
.badge img { width: 16px; height: 16px; }
.state { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; padding: 3px 8px; border-radius: 6px; }
.state-PENDING, .state-SENT { background: rgba(172, 198, 233, 0.14); color: var(--light); }
.state-HELD { background: rgba(245, 179, 1, 0.14); color: #F5C451; }
.state-FINAL { background: rgba(79, 209, 161, 0.14); color: var(--success); }
.state-FAILED { background: rgba(255, 107, 107, 0.14); color: var(--danger); }

/* ---------- token page ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); margin: 28px 0 20px; }
.back:hover { color: var(--text); }
.token-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.token-head { display: flex; gap: 20px; align-items: flex-start; }
.token-head .avatar, .token-head .avatar-fallback { width: 88px; height: 88px; border-radius: 20px; font-size: 30px; flex: none; }
.token-head h1 { font-family: var(--display); font-weight: 400; font-size: 36px; letter-spacing: -0.03em; line-height: 1.05; margin: 0; }
.token-head .ticker { font-family: var(--mono); color: var(--muted); font-size: 16px; margin-top: 2px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.bio { color: var(--muted); margin: 20px 0 0; white-space: pre-wrap; word-break: break-word; }
.links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; }
.links a { color: var(--light); }
.by { color: var(--muted-2); font-size: 13px; margin-top: 10px; font-family: var(--mono); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .value { font-family: var(--mono); font-size: 20px; font-weight: 500; margin-top: 6px; }
.stat .sub { color: var(--muted-2); font-size: 11px; margin-top: 4px; }
.addr-list { margin-top: 24px; display: flex; flex-direction: column; gap: 8px; }
.addr-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.addr-row .label { width: 56px; flex: none; }
.addr-row .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.icon-btn { background: transparent; border: 1px solid var(--line); border-radius: 8px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); flex: none; }
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.trade .seg { width: 100%; display: flex; }
.trade .seg button { flex: 1; }
.trade .seg button.sell.active { background: var(--danger); }
.slip { display: flex; align-items: center; gap: 6px; margin: 16px 0 12px; flex-wrap: wrap; }
.slip .label { margin-right: 4px; }
.slip button { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.slip button.active { background: var(--light); color: var(--bg); border-color: var(--light); }
.slip input { width: 72px; height: 28px; padding: 0 8px; font-family: var(--mono); font-size: 12px; border-radius: 999px; }
.quote-rows { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; font-size: 13px; }
.quote-rows .r { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.quote-rows .r b { font-family: var(--mono); font-weight: 500; color: var(--text); }
.note { font-size: 12px; color: var(--muted-2); margin-top: 12px; }
.note a { color: var(--light); }
.panel-title { font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: -0.02em; margin: 0 0 4px; }
.creator { margin-top: 24px; }
.creator .earn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }

/* ---------- bridge ---------- */
.bridge-hero { padding: 72px 0 40px; text-align: left; max-width: 640px; }
.bridge-hero p { color: var(--muted); font-size: 17px; margin: 0; }
.bridge-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.bridge-card { padding: 28px; }
.bridge-card .amount-box { margin-top: 10px; }
.swap-dir { display: flex; justify-content: center; margin: -6px 0; position: relative; z-index: 1; }
.swap-dir button { width: 40px; height: 40px; border-radius: 50%; background: var(--elevated); border: 1px solid var(--line); color: var(--light); display: inline-flex; align-items: center; justify-content: center; transition: transform .2s, border-color .15s; }
.swap-dir button:hover { border-color: var(--light); transform: rotate(180deg); }
.pair-select { display: inline-flex; align-items: center; gap: 8px; }
.pair-select select { width: auto; height: 36px; padding: 0 32px 0 12px; border-radius: 999px; background: var(--elevated) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ACC6E9' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; -webkit-appearance: none; appearance: none; font-family: var(--mono); font-weight: 500; }
.info-rows { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; font-size: 13px; }
.info-rows .r { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); align-items: baseline; }
.info-rows .r b { font-family: var(--mono); font-weight: 500; color: var(--text); text-align: right; }
.info-rows .r a { color: var(--light); }
.orders { margin-top: 0; }
.orders-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.order { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; }
.order .amt { font-family: var(--mono); font-weight: 500; }
.order .meta { color: var(--muted-2); font-size: 12px; }
.order .meta a { color: var(--light); }
.warn { background: rgba(245, 179, 1, 0.1); border: 1px solid rgba(245, 179, 1, 0.3); color: #F5C451; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-top: 16px; }
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; color: var(--muted); }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(4, 10, 26, 0.7); display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal { width: min(600px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.modal-head h2 { font-family: var(--display); font-weight: 400; font-size: 30px; letter-spacing: -0.03em; margin: 0; line-height: 1.1; }
.modal-head p { color: var(--muted); margin: 6px 0 0; font-size: 14px; }
.pair-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pair-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); cursor: pointer; text-align: left; }
.pair-opt:hover { border-color: var(--line-strong); }
.pair-opt.active { border-color: var(--light); box-shadow: 0 0 0 2px rgba(172, 198, 233, 0.25); }
.pair-opt b { font-family: var(--mono); font-weight: 500; font-size: 13px; display: block; }
.pair-opt small { color: var(--muted-2); font-size: 11px; }
.img-preview { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.img-preview img { width: 48px; height: 48px; border-radius: 12px; }
.file-input { display: flex; align-items: center; gap: 10px; }
.file-input input[type="file"] { color: var(--muted); font-size: 13px; }
.file-input input[type="file"]::file-selector-button { font: inherit; color: var(--text); background: var(--blue); border: 0; border-radius: 8px; padding: 8px 12px; margin-right: 10px; cursor: pointer; }

/* ---------- footer / toast ---------- */
.footer { margin-top: 96px; padding: 32px 0 40px; border-top: 1px solid var(--line); }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--light); }
.disclaimer { color: var(--muted-2); font-size: 12px; max-width: 820px; margin: 20px 0 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--elevated); border: 1px solid var(--line-strong); color: var(--text); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); font-size: 14px; }
.toast.err { border-color: var(--danger); color: #FFD3D3; }
.toast.ok { border-color: var(--success); }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3); border-top-color: currentColor; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .token-layout, .bridge-layout { grid-template-columns: 1fr; }
  .hero h1, .h-display { font-size: 48px; }
  .section-head h2 { font-size: 32px; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .topbar { padding: 10px 0; }
  .topbar-in { padding: 6px 6px 6px 10px; gap: 6px; }
  .brand { gap: 8px; }
  .brand .mark { width: 28px; height: 28px; }
  .brand-name { font-size: 17px; }
  .brand-tag, #x-link { display: none !important; }
  .nav { gap: 0; }
  .nav a { padding: 8px 8px; font-size: 14px; }
  .nav #connect { margin-left: 4px; padding: 0 12px; font-size: 13px; height: 34px; }
  .stat-card .value small { display: block; margin: 6px 0 0; font-size: 13px; }
  .hero { padding: 56px 16px 48px; margin-top: 16px; border-radius: 18px; }
  .hero h1, .h-display { font-size: 36px; }
  .hero p.lead { font-size: 15px; }
  .stat-card { padding: 20px; }
  .stat-card .value { font-size: 30px; }
  .section { padding-top: 56px; }
  .section-head h2 { font-size: 28px; }
  .card, .bridge-card, .modal { padding: 20px; }
  .stats, .row2, .creator .earn { grid-template-columns: 1fr; }
  .token-head { gap: 14px; }
  .token-head .avatar, .token-head .avatar-fallback { width: 64px; height: 64px; font-size: 22px; }
  .token-head h1 { font-size: 28px; }
  .order { grid-template-columns: 1fr; gap: 6px; }
  .grid { grid-template-columns: 1fr; }
  .amount-box input { font-size: 22px; }
  .footer { margin-top: 64px; }
}

.footer-x{display:inline-flex;align-items:center;gap:8px;color:var(--muted,#ACC6E9);text-decoration:none;font-family:'JetBrains Mono',monospace;font-size:13px}
.footer-x:hover{color:#fff}
