/* Nearchant UI — tokens and components from the Figma file "Nearchant" (Color variables + text styles).
   One responsive codebase: desktop (sidebar) and mobile web (top bar + bottom nav) — ADR 0018. */
:root {
  --accent: #007aff; --accent-soft: #e6f1ff; --on-accent: #fff;
  --label: #1d1d1f; --label-2: #6e6e73; --label-3: #8e8e93;
  --bg: #fff; --bg-2: #f5f5f7; --grouped: #f2f2f7; --track: #e5e5ea; --sep: #d2d2d7;
  --ok: #34c759; --ok-text: #248a3d; --err: #ff3b30; --pink: #ff2d55; --orange: #ff9500; --purple: #af52de;
  --near: #00ec97; --near-ink: #121916; --proof: #007a4f; --proof-soft: #e3faf0;
  --r-card: 16px; --r-lg: 20px; --r-btn: 999px; --r-input: 12px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 8px 24px rgba(0,0,0,.12);
  color-scheme: light;   /* Figma is light-only: dark-mode browsers get the same design */
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--label); font-family: var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }

/* Type styles (Figma: Title/1, Title/Large, Title/2, Title/4, Headline, Body, Subheadline, Footnote, Caption, Metric) */
.t1 { font-size: 48px; font-weight: 700; letter-spacing: -1.2px; line-height: 1.12; margin: 0; }
.tl { font-size: 34px; font-weight: 700; letter-spacing: -.6px; line-height: 1.12; margin: 0; }
.t2 { font-size: 28px; font-weight: 700; letter-spacing: -.4px; line-height: 1.15; margin: 0; }
.t4 { font-size: 22px; font-weight: 600; letter-spacing: -.3px; line-height: 1.25; margin: 0; }
.metric { font-size: 30px; font-weight: 700; letter-spacing: -.6px; line-height: 1.1; }
.headline { font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.body { font-size: 17px; letter-spacing: -.2px; line-height: 1.35; }
.sub { font-size: 15px; letter-spacing: -.1px; line-height: 1.35; }
.foot { font-size: 13px; line-height: 1.35; }
.cap { font-size: 12px; line-height: 1.3; }
.b { font-weight: 600; }
.muted { color: var(--label-2); } .faint { color: var(--label-3); } .okt { color: var(--ok-text); } .proof-t { color: var(--proof); }
@media (max-width: 899px) { .t1 { font-size: 34px; letter-spacing: -.6px; } }

/* Layout shell */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--bg-2); padding: 22px 16px 20px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 10px; padding: 0 0 18px 6px; font-weight: 600; font-size: 17px; color: var(--label); }
.mark { width: 28px; height: 28px; border-radius: 8px; background: var(--near-ink); color: var(--near); display: grid; place-items: center; font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--label); font-size: 15px; }
.nav a svg { color: var(--label-2); }
.nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; } .nav a.on svg { color: var(--accent); }
.side .grow { flex: 1; }
.wallet-mini { background: var(--bg); border-radius: 14px; padding: 14px; display: grid; gap: 6px; }
.main { padding: 36px 48px 48px; display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.head .kicker { font-size: 13px; color: var(--label-2); margin-bottom: 4px; }
.row { display: flex; gap: 16px; align-items: flex-start; }
.row > .grow { flex: 1; min-width: 0; }
.cols { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.post-cols { grid-template-columns: minmax(0, 420px) 1fr; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack.s8 { gap: 8px; } .stack.s12 { gap: 12px; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topbar, .bottomnav { display: none; }
@media (max-width: 899px) {
  .app { display: block; }
  .side { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); z-index: 5; }
  .main { padding: 8px 20px 120px; gap: 16px; }
  .cols, .grid4 { grid-template-columns: 1fr 1fr; }
  .cols { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr; }
  .bottomnav { display: flex; justify-content: space-around; align-items: center; position: fixed; left: 0; right: 0; bottom: 0; padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: .5px solid var(--sep); z-index: 5; }
  .bottomnav a { display: grid; justify-items: center; gap: 3px; font-size: 12px; color: var(--label-2); min-width: 60px; }
  .bottomnav a.on { color: var(--accent); font-weight: 600; }
  .bottomnav .fab { width: 48px; height: 48px; border-radius: 999px; background: var(--accent); color: #fff; display: grid; place-items: center; }
}

/* Components */
.card { background: var(--bg-2); border-radius: var(--r-card); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card.white { background: var(--bg); border: 1px solid var(--sep); }
.card.soft { background: var(--accent-soft); }
.card.proof { background: var(--proof-soft); }
.card.dark { background: var(--near-ink); color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 20px; border-radius: var(--r-btn); border: 0; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 16px; cursor: pointer; white-space: nowrap; }
.btn.secondary { background: var(--bg); color: var(--label); border: 1px solid var(--sep); }
.btn.soft { background: var(--accent-soft); color: var(--accent); }
.btn.near { background: var(--near-ink); color: #fff; } .btn.near svg { color: var(--near); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
@media (max-width: 899px) { .btn { border-radius: 14px; padding: 14px 18px; } }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--sep); background: var(--bg); font-size: 13px; font-weight: 600; color: var(--label); cursor: pointer; }
.chip.on { background: var(--label); color: var(--bg); border-color: var(--label); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--proof-soft); color: var(--proof); font-size: 12px; font-weight: 600; width: fit-content; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: var(--bg); font-size: 12px; font-weight: 600; }
.stat { background: var(--bg-2); border-radius: var(--r-card); padding: 18px 20px; display: grid; gap: 6px; }
.stat .delta { display: flex; gap: 4px; align-items: center; font-size: 13px; font-weight: 600; color: var(--ok-text); }
.spark { display: flex; gap: 4px; align-items: flex-end; height: 40px; padding-top: 6px; }
.spark i { flex: 1; max-width: 14px; border-radius: 3px; background: var(--accent); opacity: .28; }
.spark i:last-child { opacity: 1; }
.post { display: grid; gap: 8px; min-width: 0; align-content: start; }
/* Safari sized a stretched aspect-ratio box from its height (cards overlapped): the picture takes the column width. */
.post > .img { width: 100%; height: auto; display: block; }
.post > .badge { justify-self: start; }
.card > .stack, .card .stack { min-width: 0; }
.post .img { aspect-ratio: 1; border-radius: var(--r-card); background: var(--grouped) center/cover no-repeat; }
.input { width: 100%; padding: 13px 14px; border-radius: var(--r-input); border: 1px solid var(--sep); background: var(--bg); font-size: 16px; }
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
textarea.input { min-height: 88px; resize: vertical; }
label.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.option { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 16px; border: 1px solid var(--sep); background: var(--bg); cursor: pointer; }
.option.on { background: var(--accent-soft); border: 1.5px solid var(--accent); }
.option .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-2); display: grid; place-items: center; flex: none; }
.dot { width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center; flex: none; color: #fff; }
.dot.ok { background: var(--ok); } .dot.now { background: var(--accent); } .dot.todo { background: var(--track); color: var(--label-2); }
.progress { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; } .progress > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.steps-dots { display: flex; gap: 4px; } .steps-dots i { width: 8px; height: 6px; border-radius: 3px; background: var(--track); } .steps-dots i.on { background: var(--accent); } .steps-dots i.cur { width: 22px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, 72px); gap: 10px; } .thumbs .th { width: 72px; height: 72px; border-radius: 12px; background: var(--grouped) center/cover; position: relative; }
.dropzone { border: 1.5px dashed color-mix(in srgb, var(--accent) 50%, transparent); background: var(--accent-soft); border-radius: var(--r-lg); padding: 32px 24px; display: grid; justify-items: center; gap: 10px; text-align: center; cursor: pointer; }
.dropzone.banner { grid-template-columns: auto 1fr auto; text-align: left; align-items: center; color: inherit; }
@media (max-width: 899px) { .dropzone.banner { grid-template-columns: 1fr; justify-items: start; } }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--label); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 20; }
.hidden { display: none !important; }
.onb { max-width: 480px; margin: 0 auto; padding: 16px 20px 140px; display: flex; flex-direction: column; gap: 16px; }
.onb-bottom { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 20px calc(20px + env(safe-area-inset-bottom)); background: var(--bg); display: grid; gap: 10px; justify-items: center; }
.onb-bottom .btn { width: 100%; max-width: 440px; }
.confetti { height: 80px; position: relative; } .confetti i { position: absolute; width: 8px; height: 14px; border-radius: 2px; }

