/* ============================================================
   lepo — dark terminal theme
   Framed page, hairline borders, diagonal hatch dividers,
   square corners, sans + mono. Compact scale (~90%).
   Layout desk: ticket LEFT, chart CENTER, markets RIGHT.
   ============================================================ */
:root,
:root[data-theme="dark"] {
  --bg: #141414;             /* outside the frame */
  --surface: #1a1a1a;        /* inside the frame */
  --surface-2: #202020;      /* inputs, hovered rows */
  --surface-3: #262626;
  --line: #2e2e2e;           /* hairlines */
  --line-strong: #474747;
  --hatch: rgba(255, 255, 255, 0.22);
  --ink: #ededed;
  --ink-soft: #a3a3a3;
  --ink-faint: #6b6b6b;
  --btn-bg: #ececec;
  --btn-ink: #121212;
  --long: #4fd18b;
  --long-bg: rgba(79, 209, 139, 0.09);
  --short: #ff6b6b;
  --short-bg: rgba(255, 107, 107, 0.09);
  --warn: #e8c468;
  --code-k: #b9a8ff;
  --code-s: #d9c48f;
  --code-n: #8fd6b4;
  --chart-bg: #171717;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #e9e9e9;
  --surface: #f6f6f6;
  --surface-2: #ffffff;
  --surface-3: #efefef;
  --line: #dcdcdc;
  --line-strong: #b5b5b5;
  --hatch: rgba(0, 0, 0, 0.2);
  --ink: #111111;
  --ink-soft: #5a5a5a;
  --ink-faint: #8f8f8f;
  --btn-bg: #141414;
  --btn-ink: #f5f5f5;
  --long: #149653;
  --long-bg: rgba(20, 150, 83, 0.08);
  --short: #d63a3a;
  --short-bg: rgba(214, 58, 58, 0.07);
  --warn: #9a7414;
  --code-k: #6a4fd6;
  --code-s: #8a6a1c;
  --code-n: #177a52;
  --chart-bg: #fbfbfb;
  color-scheme: light;
}
:root {
  --font-body: "Geist", "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-display: var(--font-body);
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 0px;
  --frame-gap: 28px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  min-height: 100vh;
  padding: var(--frame-gap) var(--frame-gap) 0;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--surface); }

