/* vault (/vault). Module scoped (vt-), site.css variables only. Holders, balances and receipts are
   public chain data, so everything sits on pastel and paper; the hero object is the rewards wallet
   with its live balance, the Top 20 is one table that folds into cards on a phone, each receipt is
   one card with its payouts listed, and the last band hands off to the burn tracker and the pool. */

.vault > section + section { margin-top: clamp(64px, 8vw, 112px); }

/* ---- the banner: what the receipts say, in one sentence ---- */
.vt-banner {
  display: inline-block;
  margin: 0 0 28px;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  background: var(--paper);
  box-shadow: var(--ring), var(--shadow-1);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 34em;
}
.vt-banner[data-state="none"] { background: var(--butter); box-shadow: inset 0 0 0 1px var(--butter-line); color: var(--butter-text); }
.vt-banner[data-state="paid"] { background: var(--m-soft); box-shadow: none; color: var(--m-text); }
.vt-banner .mono { font-size: 13px; }
.vt-banner .state { vertical-align: middle; }

.vt-hero .hero__cta { gap: 12px 24px; }

/* ---- the wallet card ---- */
.vt-wallet {
  display: grid;
  gap: 8px;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--r-lg);
  background: radial-gradient(70% 90% at 100% 0%, rgba(63, 199, 143, 0.16), transparent 65%), var(--paper);
  box-shadow: var(--ring), var(--shadow-2);
  min-width: 0;
}
.vt-wallet p { margin: 0; }
.vt-wallet__label { font: 500 13px/1.3 var(--sans); color: var(--ink-2); }
.vt-wallet__bal {
  font-size: clamp(34px, 3.6vw, 52px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.vt-wallet__bal .state { font-size: 12px; letter-spacing: 0; vertical-align: middle; }
.vt-wallet__unit { font-size: 0.55em; letter-spacing: 0; color: var(--ink-3); }
.vt-wallet__addr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-size: 15px;
  color: var(--ink-2);
  min-height: 1.6em;
}
.vt-wallet__addr .mono { font-size: 13px; overflow-wrap: anywhere; }
.vt-wallet__paid { font-size: 15px; color: var(--ink-2); min-height: 1.6em; }
.vt-wallet__how {
  margin-top: 8px;
  padding-top: 14px;
  box-shadow: inset 0 1px 0 var(--line);
  font: 400 13px/1.5 var(--sans);
  color: var(--ink-3);
}
.vt-wallet[data-state="stale"] .vt-wallet__bal { color: var(--ink-2); }
.vt-wallet[data-state="unread"] { background: var(--paper); box-shadow: var(--ring), var(--shadow-1); }

/* the copy button, beside an address in the card, the table and each receipt */
.vt-copy {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: var(--paper);
  color: var(--ink-2);
  font: 500 12px/1 var(--sans);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.vt-copy:hover { color: var(--ink); border-color: rgba(27, 26, 36, 0.2); }
.mono + .vt-copy { margin-left: 8px; }

/* ---- section heads: the title and the state beside it ---- */
.vt-top__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 20px;
}
.vt-top__head h2 { margin: 0; }
.vt-top__state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}
.vt-top__state .src { overflow-wrap: anywhere; }

/* ---- the Top 20 table ---- */
.vt-scroll { min-width: 0; }
.vt-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.4;
}
.vt-table th {
  padding: 10px 12px 10px 0;
  text-align: left;
  font: 500 12px/1.3 var(--sans);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.vt-table td {
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  min-width: 0;
}
.vt-table th:last-child,
.vt-table td:last-child { padding-right: 0; }
.vt-table td.num { white-space: nowrap; }
.vt-table td.vt-addr { white-space: nowrap; }
.vt-table td.vt-addr .mono { font-size: 14px; }
/* the unit sits in the column head while the head is shown, and beside each balance once folded */
.vt-unit { font: 400 12px/1 var(--sans); color: var(--ink-3); letter-spacing: 0; }
@media (min-width: 641px) { .vt-unit { display: none; } }
.vt-empty { color: var(--ink-2); white-space: normal; }
.vt-empty .state { margin-right: 6px; vertical-align: middle; }
.vt-table .state { font-size: 11px; }
.vt-top__note { margin-top: 14px; max-width: 64em; }

/* the tier chip: 1.0x plain, 1.5x butter, 2.0x mint, as the state chips are coloured */
.vt-tier {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--ink-3);
  font: 500 12px/1.4 var(--mono);
  white-space: nowrap;
}
.vt-tier[data-tier="1.5"] { background: var(--butter); box-shadow: none; color: var(--butter-text); }
.vt-tier[data-tier="2"] { background: var(--m-soft); box-shadow: none; color: var(--m-text); }

