/*
 * css/components.css: the PONMATH design system, part 2 (components).
 *
 * colosseum.com's components rebuilt on the tokens in css/base.css. Snippets and usage: reference/DESIGN.md;
 * every component is on reference/design-demo.html.
 *
 *   .sep            diamond separator  ◇──◇
 *   .frame          double-border plate (cards, panels), --corners, --flush
 *   .media          framed picture or video, with a seal medallion on its lower edge
 *   .btn            red primary with the inset double border; --ghost, --sm, --lg, --block, --icon
 *   .soon           a control that is visible but not live yet ($PONMATH Buy, Copy CA)
 *   .caps .label    serif and mono small-caps labels (base.css); .kv, .rule--diamond, .countdown
 *   .heading        section head: separator, headline with an Old London initial, lede
 *   .strip          the event strip under the nav (meander bands, painted ground)
 *   .nav            top bar; .sheet the mobile menu; .fbar the floating bar after the hero
 *   .footer         crimson plate with texture, emblem and the one line
 *   .field .input .select .textarea .check .seg .range   forms
 *   .table          engraved table, --stack turns rows into cards on phones
 *   .stat .stats    big serif numbers with an accent suffix
 *   .pill .dot      status chips and the live dot
 *   .toasts .toast  notifications
 *   .card .tabs .progress .dialog .notice .empty .skeleton .seal .hero .call
 */

/* ================================================================= separator */

.sep {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--brand-border-strong);
  height: 9px;
}
.sep::before, .sep::after {
  content: '';
  flex: none;
  width: 7px; height: 7px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}
.sep__line { display: block; width: 96px; height: 1px; background: var(--brand-border); }
.sep--start { justify-content: flex-start; }
.sep--wide .sep__line { width: min(320px, 50vw); }

/* hairline with a small diamond in the middle (inside the hero card) */
.rule--diamond {
  position: relative;
  height: 1px;
  background: var(--brand-border-subtle);
}
.rule--diamond::after {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 7px; height: 7px;
  background: var(--brand-bg-muted);
  border: 1px solid var(--brand-border);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ================================================================= frame (double-border plate) */

.frame {
  position: relative;
  padding: 5px;
  background: var(--brand-bg-muted);
  border: 1px solid var(--brand-border);
}
.frame__inner {
  position: relative;
  height: 100%;
  border: 1px solid var(--brand-border-subtle);
  background: var(--brand-bg-muted);
  padding: var(--brand-space-lg);
}
.frame__inner--flush { padding: 0; }
.frame--elevated, .frame--elevated > .frame__inner { background: var(--brand-bg-elevated); }
.frame--clear, .frame--clear > .frame__inner { background: transparent; }
@media (min-width: 768px) { .frame__inner { padding: var(--brand-space-xl); } .frame__inner--flush { padding: 0; } }

/* corner squares, as on colosseum's closing "Your turn" plate */
.frame--corners::before, .frame--corners::after,
.frame--corners > .frame__inner::before, .frame--corners > .frame__inner::after {
  content: '';
  position: absolute;
  width: 30px; height: 30px;
  background: var(--brand-bg-elevated);
  border: 1px solid var(--brand-border);
  box-shadow: inset 0 0 0 4px var(--brand-bg-elevated), inset 0 0 0 5px var(--brand-border-subtle);
  z-index: 1;
}
.frame--corners::before { top: -15px; left: -15px; }
.frame--corners::after { top: -15px; right: -15px; }
.frame--corners > .frame__inner::before { bottom: -21px; left: -21px; }
.frame--corners > .frame__inner::after { bottom: -21px; right: -21px; }
@media (max-width: 599px) {
  .frame--corners::before, .frame--corners::after,
  .frame--corners > .frame__inner::before, .frame--corners > .frame__inner::after { width: 22px; height: 22px; }
  .frame--corners::before { top: -11px; left: -11px; }
  .frame--corners::after { top: -11px; right: -11px; }
  .frame--corners > .frame__inner::before { bottom: -17px; left: -17px; }
  .frame--corners > .frame__inner::after { bottom: -17px; right: -17px; }
}

/* a link that is a whole frame */
a.frame { display: block; transition: border-color var(--brand-transition-fast); }
a.frame:hover { border-color: var(--brand-border-strong); }
a.frame:hover > .frame__inner { background: var(--brand-bg-hover); }

/* ================================================================= framed media and seal */

.media { position: relative; display: block; }
.media__window {
  position: relative;
  overflow: hidden;
  background: var(--brand-bg-elevated);
  aspect-ratio: 16 / 9;
}
.media__window--wide { aspect-ratio: 408 / 160; }      /* the colosseum hero card band */
.media__window--square { aspect-ratio: 1; }
.media__window > img, .media__window > video, .media__window > picture, .media__window > picture > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.media__window--focus-left > img, .media__window--focus-left > video { object-position: 30% 50%; }
.media__caption { padding-top: var(--brand-space-xs); }

/* the medallion that sits on the lower edge of a media window */
.seal {
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  padding: 4px;
  background: var(--brand-bg-muted);
  border: 1px solid var(--brand-border);
  box-shadow: inset 0 0 0 3px var(--brand-bg-muted), inset 0 0 0 4px var(--brand-border-subtle);
}
.seal img { width: 100%; height: 100%; object-fit: contain; }
.seal--sm { width: 36px; height: 36px; padding: 3px; }
.seal--lg { width: 64px; height: 64px; padding: 6px; }
.media > .seal {
  position: absolute; left: 50%; bottom: -24px;
  transform: translateX(-50%);
  z-index: 2;
}

/* ================================================================= buttons
 * One element, so a script may set textContent. The inset shadows draw colosseum's double frame:
 * 1px outer line, 2px light gap, 1px inner line, then the red fill. */

.btn {
  --btn-gap: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--brand-border-primary);
  background: var(--brand-action-bg);
  box-shadow: inset 0 0 0 var(--btn-gap) var(--brand-bg-elevated), inset 0 0 0 calc(var(--btn-gap) + 1px) var(--brand-accent-strong);
  color: var(--brand-text-on-accent);
  font-family: var(--brand-font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--brand-transition-fast), border-color var(--brand-transition-fast), color var(--brand-transition-fast);
}
.btn:hover { background: var(--brand-action-bg-hover); }
.btn:active { background: var(--brand-accent-hover); }
.btn:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 3px; }
.btn svg, .btn__icon { width: 14px; height: 14px; flex: none; }