/* ---------- Frame + hatch dividers ---------- */
.frame {
  max-width: 1680px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  min-height: calc(100vh - var(--frame-gap));
  display: flex; flex-direction: column;
}
.hatch {
  height: 30px; flex: none;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  /* pola silang (X): garis miring kanan + kiri */
  background:
    repeating-linear-gradient(-45deg, var(--hatch) 0 1.5px, transparent 1.5px 11px),
    repeating-linear-gradient(45deg, var(--hatch) 0 1.5px, transparent 1.5px 11px);
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface);
}
.topbar-row {
  display: flex; align-items: center; gap: 24px;
  height: 60px; padding: 0 22px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { height: 28px; display: inline-flex; align-items: center; color: var(--ink); }
.brand-mark img { height: 28px; width: auto; display: block; }
/* logo putih transparan: di tema terang dibalik jadi gelap */
:root[data-theme="light"] .brand-mark img { filter: invert(1); }
.brand-name { font-family: "Outfit", var(--font-body); font-size: 24px; font-weight: 700; letter-spacing: -0.6px; line-height: 1; }
/* ---------- Launch: opsi pons V2 ---------- */
.check-row { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 4px; padding: 10px 12px; border: 1px solid var(--line-strong); background: var(--surface-2); cursor: pointer; }
.check-row input { margin-top: 3px; accent-color: var(--ink); flex: none; }
.check-row b { display: block; font-size: 13px; font-weight: 500; }
.check-row small { display: block; font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }
.pair-opt:disabled { opacity: .35; cursor: not-allowed; }
/* ---------- Earn: vault per token ---------- */
.earn-pick { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); }
.earn-pick > div:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.earn-pick b { font-size: 16px; }
.earn-pick .dim { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.earn-search { max-width: 280px; margin-left: auto; }
.metric .k a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
/* ---------- Pemilih wallet (EIP-6963) ---------- */
.wallet-modal { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.wallet-box { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--line-strong); padding: 18px; }
.wallet-box h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.wallet-box p { margin: 0 0 12px; font-size: 12.5px; }
.wallet-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); cursor: pointer; font-family: var(--font-body); font-size: 14px; text-align: left; }
.wallet-opt:hover { border-color: var(--ink-soft); }
.wallet-opt img, .wallet-ico { width: 28px; height: 28px; border-radius: 6px; flex: none; background: var(--surface-3); }
/* ---------- Launch: unggah logo + kartu preview token ---------- */
.drop { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px dashed var(--line-strong); cursor: pointer; background: var(--surface-2); }
.drop:hover { border-color: var(--ink-soft); }
.drop .drop-img { width: 56px; height: 56px; flex: none; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); background: var(--surface); overflow: hidden; color: var(--ink-faint); font-family: var(--font-mono); font-size: 10px; }
.drop .drop-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.drop .drop-txt b { display: block; font-size: 13px; font-weight: 500; }
.drop .drop-txt span { font-size: 11.5px; color: var(--ink-faint); }
.drop input[type=file] { display: none; }
.tok-preview { border: 1px solid var(--line-strong); padding: 18px; margin-bottom: 12px; background: var(--surface-2); }
.tok-preview .tp-img { width: 88px; height: 88px; border: 1px solid var(--line-strong); background: var(--surface); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--ink-faint); font-family: var(--font-mono); font-size: 11px; margin-bottom: 14px; }
.tok-preview .tp-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tok-preview .tp-name { font-size: 24px; font-weight: 600; letter-spacing: -0.3px; line-height: 1.1; word-break: break-word; }
.tok-preview .tp-tick { font-family: var(--font-mono); color: var(--ink-faint); font-size: 12px; margin: 4px 0 12px; }
.tok-preview .tp-desc { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 12px; white-space: pre-wrap; word-break: break-word; }
.tok-preview .tp-links { display: flex; flex-wrap: wrap; gap: 6px 12px; font-family: var(--font-mono); font-size: 11px; margin-bottom: 8px; }
.pair-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pair-opt { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 9px; align-items: center; padding: 8px 10px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); cursor: pointer; text-align: left; font-family: var(--font-body); }
.pair-opt img { grid-row: 1 / span 2; }
.pair-opt:hover { border-color: var(--ink-soft); }
.pair-opt.active { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.pair-opt.active span { color: inherit; opacity: .75; }
.pair-opt img, .pair-ico { width: 22px; height: 22px; border-radius: 50%; flex: none; object-fit: cover; }
.pair-fb { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; flex: none; background: var(--surface-3); color: var(--ink-soft); font: 600 9px/1 var(--font-mono, monospace); grid-row: 1 / span 2; }
.pair-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.pair-tools .input { flex: 1; min-width: 0; }
.pair-tools .exp-chip { white-space: nowrap; }
.pair-scroll { max-height: 264px; overflow-y: auto; padding-right: 4px; }
.pair-tag { margin-left: 6px; padding: 1px 4px; border: 1px solid currentColor; font: 600 8.5px/1.2 var(--font-mono, monospace); font-style: normal; letter-spacing: .4px; text-transform: uppercase; opacity: .8; vertical-align: 1px; }
.pair-opt b { font-size: 13px; font-weight: 600; grid-column: 2; }
.pair-opt span { display: block; font-size: 10.5px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; grid-column: 2; min-width: 0; }
.pair-row { display: flex; align-items: center; gap: 10px; }
.pair-row .input { flex: 1; }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-faint) 50%), linear-gradient(135deg, var(--ink-faint) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.brand-sub {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint);
  border: 1px solid var(--line); padding: 2px 6px; letter-spacing: 0.3px;
}
.nav { display: flex; gap: 2px; flex: 1; justify-content: center; }
.nav a, .nav button {
  padding: 6px 12px; color: var(--ink-soft); font-weight: 500; font-size: 13.5px;
  background: none; border: 1px solid transparent; cursor: pointer; line-height: 1.4;
}
.nav a:hover, .nav button:hover { color: var(--ink); }
.nav a.active { color: var(--ink); border-color: var(--line-strong); background: var(--surface-2); }
.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }

body.is-home .nav-app,
body.is-home .topbar-right .badge { display: none; }
body:not(.is-home) .nav-home,
body:not(.is-home) #deskBtn { display: none; }

