/* Zoya
   Layout and colour taken from the Layer3 app: a dark shell, a light
   translucent card wrapper with a darker panel inside it, and one blue accent
   doing all the work. */

:root {
  --bg: #101114;
  --surface: rgba(255, 255, 255, .05);
  --surface-hi: rgba(255, 255, 255, .08);
  --panel: rgba(16, 17, 20, .8);
  --line: rgba(255, 255, 255, .07);

  --text: #ffffff;
  --muted: #848486;
  --muted-2: rgba(255, 255, 255, .62);

  --blue: #1d77ff;
  --blue-hi: #4691ff;
  --green: #22c55e;
  --red: #f0546a;
  --gold: #f5c451;

  --r-card: 16px;
  --r-panel: 12px;
  --r-pill: 13px;

  --header: 80px;
  --sidebar: 280px;
  --rail: 300px;
  --gutter: 28px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(29, 119, 255, .35); }

/* the blue wash behind the top right of the page */
.glow {
  position: fixed; top: -340px; right: -160px; width: 900px; height: 700px; z-index: 0;
  background: radial-gradient(closest-side, rgba(29, 119, 255, .28), rgba(29, 119, 255, 0) 72%);
  pointer-events: none;
  animation: glowDrift 18s ease-in-out infinite alternate;
}
@keyframes glowDrift {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: .9; }
  to { transform: translate3d(-70px, 50px, 0) scale(1.12); opacity: 1; }
}

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

.topbar {
  position: sticky; top: 0; z-index: 60;
  height: var(--header);
  display: flex; align-items: center; gap: 20px;
  padding: 0 var(--gutter);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; width: calc(var(--sidebar) - var(--gutter)); flex: 0 0 auto; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; display: block;
  object-fit: cover; flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
}
.brand-word { font-size: 17px; font-weight: 800; letter-spacing: .16em; }

.search {
  position: relative; display: flex; align-items: center; gap: 10px;
  width: min(400px, 34vw); height: 40px; padding: 0 12px;
  background: var(--surface); border-radius: var(--r-panel);
  transition: background-color .2s, box-shadow .2s;
}
.search:focus-within { background: var(--surface-hi); box-shadow: 0 0 0 1px rgba(29, 119, 255, .5); }
.search > svg { width: 17px; height: 17px; color: var(--muted); flex: 0 0 auto; }
.search input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  font-size: 14px; color: var(--text);
}
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.kbd {
  flex: 0 0 auto; font-size: 11px; color: var(--muted);
  padding: 3px 7px; border-radius: 7px; background: rgba(255, 255, 255, .06);
}
.search:focus-within .kbd { display: none; }

.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  background: #16181d; border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 6px; display: none; max-height: 380px; overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.search-results.open { display: block; animation: pop .16s ease both; }
.hit {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  width: 100%; padding: 8px 10px; border-radius: 10px; text-align: left;
  transition: background-color .15s;
}
.hit:hover, .hit.on { background: var(--surface); }
.hit img { width: 30px; height: 30px; border-radius: 50%; }
.hit .nm { font-weight: 600; }
.hit .hd { font-size: 12px; color: var(--muted); }
.hit .val { font-size: 13px; font-weight: 600; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ghost-btn {
  height: 36px; padding: 0 14px; border-radius: var(--r-panel);
  display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--muted-2);
  transition: color .18s, background-color .18s;
}
.ghost-btn:hover { color: var(--text); background: var(--surface); }
.blue-btn {
  height: 36px; padding: 0 16px; border-radius: var(--r-panel);
  background: var(--blue); color: #fff; font-size: 14px; font-weight: 600;
  transition: background-color .18s, transform .18s, box-shadow .18s;
}
.blue-btn:hover { background: var(--blue-hi); box-shadow: 0 8px 24px rgba(29, 119, 255, .35); }
.blue-btn:active { transform: translateY(1px); }
.blue-btn[disabled] { opacity: .55; pointer-events: none; }

/* ------------------------------------------------------------------- shell */

