:root {
  --cream: #f7f4ee;
  --white: #ffffff;
  --ink: #201f1d;
  --gray: #8c8a82;
  --border: #e8e4d9;
  --brand: #6d28d9;
  --brand-2: #14b8a6;
  --brand-soft: #f1eaff;
  --bubble: #f0ede4;
  --green: #16a34a;
  --red: #dc2626;

  --content-max: 760px;

  --size-1: 0.25rem;
  --size-2: 0.5rem;
  --size-3: 0.75rem;
  --size-4: 1rem;
  --size-5: 1.25rem;
  --size-6: 1.75rem;
  --size-7: 2.5rem;

  --radius-1: 8px;
  --radius-2: 10px;
  --radius-3: 14px;
  --radius-4: 20px;
  --radius-round: 999px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 6px 16px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  padding: 0 0 var(--size-7);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
}

/* ---------- Header (mobile-first) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  position: relative;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: var(--size-3) var(--size-4);
  display: flex;
  align-items: center;
  gap: var(--size-2);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--size-2);
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
  min-width: 0;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-round);
  object-fit: cover;
  display: block;
  box-shadow: 0 0 0 1px var(--border);
}
.brand span {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--size-2);
}
.nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  gap: var(--size-1);
  padding: var(--size-3) var(--size-4);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-2);
}
.nav.open {
  display: flex;
}
.nav a {
  padding: var(--size-3);
  border-radius: var(--radius-2);
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}
.nav a:hover {
  background: var(--bubble);
}
.nav a.active {
  background: var(--brand-soft);
  color: var(--brand);
}
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-2);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: var(--size-4) var(--size-4) 0;
}
.hero {
  text-align: center;
  margin-bottom: var(--size-5);
}
.hero h1 {
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 600;
  margin-bottom: var(--size-1);
}
.hero p {
  color: var(--gray);
  font-size: 14.5px;
}

/* ---------- Kartu & konten ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius-4);
  padding: var(--size-4);
  box-shadow: var(--shadow-1);
}
.banner {
  margin-top: var(--size-4);
  display: grid;
  gap: var(--size-1);
  border-left: 4px solid var(--brand);
}
.banner b {
  font-size: 14px;
}
.banner span {
  color: var(--gray);
  font-size: 13px;
}
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--size-2);
}
.fact {
  background: var(--cream);
  border-radius: var(--radius-3);
  padding: var(--size-3);
  min-width: 0;
}
.fact b {
  display: block;
  font-size: 12px;
  color: var(--gray);
  font-weight: 500;
}
.fact span {
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  word-break: break-all;
}
.row {
  display: flex;
  align-items: center;
  gap: var(--size-2);
  flex-wrap: wrap;
  margin-top: var(--size-3);
}
.token-logo {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-round);
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--border);
  flex-shrink: 0;
}

/* ---------- Tombol ---------- */
.btn {
  display: inline-block;
  text-align: center;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: var(--size-3) var(--size-5);
  border-radius: var(--radius-3);
  border: none;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.btn:hover {
  filter: brightness(0.94);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn.ghost {
  background: var(--brand-soft);
  color: var(--brand);
}
.btn.small {
  font-size: 13px;
  padding: var(--size-2) var(--size-3);
  border-radius: var(--radius-2);
}

/* ---------- Section ---------- */
section {
  margin-top: var(--size-6);
}
section h2 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: var(--size-3);
}
ul.list {
  list-style: none;
  display: grid;
  gap: var(--size-2);
}
ul.list li {
  background: var(--white);
  border-radius: var(--radius-3);
  padding: var(--size-3) var(--size-4);
  font-size: 14px;
  display: flex;
  gap: var(--size-2);
}
ul.list li::before {
  content: "•";
  color: var(--brand);
  font-weight: 700;
}
.links {
  display: grid;
  gap: var(--size-2);
}
.links a {
  background: var(--white);
  border-radius: var(--radius-3);
  padding: var(--size-3) var(--size-4);
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}
.links a span {
  color: var(--brand);
}

/* ---------- Tabel (scroll di mobile) ---------- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  color: var(--gray);
  font-weight: 600;
  padding: var(--size-2);
  white-space: nowrap;
}
td {
  padding: var(--size-2);
  border-top: 1px solid var(--border);
  white-space: nowrap;
}

a {
  color: var(--brand);
}

.disclaimer {
  margin-top: var(--size-6);
  background: var(--white);
  border-radius: var(--radius-3);
  padding: var(--size-3) var(--size-4);
  font-size: 12.5px;
  color: var(--gray);
}
footer {
  margin-top: var(--size-6);
  text-align: center;
  color: var(--gray);
  font-size: 12.5px;
}

/* ---------- Swap (mobile-first) ---------- */
.swap-panel {
  background: var(--cream);
  border-radius: var(--radius-3);
  padding: var(--size-3);
  margin-top: var(--size-3);
}
.swap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--size-2);
  font-size: 13px;
  color: var(--gray);
}
.swap-line {
  display: flex;
  align-items: center;
  gap: var(--size-2);
  margin-top: var(--size-2);
}
.swap-amount {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  border: none;
  background: transparent;
  font-size: 22px;
  font-weight: 700;
  text-align: right;
  outline: none;
  color: var(--ink);
}
.swap-amount::placeholder {
  color: var(--gray);
}
.swap-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--size-2);
  margin-top: var(--size-1);
  font-size: 12px;
  color: var(--gray);
}
.token-select {
  display: flex;
  align-items: center;
  gap: var(--size-1);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-round);
  padding: var(--size-1) var(--size-2);
  flex-shrink: 0;
}
.token-select select {
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 14px;
  outline: none;
  color: var(--ink);
}
.token-select select:disabled {
  color: var(--gray);
}
.flip-wrap {
  text-align: center;
  margin: var(--size-2) 0;
}
.swap-info {
  margin-top: var(--size-3);
  font-size: 13px;
  color: var(--gray);
  display: grid;
  gap: var(--size-1);
}
.swap-info-row {
  display: flex;
  justify-content: space-between;
  gap: var(--size-3);
}
.swap-info-row .v {
  color: var(--ink);
  text-align: right;
  overflow-wrap: anywhere;
}
.chart-box {
  width: 100%;
  height: clamp(200px, 55vw, 320px);
}