.btn--sm { min-height: 40px; padding: 0 14px; }
.btn--lg { --btn-gap: 4px; min-height: 58px; padding: 0 22px; font-size: 15px; line-height: 24px; gap: 10px; }
.btn--block { display: flex; width: 100%; }
.btn--icon { padding: 0; width: 44px; }
.btn--icon.btn--sm { width: 40px; }

/* secondary: same frame, paper fill */
.btn--ghost {
  background: var(--brand-bg);
  box-shadow: inset 0 0 0 var(--btn-gap) var(--brand-bg-elevated), inset 0 0 0 calc(var(--btn-gap) + 1px) var(--brand-border-subtle);
  color: var(--brand-text-secondary);
}
.btn--ghost:hover { background: var(--brand-bg-elevated); color: var(--brand-text-primary); }
.btn--ghost:active { background: var(--brand-bg-hover); }

/* plain text action (no frame): "How a share is checked" */
.btn--text {
  min-height: 44px; padding: 0;
  border: 0; background: none; box-shadow: none;
  color: var(--brand-accent-link);
}
.btn--text:hover { background: none; color: var(--brand-accent-hover); text-decoration: underline; text-underline-offset: 3px; }

.btn:disabled, .btn[aria-disabled='true'] {
  cursor: not-allowed;
  background: var(--brand-bg-elevated);
  box-shadow: inset 0 0 0 var(--btn-gap) var(--brand-bg-elevated), inset 0 0 0 calc(var(--btn-gap) + 1px) var(--brand-border-subtle);
  color: var(--brand-text-muted);
}
.btn.is-busy { cursor: progress; }
.btn.is-busy::after {
  content: '';
  width: 12px; height: 12px;
  border: 1px solid currentColor; border-right-color: transparent;
  border-radius: var(--brand-radius-pill);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================= soon state ($PONMATH not launched) */

.soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px;
  color: var(--brand-text-muted);
  font-size: 14px;
  cursor: not-allowed;
  white-space: nowrap;
}
.soon__chip {
  font-family: var(--brand-font-label);
  font-size: 9px;
  line-height: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 1px 5px;
  border: 1px solid var(--brand-border);
  color: var(--brand-text-muted);
}
/* when the CA is set the same element drops aria-disabled and lights up */
.soon:not([aria-disabled='true']) { color: var(--brand-text-secondary); cursor: pointer; }
.soon:not([aria-disabled='true']):hover { color: var(--brand-accent-readable); }
.soon:not([aria-disabled='true']) .soon__chip { display: none; }

/* ================================================================= label rows and values */

/* label over value: "BUILDERS IN THE ARENA / 4,927" */
.kv { display: grid; gap: 8px; justify-items: center; text-align: center; }
.kv--start { justify-items: start; text-align: left; }
.kv__value {
  font-family: var(--brand-font-display);
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--brand-text-primary);
  font-variant-numeric: tabular-nums lining-nums;
}
.kv__value--sm { font-size: 1.25rem; }
.kv__value--mono { font-family: var(--brand-font-label); font-size: 15px; letter-spacing: .06em; }

/* horizontal label rows inside a panel: label left, value right */
.rows { display: grid; }
.rows > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--brand-space-md);
  padding: 12px 0;
  border-top: 1px solid var(--brand-border-subtle);
}
.rows > div:first-child { border-top: 0; }
.rows dt, .rows .rows__k { font-family: var(--brand-font-label); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-text-muted); }
.rows dd, .rows .rows__v { margin: 0; color: var(--brand-text-primary); text-align: right; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }

/* mono counter with red lead unit: 22D 04H 54M 50S */
.countdown {
  display: inline-flex; gap: 10px; align-items: baseline;
  font-family: var(--brand-font-label);
  font-size: 15px;
  letter-spacing: .08em;
  color: var(--brand-text-secondary);
  font-variant-numeric: tabular-nums;
}
.countdown small { font-size: 11px; color: var(--brand-text-muted); margin-left: 1px; }
.countdown b { font-weight: 400; color: var(--brand-accent); }

/* ================================================================= section heading */

.heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--brand-space-lg);
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}
.heading .lede { max-width: 33rem; }
.heading--start { align-items: flex-start; text-align: left; margin-inline: 0; }

/* title left, lede right (colosseum "Build with unfair advantages") */
.split {
  display: grid;
  gap: var(--brand-space-lg);
  align-items: end;
}
.split > .lede { max-width: 26rem; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--brand-space-xl); }
  .split > .lede { justify-self: end; }
}

/* ================================================================= event strip (under the nav) */