.shell {
  /* deliberately no z-index: a stacking context here would trap the drawer's
     z-index inside it and let the scrim paint over the drawer */
  position: relative;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--rail);
  gap: var(--gutter);
  padding: 0 var(--gutter) 60px;
  align-items: start;
}
@media (max-width: 1280px) { .shell { grid-template-columns: var(--sidebar) minmax(0, 1fr); } .rail { display: none; } }
@media (max-width: 900px) { .shell { grid-template-columns: minmax(0, 1fr); } .sidebar { display: none; } }

.sidebar {
  position: sticky; top: var(--header);
  height: calc(100vh - var(--header) - 20px);
  display: flex; flex-direction: column; gap: 18px;
  padding-bottom: 20px;
}

.claim-card {
  border-radius: var(--r-card); padding: 3px;
  background: linear-gradient(135deg, rgba(34, 197, 94, .5), rgba(34, 197, 94, .12));
}
.claim-inner {
  display: flex; align-items: center; gap: 10px;
  background: #12251a; border-radius: 13px; padding: 12px;
}
.claim-badge {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto;
  background: rgba(34, 197, 94, .18); color: var(--green);
}
.claim-badge svg { width: 18px; height: 18px; }
.claim-k { font-size: 11px; color: rgba(255, 255, 255, .6); }
.claim-v { font-size: 15px; font-weight: 700; }
.claim-btn {
  margin-left: auto; padding: 7px 13px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: rgba(255, 255, 255, .1); transition: background-color .18s;
}
.claim-btn:hover { background: rgba(255, 255, 255, .18); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  height: 40px; padding: 0 12px; border-radius: var(--r-panel);
  font-size: 14px; font-weight: 600; color: var(--muted);
  transition: background-color .18s, color .18s;
}
.nav a svg { width: 19px; height: 19px; flex: 0 0 auto; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.nav a.on { color: var(--text); background: var(--surface); }
.nav .tag {
  margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: .06em;
  padding: 3px 7px; border-radius: 6px; background: rgba(29, 119, 255, .16); color: var(--blue-hi);
}

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.side-cta-title { font-size: 14px; font-weight: 700; }
.side-cta-sub { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.launch {
  display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700;
  transition: color .18s;
}
.launch svg { width: 18px; height: 18px; color: var(--blue); }
.launch:hover { color: var(--blue-hi); }
.side-links { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.side-links a:hover { color: var(--text); }

/* -------------------------------------------------------------------- main */

.main { min-width: 0; padding-top: 4px; }
.rail { position: sticky; top: var(--header); display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }

/* the wrapper/panel pair that the whole design is built from */
.card { background: var(--surface); border-radius: var(--r-card); padding: 8px; }
.card > .panel { background: var(--panel); border-radius: var(--r-panel); padding: 14px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px 10px; font-size: 14px; font-weight: 700;
}
.card-head .more { font-size: 13px; font-weight: 600; color: var(--green); transition: opacity .18s; }
.card-head .more:hover { opacity: .75; }

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative; overflow: hidden;
  border-radius: 20px; padding: 38px;
  min-height: 400px;
  display: flex; flex-direction: column; justify-content: center;
  background:
    radial-gradient(120% 130% at 78% 20%, rgba(29, 119, 255, .30), rgba(29, 119, 255, 0) 60%),
    linear-gradient(180deg, #14161c 0%, #101114 100%);
  box-shadow: inset 0 0 0 1px var(--line);
}
.hero-eyebrow { font-size: 13px; font-weight: 600; color: var(--muted); }
.hero h1 { margin: 6px 0 12px; font-size: 40px; line-height: 1.05; font-weight: 700; letter-spacing: -.02em; max-width: 460px; }
.hero > *:not(.hero-art) { position: relative; z-index: 2; }
.hero p { margin: 0; max-width: 430px; font-size: 14.5px; line-height: 1.6; color: var(--muted-2); }
.hero-mark {
  width: 58px; height: 58px; border-radius: 16px; display: block;
  object-fit: cover; margin-bottom: 22px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 10px 30px rgba(29, 119, 255, .25);
}
.hero-dashes { display: flex; gap: 8px; margin: 26px 0 22px; }
.hero-dashes i {
  width: 58px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .14);
  animation: dashIn .5s cubic-bezier(.22, 1, .36, 1) both;
}
.hero-dashes i.on { background: rgba(255, 255, 255, .62); }
@keyframes dashIn { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }
.hero-foot { display: flex; align-items: center; gap: 28px; }
.stack { display: flex; align-items: center; }
.stack img {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid #14161c; margin-left: -9px;
  transition: transform .2s;
}
.stack img:first-child { margin-left: 0; }
.stack:hover img { transform: translateY(-2px); }
.hero-stat-k { font-size: 12px; color: var(--muted); }
.hero-stat-v { font-size: 15px; font-weight: 700; }
.hero-art {
  position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  width: 360px; height: 360px; pointer-events: none; z-index: 1;
}
@media (max-width: 1100px) { .hero-art { opacity: .25; } .hero h1 { font-size: 32px; } }

/* ------------------------------------------------------------------- pills */

.pills { display: flex; gap: 4px; margin: 26px 0 18px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; color: var(--muted);
  transition: background-color .18s, color .18s;
}
.pill svg { width: 15px; height: 15px; }
.pill:hover { color: var(--text); }
.pill.on { color: var(--text); background: var(--surface); }

/* ------------------------------------------------------------------- rows */

.row { margin-bottom: 34px; }
.row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.row-head h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.row-actions { display: flex; align-items: center; gap: 8px; }
.show-all {
  padding: 8px 14px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600;
  background: var(--surface); transition: background-color .18s;
}
.show-all:hover { background: var(--surface-hi); }
.arrow {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--muted-2); transition: background-color .18s, color .18s, opacity .18s;
}
.arrow svg { width: 15px; height: 15px; }
.arrow:hover { background: var(--surface-hi); color: var(--text); }
.arrow[disabled] { opacity: .3; pointer-events: none; }

.rail-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: 268px; gap: 14px;
  overflow-x: auto; scroll-snap-type: x proximity; scroll-behavior: smooth;
  padding-bottom: 4px; scrollbar-width: none;
}
.rail-scroll::-webkit-scrollbar { display: none; }
.rail-scroll > * { scroll-snap-align: start; }