.badge {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.4px;
  padding: 4px 8px; color: var(--ink-soft); border: 1px solid var(--line);
  text-transform: uppercase;
}
.badge-demo { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }

/* mobile page nav (desk pages): a scrollable strip under the topbar */
.mnav { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 0;
  background-color: transparent; color: var(--ink);
  font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
}
.btn:hover { border-color: var(--ink-soft); background-color: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background-color: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-ink); }
.btn-primary:hover { background-color: var(--btn-bg); border-color: var(--btn-bg); opacity: 0.86; }
/* ghost button with bright corner ticks */
/* border transparan: tanda sudut digambar di area border (di atas garis redup inset),
   kalau border berwarna, border akan menutupi tanda sudutnya */
.btn-ghost {
  border-color: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  background-image:
    linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink)),
    linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink)),
    linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink)),
    linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink));
  background-size: 7px 1px, 1px 7px, 7px 1px, 1px 7px, 7px 1px, 1px 7px, 7px 1px, 1px 7px;
  background-position: left top, left top, right top, right top, left bottom, left bottom, right bottom, right bottom;
  background-repeat: no-repeat;
  background-origin: border-box;
}
.btn-ghost:hover { border-color: transparent; box-shadow: inset 0 0 0 1px var(--ink-faint); }
.btn-icon { width: 34px; padding: 0; }
.btn-icon svg { width: 15px; height: 15px; }
.btn-long { background-color: var(--long); border-color: var(--long); color: #0c0c0c; }
.btn-long:hover { background-color: var(--long); border-color: var(--long); opacity: 0.86; }
.btn-short { background-color: var(--short); border-color: var(--short); color: #0c0c0c; }
.btn-short:hover { background-color: var(--short); border-color: var(--short); opacity: 0.86; }
.btn-block { width: 100%; height: 40px; font-size: 14px; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-lg { height: 40px; padding: 0 22px; font-size: 15px; }

#themeBtn .i-moon { display: none; }
:root[data-theme="light"] #themeBtn .i-sun { display: none; }
:root[data-theme="light"] #themeBtn .i-moon { display: block; }

/* ---------- Views ---------- */
.view { flex: 1; width: 100%; padding: 16px; }
.view.view-home { padding: 0; }

.trade-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 260px;
  gap: 12px; align-items: start;
}
@media (max-width: 1100px) {
  .trade-grid { grid-template-columns: minmax(0, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 16px;
  min-width: 0;
}
.card + .card { margin-top: 12px; }
.grid-2 > .card + .card, .grid-3 > .card + .card { margin-top: 0; }
.card-title {
  font-family: var(--font-body); font-size: 12.5px; font-weight: 500;
  color: var(--ink-soft); margin: 0 0 12px; letter-spacing: 0;
}
.card-title::first-letter { text-transform: uppercase; }

/* ---------- Ticket (left) ---------- */
.side-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 14px; border: 1px solid var(--line-strong); }
.side-tab {
  height: 34px; border: 0; background: transparent; font-weight: 600; cursor: pointer;
  color: var(--ink-soft); font-size: 13px;
}
.side-tab + .side-tab { border-left: 1px solid var(--line-strong); }
.side-tab.long.active { background: var(--long-bg); color: var(--long); box-shadow: inset 0 -2px 0 var(--long); }
.side-tab.short.active { background: var(--short-bg); color: var(--short); box-shadow: inset 0 -2px 0 var(--short); }

.lev-row { display: grid; grid-template-columns: repeat(5, 1fr); margin-bottom: 12px; border: 1px solid var(--line-strong); }
.lev-chip {
  height: 30px; text-align: center; border: 0; background: transparent;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; cursor: pointer; color: var(--ink-soft);
}
.lev-chip + .lev-chip { border-left: 1px solid var(--line-strong); }
.lev-chip:hover:not(:disabled) { color: var(--ink); background: var(--surface-2); }
.lev-chip.active, .lev-chip.active:hover { background: var(--btn-bg); color: var(--btn-ink); }
.lev-chip:disabled { opacity: 0.3; cursor: not-allowed; }

.field-label { font-size: 12px; color: var(--ink-soft); margin: 10px 0 6px; display: block; }
.input-row { display: flex; gap: 6px; }
.input {
  width: 100%; height: 34px; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: 0;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-mono); font-size: 13px;
}
.input::placeholder { color: var(--ink-faint); }
.input:focus { outline: none; border-color: var(--ink-soft); }
.input-row .btn { height: 34px; }
textarea.input { font-family: var(--font-body); }

.stat-list { margin: 14px 0; border-top: 1px dashed var(--line-strong); padding-top: 10px; }
.stat { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 12.5px; }
.stat .k { color: var(--ink-soft); }
.stat .v { font-family: var(--font-mono); text-align: right; }
.stat .v.pos { color: var(--long); }
.stat .v.neg { color: var(--short); }

/* ---------- Chart (center) ---------- */
.market-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px;
}
.market-head .sym { font-size: 22px; font-weight: 500; letter-spacing: -0.4px; }
.market-head .tier, .market-head .paused-tag {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; padding: 3px 8px;
  border: 1px solid var(--line-strong); color: var(--ink-soft); letter-spacing: 0.4px;
}
.market-head .paused-tag { color: var(--short); border-color: color-mix(in srgb, var(--short) 50%, transparent); }
.market-metrics { display: flex; margin-left: auto; flex-wrap: wrap; row-gap: 8px; }
.metric { padding: 0 16px; border-left: 1px solid var(--line); }
.metric .k { font-size: 10.5px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.6px; }
.metric .v { font-family: var(--font-mono); font-size: 13px; }

#chart { width: 100%; height: 440px; display: block; background: var(--chart-bg); border: 1px solid var(--line); cursor: crosshair; touch-action: pan-y; }
.chart-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-bottom: 0; background: var(--surface-2); }
.chart-grp { display: inline-flex; }
.chart-grp button, .chart-reset { font-family: var(--font-mono); font-size: 11px; padding: 4px 9px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink-soft); cursor: pointer; }
.chart-grp button + button { border-left: 0; }
.chart-grp button.active { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.chart-grp button:hover:not(.active), .chart-reset:hover { color: var(--ink); }
.chart-reset { margin-left: auto; }
@media (max-width: 760px) { #chart { height: 340px; } }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th {
  text-align: left; font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--ink-faint); font-weight: 500; padding: 8px 10px;
  border-bottom: 1px solid var(--line-strong);
}
.table td { padding: 8px 10px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); }
.table tbody tr:hover td { background: var(--surface-2); }
.table td.name-cell { font-family: var(--font-body); font-weight: 500; }
.table .pos { color: var(--long); }
.table .neg { color: var(--short); }
.empty-note { color: var(--ink-faint); padding: 18px 6px; text-align: center; font-family: var(--font-mono); font-size: 12px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 720px) {
  .table { font-size: 12px; }
  .table th, .table td { padding: 7px 7px; }
  .table th { letter-spacing: 0.3px; }
  .table .empty-note { white-space: normal; }
}