.strip {
  position: relative;
  isolation: isolate;
  background: var(--brand-accent-soft);
  color: var(--brand-text-ink);
  overflow: hidden;
}
:root[data-theme='dark'] .strip { color: var(--brand-text-primary); }
/* the meander band: a mask so the colour follows the theme */
.strip::before, .strip::after {
  content: '';
  position: absolute; left: 0; right: 0;
  height: 8px;
  background: var(--brand-accent-strong);
  -webkit-mask: url(../img/art/meander-band.svg) 0 0 / auto 100% repeat-x;
  mask: url(../img/art/meander-band.svg) 0 0 / auto 100% repeat-x;
  opacity: .55;
  z-index: 2;
}
.strip::before { top: 0; }
.strip::after { bottom: 0; transform: scaleY(-1); }
.strip__art {
  position: absolute; inset: 0;
  background: url(../img/art/strip-art.webp) center 38% / cover no-repeat;
  opacity: .32;
  z-index: -1;
}
:root[data-theme='dark'] .strip__art { opacity: .18; }
.strip__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--brand-space-sm);
  min-height: 64px;
  max-width: var(--brand-shell-max);
  margin-inline: auto;
  padding: 14px var(--brand-gutter);
}
.strip__mark { display: inline-flex; align-items: center; gap: 12px; min-width: 0; min-height: 44px; flex: 1 1 auto; }
.strip__seal { width: 36px; height: 36px; flex: none; }
.strip__title { font-family: var(--brand-font-display); font-size: 17px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip__phase { display: none; color: inherit; }
.strip__meta { display: inline-flex; gap: 8px; align-items: baseline; flex: none; color: var(--brand-accent-readable); }
.strip__meta .label { color: inherit; }
.strip__meta-k { opacity: 1; }
.strip__close {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-right: -10px;
  color: var(--brand-text-secondary);
}
.strip__close:hover { color: var(--brand-text-primary); }
.strip__close svg { width: 14px; height: 14px; }
@media (min-width: 900px) {
  .strip__bar { min-height: 72px; gap: var(--brand-space-md); }
  .strip__mark { flex: none; }
  .strip__seal { width: 40px; height: 40px; }
  .strip__title { font-size: 19px; }
  .strip__phase { display: block; flex: 1; text-align: center; color: var(--brand-text-primary); }
}
@media (max-width: 479px) { .strip__meta-k { display: none; } }

/* ================================================================= nav */

.nav { position: relative; z-index: 40; background: var(--brand-bg); }
.nav__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--brand-space-md);
  height: var(--brand-nav-height);
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--brand-gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  min-height: 44px;
  color: var(--brand-text-ink);
}
.brand__mark { width: 36px; height: 36px; flex: none; }
/* the wordmark: GT Pantheon small caps, "Ponmath" in the DOM, read as PONMATH */
.brand__word {
  font-family: var(--brand-font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  font-variant-caps: small-caps;
  font-feature-settings: 'smcp' 1, 'c2sc' 0;
  letter-spacing: .07em;
  white-space: nowrap;
}
.brand--lg .brand__mark { width: 48px; height: 48px; }
.brand--lg .brand__word { font-size: 28px; }

.nav__links { display: none; align-items: center; gap: 14px; }
.nav__link {
  display: inline-flex; align-items: center;
  min-height: 44px;
  font-size: 15px;
  line-height: 22px;
  color: var(--brand-text-secondary);
  transition: color var(--brand-transition-fast);
}
.nav__link:hover, .nav__link[aria-current='page'] { color: var(--brand-accent-readable); }
.nav__diamond {
  width: 6px; height: 6px; flex: none;
  border: 1px solid var(--brand-border-strong);
  transform: rotate(45deg);
}
.nav__actions { display: flex; align-items: center; gap: 6px; flex: none; }
.nav__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  color: var(--brand-text-secondary);
  transition: color var(--brand-transition-fast);
}
.nav__icon:hover { color: var(--brand-accent-readable); }
.nav__icon svg { width: 16px; height: 16px; }
.nav__divider { display: none; width: 1px; height: 24px; background: var(--brand-border); }
.nav__soon { display: none; }
.nav__actions > .nav__wallet { display: none; }
/* the framed square burger, as on colosseum's phone nav */
.nav__burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--brand-border-primary);
  box-shadow: inset 0 0 0 2px var(--brand-bg-elevated), inset 0 0 0 3px var(--brand-border-subtle);
  background: var(--brand-bg);
  color: var(--brand-text-primary);
}
.nav__burger svg { width: 16px; height: 16px; }
.nav__burger:hover { background: var(--brand-bg-elevated); }
/* theme icon: sun in light, moon in dark */
.theme-icon--moon { display: none; }
:root[data-theme='dark'] .theme-icon--sun { display: none; }
:root[data-theme='dark'] .theme-icon--moon { display: block; }

@media (min-width: 768px) {
  .nav__actions > .nav__wallet { display: inline-flex; }
}
@media (min-width: 1100px) {
  .nav__links { display: flex; }
  .nav__burger { display: none; }
  .nav__divider, .nav__soon { display: inline-flex; }
}
@media (max-width: 379px) {
  .brand__word { font-size: 19px; }
  .brand__mark { width: 32px; height: 32px; }
}

/* the wallet control: a single button so js/wallet-ui.js can set its text.
   .btn-primary (not connected) and .is-connected are the classes js/wallet-ui.js toggles. */
.wallet {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--brand-border-primary);
  background: var(--brand-bg);
  box-shadow: inset 0 0 0 2px var(--brand-bg-elevated), inset 0 0 0 3px var(--brand-border-subtle);
  color: var(--brand-text-secondary);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color var(--brand-transition-fast), color var(--brand-transition-fast);
}
.wallet:hover { background: var(--brand-bg-elevated); color: var(--brand-text-primary); }
.wallet.btn-primary {
  background: var(--brand-action-bg);
  box-shadow: inset 0 0 0 2px var(--brand-bg-elevated), inset 0 0 0 3px var(--brand-accent-strong);
  color: var(--brand-text-on-accent);
}
.wallet.btn-primary:hover { background: var(--brand-action-bg-hover); }
.wallet.is-connected {
  font-family: var(--brand-font-label);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--brand-text-primary);
}
.wallet.is-connected::before {
  content: '';
  width: 7px; height: 7px; flex: none;
  border-radius: var(--brand-radius-pill);
  background: var(--brand-feedback-positive);
}
.wallet[data-chain='wrong']::before { background: var(--brand-danger); }
.wallet--block { display: flex; width: 100%; max-width: none; min-height: 48px; }

/* ================================================================= mobile menu sheet */

