/* ============================================================
   Argus — design system
   Cream canvas + Fraunces serif display + violet accent
   ============================================================ */
:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* canvas */
  --bg: #f4f1ea;
  --bg-2: #efeae1;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f4ee;
  --surface-3: #efeae1;
  --border: #e4ded2;
  --border-2: #d6cec0;
  --border-strong: #c4bba9;

  /* ink */
  --text: #17150f;
  --text-2: #5c574b;
  --text-3: #8a8375;
  --text-4: #a89f8e;

  /* brand */
  --accent: #6d4bff;
  --accent-2: #7c5cff;
  --accent-soft: #efeaff;
  --accent-grad: linear-gradient(135deg, #6d4bff, #a07dff);
  --accent-ink: #fff;

  /* status */
  --pos: #17966a;
  --pos-soft: #e3f4ec;
  --neg: #d6483a;
  --neg-soft: #fbe9e6;
  --warn: #b7791f;
  --warn-soft: #fbf0dc;
  --live: #17966a;

  /* effects */
  --shadow-sm: 0 1px 2px rgba(28,24,16,.05), 0 1px 1px rgba(28,24,16,.03);
  --shadow: 0 4px 16px rgba(28,24,16,.08), 0 1px 3px rgba(28,24,16,.05);
  --shadow-lg: 0 18px 48px rgba(28,24,16,.16);
  --ring: 0 0 0 3px rgba(109,75,255,.22);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --maxw: 1220px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0e0d10;
  --bg-2: #141218;
  --bg-elev: #17151c;
  --surface: #17151c;
  --surface-2: #1e1b24;
  --surface-3: #262230;
  --border: #2a2633;
  --border-2: #37323f;
  --border-strong: #4a4455;
  --text: #f2efe8;
  --text-2: #a8a294;
  --text-3: #7d776a;
  --text-4: #5f594e;
  --accent: #8a6dff;
  --accent-2: #9d82ff;
  --accent-soft: #241f36;
  --pos: #37c896;
  --pos-soft: #12332a;
  --neg: #f0705f;
  --neg-soft: #3a1c17;
  --warn: #e0a542;
  --warn-soft: #33270f;
  --live: #37c896;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 4px 18px rgba(0,0,0,.5);
  --shadow-lg: 0 18px 56px rgba(0,0,0,.6);
  --ring: 0 0 0 3px rgba(138,109,255,.3);
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[data-theme="light"] body {
  background:
    radial-gradient(1100px 460px at 88% -12%, rgba(109,75,255,.07), transparent 60%),
    radial-gradient(800px 380px at 4% -4%, rgba(109,75,255,.05), transparent 55%),
    var(--bg);
}
[data-theme="dark"] body {
  background:
    radial-gradient(1100px 460px at 88% -12%, rgba(138,109,255,.14), transparent 60%),
    radial-gradient(800px 380px at 4% -4%, rgba(138,109,255,.1), transparent 55%),
    var(--bg);
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font-family: inherit; color: inherit; }
::selection { background: rgba(109,75,255,.24); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

.serif { font-family: var(--font-display); }
.mono { font-family: var(--font-mono); }
.pos { color: var(--pos); } .neg { color: var(--neg); }

/* ---------- skip link ---------- */
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 1000; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { left: 8px; }

/* ============================================================
   NAV
   ============================================================ */
.nav-wrap { position: sticky; top: 0; z-index: 200; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(160%); }
.nav { max-width: var(--maxw); margin: 0 auto; padding: 12px 22px; display: flex; align-items: center; gap: 14px; }
.nav-logo { display: flex; align-items: center; gap: 11px; }
.nav-logo-mark { width: 34px; height: 34px; display: grid; place-items: center; color: var(--text); border-radius: 10px; background: var(--bg-elev); border: 1px solid var(--border); }
.nav-logo-name { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -.02em; }
.search-btn {
  display: flex; align-items: center; gap: 9px; flex: 1; max-width: 340px; margin-left: 8px;
  padding: 9px 12px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text-3); font-size: 13.5px; transition: all .15s; min-width: 0;
}
.search-btn:hover { border-color: var(--border-strong); color: var(--text-2); background: var(--bg-elev); }
.search-btn-copy { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbd { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; background: var(--surface-2); margin-left: 3px; }
.kbd-k { margin-left: 0; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-link { font-size: 13.5px; font-weight: 600; color: var(--text-2); padding: 8px 12px; border-radius: 10px; transition: all .15s; }
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link-accent { color: var(--accent); }
.nav-link-accent:hover { background: var(--accent-soft); }
.nav-create {
  display: flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 11px; font-weight: 700; font-size: 13.5px;
  background: var(--accent-grad); color: var(--accent-ink); box-shadow: 0 4px 14px rgba(109,75,255,.3); transition: all .15s;
}
.nav-create:hover { filter: brightness(1.08); transform: translateY(-1px); }
.nav-connect {
  padding: 9px 15px; border-radius: 11px; font-weight: 600; font-size: 13.5px;
  background: var(--bg-elev); border: 1px solid var(--border-2); color: var(--text); transition: all .15s; white-space: nowrap;
}
.nav-connect:hover { border-color: var(--border-strong); }
.nav-connect.connected { background: var(--surface); }
.nav-theme { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--text-2); border: 1px solid var(--border); background: var(--surface); transition: all .15s; position: relative; }
.nav-theme:hover { color: var(--text); border-color: var(--border-strong); }
.nav-theme .ic { width: 17px; height: 17px; display: block; }
[data-theme="dark"] .nav-theme .ic-sun { display: none; }
[data-theme="light"] .nav-theme .ic-moon { display: none; }

/* ============================================================
   LAYOUT
   ============================================================ */
.main { max-width: var(--maxw); margin: 0 auto; padding: 26px 22px 64px; min-height: calc(100vh - 220px); }
.shell { display: flex; flex-direction: column; gap: 20px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.h-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.h-title { font-family: var(--font-display); font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1.08; margin-top: 4px; }
.h-sub { color: var(--text-2); font-size: 14.5px; margin-top: 6px; max-width: 560px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-pad { padding: 18px; }
.card-hover { transition: all .16s; }
.card-hover:hover { border-color: var(--border-2); box-shadow: var(--shadow); transform: translateY(-2px); }

/* ---------- pills / tabs ---------- */
.tabs { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.tab { padding: 7px 14px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--text-3); white-space: nowrap; transition: all .15s; }
.tab:hover { color: var(--text-2); }
.tab.on { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); transition: all .15s; }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.chip-pair.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 11px; font-weight: 700; font-size: 13.5px; transition: all .15s; border: 1px solid transparent; }
.btn-primary { background: var(--accent-grad); color: var(--accent-ink); box-shadow: 0 4px 14px rgba(109,75,255,.28); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--bg-elev); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover { filter: brightness(1.1); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: none; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: 9px; }

/* ============================================================
   TOKEN GRID (explore)
   ============================================================ */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar .spacer { margin-left: auto; }
.view-toggle { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.view-toggle button { width: 32px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: var(--text-3); transition: all .15s; }
.view-toggle button.on { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm); }
.sort-sel { position: relative; }
.sort-sel select { appearance: none; -webkit-appearance: none; padding: 9px 32px 9px 13px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; }
.sort-sel::after { content: ""; position: absolute; right: 13px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: translateY(-70%) rotate(45deg); pointer-events: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }
.grid.list-view { grid-template-columns: 1fr; }

/* token card */
.tcard { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; cursor: pointer; transition: all .16s; overflow: hidden; }
.tcard:hover { border-color: var(--border-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.tcard-top { display: flex; gap: 11px; align-items: center; }
.tava { width: 46px; height: 46px; border-radius: 13px; flex: none; display: grid; place-items: center; font-size: 24px; background: var(--surface-2); border: 1px solid var(--border); }
.tcard-id { flex: 1; min-width: 0; }
.tcard-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 7px; }
.tcard-name .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 22%, transparent); flex: none; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.tcard-meta { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-3); margin-top: 3px; }
.tcard-price { text-align: right; flex: none; }
.tcard-mcap { font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tcard-chg { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 1px; }
.tcard-spark { margin-top: 13px; height: 46px; border-radius: 9px; overflow: hidden; }
.tcard-mil { margin-top: 12px; }
.mil-bar { height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.mil-fill { height: 100%; border-radius: 999px; background: var(--accent-grad); transition: width 1s cubic-bezier(.4,0,.2,1); }
.mil-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-top: 5px; }
.mil-labels b { color: var(--text-2); font-variant-numeric: tabular-nums; }
.tcard-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--border); }
.tcard-stats .k { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.tcard-stats .v { font-size: 12.5px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tcard-stats .v small { color: var(--text-3); font-weight: 500; }
.tcard-actions { display: flex; gap: 8px; margin-top: 13px; }
.tbtn { flex: 1; padding: 9px 0; border-radius: 10px; font-weight: 700; font-size: 13px; transition: all .15s; }
.tbtn.buy { background: var(--pos-soft); color: var(--pos); border: 1px solid color-mix(in srgb, var(--pos) 30%, transparent); }
.tbtn.buy:hover { background: var(--pos); color: #fff; border-color: var(--pos); }
.tbtn.sell { background: var(--neg-soft); color: var(--neg); border: 1px solid color-mix(in srgb, var(--neg) 30%, transparent); }
.tbtn.sell:hover { background: var(--neg); color: #fff; border-color: var(--neg); }

/* list view card */
.tcard.list-row { display: grid; grid-template-columns: 52px 1.4fr 1fr 1fr .9fr auto; gap: 14px; align-items: center; padding: 12px 16px; }
.tcard.list-row .tcard-spark { display: none; }
.tcard.list-row .tcard-mil { display: none; }
.tcard.list-row .tcard-stats { grid-template-columns: 1fr 1fr 1fr; margin-top: 0; padding-top: 0; border-top: none; }
.tcard.list-row .tcard-actions { margin-top: 0; flex-direction: column; }
.tcard.list-row .tbtn { padding: 6px 0; }

/* trending sidebar */
.home-layout { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.trend-panel { position: sticky; top: 78px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.trend-panel h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.trend-sub { font-size: 12px; color: var(--text-3); margin-bottom: 12px; }
.trow { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.trank { width: 20px; text-align: center; font-weight: 700; color: var(--text-4); font-size: 12px; }
.trank.r1 { color: #d4a017; } .trank.r2 { color: #9aa3b5; } .trank.r3 { color: #c8895a; }
.tava.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 16px; }
.trow-id { flex: 1; min-width: 0; }
.trow-nm { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow-chg { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- skeleton ---------- */
.skel { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); height: 250px; position: relative; overflow: hidden; }
.skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--surface-2), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ============================================================
   DETAIL
   ============================================================ */
.back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--text-3); font-weight: 600; font-size: 13.5px; padding: 6px 10px; border-radius: 9px; }
.back-link:hover { color: var(--text); background: var(--surface); }
.detail-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.detail-ava { width: 60px; height: 60px; border-radius: 17px; display: grid; place-items: center; font-size: 30px; background: var(--surface-2); border: 1px solid var(--border); }
.detail-title { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-sym { color: var(--text-2); font-size: 16px; font-weight: 500; font-family: var(--font); }
.badge-live { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; padding: 3px 9px; border-radius: 999px; color: var(--live); background: var(--pos-soft); border: 1px solid color-mix(in srgb, var(--live) 35%, transparent); }
.badge-grad { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; padding: 3px 9px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.detail-price-row { display: flex; align-items: baseline; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.detail-mcap { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.detail-chg { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.detail-pair { font-size: 13px; color: var(--text-3); }
.detail-meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.meta-item .k { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.meta-item .v { font-size: 13px; font-weight: 600; margin-top: 2px; }
.meta-item .v.mono { font-size: 12.5px; }

/* chart */
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 10px; }
.range-tabs { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.range-tab { padding: 5px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--text-3); transition: all .15s; }
.range-tab:hover { color: var(--text-2); }
.range-tab.on { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm); }
.chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-3); }
.chart-legend b { color: var(--text-2); font-variant-numeric: tabular-nums; }
.chart-svg { width: 100%; height: 260px; display: block; }
.chart-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-4); font-family: var(--font-mono); margin-top: 8px; }
.metric-toggle { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.metric-toggle button { padding: 5px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.metric-toggle button.on { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm); }

/* detail columns */
.detail-cols { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; }
.detail-cols.right { grid-template-columns: 360px 1fr; }

/* order panel */
.order { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; position: sticky; top: 78px; }
.order-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.ota { flex: 1; padding: 10px; border-radius: 10px; font-weight: 700; font-size: 13.5px; background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); transition: all .15s; }
.ota:hover { color: var(--text-2); }
.ota.on-buy { background: var(--pos); color: #fff; border-color: var(--pos); }
.ota.on-sell { background: var(--neg); color: #fff; border-color: var(--neg); }
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 11.5px; color: var(--text-3); font-weight: 600; margin-bottom: 7px; text-transform: uppercase; letter-spacing: .05em; }
.inp { width: 100%; padding: 12px 13px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); font-size: 15px; outline: none; transition: all .15s; font-variant-numeric: tabular-nums; }
.inp:focus { border-color: var(--accent); box-shadow: var(--ring); background: var(--bg-elev); }
.inp::placeholder { color: var(--text-4); }
textarea.inp { resize: none; line-height: 1.5; }
.inp-suffix { display: flex; align-items: stretch; }
.inp-suffix .inp { border-radius: 11px 0 0 11px; border-right: none; }
.inp-suffix .cur { padding: 0 13px; border-radius: 0 11px 11px 0; background: var(--surface-3); border: 1px solid var(--border); border-left: none; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.pct-row { display: flex; gap: 6px; margin-top: 9px; }
.pct { flex: 1; padding: 6px 0; border-radius: 8px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); transition: all .15s; }
.pct:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-3); }
.order-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--text-3); padding: 7px 0; border-bottom: 1px solid var(--border); }
.order-meta:last-child { border-bottom: none; }
.order-meta b { color: var(--text); font-variant-numeric: tabular-nums; }
.order-meta .val { color: var(--text-2); }
.go-btn { width: 100%; margin-top: 14px; padding: 13px 0; border-radius: 11px; font-weight: 800; font-size: 14.5px; color: var(--accent-ink); background: var(--accent-grad); box-shadow: 0 5px 18px rgba(109,75,255,.3); transition: all .15s; }
.go-btn:hover { filter: brightness(1.08); }
.go-btn.sell { background: linear-gradient(135deg, #d6483a, #ef6a58); box-shadow: 0 5px 18px rgba(214,72,58,.3); }
.go-btn:disabled { opacity: .5; cursor: not-allowed; }
.trade-note { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 10px; line-height: 1.6; }

/* milestone box */
.mil-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.mil-box h3 { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.mil-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 6px 0; }
.mil-row .k { color: var(--text-3); }
.mil-row .v { font-weight: 700; font-variant-numeric: tabular-nums; }

/* tax split */
.tax-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.split-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 12px 13px; }
.split-item .k { font-size: 11px; color: var(--text-3); font-weight: 600; }
.split-item .v { font-size: 17px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.split-item .v small { font-size: 11px; color: var(--text-3); font-weight: 600; }
.split-bar { height: 8px; border-radius: 999px; overflow: hidden; display: flex; margin-top: 12px; background: var(--surface-3); }
.split-bar span { height: 100%; }

/* tabs panel (trades/holders/about) */
.panel-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.panel-tab { padding: 9px 14px; font-size: 13.5px; font-weight: 600; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .15s; }
.panel-tab:hover { color: var(--text-2); }
.panel-tab.on { color: var(--text); border-bottom-color: var(--accent); }
.trade-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.trade-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-4); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.trade-table th.num, .trade-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.trade-table td { padding: 10px; border-bottom: 1px solid var(--border); }
.trade-table tr:last-child td { border-bottom: none; }
.trade-table .t-time { color: var(--text-3); font-size: 12px; }
.trade-table .t-type.buy { color: var(--pos); font-weight: 700; }
.trade-table .t-type.sell { color: var(--neg); font-weight: 700; }
.trade-table .t-acc { color: var(--text-3); font-family: var(--font-mono); font-size: 12px; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 14px; font-size: 13px; color: var(--text-3); }
.pagination button { padding: 6px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; font-size: 12.5px; color: var(--text-2); transition: all .15s; }
.pagination button:hover:not(:disabled) { border-color: var(--border-strong); color: var(--text); }
.pagination button:disabled { opacity: .4; cursor: default; }
.pagination .pages { color: var(--text-2); font-variant-numeric: tabular-nums; }

/* holder row */
.holder-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.holder-row:last-child { border-bottom: none; }
.hrank { width: 22px; text-align: center; font-weight: 700; color: var(--text-4); font-size: 12.5px; }
.hava { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.hold-id { flex: 1; min-width: 0; }
.hold-addr { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; }
.hold-tag { font-size: 11.5px; color: var(--text-3); }
.hold-val { text-align: right; }
.hold-val .a { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.hold-val .p { font-size: 11.5px; color: var(--text-3); }

/* about */
.about-block { line-height: 1.75; color: var(--text-2); font-size: 14.5px; }
.social-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.social-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-2); transition: all .15s; }
.social-chip:hover { border-color: var(--border-strong); color: var(--text); }

/* ============================================================
   CREATE (LAUNCH)
   ============================================================ */
.create-layout { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; }
.create-main { display: flex; flex-direction: column; gap: 18px; }
.create-hero { display: flex; align-items: center; gap: 16px; }
.create-hero .h-eyebrow { color: var(--accent); }
.create-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.create-card > h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin-bottom: 2px; }
.create-card .cc-sub { color: var(--text-3); font-size: 13px; margin-bottom: 18px; }
.create-card .cc-sub b { color: var(--text-2); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dropzone { border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 26px; text-align: center; background: var(--surface-2); cursor: pointer; transition: all .15s; }
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .dz-ico { font-size: 30px; margin-bottom: 8px; }
.dropzone .dz-t { font-weight: 600; font-size: 14px; }
.dropzone .dz-s { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.token-preview { display: flex; align-items: center; gap: 13px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 18px; }
.token-preview .tp-ava { width: 52px; height: 52px; border-radius: 15px; font-size: 26px; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--border); }
.token-preview .tp-name { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.token-preview .tp-meta { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.range-input { display: flex; align-items: center; gap: 12px; }
input[type=range] { flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; background: var(--surface-3); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 2px 6px rgba(109,75,255,.4); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: none; cursor: pointer; }
.range-val { font-family: var(--font-mono); font-size: 13px; font-weight: 600; min-width: 52px; text-align: right; }
.split-edit { display: flex; flex-direction: column; gap: 11px; }
.split-edit-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.split-edit-row .sel-k { font-size: 13px; font-weight: 600; }
.split-edit-row .sel-sub { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.mini-inp { width: 84px; padding: 8px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; outline: none; }
.mini-inp:focus { border-color: var(--accent); box-shadow: var(--ring); }
.total-flag { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 11px; font-size: 13px; font-weight: 600; }
.total-flag.ok { background: var(--pos-soft); color: var(--pos); border: 1px solid color-mix(in srgb, var(--pos) 30%, transparent); }
.total-flag.bad { background: var(--neg-soft); color: var(--neg); border: 1px solid color-mix(in srgb, var(--neg) 30%, transparent); }
.create-summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: sticky; top: 78px; }
.create-summary h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 14px; }
.sum-row { display: flex; justify-content: space-between; font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.sum-row:last-of-type { border-bottom: none; }
.sum-row .k { color: var(--text-3); }
.sum-row .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.sum-warn { font-size: 12px; color: var(--warn); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); border-radius: 10px; padding: 10px 12px; margin-top: 12px; line-height: 1.5; }

/* ============================================================
   ANALYTICS
   ============================================================ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 14px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat-card .k { font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.stat-card .v { font-size: 24px; font-weight: 800; margin-top: 8px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-card .d { font-size: 12.5px; font-weight: 600; margin-top: 4px; }
.rank-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rank-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-4); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.rank-table th.num, .rank-table td.num { text-align: right; }
.rank-table td { padding: 12px; border-bottom: 1px solid var(--border); }
.rank-table tr:last-child td { border-bottom: none; }
.rank-table tr.clickable { cursor: pointer; transition: background .12s; }
.rank-table tr.clickable:hover { background: var(--surface-2); }
.rank-cell { display: flex; align-items: center; gap: 10px; }
.rank-cell .tava { width: 32px; height: 32px; border-radius: 9px; font-size: 16px; }
.rank-cell .rn { font-weight: 700; }
.rank-cell .rs { font-size: 12px; color: var(--text-3); }

/* ============================================================
   BRIDGE
   ============================================================ */
.bridge-wrap { max-width: 520px; margin: 0 auto; }
.bridge-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.chain-row { display: flex; align-items: center; justify-content: space-between; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; }
.chain-row .cl { display: flex; align-items: center; gap: 10px; }
.chain-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: var(--surface-3); border: 1px solid var(--border); }
.chain-row .cn { font-weight: 700; font-size: 14px; }
.chain-row .cs { font-size: 12px; color: var(--text-3); }
.bridge-arrow { text-align: center; color: var(--text-4); font-size: 20px; margin: 10px 0; }
.rate-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-3); padding: 10px 0; border-bottom: 1px solid var(--border); }
.rate-row b { color: var(--text-2); }

