/* v13 Analyst Dashboard: the stage modes and the dashboard pages (landing, test card, between, gate). */

/* ---------- the 3D stage ---------- */
.stage { position: fixed; inset: 0; z-index: 1; }
.stage.is-off { visibility: hidden; }
.stage.is-ghost { opacity: 0; inset: 0 auto auto 0; width: 640px; height: 400px; }   /* a wide frame for the test card still */
.stage.is-bg::after { /* the landing: the pitch dimmed behind the radar and the promise */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 11, 23, .55) 0%, rgba(6, 11, 23, .2) 30%, rgba(6, 11, 23, .75) 55%, var(--bg) 82%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 32px 32px;
}
.stage.is-reveal { visibility: hidden; background: transparent; }
.stage.is-reveal > .pt-clip { visibility: visible; object-fit: contain; background: #000; border-radius: 10px; }
body[data-phase="landing"] .grid-bg { display: none; }

/* ---------- landing ---------- */
.scr--landing { justify-content: flex-end; }
.land { display: grid; gap: 8px; width: 100%; max-width: 1180px; margin: 0 auto; }
.land__radar { width: min(78vw, 330px, 40vh); margin: 0 auto -6px; }
.land__copy { display: grid; gap: 14px; }
.land__h { margin: 0; font: 800 clamp(38px, 11vw, 76px)/.98 var(--sans); letter-spacing: -.035em; }
.land__h span { color: var(--you); text-shadow: 0 0 30px rgba(57, 228, 255, .35); }
.land__p { margin: 0; color: var(--ink-2); font-size: 17px; max-width: 34ch; }
.land__meta { display: flex; gap: 8px; margin: 2px 0 6px; padding: 0; list-style: none; }
.land__meta li { flex: 1; display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(10, 18, 36, .75); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.land__meta b { font-size: 24px; letter-spacing: 0; color: var(--ink); line-height: 1; }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--alert); box-shadow: 0 0 8px var(--alert); animation: blink 1.2s infinite; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--you); text-decoration: underline; min-height: 44px; }
@media (min-width: 900px) {
  .scr--landing { justify-content: center; padding-left: 64px; padding-right: 64px; }
  .land { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; }
  .land__radar { order: 2; width: min(480px, 60vh); margin: 0; justify-self: center; }
  .land__copy { order: 1; max-width: 560px; }
  .land__p { font-size: 19px; }
  .land .cta { max-width: 420px; }
  .land .cta-note { text-align: left; }
  .stage.is-bg::after { background:
    linear-gradient(90deg, rgba(6, 11, 23, .92) 0%, rgba(6, 11, 23, .7) 40%, rgba(6, 11, 23, .35) 70%, rgba(6, 11, 23, .6) 100%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 32px 32px; }
}

/* ---------- the radar ---------- */
.radar { position: relative; width: 100%; aspect-ratio: 400 / 372; }
.radar svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rd-ring { fill: none; stroke: var(--line-2); stroke-width: 1; }
.rd-ring.is-outer { stroke: rgba(130, 170, 255, .4); fill: rgba(13, 23, 48, .55); }
.rd-spoke { stroke: var(--line-2); stroke-width: 1; }
.rd-wedge { fill: transparent; transition: fill .6s; }
.rd-wedge.is-active { fill: rgba(57, 228, 255, .09); }
.rd-pro { fill: var(--pro-soft); stroke: var(--pro); stroke-width: 2; stroke-dasharray: 6 5; }
.rd-you { fill: rgba(57, 228, 255, .28); stroke: var(--you); stroke-width: 2.5; stroke-linejoin: round; filter: drop-shadow(0 0 8px rgba(57, 228, 255, .6)); }
.rd-dot { fill: var(--bg); stroke: var(--you); stroke-width: 2.5; opacity: 0; transition: opacity .3s; }
.rd-dot.is-on { opacity: 1; }
.rd-name { font: 700 15px/1 var(--mono); letter-spacing: .1em; fill: var(--ink-3); transition: fill .4s; }
.rd-label.is-done .rd-name, .rd-label.is-active .rd-name { fill: var(--ink); }
.rd-label.is-active .rd-name { fill: var(--you); }
.rd-val { font: 800 18px/1 var(--mono); fill: var(--you); }
.radar__sweep { /* the idle shimmer on the landing: a scan sweep turning (compositor only) */
  position: absolute; left: 50%; top: 52.7%; width: 61%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%); opacity: 0; pointer-events: none;
  background: conic-gradient(from 0deg, rgba(57, 228, 255, 0) 0deg, rgba(57, 228, 255, 0) 280deg, rgba(57, 228, 255, .45) 360deg);
  will-change: transform;
}
.radar.is-idle .radar__sweep { opacity: 1; animation: sweepspin 3.2s linear infinite; }
.radar.is-idle .rd-pro { animation: probreathe 3.2s ease-in-out infinite; }
@keyframes sweepspin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes probreathe { 50% { opacity: .55; } }