.sheet {
  position: fixed; inset: 0; z-index: 90;
  display: none;
  flex-direction: column;
  background: var(--brand-bg);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sheet[data-open='true'] { display: flex; }
.sheet__head {
  display: flex; align-items: center; justify-content: space-between;
  flex: none;
  height: var(--brand-nav-height);
  padding-inline: var(--brand-gutter);
  border-bottom: 1px solid var(--brand-border-subtle);
}
.sheet__body {
  display: grid;
  gap: var(--brand-space-xl);
  align-content: start;
  padding: var(--brand-space-lg) var(--brand-gutter) var(--brand-space-2xl);
  flex: 1;
}
.sheet__close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--brand-border-primary);
  box-shadow: inset 0 0 0 2px var(--brand-bg-elevated), inset 0 0 0 3px var(--brand-border-subtle);
  background: var(--brand-bg);
  color: var(--brand-text-primary);
}
.sheet__close svg { width: 16px; height: 16px; }
.sheet__close:hover { background: var(--brand-bg-elevated); }
.sheet__links { display: grid; }
.sheet__link {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px;
  font-family: var(--brand-font-display);
  font-size: 1.625rem;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--brand-text-primary);
  border-bottom: 1px solid var(--brand-border-subtle);
}
.sheet__link::after {
  content: '';
  width: 7px; height: 7px;
  border: 1px solid var(--brand-border-strong);
  transform: rotate(45deg);
}
.sheet__link[aria-current='page'] { color: var(--brand-accent-readable); }
.sheet__more { display: flex; flex-wrap: wrap; gap: 0 var(--brand-space-lg); margin-top: calc(-1 * var(--brand-space-sm)); }
.sheet__sub { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--brand-text-secondary); }
.sheet__sub:hover { color: var(--brand-accent-hover); }
.sheet__actions { display: grid; gap: var(--brand-space-sm); }
.sheet__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--brand-space-md); }
.sheet__foot { padding: var(--brand-space-md) var(--brand-gutter) var(--brand-space-lg); border-top: 1px solid var(--brand-border-subtle); }

/* ================================================================= floating bar (after the hero) */

.fbar {
  position: fixed;
  top: 8px; left: 0; right: 0;
  z-index: 60;
  padding-inline: 8px;
  opacity: 0;
  transform: translateY(-14px);
  pointer-events: none;
  transition: opacity var(--brand-transition-base), transform var(--brand-transition-base);
}
.fbar[data-visible='true'] { opacity: 1; transform: none; pointer-events: auto; }
.fbar__frame {
  max-width: 1280px;
  margin-inline: auto;
  padding: 4px;
  background: var(--brand-bg-elevated);
  border: 1px solid var(--brand-border-primary);
  box-shadow: var(--brand-floating-shadow);
}
.fbar__inner {
  display: flex;
  align-items: center;
  gap: var(--brand-space-sm);
  min-height: 52px;
  padding: 0 4px 0 8px;
  background: var(--brand-bg-muted);
  border: 1px solid var(--brand-border-subtle);
}
.fbar__menu {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 44px; min-height: 44px;
  font-size: 13px;
  color: var(--brand-text-secondary);
  flex: none;
}
.fbar__menu svg { width: 14px; height: 14px; }
.fbar__menu:hover { color: var(--brand-text-primary); }
.fbar__menu span { display: none; }
.fbar__divider { width: 1px; height: 24px; background: var(--brand-border); flex: none; }
.fbar__live { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; color: var(--brand-text-primary); }
.fbar__live-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fbar__stat { display: none; flex-direction: column; align-items: center; gap: 2px; flex: none; }
.fbar__stat--mid { margin-inline: auto; }
.fbar__value { font-family: var(--brand-font-label); font-size: 12px; line-height: 16px; color: var(--brand-text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fbar__value--accent { color: var(--brand-accent-readable); font-weight: 500; }
.fbar__end { display: inline-flex; align-items: center; gap: var(--brand-space-md); margin-left: auto; flex: none; }
.fbar .btn { min-height: 40px; padding: 0 12px; }
@media (min-width: 600px) {
  .fbar { padding-inline: var(--brand-gutter); top: 12px; }
  .fbar__menu span { display: inline; }
  .fbar__inner { min-height: 56px; padding: 0 6px 0 12px; gap: var(--brand-space-md); }
  .fbar__stat { display: flex; }
  .fbar__stat--mid { display: none; }
  .fbar .btn { padding: 0 16px; }
}
@media (min-width: 1024px) { .fbar__stat--mid { display: flex; } .fbar { padding-inline: 80px; } }

/* ================================================================= footer (crimson plate) */

.footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: var(--brand-space-2xl) 8px 8px;
  background: var(--brand-footer-bg);
  color: var(--brand-footer-text);
  border: 1px solid var(--brand-footer-border);
}
.footer__texture {
  position: absolute; inset: 0;
  background: url(../img/art/footer-texture.webp) center / cover no-repeat;
  opacity: .5;
  mix-blend-mode: multiply;
  z-index: -1;
  pointer-events: none;
}
.footer__frame {
  margin: 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  padding: clamp(2rem, 1.2rem + 4vw, 5.5rem) clamp(1rem, .4rem + 3vw, 5.5rem) clamp(1.5rem, 1rem + 2vw, 2.5rem);
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--brand-space-lg);
}
.footer .brand { color: var(--brand-footer-text); }
.footer__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.footer__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: inset 0 0 0 3px var(--brand-footer-bg), inset 0 0 0 4px rgba(255, 255, 255, .12);
  background: rgba(192, 0, 0, .55);
  color: #fff;
  transition: background-color var(--brand-transition-fast);
}
.footer__icon:hover { background: rgba(192, 0, 0, .9); }
.footer__icon svg { width: 16px; height: 16px; }
.footer .soon { color: rgba(255, 255, 255, .62); }
.footer .soon__chip { border-color: rgba(255, 255, 255, .28); color: rgba(255, 255, 255, .72); }
.footer .soon:not([aria-disabled='true']) { color: #fff; }
.footer__emblem {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, .5rem + 2vw, 3rem);
  margin-top: clamp(2.5rem, 1.5rem + 4vw, 5rem);
}
.footer__emblem::before, .footer__emblem::after { content: ''; height: 1px; background: rgba(255, 255, 255, .16); }
.footer__crest { position: relative; width: clamp(120px, 90px + 6vw, 180px); }
.footer__crest-frame { width: 100%; height: auto; opacity: .85; }
.footer__crest-mark { position: absolute; left: 50%; top: 48.7%; width: 40%; transform: translate(-50%, -50%); }
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--brand-space-xs) var(--brand-space-md);
  margin-top: var(--brand-space-lg);
}
.footer__legal .label { color: rgba(255, 255, 255, .82); letter-spacing: .1em; }
.footer__legal a.label:hover { color: #fff; }
.footer__legal a.label { display: inline-block; min-width: 44px; text-align: center; padding-block: 17px; margin-block: -17px; }  /* 44 px to tap, same line height */
.footer__links { display: flex; flex-wrap: wrap; gap: 0 var(--brand-space-md); }
@media (min-width: 600px) { .footer { margin: var(--brand-space-3xl) 20px 20px; } .footer__frame { margin: 10px; } }

/* ================================================================= forms */

.field { display: grid; gap: 8px; min-width: 0; }
.field__label { font-family: var(--brand-font-label); font-size: 11px; line-height: 1.2; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-text-muted); }
.field__hint { font-size: .875rem; line-height: 1.45; color: var(--brand-text-muted); }
.field__error { font-size: .875rem; line-height: 1.45; color: var(--brand-feedback-negative); }
.field[data-invalid='true'] .input, .field[data-invalid='true'] .textarea { border-color: var(--brand-feedback-negative); }

