/* Levity components: pills, rails, cards, balloons, forms, tables. */

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

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  padding: 14px 24px;
  min-height: 48px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.3;
  transition: transform 180ms var(--ease), background-color 180ms var(--ease);
}
.pill:active { transform: scale(.97); }
.pill.primary { background: var(--pill-ink); color: var(--pill-on); box-shadow: 0 3px 8px #1823320b; }
.pill.primary:hover:not(:disabled) { background: var(--pill-ink-hover); }
.pill.secondary { background: var(--panel); border: 1px solid var(--line); color: var(--ink); }
.pill.secondary:hover:not(:disabled) { border-color: var(--blue); }
.pill.small { padding: 10px 16px; min-height: 40px; font-size: 12px; gap: 10px; }
.pill.full-width { width: 100%; }

.text-link {
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.text-link:hover { color: var(--blue); }

.tag {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 99px;
  padding: 5px 10px;
  font-weight: 500;
  letter-spacing: .35px;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.tag.live { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); }
.tag.grad { color: var(--positive); border-color: color-mix(in srgb, var(--positive) 40%, var(--line)); }

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--rail);
  border-radius: 99px;
  max-width: 100%;
  /* Four filters do not fit a phone: let the row scroll rather than the page. */
  overflow-x: auto;
  scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented button { flex: 0 0 auto; }
.segmented button {
  padding: 10px 16px;
  border-radius: 99px;
  font-size: 11px;
  color: var(--muted);
  min-height: 38px;
  white-space: nowrap;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.segmented button.active { background: var(--pill-ink); color: var(--pill-on); }
.segmented.compact button { padding: 8px 15px; font-size: 10px; min-height: 32px; }

/* ------------------------------------------------------------------- header */

.site-header {
  position: fixed;
  /* Clear the phone's status bar when a host pads the root by its safe area. */
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: 0;
  width: 100%;
  padding: 0 40px;
  z-index: 40;
}

.nav-rail {
  max-width: 1280px;
  margin: auto;
  min-height: 62px;
  border: 1px solid var(--rail-border);
  border-radius: 99px;
  background: var(--rail);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px 9px 25px;
  gap: 20px;
  box-shadow: 0 4px 16px #5881a20a;
}

.nav-group { display: flex; align-items: center; gap: 28px; flex: 1; min-width: 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.65px;
  flex-shrink: 0;
}
/* A pair on the way up: the small one trails, the bright one leads and rides
   higher. The mark has to carry the name — two shapes side by side would be
   a pair, but not levity. */
.brand-mark { position: relative; width: 29px; height: 26px; flex-shrink: 0; }
.brand-mark i {
  position: absolute;
  border-radius: 52% 52% 46% 46%;
  background: var(--ink);
  width: 13px; height: 15px;
  left: 0; bottom: 1px;
  transform: rotate(-17deg);
}
.brand-mark i + i {
  width: 17px; height: 19px;
  left: 10px; bottom: 6px;
  background: var(--blue);
  transform: rotate(14deg);
  /* An outline that does not change the box the way a border would. */
  box-shadow: 0 0 0 2px var(--rail);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0 auto;
  font-size: 12px;
  color: var(--muted);
}
.desktop-nav a { position: relative; padding: 4px 0; }
.desktop-nav a:hover { color: var(--ink); }
.desktop-nav a[aria-current='page'] { color: var(--ink); }
.desktop-nav a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--blue);
}

.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-ghost {
  padding: 10px 13px;
  color: var(--muted);
  font-size: 12px;
  min-height: 42px;
  border-radius: 99px;
}
.nav-ghost:hover { color: var(--ink); }
.nav-cta { min-height: 42px; padding: 12px 20px; font-size: 12px; gap: 12px; }

.menu-toggle { display: none; padding: 12px; width: 44px; height: 44px; }
.menu-toggle span { display: block; width: 18px; height: 1.5px; background: var(--ink); margin: 5px auto; transition: transform 200ms var(--ease); }
.menu-toggle[aria-expanded='true'] span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-toggle[aria-expanded='true'] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-menu {
  position: absolute;
  top: 76px; left: 24px; right: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  padding: 16px;
  box-shadow: 0 14px 25px #17283c20;
}
.mobile-menu a, .mobile-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  min-height: 44px;
  font-size: 13px;
  border-radius: 12px;
}
.mobile-menu a:hover, .mobile-menu button:hover { background: var(--bg); }

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

