/* Typing… one system for every page. Palette off the avatar: milk, pale cobalt, graphite, cobalt, mint. No red. */
@font-face { font-family: "Bricolage"; src: url("/fonts/bricolage-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Hanken"; src: url("/fonts/hanken.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "JBMono"; src: url("/fonts/jbmono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --milk: #F4F1EC; --wall: #C9D3FF; --ink: #23252E; --ink2: #4A4C57; --cobalt: #2340D9; --cobalt-d: #1A2FA8;
  --mint: #9FE3C9; --mint-d: #2E8F6B; --grey: #8C8F99; --orange: #F2A65A;
  --plate: rgba(250, 248, 244, .92); --line: rgba(35, 37, 46, .12);
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  --wrap: 1240px; --pad: 24px; --hh: 72px; --rl: 40px;
  --display: "Bricolage", "Arial Black", sans-serif; --text: "Hanken", "Segoe UI", system-ui, sans-serif; --mono: "JBMono", ui-monospace, monospace;
  --shadow: 0 18px 40px -18px rgba(35, 45, 110, .35), 0 2px 6px rgba(35, 45, 110, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--milk); color: var(--ink); font: 400 18px/1.55 var(--text); font-variant-ligatures: none; font-feature-settings: "liga" 0, "clig" 0; font-variant-numeric: tabular-nums; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--pad) * 2); margin: 0 auto; padding: 0 var(--pad); }