/* ---------- Markets (right) ---------- */
.mkt-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 10px; border: 1px solid var(--line-strong); }
.mkt-tab {
  height: 30px; font-size: 12px; font-weight: 500; border: 0; background: transparent;
  cursor: pointer; color: var(--ink-soft);
}
.mkt-tab + .mkt-tab { border-left: 1px solid var(--line-strong); }
.mkt-tab.active { background: var(--btn-bg); color: var(--btn-ink); }
.mkt-search { margin-bottom: 10px; font-size: 12px; }
.mkt-list { max-height: 560px; overflow-y: auto; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.mkt-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 6px; cursor: pointer; border-bottom: 1px solid var(--line);
  border-left: 2px solid transparent;
}
.mkt-item:hover { background: var(--surface-2); }
.mkt-item.active { background: var(--surface-2); border-left-color: var(--ink); }
.mkt-ava, .tkbox {
  width: 34px; height: 34px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); color: var(--ink-soft);
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.3px; text-transform: uppercase;
  overflow: hidden; background: var(--surface-2);
}
.mkt-ava img, .tkbox img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tkbox.lg { width: 44px; height: 44px; }
.tkbox.sm { width: 24px; height: 24px; font-size: 7px; }
.sym-row { display: inline-flex; align-items: center; gap: 8px; }
.chart-frame { width: 100%; height: 440px; border: 1px solid var(--line); background: var(--chart-bg); display: block; }
.chart-src { display: inline-flex; gap: 0; margin-left: auto; }
.chart-src button { font-family: var(--font-mono); font-size: 10.5px; padding: 3px 9px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink-soft); cursor: pointer; }
.chart-src button + button { border-left: 0; }
.chart-src button.active { background: var(--btn-bg); color: var(--btn-ink); }
.chart-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dex-stats { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); margin: 6px 0 8px; }
.dex-stats b { color: var(--ink); font-weight: 500; }
@media (max-width: 760px) { .chart-frame { height: 360px; } }
.mkt-item .info { flex: 1; min-width: 0; }
.mkt-item .s { font-weight: 600; font-size: 13px; }
.mkt-item .n { font-size: 11px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkt-item .right { text-align: right; }
.mkt-item .p { font-family: var(--font-mono); font-size: 12px; }
.mkt-item .lv { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft); }