/* ---- the rules ---- */
.vt-rules h2 { margin-bottom: 20px; }
.vt-rules__list { margin: 0; padding: 0; border-top: 1px solid var(--line); }
.vt-rule {
  display: grid;
  grid-template-columns: minmax(0, 11em) minmax(0, 1fr);
  gap: 6px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.vt-rule dt { margin: 0; font: 500 14px/1.5 var(--sans); color: var(--ink-2); }
.vt-rule dd { margin: 0; min-width: 0; font-size: 15px; line-height: 1.55; color: var(--ink); max-width: 52em; }
.vt-rules__zero {
  margin: 20px 0 0;
  padding: 14px 18px;
  border-radius: var(--r-sm);
  background: var(--butter);
  box-shadow: inset 0 0 0 1px var(--butter-line);
  color: var(--butter-text);
  font-size: 15px;
  line-height: 1.55;
  max-width: 52em;
}

.vt-rules__docs { margin: 20px 0 0; }

/* ---- the receipts ---- */
.vt-cycles__list { display: grid; gap: 16px; }
.vt-cycles__none { margin: 0; max-width: 52em; font-size: 15px; color: var(--ink-2); }
.vt-cycle {
  padding: clamp(18px, 2.4vw, 28px);
  border-radius: var(--r);
  background: var(--paper);
  box-shadow: var(--ring), var(--shadow-1);
  min-width: 0;
}
.vt-cycle[data-state="dry"] { background: var(--v-mist); }
.vt-cycle__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-bottom: 12px;
  font: 400 13px/1.5 var(--mono);
  color: var(--ink-2);
}
.vt-cycle__head h3 { margin: 0; font: 500 18px/1.25 var(--sans); letter-spacing: -0.015em; color: var(--ink); }
.vt-cycle__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 1px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--line);
}
.vt-cycle__facts > div { display: grid; align-content: start; gap: 2px; padding: 10px 14px; background: var(--paper); min-width: 0; }
.vt-cycle[data-state="dry"] .vt-cycle__facts > div { background: var(--v-mist); }
.vt-cycle__facts dt { font: 500 12px/1.3 var(--sans); color: var(--ink-3); }
.vt-cycle__facts dd { margin: 0; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.vt-cycle__facts dd .mono { font-size: 13px; }
.vt-banner time,
.vt-wallet__paid time { white-space: nowrap; }
/* the payouts sit under a native disclosure: open on the newest receipt, folded on the rest */
.vt-cycle__more summary {
  cursor: pointer;
  padding: 6px 0;
  font: 500 14px/1.5 var(--sans);
  color: var(--ink-2);
}
.vt-cycle__more summary:hover { color: var(--ink); }
.vt-cycle__more[open] summary { margin-bottom: 6px; }
.vt-pays { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.vt-pay {
  display: grid;
  grid-template-columns: 2.2em minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.3fr);
  gap: 4px 14px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  min-width: 0;
}
.vt-pay > span { min-width: 0; overflow-wrap: anywhere; }
.vt-pay--head { padding: 6px 0; font: 500 11px/1.3 var(--sans); letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-3); }
.vt-pay__addr .mono { font-size: 13px; }
.vt-pay__tx,
.vt-tx { font: 400 13px/1.5 var(--mono); color: var(--ink-2); }
.vt-pay .state { font-size: 11px; }
.vt-cycle .src { display: block; margin-top: 12px; }

