/* ==========================================================================
   Orblivion: the treasury's public record (web/treasury.html)
   On top of the docs' tokens and top bar (/docs/docs.css): the same colours, type and light/dark themes.
   ========================================================================== */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* the brand's gradient stops, themed (this page allows no inline styles) */
#mk-ring stop:nth-child(1) { stop-color: var(--mk-ring-0); }
#mk-ring stop:nth-child(2) { stop-color: var(--mk-ring-1); }
#mk-orbit stop:nth-child(1) { stop-color: var(--mk-orbit-0); }
#mk-orbit stop:nth-child(2) { stop-color: var(--mk-orbit-1); }
#mk-orbit stop:nth-child(3) { stop-color: var(--mk-orbit-2); }
#wm-o-grad stop:nth-child(1) { stop-color: var(--wm-o-0); }
#wm-o-grad stop:nth-child(2) { stop-color: var(--wm-o-1); }
#wm-o-grad stop:nth-child(3) { stop-color: var(--wm-o-2); }

.tre {
  max-width: 1120px; margin: 0 auto; padding: 36px var(--gutter) 64px; outline: none;
  overflow-wrap: anywhere;
}
.tre-head { max-width: 780px; margin-bottom: 26px; }
.tre-eyebrow {
  margin: 0 0 10px; font: 500 11px var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3);
}
.tre h1 {
  margin: 0 0 12px;
  font-family: var(--display); font-weight: 400; font-size: clamp(24px, 3.6vw, 34px); line-height: 1.2;
  letter-spacing: 0.02em;
  background: var(--heading); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tre-lead { margin: 0; font-size: 16.5px; color: var(--text-2); }
.tre-note { color: var(--text-2); }
.tre-note code { font: 13px var(--mono); }
.tre-footer { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.tre-footer p { margin: 0; }
.tre-footer p + p { margin-top: 8px; }

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

.card {
  margin: 0 0 18px; padding: 20px 22px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface);
  min-width: 0;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.card h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.005em; }
.card h3 { margin: 0; font-size: 16px; font-weight: 600; }
.card h4 { margin: 14px 0 6px; font: 500 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.card-sub { margin: 0; font-size: 13px; color: var(--text-3); }
.card p { margin: 0 0 12px; }
.card p:last-child { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 18px; }
.grid-2 > .card { margin: 0; }
.section-title { margin: 30px 0 14px; font-size: 20px; font-weight: 600; }
.badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }

.mono { font-family: var(--mono); }
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.block { display: block; }
.hash { font: 12px var(--mono); overflow-wrap: anywhere; }
.addr, .tx { font: 12.5px var(--mono); overflow-wrap: anywhere; }
.empty { margin: 4px 0 0; color: var(--text-3); font-size: 14px; }

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; }

.badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px; white-space: nowrap;
  font: 600 10.5px/1.75 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-2); background: var(--surface-3);
}
.badge-up { color: var(--up); background: var(--up-soft); }
.badge-down { color: var(--down); background: var(--down-soft); }
.badge-warn { color: var(--amber); background: var(--amber-soft); }
.badge-live { color: var(--live); background: var(--live-soft); }

.err {
  margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--line-strong); border-left: 3px solid var(--down);
  border-radius: var(--radius-sm); background: var(--down-soft); font-size: 14px;
}
.err strong { display: block; margin-bottom: 2px; }

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

.tbl-wrap { overflow-x: auto; scrollbar-width: thin; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
.tbl th, .tbl td { padding: 9px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.tbl thead th {
  font: 500 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); white-space: nowrap;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; }
.tbl td.num { font-family: var(--mono); font-size: 13px; }
.tbl td.num .block { font-family: var(--font); }
.tok { display: flex; flex-direction: column; min-width: 0; }
.tok-sym { font-weight: 600; }
.tok-addr { font: 11.5px var(--mono); color: var(--text-3); }

/* ---------- transfers and payouts ---------- */

.xfers { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.xfers li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 6px 14px; flex-wrap: wrap;
  padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13.5px;
}
.xfer-what { min-width: 0; }
.meta { margin-top: 14px !important; padding-top: 10px; border-top: 1px solid var(--line); }
.item { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 10px; }
.item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.item-title { font-weight: 600; }
.item .kv { margin-bottom: 10px; }

/* ---------- phone ---------- */

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .tre { padding-top: 26px; }
  .card { padding: 16px 14px; }
  /* tables become cards: each row a block, each value under its column's label */
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .tbl tbody tr:last-child { border-bottom: 0; }
  .tbl td { padding: 2px 0; border: 0; }
  .tbl td.num { text-align: right; }
  .tbl td[data-label] { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .tbl td[data-label]::before {
    content: attr(data-label); flex: none;
    font: 500 10px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3);
  }
  .tbl td[data-label] > * { min-width: 0; text-align: right; }
  .tbl td:first-child { font-weight: 600; margin-bottom: 2px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 8px; }
}
@media (max-width: 480px) {
  .topbar-home { display: none; }                 /* the brand links home; room for the League link on a phone */
}