/* ---------- Options ---------- */
.exp-row { display: inline-grid; grid-auto-flow: column; margin-bottom: 12px; border: 1px solid var(--line-strong); }
.exp-chip {
  height: 30px; padding: 0 16px; border: 0; background: transparent;
  font-family: var(--font-mono); font-size: 12px; cursor: pointer; color: var(--ink-soft);
}
.exp-chip + .exp-chip { border-left: 1px solid var(--line-strong); }
.exp-chip.active { background: var(--btn-bg); color: var(--btn-ink); }
.chain-row-atm td { background: var(--surface-3); }
.prem-btn {
  font-family: var(--font-mono); font-size: 12px; cursor: pointer; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 0; padding: 4px 10px; background: transparent;
}
.prem-btn.call:hover { border-color: var(--long); color: var(--long); background: var(--long-bg); }
.prem-btn.put:hover { border-color: var(--short); color: var(--short); background: var(--short-bg); }

/* ---------- Earn / numbers ---------- */
.hero-num { font-size: 30px; font-weight: 400; letter-spacing: -0.8px; line-height: 1.15; }
.hero-num span { color: var(--ink-soft); }
.hero-sub { color: var(--ink-soft); font-size: 12.5px; }
.hero-sub + .btn-block, .hero-sub + .field-label { margin-top: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: start; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }

.callout {
  background: var(--bg); border: 1px dashed var(--line-strong);
  padding: 10px 12px; font-size: 12.5px; color: var(--ink-soft);
}