/* ============================================================
   MODAL
   ============================================================ */
.overlay { position: fixed; inset: 0; background: rgba(20,16,8,.5); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 400; padding: 20px; opacity: 1; transition: opacity .2s; }
.overlay[hidden] { display: none; }
.overlay.fade { opacity: 0; }
.modal { width: 520px; max-width: 100%; background: var(--bg-elev); border: 1px solid var(--border-2); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-lg); max-height: calc(100vh - 60px); overflow-y: auto; }
.modal h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.modal p { color: var(--text-2); font-size: 13.5px; line-height: 1.6; margin-top: 8px; }
.m-close { float: right; color: var(--text-3); padding: 4px; border-radius: 7px; }
.m-close:hover { color: var(--text); background: var(--surface-2); }
.search-modal { width: 580px; }
.search-modal .inp { margin-top: 14px; }
.search-res { margin-top: 14px; max-height: 340px; overflow-y: auto; }

/* wallet modal */
.wallet-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.wallet-opt { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: 14px; transition: all .15s; }
.wallet-opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.wallet-opt .wo-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: var(--surface-2); border: 1px solid var(--border); }

/* legal */
.legal-wrap { max-width: 720px; margin: 0 auto; }
.legal-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.legal-card h2 { font-family: var(--font-display); font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.legal-card .lc-sub { color: var(--text-3); font-size: 14px; margin-top: 8px; margin-bottom: 20px; }
.legal-card h4 { font-size: 14px; font-weight: 700; margin: 20px 0 8px; }
.legal-card p { color: var(--text-2); font-size: 14px; line-height: 1.75; }

/* ---------- toast ---------- */
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 500; display: flex; flex-direction: column; gap: 9px; align-items: center; }
.toast { background: var(--bg-elev); border: 1px solid var(--border-2); border-radius: 12px; padding: 12px 18px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg); display: flex; gap: 9px; align-items: center; animation: toastin .32s cubic-bezier(.2,.9,.3,1.35); max-width: 440px; }
@keyframes toastin { from { transform: translateY(14px); opacity: 0; } }
.toast .ok { color: var(--pos); } .toast .err { color: var(--neg); }
.flash { animation: flash .6s ease; }
@keyframes flash { 0% { color: var(--accent); } 100% { } }

