/* FUNCTION — black on white, like the account it belongs to. A technical plate: thin rules, a serif
   that reads like set mathematics, numbers in a mono face, and no third colour. Emphasis is the ink
   itself, inverted. */

@import url("https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=IBM+Plex+Mono:wght@400;500;600&display=swap");

:root {
  /* Black on white. The account is a black f on white paper; the site is the same ink on the same
     paper, and there is no third colour anywhere — emphasis is black, inverted. */
  --paper: #ffffff;
  --paper-2: #f6f5f2;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-2: #f6f5f2;
  --ink: #0b0b0b;
  --ink-2: #3d3d3b;
  --ink-3: #87857e;
  --rule: #d9d6cd;
  --rule-2: #ebe8e1;
  --red: #8c2b1a;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --measure: 1240px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  font-feature-settings: "liga" 1, "kern" 1;
  overflow-x: hidden;
}

#plate { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding: 0 16px; }

/* ---- the top rule ------------------------------------------------------------------------- */

header.top {
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.84));
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.top .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }

.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark img { width: 30px; height: 30px; display: block; border-radius: 3px; }
.wordmark b { font-weight: 500; letter-spacing: 0.17em; text-transform: uppercase; font-size: 15px; }

nav.top-nav { display: flex; gap: 6px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
nav.top-nav a { text-decoration: none; color: var(--ink-2); padding: 7px 12px; border: 1px solid transparent; }
nav.top-nav a:hover { color: var(--ink); border-color: var(--rule); }
nav.top-nav a[aria-current] { color: #fff; background: var(--ink); border-color: var(--ink); }
.top .spacer { margin-left: auto; }

/* ---- type ---------------------------------------------------------------------------------- */

h1 { font-size: clamp(34px, 6vw, 62px); line-height: 1.03; font-weight: 500; margin: 0 0 14px; letter-spacing: -0.012em; }
h2 { font-size: clamp(22px, 3.4vw, 32px); font-weight: 500; margin: 0 0 10px; }
h3 { font-size: 19px; font-weight: 600; margin: 0 0 6px; }
p { margin: 0 0 14px; max-width: 68ch; color: var(--ink-2); }
.lede { font-size: clamp(18px, 2.2vw, 22px); color: var(--ink); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 12px;
}
.eyebrow .live { color: var(--ink); }

.math { font-style: italic; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.dim { color: var(--ink-3); }
.up { color: var(--ink); }
.down { color: var(--red); }
.hl { color: var(--ink); }

/* ---- panels -------------------------------------------------------------------------------- */

section { padding: 48px 0; }
section + section { border-top: 1px solid var(--rule-2); }

.panel {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--rule);
  padding: 20px;
}
.panel.quiet { background: var(--panel-2); }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* ---- stat tiles ------------------------------------------------------------------------------ */

.stat { padding: 16px 18px; }
.stat .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
.stat .v { font-family: var(--mono); font-size: clamp(19px, 2.2vw, 26px); line-height: 1.15; margin-top: 7px; color: var(--ink); }
.stat .v small { font-size: 12px; color: var(--ink-3); margin-left: 4px; }
.stat .sub { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 4px; }

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

.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--ink); transform: translateY(-2px); }
.card .head { display: flex; align-items: baseline; gap: 8px; }
.card .id { font-family: var(--mono); font-size: 12px; color: var(--ink); font-weight: 600; }
.card .formula { font-family: var(--mono); font-size: 13px; color: var(--ink); word-break: break-all; }
.card .rowline { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.card .rowline b { color: var(--ink); font-weight: 500; }

.bar { height: 4px; background: var(--rule); position: relative; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--ink); }

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

.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th {
  text-align: left;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 12px 10px 0;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule-2); vertical-align: middle; color: var(--ink-2); }
.table td.num, .table th.num { text-align: right; padding-left: 16px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.table tbody tr:hover td { background: var(--panel-2); color: var(--ink); }
.scroller { overflow-x: auto; }

/* ---- controls ------------------------------------------------------------------------------- */

.btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 11px 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  transition: filter 0.15s, background 0.15s, color 0.15s;
}
.btn:hover { background: #fff; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); font-weight: 400; }
.btn.ghost:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.btn.small { padding: 7px 12px; font-size: 11px; }
.btn[disabled] { border-color: var(--rule); background: transparent; color: var(--ink-3); cursor: not-allowed; filter: none; }

.seg { display: inline-flex; border: 1px solid var(--rule); }
.seg button {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 14px;
  background: transparent;
  color: var(--ink-3);
  border: 0;
  border-right: 1px solid var(--rule);
  cursor: pointer;
}
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg button:hover { color: var(--ink); }

input, textarea, select {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  padding: 11px 13px;
  width: 100%;
}
input::placeholder { color: var(--ink-3); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); }
label { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.search { position: relative; }
.search input { padding-left: 34px; }
.search::before { content: "⌕"; position: absolute; left: 12px; top: 9px; color: var(--ink-3); font-size: 17px; }

.listing { font-family: var(--mono); font-size: 13px; line-height: 1.95; color: var(--ink-2); }
.listing .i { color: var(--ink-3); display: inline-block; width: 2.4em; }

.note { font-size: 14px; color: var(--ink-3); }
.err { color: var(--red); font-family: var(--mono); font-size: 13px; }
.ok { color: var(--ink); font-family: var(--mono); font-size: 13px; }

.hair { height: 1px; background: var(--rule-2); margin: 26px 0; border: 0; }

footer.bottom { border-top: 1px solid var(--rule); padding: 26px 0 54px; font-size: 14px; color: var(--ink-3); }
footer.bottom .wrap { display: flex; gap: 20px; flex-wrap: wrap; align-items: baseline; }

.addr { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); word-break: break-all; }
.addr:hover { color: var(--ink); }

.tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  padding: 3px 8px;
  color: var(--ink-3);
  white-space: nowrap;
}
.tag.open { border-color: var(--ink); color: var(--ink); }
.tag.sealed { background: var(--ink); border-color: var(--ink); color: #fff; }
.tag.retired { border-color: var(--rule); color: var(--ink-3); }
.tag.live { border-color: var(--ink); color: var(--ink); }
.tag.live::before { content: "●"; margin-right: 6px; font-size: 8px; vertical-align: 1px; }

.pill {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  background: #fff;
  padding: 6px 10px;
  color: var(--ink-2);
}

.empty { padding: 34px 0; text-align: center; color: var(--ink-3); font-family: var(--mono); font-size: 13px; }

@media (max-width: 900px) {
  .g5, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3, .g2 { grid-template-columns: minmax(0, 1fr); }
  section { padding: 34px 0; }
  .top .wrap { height: 58px; gap: 10px; }
  nav.top-nav a { padding: 6px 9px; }
}

@media (max-width: 680px) {
  /* The top rule is a single line that must never be clipped: the wordmark loses its name, the page
     action loses its button, and what is left is the navigation and the wallet. */
  .top .wordmark b { display: none; }
  .top .btn.small:not(.ghost) { display: none; }
  nav.top-nav { font-size: 11px; }
  nav.top-nav a { padding: 6px 8px; }
}

@media (max-width: 560px) {
  .g5, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  nav.top-nav a.hide-sm { display: none; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  h1 { letter-spacing: 0; }
}
