/* /brokers: Keep your broker. The page's own parts; the nav, type, cards and footer are ../styles.css. */

/* From the home card's "More brokers": TradeStation's logo travels into its tile here (same-origin view transitions). */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

.eyebrow {
  margin-bottom: 18px;
  font: 600 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.hide {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* ── Hero: the ready broker on the line, every broker dim behind it ─────────────────────────────── */
.bk-hero { padding: max(15vh, 92px) 0 0; }
.bk-hero > :not(.stage) { padding-inline: var(--pad); }
.bk-hero h1 { font-size: clamp(3rem, min(10vw, 14vh), 8rem); }
.lede {
  max-width: 36ch; margin-top: .5em;
  color: var(--soft); font-size: clamp(1.15rem, min(2.4vw, 3.4vh), 1.75rem); font-weight: 500; letter-spacing: -.025em; line-height: 1.2;
}
.stage { position: relative; align-self: stretch; height: clamp(250px, 36vh, 340px); margin-top: clamp(16px, 3.5vh, 44px); }

/* The wall: every logo, four rows drifting by in turn, out of focus. The tile under the pointer comes forward. */
.wall {
  position: absolute; inset: 0; z-index: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 20px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.wall .row { position: relative; display: flex; gap: 20px; width: max-content; will-change: transform; }
.wall .row:nth-child(even) { margin-left: -40px; }
.wall i {
  position: relative; flex: none; display: grid; place-items: center;
  width: 60px; height: 60px; border-radius: 16px; background: #fff;
  opacity: .1; filter: blur(2px); transform: scale(.94);
  transition: opacity .35s, filter .35s, transform .5s var(--ease);
}
.wall i img { width: 34px; height: 34px; border-radius: 8px; }
.wall i::after {
  content: attr(data-name) " · " attr(data-status);
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  font: 500 12px/1 Inter, sans-serif; color: var(--white); white-space: nowrap;
  opacity: 0; transition: opacity .25s; pointer-events: none;
}
.wall i:hover, .wall i.near { z-index: 3; opacity: 1; filter: none; transform: scale(1.08); }
.wall i:hover::after, .wall i.near::after { opacity: 1; }
/* A name points to the wall's middle: under its tile in the top two rows, over it in the bottom two. Toward the
   wall's own edge, the edge would cut it (founder 2026-11-03: "its get cut"); a phone's wall is barely taller than its
   rows. */
.wall .row:nth-child(n + 3) i::after { top: auto; bottom: calc(100% + 8px); }

/* The ready tiles ride the line: brokers.js lifts each tile to the line's height under it. The rule names the row
   (`.stage > .ready`): `.ready` alone also matched the wall's tiles marked ready, which stood off their slots with their
   logos sunk (founder 2026-11-03: "tradovate and tradestation dont look good"). */
.stage > .ready {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  display: flex; gap: clamp(30px, 4.6vw, 66px);
  margin: 0; padding: 0; list-style: none;
  transform: translate(-50%, -50%);
  /* The row is the hero's own: it takes the pointer across its tiles, the gaps between them and their names, so no
     wall tile comes forward behind it and tangles its name with theirs (founder 2026-11-03). The padding is the same
     above and below, so the row stays centred. */
  padding-block: 34px;
  pointer-events: auto;
}
.ready .tile {
  --glow: 255, 176, 86;
  position: relative; display: grid; place-items: center;
  width: 88px; height: 88px; border-radius: 22px; background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .7), 0 18px 50px -18px rgba(0, 0, 0, .9), 0 0 0 0 rgba(var(--glow), 0);
  transition: box-shadow 1.1s var(--ease);
  will-change: transform;
}
.ready .tile img { width: 54px; height: 54px; border-radius: 12px; }
.ready .tile span {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  font: 500 13px/1 Inter, sans-serif; color: var(--soft); white-space: nowrap;
}
.ready .tile.lit {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .85), 0 18px 50px -18px rgba(0, 0, 0, .9), 0 0 42px 8px rgba(var(--glow), .5);
  transition-duration: .2s;
}

/* ── Sign in at your broker: the app's own connect window, on the page by itself ─────────────────── */
/* The window at its own size (the app's dialog on a desk, its bottom sheet on a phone), with room for its shadow; no
   card of the page's own around it. Under it, the hint, which steps aside once a broker is picked. The frame is wide
   enough for the window to lay itself out as the app's desk dialog (the app's phone width is below 768px). */
.signin .scene { max-width: 820px; }
.picker { position: relative; height: 560px; }
.picker .frame, .picker iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* The app's window is light and this page is dark: a frame whose colour scheme differs from its page is painted white
   by the browser, a white slab around the window. Said light, it stays see-through, and the window stands on the page. */
.picker iframe { color-scheme: light; }
.signin .result { position: relative; height: 40px; margin-top: 4px; font-size: 15px; color: var(--muted); }
.signin .result .hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: opacity .35s var(--ease); }
.signin .result.on .hint { opacity: 0; }

