/* Uses the neutral surfaces, Inter typography and blue actions shared by Quizzman ID. */
body.portal-page {
  --play-bg: #f8fafd;
  --play-surface: #fff;
  --play-ink: #1f1f1f;
  --play-muted: #5f6368;
  --play-border: #dadce0;
  --play-primary: #0b57d0;
  --play-primary-hover: #0842a0;
  --play-soft: #e8f0fe;
  margin: 0;
  color: var(--play-ink);
  background: var(--play-bg);
  font: 400 14px/1.55 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
html[data-theme="dark"] body.portal-page {
  --play-bg: #131314;
  --play-surface: #1e1f20;
  --play-ink: #e3e3e3;
  --play-muted: #b5b8bd;
  --play-border: #444746;
  --play-primary: #a8c7fa;
  --play-primary-hover: #c2d8fc;
  --play-soft: #263d60;
  color-scheme: dark;
}
.portal-page *, .portal-page *::before, .portal-page *::after { box-sizing: border-box; }
.portal-page a { color: inherit; text-decoration: none; }
.portal-page button { font: inherit; }
.portal-page :is(a, button):focus-visible { outline: 3px solid var(--play-primary); outline-offset: 4px; }
.portal-page [hidden] { display: none !important; }
#rt-root { min-height: 100svh; display: flex; flex-direction: column; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 99999; padding: 12px 20px; background: var(--play-surface); border-radius: 8px; }
.skip-link:focus { top: 12px; }
#play-header { flex-shrink: 0; min-height: 60px; }
#play-header .lab-header__join-quiz {
  background: #0b57d0 !important;
  border-color: #0b57d0 !important;
  color: #fff !important;
  box-shadow: none !important;
}
#play-header .lab-header__join-quiz:hover { background: #0842a0 !important; border-color: #0842a0 !important; }
.header-fallback { display: flex; align-items: center; gap: 20px; padding: 14px 28px; height: 64px; background: var(--play-surface); border-bottom: 1px solid var(--play-border); }
.header-fallback a { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; letter-spacing: -.5px; }
.header-fallback img { border-radius: 8px; }
.header-fallback > span { padding-left: 20px; border-left: 1px solid var(--play-border); color: var(--play-muted); }
.portal { width: min(1032px, calc(100% - 64px)); margin: auto; padding: 64px 0 80px; }
.portal__heading { text-align: center; margin-bottom: 36px; }
.portal__heading h1 { display: flex; justify-content: center; align-items: baseline; gap: 11px; margin: 0; font-size: 44px; line-height: 1.25; letter-spacing: -2px; }
.portal__wordmark { font-weight: 650; }
.portal__play { position: relative; color: var(--play-primary); font-weight: 750; font-style: italic; padding-right: 4px; }
.portal__play svg { position: absolute; width: 100%; height: 10px; left: 0; bottom: -7px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; opacity: .35; }
.portal__heading p { margin: 20px 0 0; font-size: 15px; color: var(--play-muted); }
.portal__modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.mode-card { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 32px 28px 28px; background: var(--play-surface); border: 1px solid var(--play-border); border-radius: 16px; transition: border-color 160ms, box-shadow 160ms; }
.mode-card:hover { border-color: var(--play-primary); box-shadow: 0 2px 6px #1f1f1f0c; }
.product-logo, .product-logo img { display: block; width: 64px; height: 64px; border-radius: 16px; object-fit: contain; }
.mode-card h2 { margin: 28px 0 8px; font-size: 23px; line-height: 1.3; font-weight: 500; letter-spacing: -.5px; }
.mode-card p { margin: 0 0 32px; color: var(--play-muted); font-size: 13px; line-height: 1.6; }
.mode-card__cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 44px; margin-top: auto; padding: 11px 16px; border-radius: 8px; background: #0b57d0; color: #fff; font-size: 13px; font-weight: 550; transition: background 160ms; }
.mode-card:hover .mode-card__cta { background: #0842a0; }
.mode-card__cta svg { flex-shrink: 0; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.portal-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: min(1184px, calc(100% - 64px)); padding: 24px 0; margin: 0 auto; color: var(--play-muted); font-size: 12px; }
.portal-footer a:hover { color: var(--play-primary); }
.portal-footer span { margin-left: 6px; }
body.portal-mode-open { overflow: hidden; }
.play-mode { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 24px; background: #13131466; }
.play-mode__panel { width: min(820px, 100%); max-height: calc(100dvh - 48px); overflow: auto; padding: 28px; border: 1px solid var(--play-border); border-radius: 16px; background: var(--play-surface); box-shadow: 0 20px 80px #0002; }
.play-mode__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.play-mode__eyebrow, .play-mode__kicker { display: none; }
.play-mode__head h2 { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -.5px; line-height: 1.3; }
.play-mode__sub { margin: 8px 0 0; font-size: 13px; color: var(--play-muted); }
.play-mode__close { flex-shrink: 0; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--play-muted); font-size: 25px; cursor: pointer; }
.play-mode__close:hover { background: var(--play-soft); }
.play-mode__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.play-mode__tile { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 24px 20px; border: 1px solid var(--play-border); border-radius: 12px; transition: border-color 160ms; }
.play-mode__tile:hover { border-color: var(--play-primary); }
.play-mode__logo, .play-mode__logo img { display: block; width: 52px; height: 52px; border-radius: 13px; object-fit: contain; }
.play-mode__copy { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.play-mode__name { font-size: 19px; font-weight: 550; }
.play-mode__blurb { font-size: 12px; color: var(--play-muted); }
.play-mode__cta { font-size: 12px; color: var(--play-primary); font-weight: 550; }
@media (max-width: 850px) {
  .portal { width: calc(100% - 48px); }
  .portal__modes { gap: 14px; }
  .mode-card { padding: 24px 20px; }
  .mode-card h2 { font-size: 21px; }
  .mode-card p { min-height: 42px; }
}
@media (max-width: 640px) {
  .portal { width: calc(100% - 32px); padding: 36px 0; }
  .portal__heading { margin-bottom: 26px; }
  .portal__heading h1 { font-size: clamp(30px, 8.5vw, 38px); gap: 8px; letter-spacing: -1.5px; }
  .portal__heading p { font-size: 13px; margin-top: 18px; }
  .portal__modes { grid-template-columns: 1fr; gap: 12px; }
  .mode-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) 40px; gap: 4px 14px; padding: 24px 20px; align-items: center; min-height: 116px; }
  .product-logo, .product-logo img { width: 48px; height: 48px; border-radius: 12px; }
  .product-logo { grid-column: 1; grid-row: 1 / 3; }
  .mode-card h2 { grid-column: 2; grid-row: 1; align-self: end; font-size: 18px; font-weight: 550; margin: 0; }
  .mode-card p { grid-column: 2; grid-row: 2; align-self: start; font-size: 12px; margin: 0; min-height: 0; }
  .mode-card__cta { grid-column: 3; grid-row: 1 / 3; display: grid; place-items: center; justify-content: center; gap: 0; width: 40px; min-height: 40px; height: 40px; padding: 0; margin: 0; border-radius: 50%; background: var(--play-soft); color: var(--play-primary); }
  .mode-card__cta-label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .mode-card--join .mode-card__cta { background: #0b57d0; color: #fff; }
  .mode-card:hover .mode-card__cta { background: var(--play-soft); }
  .mode-card--join:hover .mode-card__cta { background: #0842a0; }
  .mode-card:active { background: var(--play-soft); }
  .portal-footer { width: calc(100% - 32px); padding: 20px 0; font-size: 11px; }
  .play-mode { padding: 16px; }
  .play-mode__panel { max-height: calc(100dvh - 32px); padding: 24px 20px; }
  .play-mode__head h2 { font-size: 22px; }
  .play-mode__grid { grid-template-columns: 1fr; }
  .play-mode__tile { display: grid; grid-template-columns: 48px 1fr; gap: 10px 16px; padding: 18px; }
  .play-mode__logo, .play-mode__logo img { width: 48px; height: 48px; }
  .play-mode__cta { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .mode-card, .mode-card__cta, .play-mode__tile { transition: none; }
}
