/* Who Signs Block X: the game's own look (both pages). Built on the site tokens in styles.css.
 * The signature element is the chain strip: the latest blocks arriving, each in its signer's colour, then the gap to
 * the target block. Producers keep one colour everywhere (chips, strip, results) from a hash of their address. */

.bx { max-width: 1080px; margin: 0 auto; padding: 22px 16px 64px; }
.bx h1 { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 6vw, 60px); line-height: .95; letter-spacing: -.02em; margin: 0; }
.bx h2 { font-family: var(--display); font-weight: 700; font-size: 22px; margin: 0; letter-spacing: -.01em; }
.bx-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 28px; flex-wrap: wrap; margin-bottom: 18px; }
.bx-intro p { margin: 10px 0 0; color: var(--muted); max-width: 52ch; font-size: 17px; }
.bx-games { display: flex; gap: 6px; flex-wrap: wrap; }
.bx-games a { font-size: 14px; font-weight: 700; text-decoration: none; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.bx-games a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── the stage: the chain strip and the next target ── */
.bx-stage { background: var(--navy); color: var(--navy-ink); border-radius: 26px; padding: 22px 22px 20px; position: relative; overflow: hidden; }
.bx-stage-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--navy-muted); }
.bx-stage-top b { color: var(--navy-ink); font-family: var(--num); font-variant-numeric: tabular-nums; font-weight: 800; }
.bx-chain { display: flex; align-items: center; gap: 6px; margin: 18px 0 16px; min-height: 92px; }
.bx-past { display: flex; gap: 5px; flex: 1 1 auto; min-width: 0; justify-content: flex-end; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 22%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%); }
.bx-blk { flex: none; width: 34px; height: 34px; border-radius: 8px; background: var(--c, #5b6b8f); position: relative; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.bx-blk.new { animation: bx-in .5s cubic-bezier(.2,.8,.2,1); }
@keyframes bx-in { from { transform: translateX(40px) scale(.6); opacity: 0; } }
.bx-gap { flex: none; display: flex; flex-direction: column; align-items: center; padding: 0 10px; color: var(--navy-muted); font-size: 13px; white-space: nowrap; }
.bx-gap b { font-family: var(--num); font-size: 22px; color: var(--navy-ink); font-variant-numeric: tabular-nums; line-height: 1; }
.bx-dots { letter-spacing: 3px; color: #5b6b8f; }
.bx-x { flex: none; width: 92px; height: 92px; border-radius: 18px; background: var(--sun); color: var(--tang-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 0 0 4px rgba(242,179,61,.25), inset 0 -5px 0 rgba(0,0,0,.15); }
.bx-x span { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; }
.bx-x small { font-family: var(--num); font-weight: 800; font-size: 12px; font-variant-numeric: tabular-nums; }
.bx-stage-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.bx-lock { font-size: 15px; color: var(--navy-muted); }
.bx-lock b { font-family: var(--num); font-size: 28px; font-weight: 800; color: var(--navy-ink); font-variant-numeric: tabular-nums; margin-right: 6px; }
.bx-lock .mine { display: block; margin-top: 4px; color: var(--sun); font-weight: 700; }
.bx-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.12); margin-top: 14px; overflow: hidden; }
.bx-bar i { display: block; height: 100%; width: var(--p, 0%); background: linear-gradient(90deg, var(--mint), var(--sun)); border-radius: inherit; transition: width .6s; }
.bx-cta { font: inherit; font-weight: 800; font-size: 16px; padding: 13px 22px; border-radius: 99px; border: 0; background: var(--tang); color: var(--tang-ink); cursor: pointer; }
.bx-cta:hover { filter: brightness(1.05); }
.bx-cta:focus-visible, .bx-chip:focus-visible, .bx-lockin:focus-visible, .bx-wallet:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* ── you ── */
.bx-you { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin: 16px 0 0; }
.bx-you > div { background: var(--surface); padding: 12px 14px; }
.bx-you b { display: block; font-family: var(--num); font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; }
.bx-you span { font-size: 13px; color: var(--muted); }
.bx-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: s; }
.bx-steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; font-size: 14px; color: var(--muted); }
.bx-steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-family: var(--num); font-weight: 800; }
.bx-steps b { display: block; color: var(--ink); font-size: 15px; }

