/* ==========================================================================
   STARTRADER — Market Edge Quiz popup
   Light glassmorphism · Plus Jakarta Sans · brand palette only
   Drop-in: include this file + popup.js, paste markup from snippet.html
   ========================================================================== */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('./assets/fonts/pjs-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('./assets/fonts/pjs-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Tokens (scoped, so they never collide with host-site variables) ---- */
.stq {
  --stq-navy:   #0D0D4B;
  --stq-blue:   #0047BB;
  --stq-blue-d: #003A99;
  --stq-gray:   #DAE3ED;
  --stq-ink-2:  #50555B;
  --stq-font:   'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --stq-glass:        rgba(255, 255, 255, 0.78);
  --stq-glass-strong: rgba(255, 255, 255, 0.9);
  --stq-line:         rgba(13, 13, 75, 0.08);
  --stq-radius:       28px;
  --stq-ease:         cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---- Overlay ---- */
.stq {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: var(--stq-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: rgba(13, 13, 75, 0.42);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease, visibility 0s linear 0.32s;
}
.stq.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.32s ease;
}

/* ---- Glass card ---- */
.stq__card {
  position: relative;
  width: 100%;
  max-width: 540px;
  box-sizing: border-box;
  padding: 44px 44px 36px;
  color: var(--stq-navy);
  text-align: center;
  border-radius: var(--stq-radius);
  background: linear-gradient(180deg, var(--stq-glass-strong) 0%, var(--stq-glass) 100%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 0 0 1px rgba(13, 13, 75, 0.06),
    0 32px 80px -24px rgba(13, 13, 75, 0.5),
    0 12px 28px -12px rgba(13, 13, 75, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transform: translateY(18px) scale(0.965);
  opacity: 0;
  transition: transform 0.52s var(--stq-ease), opacity 0.4s ease;
  max-height: 90vh;
  overflow: auto;
}
.stq.is-open .stq__card {
  transform: none;
  opacity: 1;
}
.stq__card * { box-sizing: border-box; }

/* ---- Close ---- */
.stq__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--stq-line);
  background: rgba(255, 255, 255, 0.6);
  color: var(--stq-navy);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.stq__close svg { width: 16px; height: 16px; }
.stq__close:hover { background: #fff; border-color: rgba(13, 13, 75, 0.16); }
.stq__close:focus-visible { outline: 2px solid var(--stq-blue); outline-offset: 2px; }

/* ---- Hero medallion ---- */
.stq__medal {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 4px auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 71, 187, 0.06);
  border: 1px solid rgba(0, 71, 187, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.stq__medal::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(13, 13, 75, 0.06);
}
.stq__medal svg {
  width: 50px;
  height: 50px;
  display: block;
  transition: transform 0.25s ease;
  will-change: transform;
}
.stq__medal .track { stroke: rgba(0, 71, 187, 0.14); }
.stq__medal .arc {
  stroke: var(--stq-blue);
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}
.stq__medal .hand {
  stroke: var(--stq-blue);
  transform-box: view-box;
  transform-origin: 24px 27px;
}
/* 5-second sweep (matches "5 seconds each"), short rest at 12 o'clock, repeat */
.stq.is-open .stq__medal .arc  { animation: stq-sweep 6s linear infinite; }
.stq.is-open .stq__medal .hand { animation: stq-hand  6s linear infinite; }
.stq__medal.is-restart .arc,
.stq__medal.is-restart .hand { animation: none !important; }

@keyframes stq-sweep {
  0%      { stroke-dashoffset: 100; opacity: 1; }
  83.33%  { stroke-dashoffset: 0;   opacity: 1; }
  91%     { stroke-dashoffset: 0;   opacity: 0; }
  100%    { stroke-dashoffset: 100; opacity: 0; }
}
@keyframes stq-hand {
  0%      { transform: rotate(0deg); }
  83.33%  { transform: rotate(360deg); }
  100%    { transform: rotate(360deg); }
}

/* Interaction: lift on hover, press on click (tilt is set inline by popup.js) */
.stq__medal { cursor: pointer; transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.stq__medal:hover {
  background: rgba(0, 71, 187, 0.09);
  border-color: rgba(0, 71, 187, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 24px -14px rgba(0, 71, 187, 0.5);
}
.stq__medal:active svg { transform: scale(0.94) !important; }

/* ---- Copy ---- */
.stq__title {
  margin: 0 0 14px;
  font-size: 31px;
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.022em;
  color: var(--stq-navy);
}
.stq__title span { display: block; color: var(--stq-blue); }

.stq__lead {
  max-width: 42ch;
  margin: 0 auto 26px;
  font-size: 15px;
  line-height: 1.62;
  color: var(--stq-ink-2);
  font-weight: 400;
}
.stq__lead strong { color: var(--stq-navy); font-weight: 600; }

/* ---- Fact tiles ---- */
.stq__facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}
.stq__fact {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--stq-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--stq-navy);
}
.stq__fact-icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(0, 71, 187, 0.07);
  color: var(--stq-blue);
}
.stq__fact-icon svg { width: 20px; height: 20px; display: block; }
.stq__fact b { font-weight: 800; }

/* ---- CTA ---- */
.stq__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 54px;
  padding: 0 24px;
  border-radius: 14px;
  border: 0;
  background: var(--stq-blue);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(0, 71, 187, 0.55);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.stq__cta svg { width: 18px; height: 18px; flex: none; }
.stq__cta:hover { background: var(--stq-blue-d); box-shadow: 0 12px 26px -10px rgba(0, 58, 153, 0.6); }
.stq__cta:focus-visible { outline: 3px solid var(--stq-navy); outline-offset: 3px; }

/* ---- Footnote ---- */
.stq__note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1;
  color: var(--stq-ink-2);
  font-weight: 500;
}
.stq__note svg { width: 15px; height: 15px; color: var(--stq-blue); flex: none; }

/* ---- Staggered entrance (one-time, no loops) ---- */
.stq__medal, .stq__title, .stq__lead, .stq__facts, .stq__cta, .stq__note {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.55s var(--stq-ease);
}
.stq.is-open .stq__medal { opacity: 1; transform: none; transition-delay: 0.12s; }
.stq.is-open .stq__title { opacity: 1; transform: none; transition-delay: 0.18s; }
.stq.is-open .stq__lead  { opacity: 1; transform: none; transition-delay: 0.24s; }
.stq.is-open .stq__facts { opacity: 1; transform: none; transition-delay: 0.30s; }
.stq.is-open .stq__cta   { opacity: 1; transform: none; transition-delay: 0.36s; }
.stq.is-open .stq__note  { opacity: 1; transform: none; transition-delay: 0.42s; }

/* ---- Responsive ---- */
@media (max-width: 560px) {
  .stq { padding: 16px; }
  .stq__card { padding: 40px 24px 28px; border-radius: 24px; }
  .stq__title { font-size: 26px; }
  .stq__lead { font-size: 14px; margin-bottom: 22px; }
  .stq__facts { gap: 8px; margin-bottom: 22px; }
  .stq__fact { flex-direction: column; padding: 14px 8px 12px; font-size: 12px; gap: 8px; text-align: center; }
  .stq__fact b { display: block; font-size: 15px; line-height: 1.1; margin-bottom: 3px; }
  .stq__fact-icon { width: 36px; height: 36px; border-radius: 10px; }
  .stq__cta { height: 52px; }

  .stq__medal{width: 76px;height: 76px;}
}
@media (max-width: 360px) {
  .stq__facts { grid-template-columns: 1fr; }
  .stq__fact { flex-direction: row; justify-content: flex-start; text-align: left; padding: 10px 12px; font-size: 13px; }
  .stq__fact b { display: inline; font-size: inherit; margin: 0; }
}

/* ---- Accessibility ---- */
@media (prefers-reduced-motion: reduce) {
  .stq, .stq__card, .stq__medal, .stq__title, .stq__lead, .stq__facts, .stq__cta, .stq__note, .stq__medal svg {
    transition: none !important;
  }
  .stq.is-open .stq__medal .arc  { animation: none; stroke-dashoffset: 32; }
  .stq.is-open .stq__medal .hand { animation: none; transform: rotate(245deg); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .stq { background: rgba(13, 13, 75, 0.62); }
  .stq__card { background: #fff; }
}
body.stq-lock { overflow: hidden; }
.stq__card:focus { outline: none; }


/* ! wwwstartr|2026-09-09 10:30:00 ! */