/* Strip. Greyscale, sentence case, a certificate torn along a perforation. */

:root {
  --ink: #0a0a0a;
  --panel: #141414;
  --chip: #232323;
  --line: #2a2a2a;
  --text: #d9d9d9;
  --dim: #a9a9a9;
  --mute: #686868;
  --faint: #3a3a3a;
  --white: #f4f4f4;
  --sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --r: 4px;
}

html { font-size: 62.5%; scroll-behavior: smooth; }
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.6rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

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

.top {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 1.6rem;
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.chips { display: flex; gap: 1px; }
.chip {
  display: inline-flex; align-items: center; gap: .8rem;
  min-height: 4.4rem; padding: 0 1.6rem;
  background: var(--chip); color: var(--text);
  font-size: 1.4rem; font-weight: 500; letter-spacing: -.01em;
  transition: background .18s, color .18s;
}
.chip:hover, .chip[aria-current] { background: var(--white); color: var(--ink); }
.chip.brand { font-weight: 640; padding-left: 1.3rem; }
.chip.brand svg { width: 2rem; height: 1.4rem; }
.chip.quiet { background: transparent; color: var(--dim); }
.chip.ca { gap: 1rem; }
.chip.ca .label { color: inherit; opacity: .7; }
.chip.ca .mono { font-size: 1.3rem; }
.chip.ca.copied { background: var(--white); color: var(--ink); }
@media (max-width: 640px) { .chip.ca .label { display: none; } }
.chip.quiet:hover { background: var(--chip); color: var(--text); }

/* ------------------------------- ground ------------------------------- */

#dots {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
main { position: relative; z-index: 2; }
.wrap { width: min(118rem, calc(100% - 3.2rem)); margin: 0 auto; }

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

.display {
  font-weight: 600; letter-spacing: -.028em; line-height: .94;
  margin: 0; color: var(--white);
}
.display .ln { display: block; }
.display .ln.dim { color: var(--mute); }
h1.display { font-size: clamp(4.2rem, 8.4vw, 9.6rem); }
h2.display { font-size: clamp(3.2rem, 4.6vw, 5.8rem); }
h3 { font-size: 2.2rem; font-weight: 600; letter-spacing: -.02em; margin: 0 0 .8rem; color: var(--white); }
.lede { font-size: clamp(1.7rem, 1.9vw, 2.1rem); color: var(--dim); max-width: 52rem; margin: 2.4rem 0 0; line-height: 1.4; }
p { margin: 0 0 1.2em; }
.small { font-size: 1.4rem; color: var(--mute); }
.label { font-size: 1.3rem; color: var(--mute); letter-spacing: 0; }
em { font-style: italic; color: var(--white); }

.btns { display: flex; gap: 1px; margin-top: 3.2rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 1rem;
  min-height: 5.2rem; padding: 0 2.2rem;
  background: var(--white); color: var(--ink);
  font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em;
  transition: background .18s, color .18s, opacity .18s;
}
.btn:hover { background: var(--text); }
.btn.ghost { background: var(--chip); color: var(--text); }
.btn.ghost:hover { background: var(--line); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn .arr { font-size: 1.8rem; line-height: 1; }

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

.live { display: grid; grid-template-columns: repeat(4, auto); gap: 3.2rem; margin-top: 3.6rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.live > div { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.live .num { font-size: 1.8rem; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live .diag { grid-column: 1 / -1; font-size: 1.2rem; color: var(--mute); white-space: normal; word-break: break-word; }
.live .num.err { color: var(--dim); font-family: var(--sans); font-size: 1.4rem; white-space: normal; }
@media (max-width: 640px) { .live { grid-template-columns: 1fr 1fr; gap: 2rem; } }


.hero {
  min-height: 100svh;
  display: grid; align-items: center;
  padding: 12rem 0 6rem;
}
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; gap: 4rem; } }

/* The certificate: one wide card, a perforation, and a stub that tears off
   as you scroll. The resting transform lives here, in CSS, so it is correct
   before any script has run. */
.cert {
  --tear: 0;
  position: relative;
  display: grid; grid-template-columns: 1fr 38%;
  aspect-ratio: 16 / 9.4;
  width: 100%;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,.6));
}
.piece {
  position: relative;
  background: #e9e9e9; color: #111;
  padding: 2.4rem;
  display: flex; flex-direction: column; justify-content: space-between;
  min-width: 0; overflow: hidden;
}
.piece.p { border-radius: var(--r) 0 0 var(--r); }
.piece.d {
  border-radius: 0 var(--r) var(--r) 0;
  border-left: 2px dashed #8a8a8a;
  background: #dedede;
  transform-origin: 0 100%;
  transform: translate(calc(var(--tear) * 9%), calc(var(--tear) * 6%)) rotate(calc(var(--tear) * 7deg));
  transition: transform .06s linear;
}
/* the two notches that make a perforation read as one */
.piece.d::before, .piece.d::after {
  content: ""; position: absolute; left: -1.3rem; width: 2.4rem; height: 2.4rem;
  border-radius: 50%; background: var(--ink);
}
.piece.d::before { top: -1.2rem; }
.piece.d::after { bottom: -1.2rem; }
.piece .kicker { font-size: 1.2rem; color: #666; letter-spacing: .02em; }
.piece .sym { font-family: var(--mono); font-size: clamp(1.5rem, 1.8vw, 2.2rem); font-weight: 600; color: #111; margin-top: .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.piece .big { font-family: var(--mono); font-size: clamp(2rem, 2.9vw, 3.6rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.05; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.piece.d .big { font-size: clamp(1.7rem, 2.1vw, 2.6rem); }
.piece.d .kicker { min-height: 2.6em; }
.piece .foot { display: flex; justify-content: space-between; gap: 1rem; font-size: 1.2rem; color: #666; }
.piece .foot .mono { color: #444; }
.piece .serial { position: absolute; top: 2.4rem; right: 2.4rem; font-family: var(--mono); font-size: 1.1rem; color: #888; }
.piece .stamp {
  display: inline-block; align-self: flex-start;
  border: 1.5px solid #111; border-radius: 3px; padding: .2rem .8rem;
  font-size: 1.1rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #111;
  transform: rotate(-4deg);
}
.piece .logo { width: 3.2rem; height: 3.2rem; border-radius: 50%; overflow: hidden; background: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; color: #111; }
.piece .logo img { width: 100%; height: 100%; object-fit: cover; }
.piece .row { display: flex; align-items: center; gap: 1.2rem; }
.cert .note { position: absolute; left: 0; right: 0; bottom: -3.2rem; font-size: 1.3rem; color: var(--mute); text-align: left; }
.cert.empty .piece { background: #1b1b1b; color: var(--dim); }
.cert.empty .piece .sym, .cert.empty .piece .big, .cert.empty .piece .kicker { color: var(--dim); }

/* ------------------------------- sections ------------------------------- */

section { padding: 9rem 0; border-top: 1px solid var(--line); background: rgba(10,10,10,.82); }
section.clear { background: transparent; border-top: 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 4rem; align-items: end; margin-bottom: 4rem; }
.sec-head p { color: var(--dim); font-size: 1.7rem; margin: 0; max-width: 46rem; }
@media (max-width: 900px) { .sec-head { grid-template-columns: 1fr; gap: 1.6rem; } }

/* ------------------------------- markets ------------------------------- */

.table { border-top: 1px solid var(--line); }
.tr {
  display: grid; align-items: center; gap: 1.6rem;
  grid-template-columns: 4rem 1.6fr 1.2fr 1fr 1fr 1fr 8rem;
  padding: 1.6rem 0; border-bottom: 1px solid var(--line);
  color: var(--text); transition: background .15s;
}
.tr.head { color: var(--mute); font-size: 1.3rem; padding: 1rem 0; }
a.tr:hover { background: rgba(255,255,255,.03); }
.tr .cell { min-width: 0; }
.tr .pair { display: flex; flex-direction: column; gap: .2rem; }
.tr .pair .mono { font-size: 1.4rem; }
.tr .sub { font-size: 1.3rem; color: var(--mute); }
.tr .go { text-align: right; color: var(--dim); white-space: nowrap; }
.logo {
  width: 4rem; height: 4rem; border-radius: 50%; overflow: hidden;
  background: #fff; display: grid; place-items: center; color: #111; font-weight: 700; font-size: 1.3rem;
}
.logo img { width: 100%; height: 100%; object-fit: cover; }
.logo.mono-mark { background: var(--chip); color: var(--text); }
@media (max-width: 1100px) { .tr .name { display: none; } }
@media (max-width: 900px) {
  .tr { grid-template-columns: 3.6rem 1fr auto 6.4rem; gap: 1.2rem; padding: 1.2rem 0; }
  .tr .hide-m { display: none; }
  .tr .logo { width: 3.6rem; height: 3.6rem; font-size: 1.1rem; }
  .tr .pair .mono { font-size: 1.3rem; }
}
.empty { padding: 4rem 0; color: var(--mute); border-bottom: 1px solid var(--line); }
.empty strong { color: var(--text); font-weight: 500; }

/* ------------------------------- example ------------------------------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.step { background: var(--ink); padding: 2.8rem 2.4rem; min-height: 24rem; display: flex; flex-direction: column; }
.step .n { font-family: var(--mono); font-size: 1.3rem; color: var(--mute); margin-bottom: 2rem; }
.step .v { font-family: var(--mono); font-size: clamp(2rem, 2.4vw, 2.8rem); color: var(--white); letter-spacing: -.02em; line-height: 1.15; margin-bottom: 1.2rem; word-break: break-word; }
.step p { color: var(--dim); font-size: 1.5rem; margin: 0; }
.step p b { color: var(--text); font-weight: 500; }
.step .fill { flex: 1; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } .step { min-height: 0; } }

details.sym { margin-top: 2.4rem; border-top: 1px solid var(--line); padding-top: 1.6rem; color: var(--dim); }
details.sym summary { cursor: pointer; color: var(--text); font-weight: 500; list-style: none; display: flex; gap: 1rem; align-items: center; }
details.sym summary::before { content: "+"; font-family: var(--mono); color: var(--mute); }
details.sym[open] summary::before { content: "-"; }
details.sym pre { font-family: var(--mono); font-size: 1.4rem; color: var(--text); background: var(--panel); padding: 2rem; overflow-x: auto; margin: 1.6rem 0 0; line-height: 1.6; }

/* ------------------------------- rules ------------------------------- */

.rules { counter-reset: rule; border-top: 1px solid var(--line); }
.rule { display: grid; grid-template-columns: 6rem 1fr; gap: 2rem; padding: 2.4rem 0; border-bottom: 1px solid var(--line); }
.rule::before { counter-increment: rule; content: counter(rule, decimal-leading-zero); font-family: var(--mono); color: var(--mute); font-size: 1.4rem; padding-top: .3rem; }
.rule h3 { margin-bottom: .4rem; }
.rule p { color: var(--dim); margin: 0; max-width: 72rem; }
.rule p .mono { color: var(--text); font-size: 1.4rem; }

/* ------------------------------- footer ------------------------------- */

footer { position: relative; z-index: 2; border-top: 1px solid var(--line); background: var(--ink); padding: 6rem 0 3rem; }
.fcols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3rem; }
.fcol .label { margin-bottom: .6rem; }
.fcol .v { color: var(--dim); font-size: 1.4rem; }
.fcol .v .mono { font-size: 1.3rem; word-break: break-all; }
.fcol a:hover { color: var(--white); }
.fmark { margin-top: 6rem; font-size: clamp(8rem, 22vw, 26rem); font-weight: 700; letter-spacing: -.05em; line-height: .8; color: #161616; user-select: none; }
.fline { display: flex; justify-content: space-between; gap: 2rem; margin-top: 2rem; color: var(--mute); font-size: 1.3rem; flex-wrap: wrap; }
@media (max-width: 900px) { .fcols { grid-template-columns: 1fr 1fr; } }

/* ------------------------------- reveal ------------------------------- */

.reveal { opacity: 0; transform: translateY(1.2rem); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .piece.d { transition: none; } }

/* ------------------------------- app ------------------------------- */

.app { padding: 11rem 0 8rem; }
.app-grid { display: grid; grid-template-columns: 34rem 1fr; gap: 3.2rem; align-items: start; }
@media (max-width: 900px) { .app-grid { grid-template-columns: 1fr; } }

.banner { background: var(--white); color: var(--ink); padding: 1.2rem 1.6rem; font-size: 1.4rem; display: flex; justify-content: space-between; gap: 1.6rem; align-items: center; margin-bottom: 2.4rem; }
.banner button { text-decoration: underline; font-weight: 600; }

.mlist { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.mitem { background: var(--ink); padding: 1.4rem 1.6rem; display: grid; grid-template-columns: 3.2rem 1fr auto; gap: 1.2rem; align-items: center; text-align: left; width: 100%; transition: background .15s; }
.mitem:hover { background: var(--panel); }
.mitem[aria-current] { background: var(--chip); }
.mitem .logo { width: 3.2rem; height: 3.2rem; font-size: 1.1rem; }
.mitem .t { font-weight: 500; color: var(--white); }
.mitem .s { font-size: 1.3rem; color: var(--mute); }
.mitem .days { font-family: var(--mono); font-size: 1.2rem; color: var(--mute); text-align: right; }
.mitem.new { color: var(--dim); }
.mitem.new .t { color: var(--dim); }

.card { background: var(--panel); border: 1px solid var(--line); padding: 2.4rem; }
.card + .card { margin-top: 1.6rem; }
.card h2 { font-size: 2.4rem; font-weight: 600; letter-spacing: -.02em; margin: 0 0 .4rem; color: var(--white); }
.card .sub { color: var(--mute); font-size: 1.4rem; margin: 0 0 2rem; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.kv div { background: var(--ink); padding: 1.4rem 1.6rem; }
.kv .label { display: block; margin-bottom: .4rem; }
.kv .val { font-family: var(--mono); font-size: 1.7rem; color: var(--white); word-break: break-all; }
.kv .val small { font-size: 1.2rem; color: var(--mute); margin-left: .4rem; font-family: var(--sans); }

.tabs { display: flex; gap: 1px; margin: 2.4rem 0 2rem; }
.tab { background: var(--chip); color: var(--dim); min-height: 4rem; padding: 0 1.6rem; font-size: 1.4rem; font-weight: 500; }
.tab[aria-selected="true"] { background: var(--white); color: var(--ink); }
.tab:disabled { opacity: .35; cursor: not-allowed; }

.field { display: grid; gap: .6rem; margin-bottom: 1.6rem; }
.field .label { display: flex; justify-content: space-between; }
.field .label button { color: var(--text); text-decoration: underline; }
.in { display: flex; align-items: center; background: var(--ink); border: 1px solid var(--line); }
.in input, .in select { flex: 1; min-width: 0; background: none; border: 0; padding: 1.2rem 1.4rem; font-family: var(--mono); font-size: 1.8rem; color: var(--white); outline: 0; }
.in select { font-family: var(--sans); font-size: 1.5rem; appearance: none; }
.in .unit { padding: 0 1.4rem; color: var(--mute); font-family: var(--mono); font-size: 1.3rem; white-space: nowrap; }
.in:focus-within { border-color: var(--mute); }
.quote { border-top: 1px solid var(--line); margin-top: 1.6rem; padding-top: 1.6rem; }
.quote .qrow { display: flex; justify-content: space-between; gap: 2rem; padding: .5rem 0; font-size: 1.4rem; color: var(--dim); }
.quote .qrow .mono { color: var(--white); }
.act { display: flex; gap: 1px; margin-top: 2rem; flex-wrap: wrap; }
.status { margin-top: 1.4rem; font-size: 1.4rem; color: var(--dim); min-height: 2rem; }
.status a { text-decoration: underline; }
.status.err { color: var(--white); }

.activity .row { display: grid; grid-template-columns: 10rem 1fr auto; gap: 1.6rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); font-size: 1.4rem; }
.activity .row .k { color: var(--text); font-weight: 500; }
.activity .row .mono { color: var(--dim); font-size: 1.3rem; }
.activity .row a:hover { color: var(--white); }

/* wallet picker */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.7); display: grid; place-items: center; padding: 2rem; }
.modal .box { background: var(--panel); border: 1px solid var(--line); width: min(42rem, 100%); padding: 2.4rem; }
.modal h2 { font-size: 2rem; margin: 0 0 .4rem; }
.modal .sub { margin-bottom: 1.6rem; }
.wlist { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.witem { background: var(--ink); display: flex; align-items: center; gap: 1.2rem; padding: 1.2rem 1.4rem; width: 100%; text-align: left; }
.witem:hover { background: var(--chip); }
.witem img { width: 2.8rem; height: 2.8rem; border-radius: 4px; }
.witem .name { font-weight: 500; }
.modal .close { margin-top: 1.6rem; color: var(--mute); text-decoration: underline; }

.wallet-chip .dot { width: .8rem; height: .8rem; border-radius: 50%; background: var(--mute); }
.wallet-chip.on .dot { background: var(--white); }

/* Narrow screens: the certificate stacks and the perforation runs across. */
@media (max-width: 640px) {
  .cert { grid-template-columns: 1fr; aspect-ratio: auto; }
  .piece { padding: 2rem; gap: 2.4rem; }
  .piece.p { border-radius: var(--r) var(--r) 0 0; }
  .piece.d {
    border-radius: 0 0 var(--r) var(--r);
    border-left: 0; border-top: 2px dashed #8a8a8a;
    transform-origin: 0 0;
    transform: translate(0, calc(var(--tear) * 5%)) rotate(calc(var(--tear) * 2deg));
  }
  .piece.d::before { left: -1.2rem; top: -1.3rem; }
  .piece.d::after { left: auto; right: -1.2rem; top: -1.3rem; bottom: auto; }
  .piece .serial { position: static; margin-top: 1rem; }
  .piece.d .kicker { min-height: 0; }
  .cert .note { position: static; margin-top: 1.6rem; }
  .cert { filter: none; }
}
