/* V2 launch promo (js/v2-launch.js): a "V2 · New" link in the header nav, a slim blue card under the header,
   and a once-per-browser pop-up. V2's own blue so it reads apart from the pool's gold notices. Everything is a
   class here — the live CSP (style-src 'self') blocks inline styles. Text on blue fills uses #2d69fd, a hair
   deeper than V2's #2f6bff, because white on #2f6bff measures 4.499:1 and the floor is 4.5:1. */

/* "New" pill, shared by nav, banner and pop-up. */
.v2-pill{display:inline-block;flex:none;padding:4px 7px 4px 8px;border-radius:999px;background:#2d69fd;color:#fff;
  font:600 10px/1 "Chakra Petch",system-ui,sans-serif;letter-spacing:1.2px;text-transform:uppercase;white-space:nowrap}

/* 1. Header nav link: same 17px as its neighbours, a little brighter than their #c3cdc2. */
.site-nav a.v2-nav{display:inline-flex;align-items:center;gap:6px;color:#f2f2f5;white-space:nowrap}
.site-nav a.v2-nav:hover,.site-nav.v2-on a.v2-nav:hover{color:#8fb0ff}
/* Between the phone layout and ~760px the brand and nav share one row with no room for the pill: drop it, keep V2 blue. */
@media(min-width:701px) and (max-width:760px){.site-nav.v2-on .v2-pill{display:none}.site-nav.v2-on a.v2-nav{color:#5b8cff}}
/* Phones: the site makes the nav a full-width space-between row. With five links, shrink the minimum gap and
   step the size down just enough to fit; below 400px the pill goes and "V2" itself turns blue. */
@media(max-width:700px){.site-nav.v2-on{gap:8px}}
@media(max-width:460px){.site-nav.v2-on a{font-size:16px}}
@media(max-width:400px){.site-nav.v2-on .v2-pill{display:none}.site-nav.v2-on a.v2-nav{color:#5b8cff}}
@media(max-width:374px){.site-nav.v2-on a{font-size:15px}}
@media(max-width:339px){.site-nav.v2-on a{font-size:14px}}

/* 2. Banner under the header: lines up with .notice-bar / the page panels at every width. Only the button is a link. */
.v2-banner{position:relative;display:flex;align-items:center;gap:16px;max-width:1208px;margin:0 auto 18px;padding:10px 12px 10px 18px;
  border:1px solid #2f6bff66;border-radius:12px;background:linear-gradient(100deg,#11182b 0%,#0f1420 48%,#131316 100%);color:#f2f2f5;box-shadow:0 8px 24px #0005}
.v2-banner-copy{flex:1 1 auto;min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px}
.v2-banner-title{font-size:16px;font-weight:600;line-height:1.3;color:#f2f2f5;white-space:nowrap}
.v2-banner-line{min-width:0;font-size:14px;line-height:1.4;color:#a6a6b0}
.v2-btn{flex:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 16px;border:1px solid #5b8cff66;border-radius:8px;
  background:#2d69fd;color:#fff;font:600 14px/1.2 "Chakra Petch",system-ui,sans-serif;text-decoration:none;white-space:nowrap;transition:background .15s,color .15s}
/* Hover is V2's lighter blue; white on it is only 3.2:1, so the label goes dark (6:1). */
.v2-btn:hover{background:#5b8cff;color:#08101f}
.v2-btn:focus-visible,.v2-banner .v2-x:focus-visible{outline:2px solid #8fb0ff;outline-offset:3px}
/* The site paints every <button> gold with a hover glow; these beat it. */
.v2-banner .v2-x{flex:none;display:grid;place-items:center;width:30px;height:30px;margin:0;padding:0;border:1px solid transparent;border-radius:50%;
  background:none;box-shadow:none;color:#a6a6b0;font:400 20px/1 "Chakra Petch",system-ui,sans-serif;cursor:pointer}
.v2-banner .v2-x:hover{background:#2f6bff22;border-color:#2f6bff66;box-shadow:none;color:#f2f2f5}
@media(max-width:1240px){.v2-banner{margin:0 16px 16px}}
@media(max-width:620px){
  .v2-banner{flex-direction:column;align-items:flex-start;gap:12px;padding:14px 16px 16px}
  .v2-banner-copy{gap:6px 10px;padding-right:30px}
  .v2-banner-line{flex:1 1 100%;font-size:13.5px}
  .v2-banner .v2-x{position:absolute;top:8px;right:8px}
}

/* 3. Pop-up: the site's .invite-dialog card, re-coloured blue, picture on top. Height is capped so it scrolls
   rather than clips on a short screen; it is a modal <dialog>, so it sits in the top layer over .notify-floor. */
.invite-dialog.v2-dialog{width:min(480px,92vw);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;
  padding:22px 22px 22px;border:1px solid #2f6bff66;background:linear-gradient(160deg,#141c30 0%,#0f1420 55%,#131316 100%);color:#f2f2f5;
  box-shadow:0 24px 60px #000b,0 0 90px -24px #2f6bff66}
.invite-dialog.v2-dialog::backdrop{background:#02040899}
/* Centre on the SCREEN, not on the layout viewport. On phones the home page is wider than the screen (an older
   overflow), and mobile browsers then centre a modal in that wider area, pushing it off the right edge. vw/dvh
   always measure the visible screen, so place the card with those. */
@supports (translate:0px) and (top:50dvh){
  .invite-dialog.v2-dialog{position:fixed;inset:auto;left:50vw;top:50dvh;margin:0;translate:-50% -50%}
}
.v2-dialog-img{display:block;width:100%;height:auto;margin:0 0 18px;border:1px solid #2f6bff55;border-radius:12px;background:#0f1420}
.v2-dialog .v2-pill{margin:0 0 10px}
.v2-dialog .invite-title{color:#f2f2f5;margin:0 0 10px}
.v2-dialog .invite-text{color:#a6a6b0;margin:0 auto 20px;max-width:36ch}
.v2-dialog .invite-actions{gap:10px}
.v2-dialog .invite-actions .v2-btn{width:100%;padding:14px 22px;border-radius:8px;font-size:16px}
.v2-dialog .btn.ghost{border-radius:8px}
.v2-dialog .btn.ghost:hover{background:#2f6bff1f;border-color:#5b8cff;color:#f2f2f5}
.v2-dialog .btn.ghost:focus-visible{outline:2px solid #8fb0ff;outline-offset:3px}
@media(max-width:600px){.invite-dialog.v2-dialog{padding:16px 16px 18px}.v2-dialog-img{margin-bottom:14px}.v2-dialog .invite-text{margin-bottom:16px}}
@media(max-height:620px){.v2-dialog-img{max-height:32vh;object-fit:cover;object-position:top}}
/* A phone held sideways: no room for the picture, keep both buttons on screen. */
@media(max-height:480px){.v2-dialog-img{display:none}.invite-dialog.v2-dialog{padding-top:18px}}
@media(prefers-reduced-motion:no-preference){
  .invite-dialog.v2-dialog[open]{animation:v2-pop .2s ease-out}
  .invite-dialog.v2-dialog[open]::backdrop{animation:v2-fade .2s ease-out}
}
@keyframes v2-pop{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes v2-fade{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.v2-btn{transition:none}}