/* ── the targets ── */
.bx-sec { margin-top: 30px; }
.bx-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.bx-sec-head p { margin: 0; font-size: 14px; color: var(--muted); }
.bx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.bx-t { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.bx-t.first { border-color: var(--sun); box-shadow: 0 0 0 3px var(--sun-soft); }
.bx-t.mine { border-color: var(--mint); }
.bx-t-top { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: baseline; }
.bx-t-top b { font-family: var(--num); font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bx-t-top span { grid-column: 1 / -1; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bx-t-top em { grid-row: 1; grid-column: 2; font-style: normal; font-size: 12px; font-weight: 800; color: var(--tang-ink); background: var(--sun); padding: 2px 9px; border-radius: 99px; }
.bx-more { grid-column: 1 / -1; justify-self: center; }
.bx-chips { display: flex; flex-direction: column; gap: 6px; }
.bx-chip { font: inherit; display: grid; grid-template-columns: 14px 1fr auto auto; gap: 10px; align-items: center; text-align: left; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; font-size: 14px; }
.bx-chip:hover { border-color: var(--ink); }
.bx-chip[aria-checked="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.bx-chip[aria-checked="true"] .bx-share { color: var(--navy-muted); }
.bx-chip.picked { border: 2px solid var(--mint); }
.bx-chip:disabled { cursor: default; opacity: .6; }
.bx-dot { width: 14px; height: 14px; border-radius: 4px; background: var(--c, #888); }
/* A nickname always comes with its short address (KNames.of): wrap instead of cutting it off (D-078). */
.bx-name { font-weight: 700; overflow-wrap: anywhere; line-height: 1.3; }
.bx-share { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bx-mult { font-family: var(--num); font-weight: 800; font-variant-numeric: tabular-nums; }
.bx-t-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.bx-lockin { font: inherit; font-weight: 800; font-size: 14px; padding: 9px 16px; border-radius: 99px; border: 0; background: var(--mint); color: #fff; cursor: pointer; }
.bx-lockin:disabled { background: var(--line); color: var(--muted); cursor: default; }
.bx-yours { color: var(--mint); font-weight: 700; }
.bx-empty { padding: 18px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); font-size: 14px; }

/* ── results, board, multipliers, how ── */
.bx-panels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.bx-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.bx-panel h2 { margin-bottom: 10px; }
.bx-res { display: flex; flex-direction: column; }
.bx-res-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.bx-res-row:last-child { border-bottom: 0; }
.bx-res-row .h { font-family: var(--num); font-weight: 800; font-variant-numeric: tabular-nums; }
.bx-res-row .who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bx-res-row .you { font-weight: 700; white-space: nowrap; }
.bx-res-row .you.ok { color: var(--mint); } .bx-res-row .you.no { color: var(--rose); }
.bx-mrow { display: grid; grid-template-columns: 14px minmax(0, 1fr) 90px auto; gap: 10px; align-items: center; padding: 7px 0; font-size: 14px; }
@media (max-width: 560px) { .bx-mrow { grid-template-columns: 14px minmax(0, 1fr) 44px auto; gap: 8px; } }
.bx-mbar { height: 8px; border-radius: 99px; background: var(--paper); overflow: hidden; }
.bx-mbar i { display: block; height: 100%; background: var(--c, #888); width: var(--w, 0%); }
.bx-how { margin-top: 30px; }
.bx-how summary { cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 20px; }
.bx-how .explain { max-width: 70ch; }
.bx .note { font-size: 13px; color: var(--muted); }
.bx .status { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.bx .status:empty { display: none; }

/* ── the wallet in the top bar ── */
.tn-top { max-width: 1080px; }
.bx-wallet { font: inherit; font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 99px; border: 0; background: var(--ink); color: var(--paper); cursor: pointer; }
.bx-wallet.on { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.bx-wallet .bx-dot { width: 12px; height: 12px; }

@media (max-width: 760px) {
  .bx-stage { padding: 16px; border-radius: 20px; }
  .bx-blk { width: 22px; height: 22px; border-radius: 5px; }
  .bx-x { width: 70px; height: 70px; border-radius: 14px; } .bx-x span { font-size: 32px; }
  .bx-gap b { font-size: 18px; }
  .bx-chain { min-height: 70px; }
  .bx-you { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bx-steps { grid-template-columns: 1fr; }
  .bx-panels { grid-template-columns: 1fr; }
  .bx-cta { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .bx-blk.new { animation: none; } .bx-bar i { transition: none; } }