/* ---------- Form (vesting) ---------- */
.muted {
  color: var(--gray);
}
.small {
  font-size: 12.5px;
}
.input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  padding: var(--size-2) var(--size-3);
  font-size: 14px;
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
}
.input:focus {
  outline: 2px solid var(--brand-soft);
  border-color: var(--brand);
}
.mono-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
}
.v-form {
  display: grid;
  gap: var(--size-4);
}
.field {
  display: grid;
  gap: 6px;
}
.field label {
  font-size: 12.5px;
  color: var(--gray);
  font-weight: 600;
  letter-spacing: 0.1px;
}
.v-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--size-3);
}
.viewline {
  display: flex;
  align-items: center;
  gap: var(--size-2);
}
.viewline .suffix {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray);
  white-space: nowrap;
}
.chips {
  display: flex;
  gap: var(--size-2);
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: var(--size-2) var(--size-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-round);
  background: var(--white);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.chip input {
  accent-color: var(--brand);
}
.chip:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}
.preview-box {
  background: var(--cream);
  border: 1px dashed var(--border);
  border-radius: var(--radius-3);
  padding: var(--size-3) var(--size-4);
  font-size: 13px;
  color: var(--ink);
  line-height: 1.65;
}
.form-actions {
  display: flex;
  gap: var(--size-2);
  flex-wrap: wrap;
  align-items: center;
}
.form-actions .btn {
  flex: 1 1 auto;
}
@media (min-width: 720px) {
  .form-actions .btn {
    flex: 0 0 auto;
    min-width: 240px;
  }
}

/* ---------- Desktop ---------- */
@media (min-width: 720px) {
  .brand img { width: 36px; height: 36px; }
  .menu-toggle { display: none; }
  .nav {
    position: static;
    display: flex;
    flex-direction: row;
    gap: var(--size-1);
    padding: var(--size-1);
    background: var(--bubble);
    border: none;
    border-radius: var(--radius-round);
    box-shadow: none;
  }
  .nav a {
    padding: var(--size-1) var(--size-3);
    border-radius: var(--radius-round);
    font-size: 14px;
  }
  .nav a.active { background: var(--brand); color: #fff; }
  .wrap { padding: var(--size-5) var(--size-4) 0; }
  .card { padding: var(--size-5); }
  .facts { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .swap-amount { font-size: 24px; }
}
