/* ============================================================
   VestingOS — token vesting infrastructure for the on-chain economy
   Brand theme: dark indigo base, purple→blue brand gradient (matches
   logo), layered surfaces, subtle grain. Restrained — gradient reserved
   for logo, primary CTAs and the hero accent word.
   ============================================================ */

:root {
  color-scheme: dark;

  --bg: #0b0a16;
  --bg-2: #0e0c1c;
  --surface: #16142a;
  --surface-2: #1c1938;
  --ink: #f1f2f9;
  --ink-2: #adb0cc;
  --muted: #74769a;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);

  /* brand (sampled from the logo) */
  --brand-purple: #8b5cf6;
  --brand-blue: #4aa5f5;
  --grad-brand: linear-gradient(135deg, #8b5cf6 0%, #4aa5f5 100%);
  --grad-btn: linear-gradient(135deg, #7d5cff 0%, #3f8ef7 100%);

  --accent: #9b8dfb;        /* legible periwinkle for links / small UI on dark */
  --accent-hover: #b4a9ff;
  --accent-ink: #ffffff;    /* text on brand fills */
  --accent-soft: rgba(139, 92, 246, 0.14);

  /* validated data palette (dataviz: dark-mode pass, L 0.48–0.67) */
  --viz-claimed: #0aa17e;
  --viz-available: #c97a10;
  --viz-locked: #6478e0;
  --viz-track: rgba(255, 255, 255, 0.06);

  --good: #33c98a;
  --warn: #e0a52a;
  --bad: #f0655a;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 44px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.4);
  --hairline: inset 0 1px 0 rgba(255, 255, 255, 0.05);

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SF Mono", ui-monospace, "Cascadia Mono", Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background:
    radial-gradient(760px 420px at 78% -180px, rgba(74, 165, 245, 0.10), transparent 68%),
    radial-gradient(820px 460px at 20% -220px, rgba(139, 92, 246, 0.12), transparent 68%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; }

/* ---------------------------------------------------------- topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 10, 22, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.nav {
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav a {
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
}
.nav a:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); text-decoration: none; }
.nav a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid var(--line);
}

.wallet-area { display: flex; align-items: center; gap: 10px; }

.net-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.04);
}
.net-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.net-pill.unsupported .dot { background: var(--bad); }

/* ---------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  transition: filter 0.15s, background 0.15s, transform 0.1s, box-shadow 0.15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--grad-btn);
  color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 6px 16px rgba(0, 0, 0, 0.4);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.05); }

.btn-dark {
  background: #f3f5f7;
  color: #0a0b0d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-dark:hover:not(:disabled) { background: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 13px 26px; font-size: 15px; }

.btn .spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-primary .spinner {
  border-color: rgba(5, 23, 15, 0.35);
  border-top-color: var(--accent-ink);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------- layout */

.page {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 28px 90px;
}
.page-narrow { max-width: 860px; }

.page-head { margin-bottom: 28px; }
.page-head .eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.page-head h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: #fff;
}
.page-head p { color: var(--muted); margin-top: 8px; max-width: 560px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--hairline), var(--shadow-soft);
}
.card-pad { padding: 26px 28px; }

.card-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- stat tiles */

.stat-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.stat-row .stat { padding: 20px 22px; border-left: 1px solid var(--line); }
.stat-row .stat:first-child { border-left: none; }
@media (max-width: 900px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat-row .stat { border-top: 1px solid var(--line); }
}

.stat .stat-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}
.stat .chip { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.stat .stat-value {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat .stat-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ---------------------------------------------------------- allocation bar */

.alloc-bar {
  display: flex;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--viz-track);
}
.alloc-bar .seg { height: 100%; border-right: 2px solid var(--bg); }
.alloc-bar .seg:last-child { border-right: none; }
.alloc-bar .seg.claimed { background: var(--viz-claimed); }
.alloc-bar .seg.available { background: var(--viz-available); }
.alloc-bar .seg.locked { background: var(--viz-locked); }

.alloc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.alloc-legend .item { display: inline-flex; align-items: center; gap: 7px; }
.alloc-legend .chip { width: 9px; height: 9px; border-radius: 3px; }
.alloc-legend b { font-variant-numeric: tabular-nums; font-weight: 600; color: #fff; }

/* mini progress bar for tables */
.mini-progress {
  width: 110px;
  height: 6px;
  border-radius: 3px;
  background: var(--viz-track);
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}
.mini-progress i { display: block; height: 100%; background: var(--grad-btn); border-radius: 3px; }

/* ---------------------------------------------------------- timeline svg */

.timeline-wrap { overflow-x: auto; }
.timeline-svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--font-ui);
}