.section-container { max-width: 1190px; padding: 0 25px; margin: 0 auto; }
.page { padding-top: 132px; padding-bottom: 60px; min-height: 70vh; }
.page-head { max-width: 1190px; margin: 0 auto 38px; padding: 0 25px; }
.page-head h1 { font-size: 54px; font-weight: 700; letter-spacing: -2.4px; line-height: 1.08; margin-top: 14px; }
.page-head p.lede { margin-top: 18px; max-width: 640px; line-height: 1.85; }

.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 25px; }
.section-heading .eyebrow { margin-bottom: 16px; }
.section-description { margin-top: 19px; max-width: 710px; line-height: 1.8; }

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 26px;
}

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.coin-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform 250ms var(--ease), box-shadow 250ms var(--ease);
  text-align: left;
  width: 100%;
}
.coin-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }

.coin-art {
  height: 190px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* A pool of the denomination's own colour sitting behind the balloon, with
     the sheen over it. Without it the wells were all the same near-white and
     the grid read as one grey block with toys scattered on it — the colour has
     to be in the light around the balloon, not only in the balloon. */
  background:
    radial-gradient(ellipse 58% 50% at 50% 47%,
      color-mix(in srgb, var(--card-glow, var(--card-color)) 30%, transparent) 0%,
      color-mix(in srgb, var(--card-glow, var(--card-color)) 13%, transparent) 54%,
      #fff0 80%),
    radial-gradient(ellipse at 48% 20%, var(--art-sheen), #fff0),
    color-mix(in srgb, var(--card-color) var(--art-mix), var(--bg));
}
.coin-art .art-corner {
  position: absolute;
  top: 16px; left: 18px;
  font-size: 9px;
  letter-spacing: 1.1px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
}
.coin-art .art-corner.right { left: auto; right: 18px; top: auto; bottom: 15px; }

.coin-info { padding: 20px 23px 21px; }
.coin-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.coin-title h3 { font-size: 19px; letter-spacing: -.7px; }
.coin-title > span { color: var(--muted); font-size: 12px; }
.coin-sub { font-weight: 500; font-size: 10px; letter-spacing: .7px; margin: 4px 0 18px; color: var(--muted); text-transform: uppercase; }
.coin-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}

/* ----------------------------------------------------------------- balloons */

/* The balloon is drawn in SVG; this box only reserves the body's footprint.
   The string overflows below it, so it never pushes layout around. */
.balloon {
  position: relative;
  width: 112px;
  aspect-ratio: 100 / 115;
  flex-shrink: 0;
}
.balloon > svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  overflow: visible;
}
/* A balloon this light needs a contact shadow or it floats off the page — but
   only the silhouette casts one; shadowing the string drew a ghost of it. */