.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--brand-border);
  background: var(--brand-bg-muted);
  box-shadow: inset 0 0 0 3px var(--brand-bg-muted), inset 0 0 0 4px transparent;
  color: var(--brand-text-primary);
  font-size: 16px;   /* 16px stops iOS from zooming on focus */
  line-height: 1.4;
  transition: border-color var(--brand-transition-fast), box-shadow var(--brand-transition-fast);
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--brand-text-muted); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--brand-border-strong); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: inset 0 0 0 3px var(--brand-bg-muted), inset 0 0 0 4px var(--brand-accent-soft);
}
.input:disabled, .select:disabled, .textarea:disabled { opacity: .6; cursor: not-allowed; }
.input--mono { font-family: var(--brand-font-label); font-size: 15px; letter-spacing: .02em; }
.input--num { font-variant-numeric: tabular-nums; text-align: right; }
.textarea { min-height: 120px; resize: vertical; }

/* select: native control, arrow drawn by the wrapper */
.select-wrap { position: relative; display: block; }
.select-wrap::after {
  content: '';
  position: absolute; right: 18px; top: 50%;
  width: 7px; height: 7px;
  border-right: 1px solid var(--brand-text-secondary);
  border-bottom: 1px solid var(--brand-text-secondary);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.select { padding-right: 44px; cursor: pointer; }

/* input with a unit and an inline action: [ 120.00 | USDG | Max ] */
.input-group { display: flex; align-items: stretch; border: 1px solid var(--brand-border); background: var(--brand-bg-muted); }
.input-group:focus-within { border-color: var(--brand-accent); }
.input-group .input { border: 0; box-shadow: none; min-width: 0; flex: 1; }
.input-group__unit { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; font-family: var(--brand-font-label); font-size: 12px; letter-spacing: .08em; color: var(--brand-text-secondary); border-left: 1px solid var(--brand-border-subtle); white-space: nowrap; }
.input-group__unit img { width: 20px; height: 20px; }
.input-group__btn { padding: 0 14px; min-width: 56px; font-family: var(--brand-font-label); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-accent-readable); border-left: 1px solid var(--brand-border-subtle); }
.input-group__btn:hover { background: var(--brand-accent-soft); }

/* checkbox and radio: square box, red tick */
.check { display: inline-flex; align-items: flex-start; gap: 12px; min-height: 44px; padding-block: 11px; cursor: pointer; font-size: .9375rem; line-height: 1.45; color: var(--brand-text-body); }
.check input {
  flex: none;
  width: 20px; height: 20px; margin: 0;
  border: 1px solid var(--brand-border-strong);
  background: var(--brand-bg-muted);
  display: grid; place-items: center;
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
}
.check input::after { content: ''; width: 10px; height: 5px; border-left: 2px solid transparent; border-bottom: 2px solid transparent; transform: translateY(-1px) rotate(-45deg); }
.check input:checked { border-color: var(--brand-accent-strong); }
.check input:checked::after { border-color: var(--brand-accent); }
.check input[type='radio'] { border-radius: var(--brand-radius-pill); }
.check input[type='radio']::after { width: 10px; height: 10px; border: 0; border-radius: var(--brand-radius-pill); transform: none; }
.check input[type='radio']:checked::after { background: var(--brand-accent); }

/* segmented choice (targets 114 390 ..., threads 1 2 4 8): radios styled as framed keys */
.seg { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.seg legend { margin-bottom: 8px; padding: 0; }
.seg label { position: relative; flex: 0 0 auto; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 56px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--brand-border);
  background: var(--brand-bg-muted);
  box-shadow: inset 0 0 0 2px var(--brand-bg-muted), inset 0 0 0 3px var(--brand-border-subtle);
  font-family: var(--brand-font-display);
  font-size: 1.0625rem;
  color: var(--brand-text-secondary);
  font-variant-numeric: tabular-nums lining-nums;
  transition: background-color var(--brand-transition-fast), color var(--brand-transition-fast);
}
.seg input:hover + span { color: var(--brand-text-primary); border-color: var(--brand-border-strong); }
.seg input:checked + span {
  background: var(--brand-action-bg);
  border-color: var(--brand-border-primary);
  box-shadow: inset 0 0 0 2px var(--brand-bg-elevated), inset 0 0 0 3px var(--brand-accent-strong);
  color: var(--brand-text-on-accent);
}
.seg input:focus-visible + span { outline: 2px solid var(--brand-accent); outline-offset: 3px; }
.seg input:disabled + span { opacity: .45; }

/* range: hairline track, square red thumb */
.range { width: 100%; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 1px; background: var(--brand-border-strong); }
.range::-moz-range-track { height: 1px; background: var(--brand-border-strong); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; margin-top: -9px;
  background: var(--brand-action-bg);
  border: 1px solid var(--brand-accent-strong);
  box-shadow: 0 0 0 3px var(--brand-bg), 0 0 0 4px var(--brand-border-primary);
}
.range::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 0;
  background: var(--brand-action-bg);
  border: 1px solid var(--brand-accent-strong);
  box-shadow: 0 0 0 3px var(--brand-bg), 0 0 0 4px var(--brand-border-primary);
}

