/* Too Many Tabs: the system every page shares, in the look of the X logo and banner: a deep night sky going teal
   towards the water, soft blurred clouds, bokeh lights, glossy violet-magenta neon tubes with a cyan edge.
   Layout: one container (1312 px + 32 px gutters, 16 px on a phone), spacing 8/16/24/32/48/64/96, one section head,
   one glass card (dark glass, 20 px radius, a thin violet->cyan tube line), one table, glossy pill buttons. No red. */

@font-face { font-family: "Baloo 2"; src: url("/fonts/Baloo2-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Text"; src: url("/fonts/Sora-var.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Mono"; src: url("/fonts/AzeretMono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --night: #061036;
  --deep: #0A3A5A;
  --glass: rgba(8, 20, 60, 0.6);
  --glass-2: rgba(5, 14, 44, 0.82);
  --ink: #EAF2FF;
  --ink-2: #B4C6EA;
  --violet: #8A2BE2;
  --magenta: #D23CFF;
  --cyan: #3FF0FF;
  --yellow: #FFD84A;
  --green: #3CFF7A;
  --orange: #FF9A3C;
  --lilac: #E3A6FF;
  --key-ink: #10093A;
  --tube: linear-gradient(135deg, var(--violet), var(--magenta) 55%, var(--cyan));
  --gut: 32px;
  --wrap: 1312px;
  --head-h: 72px;
  --reh-h: 48px;
  --r: 20px;
}
@media (max-width: 760px) { :root { --gut: 16px; --head-h: 64px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 16px); background: var(--night); }
body {
  margin: 0; min-height: 100svh; color: var(--ink); position: relative;
  font: 400 18px/1.55 "Text", system-ui, sans-serif; font-variant-numeric: tabular-nums; font-feature-settings: "liga" 0, "calt" 0;
  background: linear-gradient(180deg, var(--night) 0%, #071a48 45%, var(--deep) 100%) fixed;
  overflow-x: clip;
}
/* the sky: soft clouds (pre-blurred radial gradients, nothing blurs live) and bokeh lights, drifting slowly */
body::before, body::after { content: ""; position: fixed; inset: -10% -10%; z-index: -1; pointer-events: none; }
body::before {
  background:
    radial-gradient(38% 22% at 18% 18%, rgba(30, 80, 230, 0.35), transparent 70%),
    radial-gradient(30% 20% at 78% 12%, rgba(40, 120, 255, 0.3), transparent 70%),
    radial-gradient(34% 24% at 70% 58%, rgba(20, 200, 210, 0.22), transparent 70%),
    radial-gradient(40% 26% at 20% 78%, rgba(20, 170, 190, 0.2), transparent 70%);
  animation: drift 60s ease-in-out infinite alternate;
}
body::after {
  background:
    radial-gradient(2px 2px at 12% 14%, #fff, transparent), radial-gradient(2px 2px at 34% 8%, var(--cyan), transparent),
    radial-gradient(2.5px 2.5px at 58% 20%, var(--yellow), transparent), radial-gradient(2px 2px at 81% 9%, #fff, transparent),
    radial-gradient(2px 2px at 91% 33%, var(--cyan), transparent), radial-gradient(2.5px 2.5px at 7% 41%, var(--yellow), transparent),
    radial-gradient(2px 2px at 46% 36%, #fff, transparent), radial-gradient(2px 2px at 66% 46%, var(--cyan), transparent),
    radial-gradient(2px 2px at 24% 62%, #fff, transparent), radial-gradient(2.5px 2.5px at 87% 70%, var(--yellow), transparent);
  animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(4%, -2%, 0); } }
@keyframes twinkle { 0% { opacity: 0.45; } 50% { opacity: 1; } 100% { opacity: 0.6; } }

img { display: block; max-width: 100%; height: auto; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--magenta); color: #fff; }
h1, h2, h3 { margin: 0; font-weight: 800; }
p { margin: 0; }
.mono { font-family: "Mono", ui-monospace, monospace; font-weight: 500; font-size: 16px; letter-spacing: 0; }
/* the display face: plump rounded white letters with a thick violet outline and a hard cyan glow line (no blur) */
.disp {
  font-family: "Baloo 2", "Text", sans-serif; font-weight: 800; color: #FFFFFF; letter-spacing: 0;
  -webkit-text-stroke: 0.14em #5B17C9; paint-order: stroke fill;
  text-shadow: 0 0.04em 0 #9B4DFF, 0 0.1em 0 rgba(63, 240, 255, 0.55);
}
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -64px; z-index: 50; background: var(--cyan); color: var(--key-ink); padding: 12px 20px; border-radius: 999px; }
.skip:focus { top: 8px; }
.num { font-variant-numeric: tabular-nums; }
b, strong { font-weight: 700; color: #FFFFFF; }
.acc { color: var(--lilac); }

/* the glass card: one style everywhere */
.glass, .plate {
  background: var(--glass);
  border: 2px solid transparent; border-radius: var(--r); padding: 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ---------- header: the logo mark + a small name, the nav as glossy pills, sound + Rehearsal right ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(5, 12, 40, 0.88); border-bottom: 1px solid rgba(63, 240, 255, 0.25); }
.top .wrap { height: var(--head-h); display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; flex: none; }
.logo img { width: 40px; height: 40px; border-radius: 10px; }
.logo span { font: 800 22px/1 "Baloo 2", sans-serif; white-space: nowrap; }
.tabs-nav { display: flex; gap: 6px; margin: 0 auto; }
.tabs-nav a {
  display: flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 999px; color: var(--ink-2); text-decoration: none;
  font-size: 16px; font-weight: 600; white-space: nowrap; border: 2px solid transparent;
}
.tabs-nav a:hover { color: #fff; background: rgba(138, 43, 226, 0.18); }
.tabs-nav a[aria-current="page"] {
  color: #fff; background: linear-gradient(180deg, #A24BF0, #7A22D6) padding-box, linear-gradient(135deg, var(--cyan), var(--magenta)) border-box;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 0 18px rgba(210, 60, 255, 0.35);
}
.hdr-right { display: flex; align-items: center; gap: 10px; flex: none; }
.badge, .sound {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px; border-radius: 999px; font-size: 16px; font-weight: 600; color: var(--ink);
  background: var(--glass-2); border: 2px solid transparent;
}
.badge::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 10px var(--yellow); }
.badge.live::before { background: var(--green); box-shadow: 0 0 10px var(--green); }
.sound { cursor: pointer; font-family: inherit; }
.sound::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink-2); }
.sound[aria-pressed="true"]::before { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.menu-btn { display: none; }
.sound.in-nav { display: none; }
@media (max-width: 1180px) { .tabs-nav a { padding: 0 14px; } .logo span { display: none; } }
@media (max-width: 980px) {
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center; margin-left: auto; height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
    font: 600 16px "Text", sans-serif; color: #fff; background: var(--glass-2); border: 2px solid transparent;
  }
  .tabs-nav {
    position: fixed; top: var(--head-h); right: 0; bottom: 0; width: min(320px, 86vw); margin: 0; z-index: 40; flex-direction: column; gap: 8px; padding: 24px 16px;
    background: rgba(5, 12, 40, 0.97); border-left: 1px solid rgba(63, 240, 255, 0.3);
    transform: translateX(105%); visibility: hidden; transition: transform .25s ease, visibility 0s .25s;
  }
  .tabs-nav.open { transform: none; visibility: visible; transition: transform .25s ease; }
  .tabs-nav a { height: 52px; }
  .sound.in-nav { display: inline-flex; align-self: flex-start; margin-top: 8px; }
  .sound.in-hdr { display: none; }
}
@media (max-width: 480px) { .top .wrap { gap: 10px; } .badge::before { display: none; } }

/* ---------- the Rehearsal line ---------- */
.reh { background: rgba(5, 12, 40, 0.6); border-bottom: 1px solid rgba(138, 43, 226, 0.3); }
.reh .wrap { height: var(--reh-h); display: flex; align-items: center; gap: 16px; }
.reh .key.small { min-height: 40px; padding: 0 20px; }
.reh p { font-size: 16px; color: var(--ink-2); flex: 1; min-width: 0; }
.reh .replay-status { font-size: 16px; font-weight: 600; color: var(--yellow); white-space: nowrap; }
.reh .live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--green); vertical-align: middle; }
@media (max-width: 760px) { .reh .long { display: none; } }

/* ---------- glossy pill keys ---------- */
.key {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 700 17px/1 "Text", sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; color: #fff;
  background: linear-gradient(180deg, #B055FF 0%, #8A2BE2 55%, #6E1BC4 100%) padding-box, linear-gradient(135deg, var(--cyan), var(--magenta)) border-box;
  border: 2px solid transparent; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), inset 0 -3px 0 rgba(40, 0, 90, 0.35), 0 6px 22px rgba(138, 43, 226, 0.45);
  transition: transform .12s ease, filter .12s ease;
}
.key:hover { filter: brightness(1.1); color: #fff; }
.key:active { transform: translateY(2px) scale(0.98); }
.key.ghost { background: var(--glass-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.key.small { min-height: 48px; padding: 0 22px; font-size: 16px; }
.key.icon { width: 48px; padding: 0; }
.key[disabled], .key.off { filter: saturate(0.5); cursor: not-allowed; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.key.off:active, .key[disabled]:active { transform: none; }
.key img { width: 22px; height: 22px; flex: none; }
.key .lock { width: 16px; height: 16px; }

/* ---------- the contract line ---------- */
.ca { display: grid; gap: 10px; }
.ca-row { display: flex; align-items: stretch; gap: 8px; min-width: 0; flex-wrap: wrap; }
.ca-addr {
  flex: 1 1 0; min-width: 150px; display: flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 999px;
  background: var(--glass-2); border: 2px solid transparent;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; user-select: all; cursor: text;
}
.ca-addr.wait { font-family: "Text", sans-serif; font-weight: 500; color: var(--ink-2); user-select: none; cursor: default; white-space: normal; text-overflow: clip; line-height: 1.25; padding: 11px 20px; border-radius: 24px; }
.ca-row { gap: 6px; flex-wrap: nowrap; }
.ca-row .key.small { padding: 0 16px; flex: none; }
.ca-row .key .lock { margin-left: -4px; }
/* the contract pill: "CA", the address (or the honest waiting line), the Copy key inside, all on one line */
.ca-pill {
  position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 7px; min-height: 48px; padding: 0 6px 0 18px; border-radius: 999px;
  background: var(--glass-2);
}
.ca-k { flex: none; font-size: 16px; font-weight: 800; color: var(--cyan); }
.ca-pill .ca-addr { flex: 1 1 auto; min-width: 0; min-height: 0; padding: 0; background: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-pill .ca-addr::after { display: none; }
.ca-pill .ca-addr.wait { white-space: nowrap; padding: 0; line-height: 1.4; border-radius: 0; }
.ca-copy {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  font: 700 16px "Text", sans-serif; color: #fff; border: 0; background: linear-gradient(180deg, #A24BF0, #7A22D6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.ca-copy[disabled] { cursor: not-allowed; filter: saturate(0.5); }
.ca-copy img { width: 16px; height: 16px; }
@media (max-width: 1299px) { .ca-row { flex-wrap: wrap; } .ca-pill { flex: 1 1 100%; } }
@media (max-width: 420px) { .ca-copy span, .ca-k { display: none; } .ca-copy { width: 36px; padding: 0; justify-content: center; } }

/* ---------- section head ---------- */
.sec { padding: 64px 0; }
.sec + .sec { padding-top: 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.sec-head h2 { font-size: 52px; line-height: 1.05; }
.sec-head p { color: var(--ink-2); max-width: 62ch; margin-top: 12px; }
@media (max-width: 760px) { .sec { padding: 48px 0; } .sec-head { flex-direction: column; align-items: flex-start; } .sec-head h2 { font-size: 40px; } }

/* ---------- tables: glass, rows 54 px, sticky head, numbers right ---------- */
.table-wrap { background: var(--glass); border: 2px solid transparent; border-radius: var(--r); overflow: clip; }
.sample-note { font-size: 16px; color: var(--ink-2); margin-bottom: 12px; }
table.t { width: 100%; border-collapse: collapse; font-size: 17px; }
table.t thead th { position: sticky; top: var(--head-h); z-index: 2; background: rgba(6, 14, 46, 0.96); color: var(--ink-2); font-weight: 600; font-size: 16px; text-align: left; height: 52px; padding: 0 20px; white-space: nowrap; }
table.t td { height: 54px; padding: 0 20px; border-top: 1px solid rgba(138, 43, 226, 0.25); white-space: nowrap; }
table.t .r { text-align: right; }
[data-sessions].live tr > :nth-child(5) { display: none; }
[data-sessions].notx tr > :nth-child(8) { display: none; }
table.t tbody tr { transition: background .15s ease; }
table.t tbody tr:hover, table.t tbody tr.hot { background: rgba(63, 240, 255, 0.08); }
table.t tbody tr.fresh { animation: rowIn .8s ease-out; }
@keyframes rowIn { from { background: rgba(210, 60, 255, 0.3); } to { background: transparent; } }
.who { display: inline-flex; align-items: center; gap: 6px; }
.who a { color: var(--cyan); text-decoration: none; }
.who a:hover { text-decoration: underline; color: #fff; }
.ico { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; background: none; border: 0; border-radius: 8px; cursor: pointer; vertical-align: middle; }
.ico img { width: 16px; height: 16px; }
.ico:hover { background: rgba(63, 240, 255, 0.12); }
.more { display: flex; justify-content: center; padding: 16px; border-top: 1px solid rgba(138, 43, 226, 0.25); }
/* a wallet's chip: a tiny glossy window whose top bar takes the wallet's colour */
.chip { display: inline-block; width: 22px; height: 16px; margin-right: 10px; vertical-align: -2px; border-radius: 5px; border: 2px solid var(--violet); background: linear-gradient(180deg, var(--c, var(--cyan)) 0 5px, #0B1650 5px); box-shadow: 0 0 8px rgba(63, 240, 255, 0.35); }
.tag { display: inline-flex; align-items: center; padding: 8px 16px; line-height: 1.4; border-radius: 999px; font-size: 16px; font-weight: 600; background: rgba(5, 14, 44, 0.9); color: var(--ink-2); white-space: nowrap; }
.tag.open { color: var(--green); }
.tag.closed { color: var(--orange); }
.tag.pin { color: var(--cyan); }
.tag.crash { color: var(--lilac); }
.tag.swap { color: var(--orange); }
@media (max-width: 1100px) {
  [data-log] tr > :nth-child(6), [data-open] tr > :nth-child(4), [data-sessions] tr > :nth-child(3), [data-closed] tr > :nth-child(5) { display: none; }
}
@media (max-width: 900px) {
  table.t { font-size: 16px; }
  table.t td, table.t thead th { padding: 10px 18px; white-space: normal; }
  [data-log] tr > :nth-child(1), [data-log] tr > :nth-child(5), [data-log] tr > :nth-child(4),
  [data-open] tr > :nth-child(5), [data-closed] tr > :nth-child(2),
  [data-sessions] tr > :nth-child(2), [data-sessions] tr > :nth-child(4), [data-sessions] tr > :nth-child(5), [data-sessions] tr > :nth-child(6),
  [data-mine] tr > :nth-child(2), [data-mine] tr > :nth-child(5) { display: none; }
}
@media (max-width: 400px) { [data-open] tr > :nth-child(2), [data-closed] tr > :nth-child(4), [data-sessions] tr > :nth-child(8), [data-log] tr > :nth-child(7), [data-mine] tr > :nth-child(6) { display: none; } }

/* ---------- footer line: the contract ---------- */
.foot { border-top: 1px solid rgba(63, 240, 255, 0.25); background: rgba(5, 12, 40, 0.85); }
.foot .wrap { min-height: 64px; display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; font-size: 16px; color: var(--ink-2); }
.foot .addr { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.foot .addr.wait { font-family: "Text", sans-serif; color: var(--ink-2); }

/* ---------- toast, tooltip ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, calc(100% + 48px)); visibility: hidden; max-width: min(560px, calc(100vw - 32px));
  background: var(--glass-2); border: 2px solid transparent; border-radius: 18px;
  color: var(--ink); padding: 14px 22px; font-size: 16px; transition: transform .25s ease;
}
.toast.on { transform: translate(-50%, 0); visibility: visible; }
.toast.anchored { position: fixed; transform: translateY(10px); opacity: 0; text-align: center; padding: 10px 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform .25s ease, opacity .25s ease; }
.toast.anchored.on { transform: none; opacity: 1; }
.tip {
  position: fixed; left: 0; top: 0; z-index: 70; max-width: 300px; padding: 12px 18px; border-radius: 14px; color: var(--ink); font-size: 16px; line-height: 1.45; pointer-events: none; opacity: 0; transition: opacity .12s;
  background: rgba(5, 12, 40, 0.97); border: 2px solid transparent;
}
.tip.on { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; }
}

/* the tube line of every glass surface: a 2 px ring masked out of the tube gradient, drawn over the glass */
.glass, .plate, .badge, .sound, .menu-btn, .key.ghost, .ca-addr, .table-wrap, .figs div, .sum div, .pot, .tower-label, .toast, .tip, .pinned-card { border: 0 !important; }
.glass, .plate, .badge, .sound, .menu-btn, .key.ghost, .ca-addr, .ca-pill, .table-wrap, .figs div, .sum div, .pinned-card { position: relative; }
.glass::after, .plate::after, .badge::after, .sound::after, .menu-btn::after, .key.ghost::after, .ca-addr::after, .ca-pill::after, .table-wrap::after,
.figs div::after, .sum div::after, .pot::after, .tower-label::after, .toast::after, .tip::after, .pinned-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; background: var(--tube); pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.pinned-card::after { background: linear-gradient(135deg, var(--cyan), var(--violet)); }
.table-wrap::after { z-index: 3; }