/* ---------- Footer & toast ---------- */
.footer {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 18px 22px 22px; color: var(--ink-soft); font-size: 12px;
}
.footer strong { color: var(--ink); font-weight: 600; }
.footer-note { color: var(--ink-faint); font-family: var(--font-mono); font-size: 11px; max-width: 640px; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--btn-bg); color: var(--btn-ink); padding: 10px 16px;
  font-size: 13px; z-index: 50; max-width: 90vw; border: 1px solid var(--btn-bg);
}
.toast.err { background: var(--short); border-color: var(--short); color: #0c0c0c; }

.mono { font-family: var(--font-mono); }
.dim { color: var(--ink-soft); }
p.dim { font-size: 13px; line-height: 1.55; margin: 0 0 10px; }
.muted-cell { color: var(--ink-faint); font-family: var(--font-mono); }
.callout.warn { border-color: color-mix(in srgb, var(--warn) 55%, transparent); color: var(--ink); }
.callout a, p.dim a, .chart-foot a { text-decoration: underline; text-underline-offset: 2px; }
.stat .v a { text-decoration: underline; text-underline-offset: 2px; }
.badge-live { color: var(--long); border-color: color-mix(in srgb, var(--long) 45%, transparent); }
.badge-paper { color: var(--code-k); border-color: color-mix(in srgb, var(--code-k) 45%, transparent); }
.prem-btn.sel { border-color: var(--ink); background: var(--surface-3); }
.chart-foot { margin-top: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.grid-4 > .card + .card { margin-top: 0; }
.grid-2.tight { gap: 0 10px; }
.market-head .tier.pos { color: var(--long); }
.market-head .tier.neg { color: var(--short); }
@media (max-width: 900px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid-4, .grid-2.tight { grid-template-columns: minmax(0, 1fr); } }

/* langkah vertikal (halaman Launch) */
.steps-v { display: grid; gap: 0; border: 1px solid var(--line); margin-bottom: 12px; }
.step-v { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 12px; color: var(--ink-faint); }
.step-v + .step-v { border-top: 1px solid var(--line); }
.step-v b { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); font-family: var(--font-mono); font-weight: 500; }
.step-v h4 { margin: 2px 0 4px; font-size: 13.5px; font-weight: 500; color: inherit; }
.step-v p { margin: 0; font-size: 12.5px; line-height: 1.5; }
.step-v.now { color: var(--ink); }
.step-v.now b { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.step-v.done { color: var(--ink-soft); }
.step-v.done b { color: var(--long); border-color: var(--long); }

/* grafik PnL vault (halaman Earn) */
.pnl-svg { width: 100%; height: 180px; display: block; background: var(--chart-bg); border: 1px solid var(--line); }
.pnl-line { fill: none; stroke-width: 1.6; }
.pnl-line.up { stroke: var(--long); }
.pnl-line.down { stroke: var(--short); }
.pnl-area.up { fill: color-mix(in srgb, var(--long) 12%, transparent); }
.pnl-area.down { fill: color-mix(in srgb, var(--short) 12%, transparent); }
.pnl-axis { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); margin-top: 6px; }

/* USD sekunder, banner pause, pengelola posisi, docs */
.usd { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); margin-left: 4px; }
.table td .usd { display: block; margin: 0; }
.badge-paused { color: var(--short); border-color: color-mix(in srgb, var(--short) 55%, transparent); }
.pause-banner {
  border: 1px solid color-mix(in srgb, var(--short) 55%, transparent); background: var(--short-bg);
  padding: 10px 14px; font-size: 13px; margin-bottom: 12px;
}
.nowrap { white-space: nowrap; }
.table tr.row-sel td { background: var(--surface-3); }
.mgr { margin-top: 12px; }
.grid-3.tight { gap: 0 16px; }
.pct-row { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line-strong); }
.pct-row .lev-chip + .lev-chip { border-left: 1px solid var(--line-strong); }
.docs { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; max-width: 1080px; margin: 0 auto; padding: 12px 8px 40px; }
.docs-nav { position: sticky; top: 72px; align-self: start; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.docs-nav a { padding: 6px 12px; color: var(--ink-soft); font-size: 13px; }
.docs-nav a:hover { color: var(--ink); }
.docs-body h1 { font-size: 30px; font-weight: 500; letter-spacing: -0.03em; margin: 0 0 6px; }
.docs-body h2 { font-size: 18px; font-weight: 500; margin: 34px 0 8px; padding-top: 10px; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.docs-body p, .docs-body li { font-size: 14px; line-height: 1.65; color: var(--ink-soft); }
.docs-body b { color: var(--ink); font-weight: 500; }
.docs-body ul { padding-left: 18px; }
@media (max-width: 800px) { .docs { grid-template-columns: minmax(0, 1fr); } .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; border: 0; } .grid-3.tight { grid-template-columns: minmax(0, 1fr); } }

/* panel transaksi (pending → confirmed) */
.tx-tray {
  position: fixed; right: 16px; bottom: 16px; z-index: 40; width: min(360px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.5);
}
.tx-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 9px 12px; font-size: 12.5px; }
.tx-item + .tx-item { border-top: 1px solid var(--line); }
.tx-item .tx-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-item .tx-status { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); }
.tx-item a { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); }
.tx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.tx-item.pending .tx-dot { animation: blink 1.2s ease-in-out infinite; }
.tx-item.confirmed .tx-dot { background: var(--long); }
.tx-item.failed .tx-dot, .tx-item.unknown .tx-dot { background: var(--short); }
@media (max-width: 640px) { .tx-tray { right: 8px; bottom: 8px; } .toast { bottom: 90px; } }
.pos { color: var(--long); }
.neg { color: var(--short); }

/* ============================================================
   HOME / landing
   ============================================================ */
