/* =====================================================================
   OptimusFlow — Wise-inspired design system
   Forest green ink, bright lime accent, big condensed display type,
   pill buttons, flat rounded cards, generous whitespace.
   ===================================================================== */
:root {
  --forest: #163300;
  --lime: #9fe870;
  --lime-2: #80e142;
  --lime-pale: #e2f6d5;
  --yellow: #ffeb69;
  --teal: #a0e1e1;
  --orange: #ffc091;
  --pink: #ffd7ef;
  --pos: #2f5711;

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f4ef;
  --surface-3: #e8ebe6;
  --line: #e8ebe6;
  --line-2: #c9cbc4;
  --text: #0e0f0c;
  --text-2: #454745;
  --text-3: #6a6c6a;

  /* legacy names used by inline styles in HTML/JS */
  --signal: #9fe870;
  --signal-dim: #e2f6d5;
  --signal-ink: #163300;
  --amber: #d97a00;
  --amber-dim: #fff4cc;
  --red: #e1573a;
  --red-dim: #fde6e1;
  --sky: #38b2c9;
  --violet: #8a6cf0;

  --f-display: 'Archivo', 'Inter', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --r: 12px;
  --r-lg: 24px;
  --r-xl: 32px;
  --max: 1240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.006em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--lime); color: var(--forest); }