/* ================================================================= tables */

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--brand-border);
  background: var(--brand-bg-muted);
  padding: 4px;
}
.table-wrap > .table { border: 1px solid var(--brand-border-subtle); }
.table { width: 100%; font-size: .9375rem; color: var(--brand-text-body); }
.table th {
  padding: 12px 14px;
  text-align: left;
  font-family: var(--brand-font-label);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-text-muted);
  background: var(--brand-bg-elevated);
  border-bottom: 1px solid var(--brand-border-subtle);
  white-space: nowrap;
}
.table td { padding: 14px; border-top: 1px solid var(--brand-border-subtle); vertical-align: middle; }
.table tbody tr:first-child td { border-top: 0; }
.table tbody tr:hover td { background: var(--brand-bg-hover); }
.table .is-num, .table th.is-num { text-align: right; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.table .is-strong { color: var(--brand-text-primary); }
.table .is-you td { background: var(--brand-accent-soft); }
.table__rank { font-family: var(--brand-font-label); font-size: 12px; color: var(--brand-text-muted); width: 3.5rem; }
.table__asset { display: inline-flex; align-items: center; gap: 10px; color: var(--brand-text-primary); }
.table__asset img { width: 24px; height: 24px; flex: none; }

/* phones: rows become label/value cards; each td carries data-label="..." */
@media (max-width: 599px) {
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack tr { padding: 10px 14px; border-top: 1px solid var(--brand-border-subtle); }
  .table--stack tbody tr:first-child { border-top: 0; }
  .table--stack td { padding: 6px 0; border: 0; text-align: right; overflow-wrap: anywhere; }
  .table--stack td::after { content: ''; display: block; clear: both; }
  .table--stack td::before {
    content: attr(data-label);
    float: left;
    margin-right: 12px;
    padding-top: 3px;
    font-family: var(--brand-font-label); font-size: 10px; line-height: 1.2; letter-spacing: .12em; text-transform: uppercase;
    color: var(--brand-text-muted); text-align: left;
  }
  .table--stack tbody tr:hover td { background: none; }
}

/* ================================================================= stats */

.stat { display: grid; justify-items: center; gap: 10px; text-align: center; }
.stat__value {
  font-family: var(--brand-font-display);
  font-size: clamp(2.75rem, 2rem + 3vw, 4.5rem);
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--brand-text-primary);
  font-variant-numeric: lining-nums;
}
.stat__value em { font-style: normal; color: var(--brand-accent); }
.stat--sm .stat__value { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); letter-spacing: -.03em; }
.stat--start { justify-items: start; text-align: left; }
.stat__note { font-size: .875rem; color: var(--brand-text-muted); }

/* a row of stats split by hairlines inside one plate (colosseum's stat arches) */
.stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--brand-border);
  background: var(--brand-bg-muted);
}
.stats > * { position: relative; padding: clamp(2rem, 1.2rem + 3vw, 3.5rem) var(--brand-space-lg); overflow: hidden; }
.stats > * + * { border-top: 1px solid var(--brand-border-subtle); }
.stats--arch > *::before {
  content: '';
  position: absolute; left: 50%; top: 16px;
  width: min(82%, 330px); height: calc(100% + 40px);
  transform: translateX(-50%);
  border: 1px solid var(--brand-border-subtle);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  pointer-events: none;
}
.stats__art { height: 96px; display: grid; place-items: end center; margin-bottom: var(--brand-space-sm); }
.stats__art img { max-height: 96px; width: auto; }
@media (min-width: 768px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats > * + * { border-top: 0; border-left: 1px solid var(--brand-border-subtle); }
}

/* ================================================================= pills and dots */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border: 1px solid var(--brand-border);
  background: var(--brand-bg);
  font-family: var(--brand-font-label);
  font-size: 9px;
  line-height: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-text-secondary);
  white-space: nowrap;
  vertical-align: middle;
}
.pill--live { color: var(--brand-accent-readable); border-color: rgba(192, 0, 0, .35); }
.pill--ok { color: var(--brand-feedback-positive); border-color: color-mix(in srgb, var(--brand-feedback-positive) 40%, transparent); }
.pill--warn { color: var(--brand-feedback-warning); border-color: color-mix(in srgb, var(--brand-feedback-warning) 40%, transparent); }
.pill--bad { color: var(--brand-feedback-negative); border-color: color-mix(in srgb, var(--brand-feedback-negative) 40%, transparent); }
.pill--muted { color: var(--brand-text-muted); border-color: var(--brand-border-subtle); }
.pill--solid { background: var(--brand-action-bg); border-color: var(--brand-accent-strong); color: var(--brand-text-on-accent); }
.pill--lg { font-size: 11px; line-height: 16px; padding: 4px 9px; }

.dot { display: inline-block; width: 8px; height: 8px; flex: none; border-radius: var(--brand-radius-pill); background: var(--brand-accent); }
.dot--ring { box-shadow: 0 0 0 3px var(--brand-accent-soft); }
.dot--ok { background: var(--brand-feedback-positive); }
.dot--muted { background: var(--brand-text-muted); }
.dot--pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ================================================================= toasts */

.toasts {
  position: fixed;
  left: 0; right: 0; bottom: 16px;
  z-index: 150;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding-inline: var(--brand-gutter);
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  max-width: min(440px, 100%);
  padding: 4px;
  background: var(--brand-bg-elevated);
  border: 1px solid var(--brand-border-primary);
  box-shadow: var(--brand-floating-shadow);
  pointer-events: auto;
  animation: toast-in var(--brand-transition-base) both;
}
.toast__inner {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--brand-border-subtle);
  background: var(--brand-bg-muted);
  font-size: .9375rem; line-height: 1.4;
  color: var(--brand-text-primary);
}
.toast__icon { width: 16px; height: 16px; flex: none; color: var(--brand-accent); }
.toast--ok .toast__icon { color: var(--brand-feedback-positive); }
.toast--bad .toast__icon { color: var(--brand-feedback-negative); }
.toast.is-leaving { animation: toast-out var(--brand-transition-base) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ================================================================= cards */

.card { display: grid; gap: var(--brand-space-sm); align-content: start; height: 100%; }
.card__art { height: 96px; display: flex; align-items: flex-end; margin-bottom: var(--brand-space-sm); }
.card__art img { max-height: 92px; width: auto; }
.card__title { font-family: var(--brand-font-display); font-size: 1.5rem; line-height: 1.333; letter-spacing: -.01em; color: var(--brand-text-primary); }
.card__text { color: var(--brand-text-secondary); font-size: 1rem; line-height: 1.5; }
.card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--brand-space-sm); margin-top: var(--brand-space-sm); }
.card__link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: .9375rem; color: var(--brand-accent-link); }
.card__link svg { width: 14px; height: 14px; }
.card__link:hover { color: var(--brand-accent-hover); text-decoration: underline; text-underline-offset: 3px; }