/* ── The list ───────────────────────────────────────────────────────────────────────────────────── */
.list .scene { max-width: 760px; }
.brokers-list { padding: 6px 26px; }
.group { display: grid; grid-template-columns: 136px 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid var(--ln); }
.group:first-child { border-top: 0; }
.group h3 { display: flex; align-items: center; gap: 8px; height: 40px; font: 500 13px/1 Inter, sans-serif; color: var(--mu); letter-spacing: 0; }
.group h3 i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ready-group h3 { color: var(--ok); }
.group ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 0; padding: 0; list-style: none; }
.soon-group ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.group li { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; align-items: center; min-height: 40px; }
.group li img { grid-column: 1; grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1px var(--ln); }
.group li b { grid-column: 2; align-self: end; font-size: 15px; font-weight: 600; color: var(--tx); }
.group li small { grid-column: 2; align-self: start; font-size: 12.5px; color: var(--mu); }
.group li b:last-child { grid-row: 1 / span 2; align-self: center; }

/* ── Yours next: an empty seat at the end of the line ───────────────────────────────────────────── */
.ask { display: flex; flex-direction: column; align-items: center; gap: 26px; width: 100%; margin-top: clamp(28px, 5vh, 52px); }
.seat {
  display: grid; place-items: center;
  width: 88px; height: 88px; padding: 8px; border-radius: 22px;
  border: 1.5px dashed rgba(251, 248, 241, .38);
  font: 500 12px/1.2 Inter, sans-serif; color: var(--muted); text-align: center; overflow-wrap: anywhere;
  transition: border-color .4s, color .4s, background-color .4s;
}
.seat.named { border-color: rgba(251, 248, 241, .8); background: rgba(251, 248, 241, .05); color: var(--white); font-size: 13px; font-weight: 600; }
.fields { display: flex; gap: 10px; width: min(100%, 420px); }
.fields input {
  flex: 1; min-width: 0; height: 48px; padding: 0 22px;
  border: 1px solid rgba(251, 248, 241, .18); border-radius: 999px;
  background: rgba(251, 248, 241, .06); color: var(--white);
  font: 500 16px Inter, sans-serif; outline: none; transition: border-color .3s, background-color .3s;
}
.fields input::placeholder { color: var(--muted); }
.fields input:focus { border-color: var(--iris-soft); background: rgba(251, 248, 241, .09); }
/* A keyboard user sees where he is: the border alone is one pixel (accessibility pass 2026-11-12, WCAG 2.4.7). */
.fields input:focus-visible { box-shadow: 0 0 0 1px var(--iris-soft); }
.fields .pill { flex: none; border: 0; cursor: pointer; font-family: inherit; }

.close .more { margin-top: 0; }
/* Each door's support line in two lines at most, not one across the page. */
.door > p { max-width: 34ch; }

@media (max-width: 560px) {
  .stage { height: 230px; }
  .wall { gap: 16px; }
  .wall .row { gap: 14px; }
  .wall i { width: 44px; height: 44px; border-radius: 12px; }
  .wall i img { width: 26px; height: 26px; border-radius: 6px; }
  .stage > .ready { gap: 18px; }
  .ready .tile { width: 60px; height: 60px; border-radius: 16px; }
  .ready .tile img { width: 38px; height: 38px; border-radius: 9px; }
  .ready .tile span { top: calc(100% + 9px); font-size: 11px; }
  .picker { height: 600px; }
  .brokers-list { padding: 4px 18px; }
  .group { grid-template-columns: 1fr; gap: 6px; padding: 16px 0; }
  .group h3 { height: auto; }
  .group ul, .soon-group ul { grid-template-columns: 1fr; gap: 10px; }
  .fields { flex-direction: column; }
  .fields input { flex: none; width: 100%; }
  .fields .pill { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .wall i, .ready .tile, .seat { transition: none; }
}