a { color: inherit; text-decoration: none; }
p a, .link { color: var(--forest); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
p a:hover, .link:hover { text-decoration-thickness: 2px; }
code { font-family: var(--f-mono); font-size: 0.86em; background: var(--surface-3); padding: 2px 6px; border-radius: 6px; color: var(--forest); }
.mono, .num { font-variant-numeric: tabular-nums; }
.mono.xs { font-family: var(--f-mono); }
.hidden { display: none !important; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.small { font-size: 0.9rem; }
.xs { font-size: 0.78rem; }
.signal { color: var(--pos); font-weight: 600; }
.amber { color: var(--amber); font-weight: 600; }
.break { word-break: break-all; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 32px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--lime); box-shadow: 0 2px 8px rgba(22, 51, 0, .08); }
.nav-inner { display: flex; align-items: center; height: 76px; gap: 32px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.04em; color: var(--forest); }
.logo-mark { width: 28px; height: 28px; display: block; }
.nav-links { display: flex; gap: 4px; flex: 1; align-items: center; }
.nav-links a { padding: 8px 14px; color: var(--forest); font-weight: 600; font-size: 0.98rem; border-radius: 999px; transition: background .15s; display: inline-flex; align-items: center; gap: 6px; }
.nav-links a:hover { background: rgba(22, 51, 0, .08); }
.nav-links a.active { background: rgba(22, 51, 0, .12); }
.nav-contract { display: inline-flex !important; align-items: center; gap: 6px; font-size: 0.92rem !important; }
.nav-contract svg { opacity: 0.75; }
.nav-divider { width: 1px; height: 24px; background: rgba(22, 51, 0, .15); margin: 0 4px; }
.nav-social { padding: 8px !important; display: inline-flex !important; align-items: center; justify-content: center; width: 38px; height: 38px; opacity: 0.75; transition: opacity .15s, background .15s; }
.nav-social:hover { opacity: 1; background: rgba(22, 51, 0, .08); }
.nav-social svg { flex-shrink: 0; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.net { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--forest); padding: 6px 12px; background: rgba(22, 51, 0, .08); border-radius: 999px; }
.net::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--forest); }
.net.bad { color: #a8200d; }
.net.bad::before { background: #a8200d; }
.burger { display: none; background: rgba(22, 51, 0, .08); border: 0; color: var(--forest); border-radius: 999px; width: 44px; height: 44px; cursor: pointer; }
.burger span { display: block; width: 16px; height: 2px; background: currentColor; margin: 3px auto; border-radius: 2px; }

.demo-bar { background: var(--yellow); color: var(--forest); font-size: 0.88rem; font-weight: 500; padding: 10px 0; text-align: center; }
.demo-bar code { background: rgba(22, 51, 0, .08); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px;
  font: 600 1rem/1 var(--f-body); letter-spacing: -0.01em;
  border: 0; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, transform .1s;
  color: var(--forest); background: transparent;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-signal { background: var(--lime); color: var(--forest); }
.btn-signal:hover:not(:disabled) { background: var(--lime-2); }
.btn-line { background: rgba(22, 51, 0, .08); }
.btn-line:hover:not(:disabled) { background: rgba(22, 51, 0, .14); }
.btn-quiet { background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.btn-quiet:hover:not(:disabled) { background: rgba(22, 51, 0, .06); }
.btn-danger { background: var(--red-dim); color: #a8200d; }
.btn-lg { height: 56px; padding: 0 28px; font-size: 1.06rem; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 0.88rem; }
.btn-block { width: 100%; }
.nav .btn-signal { background: var(--forest); color: var(--lime); }
.nav .btn-signal:hover:not(:disabled) { background: #0d1f00; }
.wallet-btn.connected { background: rgba(22, 51, 0, .1) !important; color: var(--forest) !important; font-variant-numeric: tabular-nums; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; color: var(--forest); }
h3 { font-size: 1.3rem; }
.display, .hero h1, .section-head h2, .page-head h1 {
  font-family: var(--f-display); font-stretch: 62%; font-weight: 900;
  text-transform: uppercase; letter-spacing: -0.01em; line-height: .86; color: var(--forest);
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 600; color: var(--forest); background: var(--surface-2); padding: 6px 14px; border-radius: 999px; }
.eyebrow b { font-weight: 800; }
.eyebrow.plain { background: transparent; padding: 0; color: var(--text-2); }
.eyebrow.plain b { color: var(--pos); }

/* ---------- Page scaffold ---------- */
main { padding-bottom: 0; }
.view { animation: in .3s ease; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.view:not(#view-home) { padding-bottom: 96px; }

.page-head { padding: 64px 0 40px; margin-bottom: 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(3rem, 7vw, 5.5rem); margin-top: 18px; }
.page-head p { color: var(--text-2); max-width: 640px; margin-top: 18px; font-size: 1.1rem; }

.section { padding: 112px 0; }
.section:nth-of-type(odd) { background: var(--surface-2); }
.section:nth-of-type(odd) .panel, .section:nth-of-type(odd) .tbl-wrap { background: #fff; }
.section-head { max-width: 860px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(2.6rem, 6vw, 4.8rem); margin-top: 22px; }
.section-head p { color: var(--text-2); font-size: 1.15rem; margin-top: 24px; max-width: 680px; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(var(--lime) calc(100% - 110px), var(--bg) 0); padding: 56px 0 40px; text-align: center; }
.hero-grid { display: block; }
.hero-grid > div:first-child { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.hero .eyebrow.plain { color: var(--forest); background: rgba(22, 51, 0, .08); padding: 6px 14px; }
.hero .eyebrow.plain b { color: var(--forest); }
.hero h1 { font-size: clamp(3.4rem, 10.5vw, 9rem); margin: 28px 0 0; }
.hero h1 em { font-style: normal; }
.hero .lede { font-size: 1.22rem; font-weight: 500; color: var(--forest); max-width: 680px; margin: 28px auto 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 24px; }
.hero-actions .btn-signal { background: var(--forest); color: var(--lime); }
.hero-actions .btn-signal:hover:not(:disabled) { background: #0d1f00; }
.hero-actions .btn-line { background: rgba(22, 51, 0, .1); }
.hero-actions .btn-line:hover:not(:disabled) { background: rgba(22, 51, 0, .16); }
.hero-meta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: 0.9rem; font-weight: 600; color: var(--forest); }
.hero-meta span { display: inline-flex; gap: 6px; align-items: center; }
.hero-meta span::before { content: '✓'; font-weight: 800; }
.hero-meta span:last-child::before { content: none; }

/* Spec card — dark forest, two columns */
.spec { background: var(--forest); color: #fff; border-radius: var(--r-xl); margin: 64px auto 0; max-width: 1000px; text-align: left; display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; padding: 12px 36px 0; overflow: hidden; }
.spec-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 20px 0 16px; }
.spec-head .mono { color: var(--lime) !important; font-family: var(--f-body); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; }
.spec-head .dots { display: none; }
.spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 0.98rem; }
.spec-row dt { color: rgba(255, 255, 255, .7); }
.spec-row dd { font-weight: 600; text-align: right; color: #fff; }
.spec-row dd.signal { color: var(--lime); }
.spec-row dd.amber { color: var(--yellow); }
.spec-foot { grid-column: 1 / -1; margin: 8px -36px 0; padding: 18px 36px; font-size: 0.9rem; color: rgba(255, 255, 255, .75); background: rgba(255, 255, 255, .06); }
.spec-foot code { background: rgba(255, 255, 255, .12); color: var(--lime); }

/* Live stats */
.ticker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; background: #fff; border-radius: var(--r-lg); margin-top: 32px; text-align: left; box-shadow: 0 0 0 1px var(--line), 0 16px 40px rgba(22, 51, 0, .08); }
.ticker > div { padding: 24px 26px; border-right: 1px solid var(--line); }
.ticker > div:last-child { border-right: none; }
.ticker .k { font-size: 0.86rem; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.ticker .v { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; margin-top: 6px; color: var(--forest); font-variant-numeric: tabular-nums; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime-2); box-shadow: 0 0 0 3px var(--lime-pale); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }

/* ---------- Panels ---------- */
.panel { background: var(--surface-2); border-radius: var(--r-lg); padding: 32px; }
.panel + .panel { margin-top: 20px; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.panel-title h3 { font-size: 1.3rem; }
.panel-title .mono { font-family: var(--f-mono); color: var(--text-3); }
.cols { display: grid; gap: 20px; margin-bottom: 20px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-5-7 { grid-template-columns: 5fr 7fr; }
.cols > .panel + .panel { margin-top: 0; }

/* KPIs — separate rounded tiles */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi { padding: 26px; border-radius: var(--r-lg); background: var(--surface-2); }
.section:nth-of-type(odd) .kpi { background: #fff; }
.kpi .k { font-size: 0.9rem; color: var(--text-2); font-weight: 500; }
.kpi .v { font-size: 2rem; font-weight: 800; letter-spacing: -0.04em; margin-top: 8px; color: var(--forest); font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 0.82rem; color: var(--text-3); margin-top: 4px; }
.kpi.hl, .section:nth-of-type(odd) .kpi.hl { background: var(--forest); }
.kpi.hl .k, .kpi.hl .s { color: rgba(255, 255, 255, .75); }
.kpi.hl .v { color: var(--lime); }

/* Tags */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 12px; border-radius: 999px; font: 600 0.78rem/1 var(--f-body); background: var(--surface-3); color: var(--forest); }
.tag-signal { background: var(--lime-pale); color: var(--pos); }
.tag-sky { background: #dcf3f3; color: #0b5c66; }
.tag-violet { background: #ece6ff; color: #4a2fa6; }
.tag-amber { background: var(--amber-dim); color: #7a4a00; }
.tag-red { background: var(--red-dim); color: #a8200d; }

/* Notes */
.note { background: var(--amber-dim); padding: 16px 20px; border-radius: var(--r); font-size: 0.94rem; color: var(--text); margin-bottom: 18px; }
.note b { color: #7a4a00; font-weight: 700; }
.note.info { background: #dcf3f3; }
.note.info b { color: #0b5c66; }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; border-radius: var(--r-lg); background: #fff; box-shadow: 0 0 0 1px var(--line); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 640px; }
th { text-align: left; font-size: 0.82rem; font-weight: 600; color: var(--text-2); padding: 16px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }
td.r, th.r { text-align: right; }
td .sub { display: block; font-size: 0.8rem; color: var(--text-3); margin-top: 2px; }
tr.off td { color: var(--text-3); }
tr.cur td { background: var(--lime-pale); }
.plan-name { font-weight: 600; color: var(--forest); }

.tl { position: relative; height: 8px; background: var(--surface-3); border-radius: 999px; min-width: 120px; }
.tl i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--text-3); }
.tl.t-lock i { background: var(--forest); }
.tl.t-bond i { background: var(--sky); background-image: repeating-linear-gradient(90deg, transparent 0 calc(var(--w) - 2px), #fff calc(var(--w) - 2px) var(--w)); }
.tl.t-open i { width: 100%; background: repeating-linear-gradient(90deg, var(--lime-2) 0 8px, transparent 8px 12px); }

.progress { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress > i { display: block; height: 100%; background: var(--lime-2); border-radius: 999px; transition: width .4s; }

/* ---------- Flow diagram ---------- */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; }
.flow-node { background: #fff; border-radius: var(--r-lg); padding: 28px; }
.flow-node .eyebrow { margin-bottom: 14px; }
.flow-node h4 { font-size: 1.2rem; margin-bottom: 8px; }
.flow-node p { font-size: 0.95rem; color: var(--text-2); }
.flow-node.core { background: var(--forest); }
.flow-node.core h4 { color: var(--lime); }
.flow-node.core p, .flow-node.core .eyebrow, .flow-node.core .eyebrow b { color: rgba(255, 255, 255, .8); }
.flow-node.core code { background: rgba(255, 255, 255, .12); color: var(--lime); }
.flow-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 12px; font-family: var(--f-mono); font-size: 0.72rem; color: var(--text-3); gap: 8px; min-width: 120px; text-align: center; }
.flow-arrow::before { content: '→'; font: 800 1.6rem/1 var(--f-body); color: var(--forest); }

.split { display: grid; grid-template-columns: 5fr 1fr 1.25fr 92.75fr; height: 16px; border-radius: 999px; overflow: hidden; margin: 24px 0 16px; gap: 3px; }
.split i:nth-child(1) { background: var(--red); }
.split i:nth-child(2) { background: var(--amber); }
.split i:nth-child(3) { background: var(--violet); }
.split i:nth-child(4) { background: var(--lime); }
.legend { display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.9rem; color: var(--text-2); font-weight: 500; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend span::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--c); }

/* ---------- Bar chart ---------- */
.bars { display: grid; grid-template-columns: repeat(21, 1fr); align-items: end; gap: 6px; height: 180px; }
.bars div { background: var(--surface-3); border-radius: 8px 8px 4px 4px; position: relative; transition: background .15s; }
.bars div.top { background: var(--lime); }
.bars div:hover { background: var(--forest); }
.bars div:hover::after { content: attr(data-t); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); font: 600 0.75rem var(--f-body); background: var(--forest); color: #fff; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.bars-x { display: grid; grid-template-columns: repeat(21, 1fr); gap: 6px; font-size: 0.72rem; color: var(--text-3); text-align: center; margin-top: 10px; }

/* ---------- Feature cards (Wise colour tiles) ---------- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fact { padding: 36px 32px 40px; border-radius: var(--r-xl); min-height: 300px; display: flex; flex-direction: column; }
.fact:nth-child(1) { background: var(--forest); }
.fact:nth-child(2) { background: var(--teal); }
.fact:nth-child(3) { background: var(--yellow); }
.fact .big { font-family: var(--f-display); font-stretch: 62%; font-weight: 900; font-size: 4.2rem; line-height: 1; color: var(--forest); }
.fact h4 { font-size: 1.4rem; margin: 18px 0 10px; color: var(--forest); }
.fact p { font-size: 1rem; color: rgba(14, 15, 12, .8); }
.fact:nth-child(1) .big, .fact:nth-child(1) h4 { color: var(--lime); }
.fact:nth-child(1) p { color: rgba(255, 255, 255, .85); }

/* Risks */
.risks { counter-reset: r; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.risk { padding: 32px; background: #fff; border-radius: var(--r-lg); }
.section:nth-of-type(even) .risk { background: var(--surface-2); }
.risk::before { counter-increment: r; content: counter(r); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--orange); color: var(--forest); font-weight: 800; margin-bottom: 18px; }
.risk h4 { font-size: 1.2rem; margin-bottom: 8px; }
.risk p { font-size: 0.96rem; color: var(--text-2); }

/* FAQ */
.faq { max-width: 900px; display: grid; gap: 12px; }
.faq details { background: #fff; border-radius: var(--r-lg); padding: 0 28px; transition: background .15s; }
.section:nth-of-type(even) .faq details { background: var(--surface-2); }
.faq summary { list-style: none; cursor: pointer; padding: 24px 0; display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 1.1rem; font-weight: 600; color: var(--forest); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: 0 0 36px; height: 36px; border-radius: 50%; background: rgba(22, 51, 0, .08); display: grid; place-items: center; font-size: 1.3rem; font-weight: 500; transition: transform .2s, background .2s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--lime); }
.faq details p { color: var(--text-2); padding: 0 0 26px; max-width: 760px; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 0.88rem; font-weight: 600; color: var(--text-2); display: flex; justify-content: space-between; }
input, select {
  width: 100%; height: 56px; padding: 0 18px; border-radius: var(--r);
  font: 500 1.05rem var(--f-body); background: #fff; color: var(--text);
  border: 1px solid var(--line-2); outline: none; transition: border-color .15s, box-shadow .15s;
}
input[type=number] { font-weight: 700; font-size: 1.4rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
input:hover, select:hover { border-color: var(--text-3); }
input:focus, select:focus { border-color: var(--forest); box-shadow: 0 0 0 3px var(--lime-pale); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--forest) 50%), linear-gradient(135deg, var(--forest) 50%, transparent 50%); background-position: calc(100% - 22px) 25px, calc(100% - 16px) 25px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.input-x { display: flex; gap: 8px; }
.input-x input { flex: 1; }
.input-x .btn { height: 56px; }
.plan-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.plan-pick button { height: 64px; border: 0; background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-2); border-radius: var(--r); cursor: pointer; font: 500 0.78rem/1.2 var(--f-body); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transition: .15s; }
.plan-pick button b { font-size: 1rem; color: var(--forest); font-weight: 700; }
.plan-pick button:hover { box-shadow: inset 0 0 0 1px var(--forest); }
.plan-pick button.on { background: var(--lime); box-shadow: inset 0 0 0 2px var(--forest); color: var(--forest); }
.preview { background: var(--surface-2); border-radius: var(--r); padding: 16px 18px; font-size: 0.92rem; color: var(--text-2); display: grid; gap: 8px; }
.preview div { display: flex; justify-content: space-between; gap: 12px; }
.preview b { font-weight: 700; color: var(--forest); font-variant-numeric: tabular-nums; }

/* Ledger */
.ledger { display: flex; flex-direction: column; margin-bottom: 18px; }
.ledger > div { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 0.96rem; }
.ledger span { color: var(--text-2); }
.ledger b { font-weight: 700; color: var(--forest); font-variant-numeric: tabular-nums; }
.ledger .tot { border-bottom: none; padding-top: 18px; }
.ledger .tot span { color: var(--forest); font-weight: 600; }
.ledger .tot b { font-size: 1.4rem; letter-spacing: -0.03em; }

/* Calculator — Wise "send money" card */
.calc { display: grid; grid-template-columns: 5fr 7fr; gap: 20px; }
.calc-in { padding: 32px; background: #fff; border-radius: var(--r-xl); box-shadow: 0 0 0 1px var(--line), 0 16px 40px rgba(22, 51, 0, .08); }
.calc-out { padding: 32px; background: var(--surface-2); border-radius: var(--r-xl); }
.calc-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.calc-kpis > div { background: #fff; padding: 18px; border-radius: var(--r); }
.calc-kpis .k { font-size: 0.82rem; color: var(--text-2); }
.calc-kpis .v { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; margin-top: 4px; color: var(--forest); font-variant-numeric: tabular-nums; }
.sched { font-size: 0.94rem; }
.sched > div { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); align-items: center; }
.sched > div:last-child { border-bottom: none; }
.sched .d { color: var(--text-3); font-size: 0.84rem; font-weight: 500; }
.sched .a { font-weight: 700; color: var(--forest); font-variant-numeric: tabular-nums; }

/* Plan cards */
.plan-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan-card { background: var(--surface-2); padding: 32px; border-radius: var(--r-xl); display: flex; flex-direction: column; transition: transform .2s; }
.plan-card:hover { transform: translateY(-3px); }
.plan-card .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.plan-card h3 { font-size: 1.3rem; }
.plan-card .rate { font-family: var(--f-display); font-stretch: 62%; font-weight: 900; font-size: 3.6rem; line-height: 1; color: var(--forest); margin: 12px 0 4px; }
.plan-card .rate small { font-family: var(--f-body); font-stretch: 100%; font-size: 0.95rem; font-weight: 500; color: var(--text-2); margin-left: 6px; }
.plan-card ul { list-style: none; margin: 20px 0 26px; flex: 1; }
.plan-card li { font-size: 0.95rem; color: var(--text-2); padding: 9px 0 9px 30px; position: relative; }
.plan-card li::before { content: '✓'; position: absolute; left: 0; top: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--lime); color: var(--forest); font-size: 0.7rem; font-weight: 800; display: grid; place-items: center; }
.plan-group { grid-column: 1 / -1; padding: 24px 4px 0; font-family: var(--f-display); font-stretch: 62%; font-weight: 900; font-size: 1.8rem; text-transform: uppercase; color: var(--forest); }

/* User strip */
.who { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 24px 28px; border-radius: var(--r-xl); background: var(--forest); color: #fff; margin-bottom: 20px; }
.who h3, .who b { color: #fff; }
.who .muted, .who .dim { color: rgba(255, 255, 255, .7); }
.who-id { display: flex; align-items: center; gap: 16px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; font-weight: 800; font-size: 0.95rem; color: var(--forest); }
.who-meta { display: flex; gap: 32px; flex-wrap: wrap; }
.who-meta .k { font-size: 0.82rem; color: rgba(255, 255, 255, .7); }
.who-meta .v { font-weight: 700; font-size: 1.05rem; color: #fff; font-variant-numeric: tabular-nums; }
.who .btn-line { background: rgba(255, 255, 255, .12); color: #fff; }
.who .btn-signal { background: var(--lime); color: var(--forest); }

/* Gate / empty */
.gate { max-width: 560px; margin: 40px auto; text-align: center; padding: 56px 40px; border-radius: var(--r-xl); background: var(--surface-2); }
.gate h3 { font-size: 1.8rem; margin: 20px 0 10px; }
.gate p { color: var(--text-2); margin-bottom: 28px; font-size: 1.05rem; }
.gate .form { text-align: left; margin-top: 8px; }
.gate-icon { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--lime); display: grid; place-items: center; color: var(--forest); font-weight: 800; font-size: 1.3rem; }
.spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--forest); animation: spin .8s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Rank progress */
.prog { display: grid; grid-template-columns: 200px 1fr 130px; gap: 16px; align-items: center; padding: 12px 0; font-size: 0.94rem; border-bottom: 1px solid var(--line); }
.prog:last-child { border-bottom: none; }
.prog .progress { margin-top: 0; }
.prog .num { text-align: right; color: var(--text-2); font-size: 0.88rem; }

.reflink { display: flex; gap: 8px; }
.reflink input { font-size: 0.95rem; font-weight: 600; color: var(--forest); }

/* Token page */
.supply { display: flex; height: 20px; border-radius: 999px; overflow: hidden; gap: 3px; margin: 20px 0 16px; }
.supply i { display: block; }

/* ---------- Footer ---------- */
.foot { background: var(--forest); color: #fff; padding: 80px 0 40px; }
.foot .logo { color: var(--lime); }
.foot .logo-mark rect { fill: var(--lime); stroke: var(--lime); }
.foot .logo-mark path { stroke: var(--forest); }
.foot .muted { color: rgba(255, 255, 255, .7); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 56px; }
.foot h5 { font-size: 1rem; font-weight: 700; color: var(--lime); margin-bottom: 16px; }
.foot ul { list-style: none; display: grid; gap: 10px; font-size: 0.96rem; color: rgba(255, 255, 255, .85); }
.foot ul a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot-legal { border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 28px; font-size: 0.84rem; color: rgba(255, 255, 255, .6); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-legal p { max-width: 760px; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(14, 15, 12, .55); z-index: 100; display: grid; place-items: center; padding: 20px; animation: in .2s; }
.modal { width: 100%; max-width: 480px; background: #fff; border-radius: var(--r-xl); padding: 36px; position: relative; box-shadow: 0 24px 64px rgba(0, 0, 0, .2); }
.modal h3 { margin-bottom: 16px; font-size: 1.5rem; }
.modal-x { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); border: 0; color: var(--forest); cursor: pointer; font-size: 1.3rem; }
.modal-x:hover { background: var(--surface-3); }
.modal .addr { font-family: var(--f-mono); font-size: 0.86rem; padding: 14px; background: var(--surface-2); border-radius: var(--r); word-break: break-all; margin-bottom: 18px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; width: 380px; max-width: calc(100vw - 48px); }
.toast { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; background: var(--forest); color: #fff; border-radius: 16px; padding: 16px 18px; font-size: 0.94rem; box-shadow: 0 16px 40px rgba(0, 0, 0, .2); animation: in .2s; }
.toast::before { content: ''; flex: 0 0 10px; height: 10px; border-radius: 50%; background: var(--teal); margin-top: 6px; }
.toast-success::before { background: var(--lime); }
.toast-error::before { background: var(--orange); }
.toast span { flex: 1; }
.toast a { color: var(--lime); margin-left: 6px; text-decoration: underline; }
.toast button { background: none; border: none; color: rgba(255, 255, 255, .6); cursor: pointer; font-size: 1.1rem; }

/* ---------- Wallet picker ---------- */
.modal.wide { max-width: 760px; padding: 0; overflow: hidden; }
.wallet-picker { display: grid; grid-template-columns: 1.15fr 1fr; }
.wp-col { padding: 32px; max-height: 80vh; overflow-y: auto; }
.wp-side { padding: 32px; background: var(--surface-2); }
.wp-side p { margin-bottom: 18px; }
.wp-label { font-size: 0.82rem; font-weight: 700; color: var(--text-2); margin: 20px 0 10px; }
.wp-col h3 + .wp-label, .wp-side > .wp-label:first-child { margin-top: 4px; }
.wallet-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; margin-bottom: 6px; border-radius: 16px; background: transparent; border: 0; color: var(--text); font: 600 1rem var(--f-body); cursor: pointer; text-align: left; transition: background .15s; }
.wallet-item:hover:not(:disabled):not(.static) { background: var(--surface-2); }
.wallet-item:disabled { opacity: .6; cursor: wait; }
.wallet-item.static { cursor: default; }
.wallet-item .wn { flex: 1; min-width: 0; }
.wallet-item .wn .sub { display: block; font-size: 0.8rem; color: var(--text-3); font-weight: 400; margin-top: 2px; }
.wi { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); }
.wi img { width: 100%; height: 100%; object-fit: cover; }
.wi-letter { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font-weight: 700; }
.spinner.sm { width: 18px; height: 18px; margin: 0; border-width: 2px; }

/* ---------- Whitepaper ---------- */
.wp { display: grid; grid-template-columns: 240px 1fr; gap: 64px; align-items: start; }
.wp-toc { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 130px); overflow-y: auto; padding-right: 8px; }
.wp-toc .wp-label { margin-top: 0; }
.wp-toc a { font-size: 0.92rem; font-weight: 500; color: var(--text-2); padding: 8px 14px; border-radius: 999px; transition: background .15s, color .15s; }
.wp-toc a:hover { background: var(--surface-2); color: var(--forest); }
.wp-toc a.on { background: var(--lime); color: var(--forest); font-weight: 700; }
.wp-body { min-width: 0; max-width: 820px; }
.wp-body > section { padding: 8px 0 48px; margin-bottom: 40px; border-bottom: 1px solid var(--line); scroll-margin-top: 100px; }
.wp-body > section:last-child { border-bottom: none; }
.wp-body h2 { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 20px; display: flex; align-items: center; gap: 14px; }
.wp-body h2 span { flex: 0 0 40px; height: 40px; border-radius: 50%; background: var(--lime); color: var(--forest); display: grid; place-items: center; font-size: 1rem; font-weight: 800; letter-spacing: 0; }
.wp-body h3 { font-size: 1.2rem; margin: 32px 0 12px; }
.wp-body h4 { font-size: 1.05rem; margin-bottom: 6px; }
.wp-body p { color: var(--text-2); margin-bottom: 16px; font-size: 1.02rem; line-height: 1.65; }
.wp-body p b, .wp-body li b { color: var(--forest); font-weight: 700; }
.wp-body ul, .wp-body ol { color: var(--text-2); padding-left: 22px; margin-bottom: 18px; display: grid; gap: 10px; line-height: 1.6; }
.wp-body ol.steps { counter-reset: s; list-style: none; padding-left: 0; }
.wp-body ol.steps > li { counter-increment: s; position: relative; padding-left: 46px; }
.wp-body ol.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--forest); color: var(--lime); display: grid; place-items: center; font-size: 0.82rem; font-weight: 800; }
.wp-body .tbl-wrap { margin: 16px 0 20px; }
.wp-body table { min-width: 560px; }
.wp-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 10px; }
.wp-card { border-radius: var(--r-lg); background: var(--surface-2); padding: 24px; }
.wp-card:nth-child(1) { background: var(--lime-pale); }
.wp-card:nth-child(2) { background: #dcf3f3; }
.wp-card:nth-child(3) { background: #fff8cc; }
.wp-card p { font-size: 0.92rem; margin: 0; }
.formula { font-family: var(--f-mono); font-size: 0.92rem; background: var(--forest); color: var(--lime); border-radius: var(--r); padding: 16px 20px; margin: 12px 0 16px; overflow-x: auto; white-space: nowrap; }
.wp-split { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0; font-size: 0.9rem; }
.wp-split span { display: inline-flex; align-items: center; gap: 8px; }
.wp-split span::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.wp-example { border-radius: var(--r-lg); padding: 24px 26px 10px; margin: 20px 0; background: var(--surface-2); }
.wp-example .wp-label { margin-top: 0; }
.wp-gloss { display: grid; grid-template-columns: 180px 1fr; gap: 12px 24px; font-size: 0.98rem; }
.wp-gloss dt { font-weight: 700; color: var(--forest); }
.wp-gloss dd { color: var(--text-2); }

@media print {
  .nav, .foot, .demo-bar, .wp-toc, .page-head .btn, .toasts { display: none !important; }
  .wp { display: block; }
  .formula { background: #fff; color: #111; border: 1px solid #ccc; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cols-5-7, .calc, .wp { grid-template-columns: 1fr; }
  .wp-toc { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; gap: 6px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
  .wp-toc .wp-label { width: 100%; }
  .wp-toc a { background: var(--surface-2); padding: 6px 12px; font-size: 0.84rem; }
  .ticker { grid-template-columns: repeat(3, 1fr); }
  .ticker > div:nth-child(3) { border-right: none; }
  .ticker > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .cols-4, .kpis { grid-template-columns: repeat(2, 1fr); }
  .plan-cards, .cols-3, .risks { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { padding: 14px 0; min-width: 0; }
  .flow-arrow::before { content: '↓'; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .plan-pick { grid-template-columns: repeat(4, 1fr); }
  .nav-links a { padding: 6px 8px; font-size: 0.88rem; }
  .nav-inner { gap: 16px; }
  .wallet-btn { padding: 0 16px; font-size: 0.92rem; }
}

@media (max-width: 960px) {
  /* Collapse to burger menu earlier to prevent overflow */
  .burger { display: block; }
  .nav-inner { justify-content: space-between; height: 68px; gap: 12px; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--lime); padding: 8px 20px 20px; gap: 2px; box-shadow: 0 8px 16px rgba(22, 51, 0, .12); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 16px; font-size: 1.05rem; justify-content: flex-start; }
  .nav-contract { font-size: 1.05rem !important; }
  .nav-divider { width: 100%; height: 1px; margin: 8px 0; }
  .nav-social { width: 100%; justify-content: flex-start !important; padding: 14px 16px !important; gap: 14px; }
  .nav-social svg { width: 20px; height: 20px; }
  .nav-social::after { content: attr(title); font-size: 1.05rem; font-weight: 600; }
  .net { display: none; }
}

@media (max-width: 860px) {
  .spec { grid-template-columns: 1fr; padding: 8px 24px 0; }
  .spec-foot { margin: 8px -24px 0; padding: 16px 24px; }
  .cols-2, .facts, .risks, .wp-grid3 { grid-template-columns: 1fr; }
  .fact { min-height: 0; }
  .wallet-picker { grid-template-columns: 1fr; }
  .wp-gloss { grid-template-columns: 1fr; gap: 2px; }
  .wp-gloss dd { margin-bottom: 12px; }
  .prog { grid-template-columns: 1fr; gap: 6px; }
  .prog .num { text-align: left; }
  .section { padding: 72px 0; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .hero { padding-top: 36px; background: linear-gradient(var(--lime) calc(100% - 160px), var(--bg) 0); }
  .hero .lede { font-size: 1.05rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .ticker { grid-template-columns: 1fr 1fr; }
  .ticker > div { border-right: none; border-top: 1px solid var(--line); padding: 18px; }
  .ticker > div:nth-child(odd) { border-right: 1px solid var(--line); }
  .ticker > div:nth-child(-n+2) { border-top: none; }
  .ticker > div:last-child { grid-column: 1 / -1; border-right: none; }
  .ticker .v { font-size: 1.25rem; }
  .cols-4, .kpis, .plan-cards, .cols-3, .calc-kpis { grid-template-columns: 1fr; }
  .panel, .calc-in, .calc-out, .plan-card, .fact, .risk { padding: 24px; }
  .bars { height: 130px; gap: 3px; }
  .bars-x { gap: 3px; font-size: 0.6rem; }
  .foot-grid { grid-template-columns: 1fr; }
  .wallet-btn { padding: 0 14px; }
  .modal { padding: 28px 22px; }
  
  /* Mobile table optimization */
  .tbl-wrap {
    margin: 0 -18px;
    border-radius: 0;
    box-shadow: none;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  table {
    min-width: 640px;
    font-size: 0.85rem;
  }
  th {
    padding: 12px 10px;
    font-size: 0.75rem;
  }
  td {
    padding: 12px 10px;
    font-size: 0.85rem;
  }
  table { min-width: max-content; }
  th, td { white-space: nowrap; }
  td:last-child:has(> div) { min-width: 120px; }
  td:first-child { font-weight: 600; }
  tr:hover td:first-child {
    background: var(--surface-2);
  }
  td .sub {
    font-size: 0.72rem;
  }
  .plan-name {
    font-size: 0.85rem;
  }
  
}

/* Extra small screens - more aggressive table optimization */
@media (max-width: 400px) {
  table { font-size: 0.78rem; }
  th, td { padding: 10px 8px; }
  th { font-size: 0.7rem; }
  .plan-name { font-size: 0.78rem; }
}

/* ---------- Wordmark ---------- */
.logo-text { font-family: var(--f-display); font-stretch: 62%; font-weight: 900; font-size: 1.7rem; letter-spacing: 0.01em; line-height: 1; text-transform: uppercase; }
.foot .logo-text { font-size: 2.4rem; }
.hero-meta .link { color: var(--forest); }

/* ---------- Hero scene: USDT → contract → PancakeSwap ---------- */
.hero-scene { display: flex; align-items: center; justify-content: center; margin-top: 48px; flex-wrap: wrap; gap: 0; }
.scene-node { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 999px; padding: 10px 24px 10px 10px; text-align: left; box-shadow: 0 10px 30px rgba(22, 51, 0, .12); }
.scene-node img, .scene-node svg { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 44px; }
.scene-node b { display: block; font-size: 1rem; color: var(--forest); line-height: 1.2; }
.scene-node span { display: block; font-size: 0.82rem; color: var(--text-2); }
.scene-node.core { background: var(--forest); transform: scale(1.06); }
.scene-node.core b { color: var(--lime); }
.scene-node.core span { color: rgba(255, 255, 255, .75); }
.scene-link { width: 56px; height: 3px; background: repeating-linear-gradient(90deg, var(--forest) 0 6px, transparent 6px 11px); background-size: 22px 3px; animation: flow 1s linear infinite; opacity: .55; }
@keyframes flow { to { background-position: 22px 0; } }

/* flow step numbers */
.flow-node .eyebrow.plain b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--lime); color: var(--forest); font-size: 1rem; }
.flow-node.core .eyebrow.plain b { background: var(--lime); color: var(--forest); }

.risks { grid-template-columns: repeat(2, 1fr); }

/* ---------- Closing CTA ---------- */
.cta-band { background: var(--lime); padding: 112px 0; text-align: center; }
.cta-band h2 { font-family: var(--f-display); font-stretch: 62%; font-weight: 900; text-transform: uppercase; font-size: clamp(3rem, 8vw, 6.5rem); line-height: .86; }
.cta-band p { font-size: 1.2rem; font-weight: 500; color: var(--forest); max-width: 560px; margin: 24px auto 32px; }
.cta-band .row { justify-content: center; }
.cta-primary { background: var(--forest); color: var(--lime); }
.cta-primary:hover { background: #0d1f00; }
.cta-secondary { background: rgba(22, 51, 0, .1); }
.cta-secondary:hover { background: rgba(22, 51, 0, .16); }

@media (max-width: 860px) {
  .hero-scene { flex-direction: column; }
  .scene-link { width: 3px; height: 28px; background: repeating-linear-gradient(180deg, var(--forest) 0 6px, transparent 6px 11px); animation: none; }
  .scene-node.core { transform: none; }
  .risks { grid-template-columns: 1fr; }
  .logo-text { font-size: 1.45rem; }
}