/* ---------- 3-step progress ---------- */
.steps { display: flex; gap: 6px; margin: 0 0 14px; }
.steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--line-2); position: relative; overflow: hidden; }
.steps i.is-done { background: var(--you); box-shadow: 0 0 10px rgba(57, 228, 255, .5); }
.steps i.is-now::after { content: ''; position: absolute; inset: 0; background: var(--you); transform-origin: left; animation: stepfill 1.6s ease-in-out infinite alternate; opacity: .8; }
@keyframes stepfill { from { transform: scaleX(.08); } to { transform: scaleX(.4); } }

/* ---------- the test card (intro) ---------- */
.intro, .betw, .gate { width: 100%; max-width: 1080px; margin: 0 auto; flex: 1; display: flex; flex-direction: column; }
.intro__grid { display: grid; gap: 12px; flex: 1; align-content: start; }
.metric { display: grid; gap: 12px; padding: 14px; }
.metric__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.metric__h { margin: 0; font: 800 32px/1 var(--sans); letter-spacing: -.02em; }
.cam { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 8; background: #040812; border: 1px solid var(--line-2); }
.cam__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; animation: camin .9s var(--ease) both; }
.cam.is-empty { background: radial-gradient(80% 90% at 50% 100%, #12305a, #040812); }
.cam::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 11, 23, .5), transparent 40%, rgba(6, 11, 23, .35)); pointer-events: none; }
.cam__tag { position: absolute; z-index: 2; left: 10px; top: 10px; display: inline-flex; gap: 6px; align-items: center; font-size: 11px; font-weight: 700; letter-spacing: .12em; padding: 5px 8px; border-radius: 6px; background: rgba(6, 11, 23, .75); }
.cam__tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--alert); animation: blink 1s infinite; }
.cam__ret { position: absolute; z-index: 2; left: 50%; top: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%); border-radius: 50%; border: 1.5px solid rgba(57, 228, 255, .8); box-shadow: 0 0 0 999px rgba(6, 11, 23, 0); }
.cam__ret::before, .cam__ret::after { content: ''; position: absolute; background: var(--you); }
.cam__ret::before { left: 50%; top: -12px; bottom: -12px; width: 1.5px; transform: translateX(-50%); }
.cam__ret::after { top: 50%; left: -12px; right: -12px; height: 1.5px; transform: translateY(-50%); }
@keyframes camin { from { opacity: 0; transform: scale(1.08); filter: brightness(2); } to { opacity: 1; transform: none; filter: none; } }
.metric__rows { margin: 0; display: grid; gap: 8px; }
.metric__rows > div { display: grid; grid-template-columns: 84px 1fr; gap: 10px; align-items: baseline; }
.metric__rows dt { font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--you); }
.metric__rows dd { margin: 0; font-size: 15px; line-height: 1.35; color: var(--ink); }
.metric__mo { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.metric__mo li { flex: 1; display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(6, 11, 23, .6); border: 1px solid var(--line); font-size: 13px; min-width: 0; }
.metric__mo b { color: var(--you); }
.metric__mo span { flex: 1; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--sans); font-weight: 600; }
.metric__mo em { font-style: normal; color: var(--ink-3); }
.intro__side { display: grid; gap: 12px; align-content: start; }
.rate { display: grid; gap: 10px; padding: 14px; }
.rate__q { margin: 0; font: 700 18px/1.2 var(--sans); }
.rate__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.rate__b {
  min-height: 48px; border-radius: 11px; border: 1px solid var(--line-2); background: rgba(6, 11, 23, .7);
  font-size: 19px; font-weight: 800; transition: transform .18s var(--spring), background .2s, border-color .2s, color .2s;
}
.rate__b:active { transform: scale(.9); }
.rate__b.is-on { background: var(--you); color: #031220; border-color: var(--you); transform: scale(1.06); box-shadow: 0 0 18px rgba(57, 228, 255, .5); }
.rate__hint { margin: 0; font-size: 13px; }
@media (min-width: 900px) {
  .intro__grid { grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: start; }
  .metric { padding: 20px; }
  .metric__h { font-size: 44px; }
  .rate { padding: 20px; }
  .rate__b { min-height: 56px; }
  .scr--intro, .scr--between, .scr--gate { padding-top: 96px; justify-content: center; }
  .intro, .betw, .gate { flex: 0 0 auto; }
}

/* ---------- between ---------- */
.betw__grid { display: grid; gap: 12px; }
.betw__main { display: grid; gap: 6px; }
.betw__score { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.betw__n { font-size: 72px; font-weight: 800; line-height: .9; color: var(--you); text-shadow: 0 0 24px rgba(57, 228, 255, .4); }
.betw__of { font-size: 26px; color: var(--ink-3); font-weight: 700; margin-right: 8px; }
.betw__score .tag { align-self: center; }
.betw__radar { width: min(100%, 330px, 36vh); margin: 0 auto; }
.betw__side { display: grid; gap: 10px; align-content: start; }
.plays { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.play { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.play__v { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.play--good .play__v { background: rgba(52, 227, 154, .16); color: var(--good); }
.play--warn .play__v { background: rgba(255, 181, 71, .16); color: var(--warn); }
.play--alert .play__v { background: rgba(255, 95, 109, .14); }
.play--alert .play__v::before { content: ''; width: 12px; height: 3px; border-radius: 2px; background: var(--alert); }
.play__who { flex: 1; display: grid; line-height: 1.2; }
.play__who small { color: var(--ink-3); font-size: 13px; }
.play__t { text-align: right; display: grid; font-weight: 700; font-size: 16px; line-height: 1.2; }
.play__t small { color: var(--pro); font-size: 11px; font-weight: 600; }
.peek { padding: 12px 14px; display: grid; gap: 4px; border-color: rgba(255, 200, 74, .3); }
.peek .kicker { color: var(--pro); }
.peek p { margin: 0; font-size: 15px; color: var(--ink); }
@media (min-width: 900px) {
  .betw__grid { grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
  .betw__radar { width: min(100%, 440px, 52vh); }
  .betw__n { font-size: 96px; }
}

/* ---------- gate ---------- */
.gate__grid { display: grid; gap: 14px; }
.gate__left { display: grid; gap: 10px; justify-items: start; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); letter-spacing: .04em; }
.checks li { display: inline-flex; gap: 6px; align-items: center; }
.checks svg { color: var(--good); width: 14px; height: 14px; }
.checks li:nth-child(1) { animation: rise .4s .3s both; } .checks li:nth-child(2) { animation: rise .4s .6s both; } .checks li:nth-child(3) { animation: rise .4s .9s both; }
.tag svg { width: 13px; height: 13px; }
.sealed { width: 100%; padding: 12px 16px; display: flex; align-items: center; overflow: hidden; min-height: 86px; }
.sealed__blur { display: flex; align-items: center; gap: 16px; flex: 1; filter: blur(5px); transition: filter .6s; user-select: none; }
.sealed.is-open .sealed__blur { filter: none; }
.sealed__n { font-size: 46px; font-weight: 800; color: var(--you); line-height: 1; }
.sealed__n small { font-size: 18px; color: var(--ink-3); }
.sealed__tier { font-weight: 800; font-size: 20px; }
.sealed__bars { flex: 1; display: grid; gap: 5px; }
.sealed__bars i { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--you) var(--w), var(--line-2) var(--w)); }
.sealed__lock { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 10px; background: rgba(6, 11, 23, .85); border: 1px solid var(--line-2); font: 700 13px/1 var(--mono); letter-spacing: .08em; color: var(--pro); transition: opacity .4s, transform .4s; }
.sealed.is-open .sealed__lock { opacity: 0; transform: translateY(-50%) scale(.6); }
.gate__form { display: grid; gap: 12px; }
.gate__form.is-shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.gate__h { margin: 2px 0 0; font: 800 32px/1.02 var(--sans); letter-spacing: -.02em; }
.gate__p { margin: 0; color: var(--ink-2); }
.field { display: grid; gap: 6px; }
.field__l { font-size: 11px; font-weight: 700; letter-spacing: .16em; color: var(--ink-3); }
.field__box { display: flex; align-items: center; gap: 4px; min-height: 58px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line-2); background: rgba(6, 11, 23, .85); transition: border-color .2s, box-shadow .2s; }
.field__box:focus-within { border-color: var(--you); box-shadow: 0 0 0 4px rgba(57, 228, 255, .15); }
.field.is-bad .field__box { border-color: var(--alert); }
.field__pre { color: var(--you); font-size: 20px; font-weight: 700; }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 19px; padding: 14px 0; color: var(--ink); }
.field input::placeholder { color: #4d5d80; }
.err { min-height: 0; font-size: 14px; color: var(--alert); font-weight: 600; }
.err:empty { display: none; }
@media (min-width: 900px) {
  .gate__grid { grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
  .gate__h { font-size: 44px; }
  .sealed { min-height: 120px; }
}

/* ---------- something went wrong ---------- */
.oops { max-width: 420px; margin: auto; display: grid; gap: 12px; text-align: center; }
.oops h1 { margin: 0; font-size: 26px; }
.oops p { margin: 0; color: var(--ink-2); }
.land__copy > .tag { justify-self: start; }
.rd-name, .rd-val { paint-order: stroke; stroke: rgba(6, 11, 23, .85); stroke-width: 5px; stroke-linejoin: round; }
.scr--landing .rd-name { fill: var(--ink-2); }
.rd-q { display: none; font: 800 24px/1 var(--mono); fill: var(--you); paint-order: stroke; stroke: rgba(6, 11, 23, .9); stroke-width: 6px; }
.radar.is-idle .rd-q { display: block; animation: blink 1.6s infinite; }