/* the target card: a big serif number, its equation, its state */
.target { display: grid; gap: 6px; }
.target__k { font-family: var(--brand-font-display); font-size: 3rem; line-height: 1; letter-spacing: -.04em; color: var(--brand-text-primary); font-variant-numeric: lining-nums; }
.target__eq { font-size: 1.0625rem; color: var(--brand-text-secondary); }

/* ================================================================= tabs */

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--brand-border-subtle);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  font-family: var(--brand-font-label);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-text-muted);
}
.tab:hover { color: var(--brand-text-primary); }
.tab[aria-selected='true'], .tab[aria-current='page'] { color: var(--brand-accent-readable); }
.tab[aria-selected='true']::after, .tab[aria-current='page']::after {
  content: '';
  position: absolute; left: 12px; right: 12px; bottom: -1px;
  height: 1px; background: var(--brand-accent);
}

/* ================================================================= vote bar */

.progress { display: grid; gap: 8px; }
.progress__bar { display: flex; height: 10px; border: 1px solid var(--brand-border); background: var(--brand-bg-elevated); padding: 2px; gap: 2px; }
.progress__seg { min-width: 0; height: 100%; background: var(--brand-text-muted); }
.progress__seg--for { background: var(--brand-feedback-positive); }
.progress__seg--against { background: var(--brand-accent); }
.progress__seg--abstain { background: var(--brand-border-strong); }
.progress__seg--fill { background: var(--brand-accent); }
.progress__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.progress__legend span { display: inline-flex; align-items: center; gap: 6px; }
.progress__legend i { width: 8px; height: 8px; display: inline-block; }
/* widths come from the page script through CSSOM, which the CSP allows (a style="" attribute it does not):
   seg.style.setProperty('--w', '42%') */
.progress__seg { width: var(--w, 0%); }

/* ================================================================= dialog (wallet chooser, confirm) */

.dialog { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: var(--brand-gutter); }
.dialog[hidden] { display: none; }
.dialog__backdrop { position: absolute; inset: 0; background: var(--brand-scrim); }
.dialog__panel { position: relative; width: min(440px, 100%); max-height: calc(100dvh - 2 * var(--brand-gutter)); overflow-y: auto; }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: var(--brand-space-md); margin-bottom: var(--brand-space-md); }
.dialog__title { font-family: var(--brand-font-display); font-size: 1.5rem; line-height: 1.3; color: var(--brand-text-primary); }
.dialog__close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -10px -12px -10px 0; color: var(--brand-text-secondary); }
.dialog__close svg { width: 14px; height: 14px; }
.option {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 8px 14px;
  border: 1px solid var(--brand-border);
  background: var(--brand-bg-elevated);
  color: var(--brand-text-primary);
  font-size: 1rem;
  text-align: left;
  transition: border-color var(--brand-transition-fast), background-color var(--brand-transition-fast);
}
.option + .option { margin-top: 6px; }
.option:hover { border-color: var(--brand-accent); background: var(--brand-accent-soft); }
.option img, .option__blank { width: 28px; height: 28px; flex: none; }
.option__blank { border: 1px solid var(--brand-border); background: var(--brand-bg-muted); }
.option__tag { margin-left: auto; }

/* ================================================================= notice, empty, skeleton */

/* a quiet line of context with a hairline rule on its left */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px;
  border-left: 1px solid var(--brand-border-strong);
  background: var(--brand-bg-elevated);
  font-size: .9375rem; line-height: 1.5;
  color: var(--brand-text-body);
}
.notice svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--brand-text-muted); }
.notice--accent { border-left-color: var(--brand-accent); background: var(--brand-accent-soft); }
.notice--ok { border-left-color: var(--brand-feedback-positive); background: var(--brand-feedback-positive-soft); }

.empty { display: grid; justify-items: center; gap: var(--brand-space-md); padding: var(--brand-space-2xl) var(--brand-space-lg); text-align: center; color: var(--brand-text-secondary); }
.empty img { width: 120px; height: auto; }

/* loading value: a soft bar, never a dash */
.skeleton {
  display: inline-block;
  width: 4.5em; height: .8em;
  vertical-align: middle;
  background: linear-gradient(90deg, var(--brand-bg-elevated) 0%, var(--brand-bg-hover) 50%, var(--brand-bg-elevated) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ================================================================= hero (landing) */

.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero__art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__stoa {
  position: absolute;
  left: 50%; top: 40px;
  width: max(1100px, 132%);
  max-width: none;
  transform: translateX(-50%);
}
.hero__fade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--brand-bg) 0%, transparent 18%, transparent 70%, var(--brand-bg) 98%);
}
.hero__cloud { position: absolute; display: none; }
.hero__cloud--l1 { left: 12%; top: 300px; width: 265px; }
.hero__cloud--l2 { left: 2%; top: 420px; width: 170px; }
.hero__cloud--r1 { right: 10%; top: 280px; width: 285px; }
.hero__cloud--r2 { right: 2%; top: 410px; width: 150px; }
.hero__cloud--r3 { right: 24%; top: 380px; width: 96px; }
.hero__birds { position: absolute; display: none; left: 24%; top: 330px; width: 92px; }
.hero__body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--brand-space-2xl);
  padding-block: clamp(3.5rem, 2rem + 6vw, 4.5rem) clamp(3rem, 2rem + 4vw, 5rem);
}
.hero__head { display: grid; gap: var(--brand-space-lg); justify-items: center; text-align: center; max-width: 44rem; }
.hero__head .lede { max-width: 25rem; }
.hero__card { width: min(408px, 100%); }
.hero__card .frame__inner { padding: 0; }
.hero__card-body { display: grid; gap: var(--brand-space-lg); padding: 44px var(--brand-space-lg) var(--brand-space-lg); }
@media (min-width: 900px) {
  .hero__cloud, .hero__birds { display: block; }
  .hero__body { padding-block: 4.5rem 5rem; }
}