.h-wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* hero */
.h-hero { position: relative; padding: 92px 0 104px; overflow: hidden; }
.h-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M14 10v8M10 14h8' stroke='%23fff' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 28px 28px;
  opacity: 0.1;
  -webkit-mask-image: radial-gradient(75% 65% at 50% 100%, #000 15%, transparent 72%);
          mask-image: radial-gradient(75% 65% at 50% 100%, #000 15%, transparent 72%);
}
:root[data-theme="light"] .h-hero::before { filter: invert(1); opacity: 0.16; }
.h-center { position: relative; text-align: center; max-width: 760px; margin: 0 auto; padding: 0 20px; }
.h-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft);
  border: 1px solid var(--line-strong); padding: 4px 10px; letter-spacing: 0.3px;
}
.h-eyebrow i { width: 6px; height: 6px; background: var(--long); display: inline-block; }
.h-title {
  font-size: clamp(36px, 4.3vw, 60px); font-weight: 500; line-height: 1.04;
  letter-spacing: -0.035em; margin: 22px 0 16px;
}
.mute { color: var(--ink-faint); }
.h-lead { font-size: 15.5px; color: var(--ink-soft); line-height: 1.5; margin: 0 auto 24px; max-width: 520px; }
.h-cta { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* stats strip */
.h-stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.h-stat { padding: 22px 30px 20px; min-width: 0; }
.h-stat + .h-stat { border-left: 1px solid var(--line-strong); }
.h-stat b { display: block; font-size: 40px; font-weight: 400; letter-spacing: -0.04em; line-height: 1.1; }
.h-stat span { color: var(--ink-soft); font-size: 12.5px; }

/* sections */
.h-sec { padding: 84px 0; }
.h-sec-head { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: end; margin-bottom: 36px; }
.h-kicker { font-size: 12.5px; color: var(--ink-soft); display: block; margin-bottom: 14px; }
.h-h2 { font-size: clamp(28px, 3vw, 42px); font-weight: 500; line-height: 1.08; letter-spacing: -0.03em; margin: 0; }
.h-sec-head p { color: var(--ink-soft); font-size: 15px; line-height: 1.55; margin: 0; }

/* live market panel */
.h-panel { display: grid; grid-template-columns: 0.8fr 1.2fr; border: 1px solid var(--line-strong); }
.h-now { padding: 22px 24px; border-right: 1px solid var(--line-strong); display: flex; flex-direction: column; min-width: 0; }
.h-now-label { color: var(--ink-soft); font-size: 12.5px; }
.h-now-head { display: flex; align-items: center; gap: 12px; margin: 14px 0 18px; }
.h-now-sym { font-size: 28px; font-weight: 500; letter-spacing: -0.03em; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); }
.live-dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 50% { background: var(--long); } }
.h-now-tier { margin-left: auto; font-family: var(--font-mono); font-size: 13px; }
.segs { display: grid; grid-template-columns: repeat(40, 1fr); gap: 3px; margin-bottom: 8px; }
.segs i { height: 5px; background: var(--line-strong); display: block; }
.segs i.on { background: var(--ink); }
.segs-cap { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); margin-bottom: 20px; }
.h-now-price { font-family: var(--font-mono); font-size: 15px; margin-bottom: 18px; }
.h-now p { color: var(--ink-soft); font-size: 13.5px; line-height: 1.55; margin: 0 0 18px; max-width: 400px; }
.h-now .btn { align-self: flex-start; margin-top: auto; }
.h-rows { min-width: 0; }
.h-rows-head {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 72px 36px; gap: 14px;
  padding: 10px 24px; border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.6px;
}
.h-rows-head span:nth-child(n+3) { text-align: right; }
.h-sec, #markets { scroll-margin-top: 64px; }

.h-row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 72px 36px; gap: 14px; align-items: center;
  padding: 10px 24px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.h-row:last-child { border-bottom: 0; }
.h-row:hover, .h-row.sel { background: var(--surface-2); }
.h-row .nm { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-row .nm small { color: var(--ink-faint); font-weight: 400; margin-left: 8px; font-size: 12px; }
.h-row .pr { font-family: var(--font-mono); font-size: 13px; text-align: right; }
.h-row .ch { font-family: var(--font-mono); font-size: 12px; text-align: right; }
.h-row .lv { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); text-align: right; }

/* bordered cell grids */
.cells { display: grid; border: 1px solid var(--line-strong); }
.cells.c2 { grid-template-columns: 1fr 1fr; }
.cells.c3 { grid-template-columns: repeat(3, 1fr); }
.cells.c4 { grid-template-columns: repeat(4, 1fr); }
.cell { padding: 24px; min-width: 0; }
.cells > .cell + .cell { border-left: 1px solid var(--line-strong); }
.cell .idx { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); display: block; margin-bottom: 26px; }
.cell h3 { font-size: 16px; font-weight: 500; letter-spacing: -0.2px; margin: 0 0 8px; }
.cell p { color: var(--ink-soft); font-size: 13.5px; line-height: 1.55; margin: 0; }
.cell-label { color: var(--ink-soft); font-size: 12.5px; display: block; margin-bottom: 18px; }