/* ---------- empty ---------- */
.empty { text-align: center; padding: 64px 20px; color: var(--text-3); }
.empty .big { font-size: 44px; margin-bottom: 12px; }
.empty h3 { color: var(--text-2); font-size: 16px; margin-bottom: 6px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 30px 22px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-tag { display: flex; align-items: center; gap: 9px; }
.footer-mark { color: var(--text); }
.footer-tagline { font-family: var(--font-display); font-size: 15px; font-weight: 500; color: var(--text-2); }
.footer-links { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.footer-links a { font-size: 13.5px; color: var(--text-3); transition: color .15s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 12.5px; color: var(--text-4); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .home-layout { grid-template-columns: 1fr; }
  .trend-panel { position: static; order: -1; }
  .detail-cols, .detail-cols.right, .create-layout { grid-template-columns: 1fr; }
  .order, .create-summary { position: static; }
  .tcard.list-row { grid-template-columns: 44px 1.4fr 1fr 1fr auto; }
  .tcard.list-row .tcard-stats { display: none; }
}
@media (max-width: 640px) {
  .search-btn { display: none; }
  .nav-link { display: none; }
  .two-col, .tax-split { grid-template-columns: 1fr; }
  .h-title { font-size: 26px; }
  .detail-ava { width: 48px; height: 48px; font-size: 24px; }
}