.balloon .balloon-body {
  /* A shadow, not a halo: the hue is carried into a dark so it grounds the
     balloon instead of glowing around it. */
  filter: drop-shadow(5px 12px 10px
    color-mix(in srgb, color-mix(in srgb, var(--toy-color) 50%, #241848) 30%, transparent));
}
.balloon.small { width: 66px; }
.balloon.tiny { width: 40px; }
/* At thumbnail size the shadow is just mud. */
.balloon.tiny .balloon-body { filter: none; }

.balloon.pop { animation: balloon-pop 760ms var(--ease); transform-origin: 50% 118%; }

/* Graduation: the balloon takes a breath and springs. The old keyframes carried
   the base rotation the CSS shape used to need, which now reads as a jolt. */
@keyframes balloon-pop {
  0% { transform: scale(1) rotate(0); }
  22% { transform: scale(.93) rotate(-3deg); }
  52% { transform: scale(1.18) rotate(4deg); }
  76% { transform: scale(.97) rotate(-2deg); }
  100% { transform: scale(1) rotate(0); }
}

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

.field { display: block; margin-bottom: 18px; }
.field > span.label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .4px;
  color: var(--muted);
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  padding: 13px 15px;
  min-height: 48px;
  outline: none;
  font-size: 14px;
  transition: border-color 160ms var(--ease);
}
.field input:focus, .field select:focus { border-color: var(--blue); }
.field input[aria-invalid='true'] { border-color: var(--negative); }
.field .hint { font-size: 10px; color: var(--muted); margin-top: 7px; line-height: 1.7; display: block; }
.field .hint.error { color: var(--negative); }

.input-affix { position: relative; display: flex; align-items: center; }
.input-affix input { padding-right: 76px; }
.input-affix .affix {
  position: absolute;
  right: 14px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  pointer-events: none;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-field {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--panel);
  padding: 0 14px;
  gap: 8px;
}
.search-field > span { font-size: 20px; transform: rotate(-25deg); color: var(--muted); }
.search-field input { border: 0; background: transparent; outline: none; padding: 11px 0; width: 170px; font-size: 12px; min-height: 43px; }

select.plain {
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 12px 16px;
  background: var(--panel);
  font-size: 11px;
  min-height: 45px;
  max-width: 190px;
}

.range-input { width: 100%; accent-color: var(--blue); cursor: pointer; margin: 13px 0; min-height: 24px; }

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

.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; text-align: left; }
th { font-weight: 500; font-size: 9px; letter-spacing: 1px; color: var(--muted); padding: 16px 14px; text-transform: uppercase; white-space: nowrap; }
td { padding: 18px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
td.strong { color: var(--ink); font-size: 13px; white-space: nowrap; }
td:last-child, th:last-child { text-align: right; }
tbody tr:hover td { background: color-mix(in srgb, var(--blue) 4%, transparent); }

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

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  margin: 0;
}
.stat-strip > div { background: var(--panel); padding: 20px 22px; }
.stat-strip dt { font-size: 9px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.stat-strip dd { margin: 8px 0 0; font-size: 22px; letter-spacing: -.9px; color: var(--ink); }

.progress-track { height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; background: var(--blue); transition: width 500ms var(--ease); }
.progress-fill.done { background: var(--positive); }

.live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
  margin-right: 8px;
  animation: pulse 2.4s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.pos { color: var(--positive); }
.neg { color: var(--negative); }

.empty-state { text-align: center; padding: 64px 20px; border: 1px dashed var(--line); border-radius: 22px; }
.empty-state h3 { font-size: 22px; letter-spacing: -.8px; }
.empty-state p { margin: 12px auto 22px; max-width: 380px; }

.notice {
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 14px;
  padding: 15px 18px;
  background: var(--panel);
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}
.notice strong { color: var(--ink); font-weight: 500; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--bg);
  padding: 14px 22px;
  border-radius: 99px;
  font-size: 12px;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease), transform 220ms var(--ease);
  max-width: min(90vw, 460px);
  text-align: center;
  box-shadow: 0 10px 30px #0e1b2a33;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.site-footer { padding: 60px 6% 25px; border-top: 1px solid var(--line); margin-top: 60px; }
.footer-top { display: flex; justify-content: space-between; gap: 25px; align-items: flex-start; max-width: 1190px; margin: auto; }
.footer-top p { font-size: 12px; margin-top: 10px; }
.footer-top nav { display: flex; flex-wrap: wrap; gap: 18px 28px; font-size: 11px; margin-top: 8px; max-width: 520px; }
.footer-top nav a:hover { color: var(--blue); }
.footer-bottom {
  max-width: 1190px;
  margin: 46px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-weight: 500;
  font-size: 8px;
  letter-spacing: .7px;
  color: var(--muted);
  text-transform: uppercase;
}

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

/*
 * Only shown when more than one wallet announced itself. It is a real dialog —
 * focus moves into it, Escape and a click outside both dismiss — because it is
 * the one place on the site where a click hands control to an extension, and a
 * half-modal that can be typed past is how people approve things they did not
 * mean to.
 */
.wallet-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #16233a4d;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: wallet-fade 160ms var(--ease);
}
@keyframes wallet-fade { from { opacity: 0; } to { opacity: 1; } }

.wallet-dialog {
  width: min(360px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 24px;
  box-shadow: 0 24px 60px #16233a2e;
}
.wallet-dialog .eyebrow { margin-bottom: 16px; }
.wallet-options { display: flex; flex-direction: column; gap: 8px; }

.wallet-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  transition: border-color 160ms var(--ease), transform 160ms var(--ease);
}
.wallet-option:hover { border-color: var(--blue); transform: translateY(-1px); }
.wallet-option img { border-radius: 7px; flex-shrink: 0; }
.wallet-option-dot {
  width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(140deg, var(--blue), #8bc6f5);
}

.wallet-skip {
  display: block;
  width: 100%;
  margin-top: 16px;
  min-height: 44px;
  font-size: 12px;
  color: var(--muted);
}
.wallet-skip:hover { color: var(--ink); }

/* A connected wallet is a real one only sometimes; the dot says which. */
.nav-ghost.is-real::before {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--positive);
  vertical-align: middle;
}