.mono { font-family: var(--mono); font-weight: 500; font-size: 16px; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
b, strong { font-weight: 700; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 12px; }

/* ---- header: one on every page ------------------------------------------------------------------------------ */
.top { position: relative; z-index: 20; height: var(--hh); }
.top .wrap { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s3); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; justify-self: start; border-radius: 14px; }
.brand img { height: 40px; width: auto; }
.brand span { font: 800 24px/1 var(--display); letter-spacing: -.01em; }
.nav { display: flex; gap: var(--s4); }
.nav a { position: relative; text-decoration: none; font-weight: 600; font-size: 18px; padding: 10px 2px; color: var(--ink2); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 4px; border-radius: 4px; background: var(--cobalt); }
.mode { justify-self: end; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; background: var(--mint); color: var(--ink); font-weight: 700; font-size: 16px; text-decoration: none; box-shadow: var(--shadow); }
.mode:hover { background: #B4EBD6; }
.mode i { width: 10px; height: 10px; border-radius: 50%; background: var(--mint-d); }
.mode.live { background: var(--cobalt); color: #fff; }
.mode.live i { background: var(--mint); }
.rline { height: var(--rl); display: flex; align-items: center; position: relative; z-index: 19; font-size: 16px; color: var(--ink2); }
.rline .wrap { display: flex; align-items: center; gap: 12px; white-space: nowrap; overflow: hidden; }
.rline .wrap > span { overflow: hidden; text-overflow: ellipsis; }
.rline a { font-weight: 600; color: var(--cobalt-d); }
.rline.replaying { color: var(--ink); }
.rline .skip { display: none; }
.rline.replaying .skip { display: inline-flex; }
.chip { display: inline-flex; align-items: center; height: 44px; padding: 0 24px; border-radius: 999px; background: var(--plate); border: 1px solid var(--line); font-weight: 600; font-size: 16px; cursor: pointer; }
.chip:hover { background: #fff; }

/* ---- buttons ------------------------------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 1.4em; border-radius: 999px; border: 2px solid transparent; font-weight: 700; font-size: 18px; line-height: 1; text-decoration: none; cursor: pointer; transition: transform .12s ease-out, background-color .15s; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.primary { background: var(--cobalt); color: #fff; box-shadow: 0 14px 28px -12px rgba(35, 64, 217, .7); }
.btn.primary:hover { background: #2E4DF0; }
.btn.ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn.ghost:hover { background: rgba(255, 255, 255, .6); }
.btn[aria-disabled="true"] { cursor: not-allowed; }

/* ---- the contract tray: only on the first screen ----------------------------------------------------------- */
.tray { display: flex; flex-direction: column; gap: 12px; padding: 12px 12px 12px 12px; border-radius: 28px; background: var(--plate); box-shadow: var(--shadow); max-width: 560px; }
.ca { padding-left: 12px; }
.ca { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.ca .addr { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); font-size: 16px; }
.ca .addr:not(.set) { white-space: normal; line-height: 1.3; }
.ca .addr.set { font-family: var(--mono); color: var(--ink); user-select: all; }
.ca .copy { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: #E9E6E0; font-weight: 700; font-size: 16px; cursor: pointer; }
.ca .copy:hover:not([disabled]) { background: #DEDAD2; }
.ca .copy[disabled] { color: #6B6D76; cursor: not-allowed; }
.ca .copy img { width: 16px; height: 16px; }
.links { display: flex; gap: 8px; }
.links .lk { flex: 1; justify-content: center; }
.lk { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; white-space: nowrap; }
.lk img { width: 18px; height: 18px; object-fit: contain; }
.lk:hover { background: #33364A; }
.lk.locked { background: #E4E1DA; color: var(--ink); cursor: not-allowed; }
.lk.locked .lock { width: 14px; height: 14px; opacity: .8; }
.lk .soon { font-weight: 600; color: var(--ink2); }

/* ---- toast: one at a time, queued ------------------------------------------------------------------------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, calc(100% + 48px)); visibility: hidden; padding: 14px 24px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: 16px; transition: transform .25s ease-out; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.on { transform: translate(-50%, 0); visibility: visible; }

/* ---- sections below the first screen ----------------------------------------------------------------------- */
.sec { padding-top: var(--s7); }
.sec:last-of-type { padding-bottom: var(--s7); }
.sh { margin: 0 0 var(--s4); }
.sh small { display: block; font-weight: 600; font-size: 16px; color: var(--ink2); margin-bottom: 8px; }
.sh h2 { margin: 0; font: 800 48px/1.05 var(--display); letter-spacing: -.015em; }
.sh p { margin: 12px 0 0; max-width: 62ch; color: var(--ink2); }
.card { background: var(--plate); border-radius: 28px; box-shadow: var(--shadow); padding: var(--s4); }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.more { display: inline-flex; margin-top: var(--s3); font-weight: 700; color: var(--cobalt-d); text-decoration: none; }
.more:hover { text-decoration: underline; }
.note { font-size: 16px; color: var(--ink2); }

/* ---- tables (text face, tabular numbers) ------------------------------------------------------------------- */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--plate); border-radius: 28px; box-shadow: var(--shadow); overflow: hidden; }
.tbl th, .tbl td { height: 54px; padding: 0 24px; text-align: left; font-size: 17px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { position: sticky; top: 0; z-index: 2; background: #EFECE6; font-weight: 700; font-size: 16px; color: var(--ink2); }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background-color .15s; }
.tbl tbody tr:hover, .tbl tbody tr.hot { background: rgba(159, 227, 201, .28); }
.w { display: inline-flex; align-items: center; gap: 8px; }
.w .mono { cursor: pointer; }
.ico { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 8px; border: 0; background: transparent; cursor: pointer; padding: 0; }
.ico:hover { background: rgba(35, 37, 46, .08); }
.ico img { width: 16px; height: 16px; }
.tag { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; font-size: 16px; font-weight: 700; background: #EAEAF7; color: var(--cobalt-d); }
.tag.mint { background: rgba(159, 227, 201, .55); color: #1E6B4F; }
.tag.grey { background: #ECEBE7; color: #55575F; }
.showmore { margin-top: var(--s2); }

/* ---- the fx test panel (?fx=1) ----------------------------------------------------------------------------- */
.fxpanel { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-wrap: wrap; gap: 8px; max-width: 420px; padding: 12px; border-radius: 20px; background: rgba(35, 37, 46, .9); }
.fxpanel button { height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: #fff; font-weight: 700; font-size: 16px; cursor: pointer; }

@media (max-width: 1023px) {
  :root { --hh: 112px; --rl: auto; }
  .top .wrap { grid-template-columns: 1fr auto; grid-template-rows: 60px 52px; gap: 0 var(--s2); }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
  .nav a { font-size: 17px; }
  .brand span { font-size: 22px; }
  .rline { padding: 8px 0; }
  .rline .wrap { white-space: normal; flex-wrap: wrap; gap: 4px 12px; }
  .sh h2 { font-size: 36px; }
  .row3 { grid-template-columns: 1fr; }
  .tray { padding: 12px; border-radius: 24px; }
  .ca { flex: 1 1 100%; }
  .links { flex: 1 1 100%; }
  .links .lk { flex: 1; justify-content: center; }
  .tbl th, .tbl td { padding: 0 18px; }
}
@media (max-width: 420px) { :root { --pad: 16px; } .mode { padding: 0 14px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.wide { overflow-x: auto; border-radius: 28px; }
.mode { padding: 0 24px; }
@media (max-width: 360px) { .brand span { display: none; } }