/* ================================================================= closing call (framed, over the landscape) */

.call { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(3rem, 2rem + 5vw, 6rem); }
.call__art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.call__side { position: absolute; bottom: 0; width: 30%; max-width: 440px; display: none; }
.call__side--l { left: 0; }
.call__side--r { right: 0; }
.call__greens { position: absolute; left: 50%; bottom: 0; width: min(600px, 120%); transform: translateX(-50%); }
.call__plate { position: relative; width: min(440px, 100%); margin-inline: auto; }
.call__body { display: grid; justify-items: center; gap: var(--brand-space-lg); text-align: center; }
@media (min-width: 900px) { .call__side { display: block; } }

/* ================================================================= static variants (design demo and docs only) */

.fbar--static { position: relative; top: auto; opacity: 1; transform: none; pointer-events: auto; padding-inline: 0; z-index: 1; }
.dialog--static { position: relative; inset: auto; z-index: 1; padding: 0; place-items: start; }
.dialog--static .dialog__panel { width: min(440px, 100%); max-height: none; }
.sheet--static { position: relative; inset: auto; display: flex; z-index: 1; height: 600px; max-width: 390px; border: 1px solid var(--brand-border); }
.toasts--static { position: relative; inset: auto; bottom: auto; padding: 0; justify-items: start; z-index: 1; }
.fbar__value--math { font-family: var(--brand-font-body); font-size: 14px; }
.strip__eq { font-size: 15px; color: var(--brand-text-primary); }
:root[data-theme='dark'] .strip::before, :root[data-theme='dark'] .strip::after { opacity: .38; }

/* ================================================================= inner page patterns (colosseum about, accelerator, portfolio) */

/* page head: title with initial left, lede under it, one action right (stacks on phones) */
.page-head { display: grid; gap: var(--brand-space-lg); padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) var(--brand-space-xl); }
.page-head__text { display: grid; gap: var(--brand-space-md); max-width: 36rem; }
@media (min-width: 900px) {
  .page-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
}

/* a paragraph that opens with a framed red initial (colosseum about: the boxed "C") */
.dropcap { color: var(--brand-text-body); font-size: 1rem; line-height: 1.6; }
.dropcap::after { content: ''; display: block; clear: both; }
.dropcap__letter {
  float: left;
  display: grid; place-items: center;
  width: 3.4em; height: 3.4em;
  margin: .3em .9em .2em 0;
  border: 1px solid var(--brand-border);
  box-shadow: inset 0 0 0 4px var(--brand-bg-muted), inset 0 0 0 5px var(--brand-border-subtle);
  background: var(--brand-bg-muted);
  font-family: var(--brand-font-initial);
  font-size: 1em;
  line-height: 1;
}
.dropcap__letter > span { font-size: 2.3em; color: var(--brand-accent-strong); transform: translateY(.04em); }
:root[data-theme='dark'] .dropcap__letter > span { color: var(--brand-accent-readable); }

/* a row of counts split by small diamonds: "7 TARGETS ◇ 10 VAULTS" */
.count-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.count-row > * + *::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  margin-right: 12px;
  border: 1px solid var(--brand-border-strong);
  transform: translateY(-2px) rotate(45deg);
}

/* a lifecycle on a hairline: commit, reveal, review, attest, release (diamonds; done = filled, now = red) */
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; position: relative; margin: 0; padding: 0; counter-reset: none; }
.steps::before { content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 1px; background: var(--brand-border); }
.steps > li { position: relative; display: grid; gap: 6px; justify-items: start; padding-top: 22px; padding-right: 8px; min-width: 0; }
.steps > li::before {
  content: '';
  position: absolute; left: 1px; top: 1px;
  width: 9px; height: 9px;
  background: var(--brand-bg);
  border: 1px solid var(--brand-border-strong);
  transform: rotate(45deg);
}
.steps > li[data-state='done']::before { background: var(--brand-text-secondary); border-color: var(--brand-text-secondary); }
.steps > li[data-state='now']::before { background: var(--brand-accent); border-color: var(--brand-accent-strong); }
.steps__name { font-family: var(--brand-font-label); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-text-secondary); }
.steps > li[data-state='now'] .steps__name { color: var(--brand-accent-readable); }
.steps__note { font-size: .8125rem; line-height: 1.4; color: var(--brand-text-muted); overflow-wrap: anywhere; }
@media (max-width: 599px) {
  .steps { grid-auto-flow: row; gap: 14px; }
  .steps::before { left: 5px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .steps > li { padding: 0 0 0 26px; }
  .steps > li::before { top: 4px; }
}

/* filters left, results right (portfolio, leaderboard, vaults) */
.with-aside { display: grid; gap: var(--brand-space-xl); }
.with-aside__aside { display: grid; gap: var(--brand-space-md); align-content: start; }
@media (min-width: 1024px) {
  .with-aside { grid-template-columns: 240px minmax(0, 1fr); gap: 3rem; }
  .with-aside__aside { position: sticky; top: 96px; }
}

/* a logo tile in a list card (asset, vault, holder): framed square, name, mono meta */
.entity { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center; }
.entity__logo { grid-row: span 2; width: 56px; height: 56px; padding: 4px; border: 1px solid var(--brand-border); background: var(--brand-bg); display: grid; place-items: center; }
.entity__logo img { width: 100%; height: 100%; object-fit: contain; }
.entity__name { font-family: var(--brand-font-display); font-size: 1.375rem; line-height: 1.2; color: var(--brand-text-primary); min-width: 0; overflow-wrap: anywhere; }
.entity__meta { font-family: var(--brand-font-label); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-text-muted); }
@media (max-width: 379px) {
  .fbar__live .pill { display: none; }
  .fbar .btn { padding: 0 10px; }
}

/* phones: every control is at least 44 px to tap (SPEC 0); the compact sizes stay for mouse pointers */
@media (max-width: 767px), (pointer: coarse) {
  .btn--sm { min-height: 44px; }
  .btn--icon.btn--sm { width: 44px; height: 44px; }
  .btn--text { min-width: 44px; }
  .wallet { min-height: 44px; }
}