/* ---- the hand-off band ---- */
.vt-links {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 24px 48px;
  align-items: center;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--r-lg);
  background: radial-gradient(60% 90% at 0% 0%, rgba(255, 255, 255, 0.75), transparent 65%), var(--butter);
}
.vt-links h2 { font-size: clamp(24px, 2.6vw, 34px); }
.vt-links__copy p { margin: 0; max-width: 34em; color: var(--ink-2); }
.vt-links__cta { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 900px) {
  .vt-hero .hero__object { order: 1; margin-top: 24px; }
  .vt-hero .hero__cta { order: 2; margin-top: 24px; }
  .vt-rule { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 0; }
  .vt-links { grid-template-columns: minmax(0, 1fr); }
  /* to 640 the table stays a table, tighter, and scrolls sideways before it clips */
  .vt-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .vt-table { font-size: 13px; }
  .vt-table th { padding-right: 8px; font-size: 11px; white-space: normal; }
  .vt-table td { padding: 10px 8px 10px 0; }
  .vt-table td.vt-c-next { white-space: normal; }
  .vt-table .vt-copy { padding: 0 8px; }
  .vt-table td.vt-addr .mono { font-size: 12px; }
  .vt-pay { grid-template-columns: 2.2em minmax(0, 1fr); }
  .vt-pay--head { display: none; }
  .vt-pay__rank { grid-row: 1 / span 4; align-self: start; }
  .vt-pay__share::before { content: "weight share "; color: var(--ink-3); font-family: var(--sans); }
  .vt-pay__amt::before { content: "paid "; color: var(--ink-3); font-family: var(--sans); }
}

@media (max-width: 640px) {
  /* the table folds: each row one card of three lines (rank, address and tier; balance and its
     share; held for and weight share; then the next cycle share), the small labels drawn in */
  .vt-table, .vt-table tbody { display: block; }
  .vt-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .vt-table { border-top: 0; }
  .vt-table tr {
    display: grid;
    grid-template-columns: 1.6em minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .vt-table td { display: block; padding: 0; border: 0; white-space: normal; min-width: 0; }
  .vt-table td.num,
  .vt-table td.vt-addr { white-space: normal; }
  .vt-table td::before { content: attr(data-label); display: block; margin-bottom: 2px; font: 500 11px/1.3 var(--sans); letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-3); }
  .vt-table td.vt-c-rank::before,
  .vt-table td.vt-c-addr::before,
  .vt-table td.vt-c-tier::before { content: none; }
  .vt-c-rank { grid-column: 1; grid-row: 1; color: var(--ink-3); }
  .vt-c-addr { grid-column: 2; grid-row: 1; }
  .vt-c-tier { grid-column: 3; grid-row: 1; justify-self: end; }
  .vt-c-bal { grid-column: 2; grid-row: 2; }
  .vt-c-share { grid-column: 3; grid-row: 2; }
  .vt-c-held { grid-column: 2; grid-row: 3; }
  .vt-c-weight { grid-column: 3; grid-row: 3; }
  .vt-c-next { grid-column: 2 / -1; grid-row: 4; }
  .vt-table td.vt-empty { grid-column: 1 / -1; display: block; padding: 12px 0; }
  .vt-table td.vt-empty::before { content: none; }
  /* on a phone: the headline, the sub-line, the banner, then the wallet card and the actions */
  .vt-hero .hero__sub { order: 0; margin: 0 0 20px; }
  .vt-hero .hero__cta { flex-wrap: wrap; gap: 14px 24px; }
  .vt-hero .hero__cta .link-arrow { white-space: nowrap; }
  .vt-wallet { border-radius: var(--r); }
  .vt-banner { display: block; max-width: none; margin-bottom: 0; }
  .vt-links__cta .btn { width: 100%; }
}