/* Landing (Figma "Landing", 21:674): 1440 desktop with 120 px gutters, one column on phones. */
.land { min-height: 100vh; }
.land-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px clamp(16px, 8.3vw, 120px); border-bottom: 1px solid var(--sep); }
.land-logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; color: var(--label); }
.land-links { display: flex; gap: 32px; } .land-links a { color: var(--label); }
.land-hero { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 88px clamp(16px, 8.3vw, 120px) 72px; text-align: center; }
.land-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }
.land-h1 { font-size: 72px; font-weight: 700; letter-spacing: -2.4px; line-height: 1.12; margin: 0; }
.land-lead { font-size: 20px; letter-spacing: -.2px; line-height: 1.3; color: var(--label-2); max-width: 860px; margin: 0; }
.land-peek { display: flex; gap: 20px; padding: 24px; border-radius: 28px; background: var(--bg-2); text-align: left; flex-wrap: wrap; justify-content: center; }
.land-post { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 18px; background: var(--bg); color: var(--label); width: 244px; align-items: flex-start; }
.land-img { width: 220px; height: 220px; border-radius: 12px; background-size: cover; background-position: center; }
.land-stats { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 18px; background: var(--bg); width: 240px; }
.land-insight { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; background: var(--bg-2); }
.land-sec { display: flex; flex-direction: column; align-items: center; gap: 32px; padding: 72px clamp(16px, 8.3vw, 120px); text-align: center; }
.land-pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; width: 100%; text-align: left; }
.land-pillar { display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: 22px; background: var(--bg-2); }
.land-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--bg); display: grid; place-items: center; color: var(--accent); }
.land-trust { display: flex; gap: 40px; align-items: center; padding: 48px clamp(16px, 8.3vw, 120px); background: var(--near-ink); color: #fff; }
.land-plans { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; text-align: left; }
.land-plan { display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: 22px; background: var(--bg-2); width: 340px; max-width: 100%; }
.land-plan.dark { background: #1d1d1f; color: #fff; }
.land-item { display: flex; gap: 8px; align-items: center; font-size: 15px; letter-spacing: -.1px; }
.land-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px clamp(16px, 8.3vw, 120px); background: var(--bg-2); }
@media (max-width: 899px) {
  .land-links { display: none; }
  .land-nav { padding: 12px 16px; } .land-nav .sub, .land-nav .btn { white-space: nowrap; } .land-nav .btn { padding: 9px 14px; }
  .land-hero { padding-top: 48px; }
  .land-h1 { font-size: 40px; letter-spacing: -1px; }
  .land-lead { font-size: 17px; }
  .land-peek { padding: 16px; } .land-post, .land-stats { width: 100%; } .land-img { width: 100%; height: auto; aspect-ratio: 1; }
  .land-pillars { grid-template-columns: 1fr; }
  .land-trust { flex-direction: column; align-items: flex-start; }
}

/* Onboarding on desktop (Figma "Web · Onboarding 1–3"): a white card on the grey page; buttons sit in the card. */
@media (min-width: 900px) {
  html:has(.onb), body:has(.onb) { background: var(--bg-2); min-height: 100%; }
  .onb { max-width: 560px; margin: 40px auto; padding: 32px; background: var(--bg); border-radius: var(--r-lg); padding-bottom: 32px; }
  .onb-bottom { position: static; padding: 8px 0 0; background: none; }
  .onb-bottom .btn { max-width: none; }
}

/* Icons keep their size inside flex rows (they were squeezed in cards with long text). */
svg { flex-shrink: 0; }

/* Home header: the store's NEAR account and balance (Figma Web · Home). */
.acct-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--sep); color: var(--label); background: var(--bg); }
.acct-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
@media (max-width: 899px) { .acct-pill { display: none; } }

/* The sidebar column stays grey below the sticky sidebar (long pages, full-page captures). */
@media (min-width: 900px) { .app { background: linear-gradient(to right, var(--bg-2) 248px, var(--bg) 248px); } }

/* Create flow steps (Figma Web · Create 1–3). */
.csteps { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.csteps-s { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; font-size: 13px; color: var(--label-2); }
.csteps-s i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 600; font-size: 12px; background: var(--track); color: var(--label-2); }
.csteps-s.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; } .csteps-s.on i { background: var(--accent); color: #fff; }
.csteps-s.done i { background: var(--ok); color: #fff; }
.csteps-line { width: 28px; height: 2px; background: var(--track); border-radius: 1px; }
@media (max-width: 899px) { .csteps-line { display: none; } }

/* Phone: the + in the bottom bar is the create button. */
@media (max-width: 899px) { .hide-m { display: none !important; } }

/* Figma onboarding sizes: two-line clamps, the opportunity check circle. */
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.clamp1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.chk { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--sep); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; }
.chk.on { background: var(--accent); border-color: var(--accent); }