/* ---------------------------------------------------------- forms */

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.field .hint.error { color: var(--bad); }
.field .hint.ok { color: var(--good); }

.input, select.input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border 0.15s, box-shadow 0.15s, background 0.15s;
}
.input::placeholder { color: var(--muted); }
.input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(45, 212, 167, 0.18);
}
.input.mono { font-family: var(--font-mono); font-size: 13px; }
select.input option { background: var(--surface-2); color: var(--ink); }

.input-row { display: flex; gap: 10px; }
.input-row .input { flex: 1; }
.input-row select.input { flex: 0 0 130px; width: 130px; }

.token-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.token-meta .sym {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(45, 212, 167, 0.35);
}
.token-meta .bal { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.data th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
table.data tr:last-child td { border-bottom: none; }
table.data tr.rowlink { cursor: pointer; }
table.data tr.rowlink:hover td { background: rgba(255, 255, 255, 0.035); }
table.data td.num, table.data th.num { text-align: right; }

.addr {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  border-bottom: 1px dashed var(--line-strong);
}
.addr:hover { color: var(--accent); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; }
.tag-active { background: rgba(45, 212, 167, 0.13); color: var(--accent); border-color: rgba(45, 212, 167, 0.3); }
.tag-active .dot { background: var(--accent); box-shadow: 0 0 6px rgba(45, 212, 167, 0.8); }
.tag-cliff { background: rgba(240, 180, 41, 0.12); color: #f4c455; border-color: rgba(240, 180, 41, 0.3); }
.tag-cliff .dot { background: var(--warn); }
.tag-pending { background: rgba(100, 120, 224, 0.14); color: #9dabf5; border-color: rgba(100, 120, 224, 0.32); }
.tag-pending .dot { background: var(--viz-locked); }
.tag-done { background: rgba(255, 255, 255, 0.07); color: var(--ink-2); border-color: var(--line); }
.tag-done .dot { background: var(--muted); }

/* ---------------------------------------------------------- position cards */

.position { margin-bottom: 26px; }
.position-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.position-head .sym {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(45, 212, 167, 0.35), 0 0 16px rgba(45, 212, 167, 0.15);
}
.position-head .t-name { font-weight: 650; font-size: 16px; color: #fff; }
.position-head .t-sub { font-size: 12.5px; color: var(--muted); }
.position-head .spacer { flex: 1; }

.claim-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  flex-wrap: wrap;
}
.claim-strip .claim-info { font-size: 13.5px; color: var(--ink-2); }
.claim-strip .claim-info b { font-variant-numeric: tabular-nums; color: #fff; }
.claim-strip .spacer { flex: 1; }

/* ---------------------------------------------------------- unlock list */

.unlock-list { list-style: none; }
.unlock-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.unlock-list li:last-child { border-bottom: none; }
.unlock-date {
  flex: none;
  width: 88px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 4px;
}
.unlock-date .d { font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.2; color: #fff; }
.unlock-date .m { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.unlock-what { flex: 1; min-width: 0; }
.unlock-what .w1 { font-weight: 600; color: var(--ink); }
.unlock-what .w2 { font-size: 12px; color: var(--muted); }
.unlock-amt { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

/* ---------------------------------------------------------- landing */

.hero {
  padding: 96px 28px 54px;
  max-width: 1160px;
  margin: 0 auto;
  text-align: left;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40px -200px auto -200px;
  height: 460px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(ellipse 50% 70% at 30% 30%, #000 10%, transparent 68%);
  mask-image: radial-gradient(ellipse 50% 70% at 30% 30%, #000 10%, transparent 68%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 26px;
}
.hero .eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6.2vw, 66px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.04;
  max-width: 860px;
  margin: 0;
  color: #fff;
}
.hero h1 em {
  font-style: normal;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.sub {
  max-width: 540px;
  margin: 24px 0 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
}
.hero .cta { margin-top: 36px; display: flex; gap: 12px; justify-content: flex-start; flex-wrap: wrap; }

.hero-visual {
  max-width: 1104px;
  margin: 60px auto 0;
  text-align: left;
}
.hero-visual .demo-note {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.hero-visual .card {
  box-shadow: var(--hairline), 0 30px 80px rgba(0, 0, 0, 0.55);
}

.features {
  max-width: 1160px;
  margin: 70px auto 0;
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 1000px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.feature { padding: 24px; transition: border-color 0.2s, background 0.2s; }
.feature:hover { border-color: var(--line-strong); background: var(--surface-2); }
.feature .f-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  border: 1px solid rgba(55, 210, 154, 0.18);
}
.feature h3 { font-size: 15px; font-weight: 650; margin-bottom: 6px; color: #fff; }
.feature p { font-size: 13px; color: var(--muted); line-height: 1.55; }

.how {
  max-width: 860px;
  margin: 90px auto 0;
  padding: 0 28px;
}
.how h2, .section-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-align: center;
  margin-bottom: 40px;
  color: #fff;
}
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 720px) { .how-steps { grid-template-columns: 1fr; } }
.how-step { text-align: center; padding: 0 10px; }
.how-step .n {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.how-step h3 { font-size: 15px; font-weight: 650; margin-bottom: 6px; color: #fff; }
.how-step p { font-size: 13px; color: var(--muted); }

.landing-cta {
  max-width: 1104px;
  margin: 90px auto 0;
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(55, 210, 154, 0.07), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  color: #fff;
  box-shadow: var(--hairline), var(--shadow-soft);
}
.landing-cta h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.landing-cta p { color: var(--ink-2); margin: 12px auto 26px; max-width: 460px; }

.footer {
  border-top: 1px solid var(--line);
  margin-top: 90px;
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 30px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
}
.footer-inner .spacer { flex: 1; }

/* ---------------------------------------------------------- misc */

.empty {
  text-align: center;
  padding: 70px 30px;
  color: var(--muted);
}
.empty .e-icon { margin-bottom: 16px; opacity: 0.55; }
.empty h3 { color: #fff; font-size: 17px; font-weight: 650; margin-bottom: 6px; }
.empty p { font-size: 13.5px; max-width: 380px; margin: 0 auto 20px; }

.notice {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink-2);
  margin-bottom: 22px;
  align-items: flex-start;
}
.notice.warn {
  background: rgba(240, 180, 41, 0.09);
  border-color: rgba(240, 180, 41, 0.3);
  color: #f2cf7d;
}
.notice b { color: inherit; }

.steps-modal {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.step-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  align-items: flex-start;
}
.step-item .s-dot {
  width: 26px; height: 26px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.step-item.active .s-dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 12px rgba(45, 212, 167, 0.4); }
.step-item.done .s-dot { border-color: var(--accent); background: var(--accent); color: #041a15; }
.step-item .s-body .s-t { font-weight: 600; font-size: 14px; color: var(--ink); }
.step-item .s-body .s-d { font-size: 12.5px; color: var(--muted); }

#toast-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: #141b31;
  color: var(--ink);
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  max-width: 380px;
  display: flex;
  gap: 10px;
  align-items: center;
  animation: toast-in 0.25s ease;
}
.toast.error { background: #351512; border-color: rgba(255, 107, 94, 0.4); color: #ffc4bd; }
.toast.success { background: #0b2c24; border-color: rgba(45, 212, 167, 0.4); color: #b8f2df; }
.toast a { color: var(--accent-hover); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.share-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.share-row .input { flex: 1; min-width: 220px; }

.skeleton {
  height: 120px;
  border-radius: var(--radius);
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.03) 40%, rgba(255, 255, 255, 0.07) 50%, rgba(255, 255, 255, 0.03) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border: 1px solid var(--line);
}
@keyframes shimmer { to { background-position: -200% 0; } }

.deploy-addr-list { list-style: none; }
.deploy-addr-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  flex-wrap: wrap;
}
.deploy-addr-list li:last-child { border-bottom: none; }
.deploy-addr-list .spacer { flex: 1; }

/* narrow screens: keep topbar on one line, scroll the nav */
@media (max-width: 760px) {
  .topbar-inner { gap: 14px; padding: 0 16px; }
  .nav { overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
}

/* ---------------------------------------------------------- wallet picker modal */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(4, 6, 12, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: overlay-in 0.16s ease;
}
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, #131a2c, #0d1220);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(45, 212, 167, 0.08);
  overflow: hidden;
  animation: modal-in 0.2s ease;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--line);
}
.modal-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: #fff; }
.modal-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.modal-x {
  margin-left: auto;
  flex: none;
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.modal-x:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }

.wallet-list { padding: 14px; display: flex; flex-direction: column; gap: 8px; }

.wallet-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  text-align: left;
}
.wallet-item:hover {
  border-color: rgba(45, 212, 167, 0.5);
  background: rgba(45, 212, 167, 0.07);
}
.wallet-item:active { transform: translateY(1px); }
.wallet-ic {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
  overflow: hidden;
}
.wallet-ic img { width: 34px; height: 34px; object-fit: contain; border-radius: 9px; }
.wallet-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-go { font-size: 12.5px; font-weight: 600; color: var(--accent); opacity: 0; transition: opacity 0.15s; }
.wallet-item:hover .wallet-go { opacity: 1; }

.wallet-connecting {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 16px;
  font-size: 13.5px;
  color: var(--ink-2);
  justify-content: center;
  text-align: center;
}
.wallet-connecting .spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.wallet-empty { text-align: center; padding: 26px 18px; color: var(--muted); }
.wallet-empty .e-icon { opacity: 0.5; margin-bottom: 12px; }
.wallet-empty p { font-size: 13.5px; margin-bottom: 16px; }
.wallet-install { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.wallet-install a {
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
.wallet-install a:hover { background: rgba(255, 255, 255, 0.06); text-decoration: none; }

.modal-foot {
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}

/* wallet badge + disconnect in the topbar */
.wallet-pill { gap: 6px; }
.wallet-mini { width: 15px; height: 15px; border-radius: 4px; object-fit: contain; display: block; }
.disc-btn { cursor: pointer; color: var(--muted); }
.disc-btn:hover { color: var(--bad); border-color: rgba(255, 107, 94, 0.4); }

@media (max-width: 760px) {
  .wallet-pill, .disc-btn { display: none; } /* keep network + address on small screens */
}

/* ---------------------------------------------------------- subtle grain (premium texture) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.028;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* keep page content above the grain overlay (z-index 1); the topbar keeps its
   own z-index:50 so its network dropdown stacks — and stays clickable — above main */
main, .footer { position: relative; z-index: 2; }

/* ---------------------------------------------------------- network switcher (distinct) */
.net-switch-wrap { position: relative; }
.net-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 11px 0 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid var(--line-strong);
  transition: border-color 0.15s, background 0.15s;
}
.net-switch:hover { border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.07); }
.net-switch.open { border-color: var(--brand-purple); box-shadow: 0 0 0 3px rgba(139,92,246,0.15); }
.net-switch.unsupported { border-color: rgba(240,101,90,0.5); color: #f2a49c; }
.net-switch .net-chevron { color: var(--muted); transition: transform 0.18s; }
.net-switch.open .net-chevron { transform: rotate(180deg); }
.chain-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px; height: 17px;
  flex: none;
}
.chain-ic svg { display: block; }
.chain-ic.warn { color: var(--bad); }

.net-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  z-index: 120;
  padding: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--hairline), 0 18px 44px rgba(0,0,0,0.55);
  animation: net-menu-in 0.14s ease;
}
@keyframes net-menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.net-menu-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 10px 6px;
}
.net-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.net-opt:hover { background: rgba(255,255,255,0.06); }
.net-opt.active { background: var(--accent-soft); }
.net-opt-name { flex: 1; }
.net-opt-check { color: var(--brand-purple); font-weight: 700; }

@media (max-width: 760px) {
  .net-switch-name { display: none; }        /* compact to dot + chevron on small screens */
  .net-switch { padding: 0 8px; }
}