.tier-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 120px; gap: 16px; align-items: center; padding: 11px 0; }
.tier-row + .tier-row { border-top: 1px solid var(--line); }
.tier-lev { font-size: 20px; font-weight: 500; letter-spacing: -0.03em; }
.tier-row .segs { margin: 0; grid-template-columns: repeat(25, 1fr); }
.tier-req { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft); text-align: right; }

.flow-list { font-size: 13.5px; }
.flow-list div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.flow-list div:first-child { border-top: 0; }
.flow-list .tag { font-family: var(--font-mono); font-size: 11px; }
.flow-note { margin-top: 14px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }

/* closing CTA */
.h-final { padding: 96px 0 100px; text-align: center; position: relative; }
.h-final .h-h2 { margin-bottom: 14px; }
.h-final p { color: var(--ink-soft); font-size: 15px; margin: 0 0 26px; }

/* entrance */
.h-center > * { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.h-center > :nth-child(2) { animation-delay: 0.06s; }
.h-center > :nth-child(3) { animation-delay: 0.12s; }
.h-center > :nth-child(4) { animation-delay: 0.18s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .h-center > *, .live-dot::before { animation: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .brand-sub { display: none; }
  .nav-app { justify-content: flex-start; }
}
@media (max-width: 1000px) {
  :root { --frame-gap: 10px; }
  .nav-home { display: none; }
  .h-wrap { padding: 0 18px; }
  .h-hero { padding: 56px 0 64px; }
  .h-stats, .cells.c4 { grid-template-columns: 1fr 1fr; }
  .h-stat:nth-child(3), .cells.c4 > .cell:nth-child(3) { border-left: 0; }
  .h-stat:nth-child(n+3), .cells.c4 > .cell:nth-child(n+3) { border-top: 1px solid var(--line-strong); }
  .h-sec { padding: 60px 0; }
  .h-sec-head { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .h-panel { grid-template-columns: minmax(0, 1fr); }
  .h-now { border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .cells.c3, .cells.c2 { grid-template-columns: minmax(0, 1fr); }
  .cells.c3 > .cell + .cell, .cells.c2 > .cell + .cell { border-left: 0; border-top: 1px solid var(--line-strong); }
  .market-metrics { margin-left: 0; }
  .metric:first-child { padding-left: 0; border-left: 0; }
}
@media (max-width: 760px) {
  .topbar-row { padding: 0 12px; gap: 10px; height: 54px; }
  .nav-app { display: none; }
  .topbar .badge { display: none; }
  body.is-home #walletBtn { display: none; }
  body:not(.is-home) .mnav { display: flex; overflow-x: auto; border-top: 1px solid var(--line); scrollbar-width: none; }
  .mnav::-webkit-scrollbar { display: none; }
  .mnav a { flex: 1 0 auto; text-align: center; padding: 9px 9px; color: var(--ink-soft); font-size: 12.5px; border-right: 1px solid var(--line); white-space: nowrap; }
  .mnav a:last-child { border-right: 0; }
  .mnav a.active { color: var(--ink); background: var(--surface-2); }
  .view { padding: 10px; }
}
@media (max-width: 640px) {
  .h-stats, .cells.c4 { grid-template-columns: minmax(0, 1fr); }
  .h-stat + .h-stat, .cells.c4 > .cell + .cell { border-left: 0; border-top: 1px solid var(--line-strong); }
  .h-stat { padding: 18px; }
  .h-stat b { font-size: 32px; }
  .h-row { grid-template-columns: 34px minmax(0, 1fr) auto 60px; padding: 10px 14px; gap: 10px; }
  .h-row .lv, .h-rows-head span:last-child { display: none; }
  .h-rows-head { grid-template-columns: 34px minmax(0, 1fr) auto 60px; padding: 10px 14px; gap: 10px; }
  .footer { flex-direction: column; }
  .tier-row { grid-template-columns: 36px minmax(0, 1fr) 100px; gap: 10px; }
  .cell { padding: 18px; }
}