/* --------------------------------------------------------------- quest card */

.qcard {
  position: relative; display: block; overflow: hidden;
  background: var(--surface); border-radius: var(--r-card); padding: 8px;
  transition: transform .22s cubic-bezier(.22, 1, .36, 1), background-color .22s;
  animation: riseIn .45s cubic-bezier(.22, 1, .36, 1) both;
}
.qcard:hover { transform: translateY(-4px); background: var(--surface-hi); }
.qcard-art {
  position: relative; height: 148px; border-radius: 11px; overflow: hidden;
  display: flex; align-items: flex-end; padding: 12px;
}
.qcard-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16, 17, 20, 0) 35%, rgba(16, 17, 20, .8) 100%);
}
.qcard-spark { position: absolute; inset: auto 0 0 0; height: 74px; width: 100%; }
.qcard-chip {
  position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px; border-radius: 8px; font-size: 12px; font-weight: 600;
  background: rgba(16, 17, 20, .72); backdrop-filter: blur(6px);
}
.qcard-chip img { width: 16px; height: 16px; border-radius: 50%; }
.qcard-body { padding: 12px 8px 6px; }
.qcard-title {
  font-size: 15px; font-weight: 700; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.qcard-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.qcard-meta b { color: var(--text); font-weight: 600; }
.qcard-badges { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 600;
  background: rgba(255, 255, 255, .07); color: var(--muted-2);
}
.badge.blue { background: rgba(29, 119, 255, .16); color: var(--blue-hi); }
.badge.green { background: rgba(34, 197, 94, .16); color: #4ade80; }
.badge.red { background: rgba(240, 84, 106, .16); color: var(--red); }
.badge.gold { background: rgba(245, 196, 81, .16); color: var(--gold); }

/* ------------------------------------------------------------- promo card */

.promo {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: center;
  border-radius: var(--r-card); padding: 26px 28px; overflow: hidden; position: relative;
  background:
    radial-gradient(90% 140% at 88% 30%, rgba(34, 197, 94, .22), rgba(34, 197, 94, 0) 62%),
    var(--surface);
}
.promo h3 { margin: 0 0 16px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.promo-pts { display: flex; flex-direction: column; gap: 12px; }
.promo-pt { display: flex; gap: 11px; }
.promo-pt svg { width: 18px; height: 18px; color: var(--green); flex: 0 0 auto; margin-top: 1px; }
.promo-pt b { display: block; font-size: 14px; font-weight: 600; }
.promo-pt span { font-size: 13px; color: var(--muted); line-height: 1.5; }
.promo-side { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 900px) { .promo { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------------------------- rail cards */

.rail-card { background: var(--surface); border-radius: var(--r-card); padding: 8px; }
.rail-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px 10px; font-size: 14px; font-weight: 700;
}
.rail-head .more { font-size: 13px; font-weight: 600; color: var(--green); }
.rail-panel { background: var(--panel); border-radius: var(--r-panel); padding: 12px; }
.kv-line { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.kv-line .k { color: var(--muted-2); display: inline-flex; align-items: center; gap: 6px; }
.kv-line .v { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.seg-bar { display: flex; gap: 3px; margin-top: 10px; }
.seg-bar i { flex: 1; height: 7px; border-radius: 2px; background: rgba(255, 255, 255, .07); }
.seg-bar i.on { background: var(--blue); box-shadow: 0 0 10px rgba(29, 119, 255, .6); }
.hexes { display: flex; align-items: center; gap: 7px; }
.hex {
  width: 30px; height: 34px; background: rgba(255, 255, 255, .07);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  transition: background-color .3s;
}
.hex.on { background: linear-gradient(160deg, var(--blue), #7db1ff); }
.hex-count { margin-left: auto; font-size: 12px; color: var(--muted); }

.note { display: flex; gap: 12px; align-items: flex-start; padding: 4px 6px; }
.note-ico { font-size: 22px; line-height: 1; }
.note-text { font-size: 13px; color: var(--muted-2); line-height: 1.5; }

.feed { display: flex; flex-direction: column; }
.feed-row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 9px 6px; border-radius: 10px; transition: background-color .18s;
  animation: riseIn .4s cubic-bezier(.22, 1, .36, 1) both;
}
.feed-row:hover { background: rgba(255, 255, 255, .04); }
.feed-av { position: relative; width: 34px; height: 34px; }
.feed-av img { width: 34px; height: 34px; border-radius: 50%; }
.feed-av .dot {
  position: absolute; left: -2px; top: -2px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: 9px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid #16181d;
}
.feed-t { font-size: 13.5px; font-weight: 600; }
.feed-s { font-size: 11.5px; color: var(--muted); }
.feed-v {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 9px;
  background: rgba(255, 255, 255, .07); font-size: 12px; font-weight: 600; white-space: nowrap;
}

/* ------------------------------------------------------------------ shared */

.up { color: #4ade80; }
.down { color: var(--red); }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(-1deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ------------------------------------------------------------ page shapes */

.page-head { padding: 8px 0 22px; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.page-head p { margin: 8px 0 0; max-width: 620px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.card + .card { margin-top: 14px; }
.empty { padding: 26px; text-align: center; color: var(--muted); font-size: 13.5px; }
.prose p { margin: 0 0 14px; font-size: 14px; line-height: 1.75; color: var(--muted-2); }
.prose p:last-child { margin-bottom: 0; }

/* leaderboard */
.board-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 110px 100px 100px 80px;
  align-items: center; gap: 8px; padding: 0 12px; height: 54px; border-radius: 10px;
  transition: background-color .16s;
}
.board-row:not(.board-head):hover { background: rgba(255, 255, 255, .045); }
.board-head { height: 38px; font-size: 12px; color: var(--muted); }
.board-head .sortbtn {
  display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px;
  font-size: 12px; color: var(--muted); transition: color .16s;
}
.board-head .sortbtn:hover { color: var(--text); }
.board-head .sortbtn.on { color: var(--blue-hi); }
.caret { font-size: 8px; opacity: .8; }
.board-row .rk { font-size: 13px; color: var(--muted); font-weight: 600; }
.board-row .rk.top { color: var(--gold); }
.board-row .who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.board-row .who img { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; }
.board-row .nm { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-row .hd { display: block; font-size: 12px; color: var(--muted); }
.board-row .val { text-align: right; font-size: 13.5px; font-weight: 600; }
@media (max-width: 720px) {
  .board-row { grid-template-columns: 32px minmax(0, 1fr) 84px 74px; }
  .board-row > :nth-child(5), .board-row > :nth-child(6) { display: none; }
}

/* account detail */
.detail-hero {
  display: flex; align-items: center; gap: 16px; padding: 6px 2px 22px;
}
.detail-av { width: 68px; height: 68px; border-radius: 50%; }
.detail-name { font-size: 26px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.verified { font-size: 12px; color: var(--blue-hi); }
.detail-handle { font-size: 14px; color: var(--muted); }
.detail-handle:hover { color: var(--blue-hi); }
.detail-rank { margin-left: auto; text-align: right; }
.detail-rank .big { font-size: 30px; font-weight: 800; }
.detail-rank .muted { font-size: 12px; }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 14px;
}
.stat { background: var(--surface); border-radius: var(--r-panel); padding: 14px; }
.stat-k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.stat-v { font-size: 21px; font-weight: 700; margin-top: 4px; }

.big-chart { width: 100%; height: 190px; display: block; }
.chart-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 6px; }

.post-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 10px;
  transition: background-color .16s;
}
.post-row + .post-row { border-top: 1px solid rgba(255, 255, 255, .04); }
.post-row:hover { background: rgba(255, 255, 255, .04); }
.post-row .who { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.post-row .who img { width: 32px; height: 32px; border-radius: 50%; }
.post-row .nm { font-size: 14px; font-weight: 600; }
.post-text {
  font-size: 13.5px; line-height: 1.5; color: var(--muted-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* fields */
.field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.field {
  flex: 1 1 260px; min-width: 0; height: 40px; padding: 0 13px; border-radius: var(--r-panel);
  background: rgba(255, 255, 255, .05); border: 1px solid transparent; color: var(--text);
  font-size: 14px; outline: none; transition: border-color .18s, background-color .18s;
}
.field:focus { border-color: rgba(29, 119, 255, .6); background: rgba(255, 255, 255, .07); }
.field::placeholder { color: var(--muted); }
.field-hint { margin-top: 10px; font-size: 12.5px; color: var(--muted); min-height: 16px; }
.field-hint.good { color: #4ade80; }
.field-hint.bad { color: var(--red); }

.wallet-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wallet-line .nm { font-size: 14px; font-weight: 600; }
.wallet-line .hd { font-size: 12.5px; color: var(--muted); }
.wallet-line .field { margin-left: auto; max-width: 210px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.dot.on { background: var(--green); box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); }

/* ledger page, reusing the card system */
.ledger-summary, .ledger-events, .ledger-detail, .panel.pad { background: var(--surface); border-radius: var(--r-card); padding: 14px; }
.ledger-grid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 14px; }
@media (max-width: 1100px) { .ledger-grid { grid-template-columns: minmax(0, 1fr); } }
.lede { font-size: 14px; line-height: 1.65; color: var(--muted); max-width: 720px; margin: 0 0 16px; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 22px; }
.kv-grid.tight { gap: 5px 22px; margin: 10px 0; }
.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.kv-k { font-size: 12px; color: var(--muted); }
.kv-v { font-size: 13px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv-v.mono { font-size: 11px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.panel-head .muted { font-size: 12px; font-weight: 400; }
.sub-label { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.code, .code-edit {
  margin: 0; padding: 12px; border-radius: var(--r-panel); background: rgba(0, 0, 0, .4);
  border: 1px solid var(--line); color: rgba(255, 255, 255, .82); width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word; outline: none; resize: vertical;
}
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--r-panel); font-size: 13px; font-weight: 600; background: var(--surface); transition: background-color .18s; }
.btn:hover { background: var(--surface-hi); }
.btn.primary { background: var(--blue); }
.btn.primary:hover { background: var(--blue-hi); }
.verdict { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 6px; padding: 14px; border-radius: var(--r-panel); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.verdict.good { border-color: rgba(34, 197, 94, .3); background: rgba(34, 197, 94, .07); }
.verdict.bad { border-color: rgba(240, 84, 106, .3); background: rgba(240, 84, 106, .07); }
.verdict-ico { width: 20px; height: 20px; flex: 0 0 auto; }
.verdict-ico svg { width: 100%; height: 100%; }
.verdict.good .verdict-ico { color: #4ade80; }
.verdict.bad .verdict-ico { color: var(--red); }
.verdict-title { font-size: 14px; font-weight: 700; }
.verdict-sub { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.55; }
.audit-line { font-size: 12px; color: var(--muted); padding: 4px 0; }
.audit-line.bad { color: var(--red); }
.chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 5px 11px; border-radius: 999px; font-size: 12px; background: rgba(255, 255, 255, .06); color: var(--muted-2); }
.chip.good { background: rgba(34, 197, 94, .14); color: #4ade80; }
.chip.bad { background: rgba(240, 84, 106, .14); color: var(--red); }
.ev-cols, .ev-row { display: grid; grid-template-columns: 34px 44px 74px minmax(0, 1fr) 92px; align-items: center; gap: 6px; padding: 0 10px; text-align: left; }
.ev-cols { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); height: 26px; }
.ev-list { max-height: 620px; overflow-y: auto; scrollbar-width: thin; }
.ev-row { width: 100%; height: 32px; font-size: 12px; color: var(--muted-2); border-radius: 8px; transition: background-color .15s; }
.ev-row:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.ev-row.is-active { background: rgba(29, 119, 255, .14); color: var(--text); }
.ev-row.is-tampered { background: rgba(240, 84, 106, .14); }
.ev-op { font-size: 10px; text-transform: uppercase; }
.op-put { color: #4ade80; }
.op-del { color: var(--red); }
.ev-tbl, .ev-key { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-hash { color: var(--muted); text-align: right; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.proof-path { display: flex; flex-direction: column; gap: 4px; }
.proof-step { display: grid; grid-template-columns: 22px 46px minmax(0, 1fr); align-items: center; gap: 8px; padding: 5px 10px; border-radius: 8px; background: rgba(255, 255, 255, .03); font-size: 11px; }
.proof-i { color: var(--muted); }
.proof-side { color: var(--blue-hi); font-size: 10px; text-transform: uppercase; }
.binding-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.binding-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; background: var(--surface); color: var(--muted-2); }
.binding-chip.is-active { background: rgba(29, 119, 255, .16); color: var(--text); }

/* modal + toast */
.modal-overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(6, 8, 11, .7); backdrop-filter: blur(5px); opacity: 0; transition: opacity .18s; }
.modal-overlay.show { opacity: 1; }
.modal { width: min(100%, 620px); background: #16181d; border: 1px solid var(--line); border-radius: 18px; transform: translateY(10px) scale(.985); transition: transform .22s cubic-bezier(.22, 1, .36, 1); }
.modal-overlay.show .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.modal-x { color: var(--muted); font-size: 15px; }
.modal-x:hover { color: var(--text); }
.modal-body { padding: 18px; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); z-index: 100; padding: 11px 18px; border-radius: 12px; font-size: 13px; max-width: min(92vw, 560px); background: #1b2027; border: 1px solid var(--line); box-shadow: 0 18px 44px rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: rgba(240, 84, 106, .45); }

/* Keep the hero copy clear of the art on narrow desktops. */
@media (max-width: 1500px) { .hero-art { right: 0; width: 320px; height: 320px; } }
@media (max-width: 1240px) {
  .hero { min-height: 350px; padding: 30px; }
  .hero h1 { font-size: 33px; max-width: 360px; }
  .hero p { font-size: 14px; max-width: 370px; }
  .hero-foot { flex-wrap: wrap; gap: 18px 24px; }
  .hero-art { opacity: .45; right: -60px; width: 280px; height: 280px; }
}

/* ------------------------------------------------------ wallet + steps UI */

.wallet-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.wallet-opt {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 13px 8px 8px; border-radius: var(--r-panel);
  background: rgba(255, 255, 255, .05); font-size: 13.5px; font-weight: 600;
  transition: background-color .18s, transform .18s;
}
.wallet-opt:hover { background: rgba(255, 255, 255, .1); transform: translateY(-1px); }
.wallet-opt[disabled] { opacity: .5; pointer-events: none; }
.wallet-ico { width: 26px; height: 26px; border-radius: 8px; overflow: hidden; flex: 0 0 auto; display: block; }
.wallet-ico svg { width: 100%; height: 100%; display: block; }

.step { display: flex; gap: 12px; padding: 11px 6px; }
.step + .step { border-top: 1px solid rgba(255, 255, 255, .04); }
.step-n {
  width: 24px; height: 24px; border-radius: 8px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: rgba(29, 119, 255, .16); color: var(--blue-hi);
}
.step .nm { font-size: 14px; font-weight: 600; }

/* ------------------------------------------------------------ narrow screens */

.menu-btn {
  display: none; width: 38px; height: 38px; border-radius: var(--r-panel);
  place-items: center; color: var(--muted-2); background: var(--surface); flex: 0 0 auto;
}
.menu-btn svg { width: 20px; height: 20px; }
.scrim {
  position: fixed; inset: 0; z-index: 70; background: rgba(6, 8, 11, .66);
  backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s;
}
.scrim.show { opacity: 1; }

/* below the rail breakpoint the rail becomes a normal block under the page
   instead of vanishing with its content */
@media (max-width: 1280px) {
  .shell { grid-template-columns: var(--sidebar) minmax(0, 1fr); }
  .rail {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    grid-column: 1 / -1; position: static; height: auto; margin-top: 8px;
  }
}
@media (max-width: 900px) {
  :root { --gutter: 16px; }
  .menu-btn { display: grid; }
  .topbar { gap: 10px; padding: 0 var(--gutter); }
  .brand { width: auto; gap: 8px; }
  /* a flex child defaults to min-width auto, which is what pushes the
     Connect button off the side of a phone */
  .search { width: auto; flex: 1 1 0; min-width: 0; }
  .topbar-right { flex: 0 0 auto; }
  .kbd { display: none; }
  .ghost-btn { display: none; }
  .shell { grid-template-columns: minmax(0, 1fr); }

  .sidebar {
    display: flex; position: fixed; top: 0; left: 0; z-index: 80;
    width: 282px; height: 100vh; padding: 18px 16px;
    background: #14161b; border-right: 1px solid var(--line);
    transform: translateX(-102%); transition: transform .26s cubic-bezier(.22, 1, .36, 1);
  }
  .sidebar.open { transform: none; }
  .hero { min-height: 0; padding: 24px; }
  .hero h1 { font-size: 28px; max-width: none; }
  .hero p { max-width: none; }
  .hero-art { display: none; }
  .hero-foot { gap: 14px 22px; }
  .page-head h1 { font-size: 23px; }
  .rail-scroll { grid-auto-columns: 232px; }
  .detail-rank { margin-left: 0; text-align: left; width: 100%; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-word { display: none; }
  .search { padding: 0 10px; }
  .promo { padding: 20px; }
  .wallet-line .field { margin-left: 0; max-width: none; flex: 1 1 100%; }
}
