/* The Next Generation's blue opening titles and the Enterprise as printed in Premiere. */
body[data-site-theme="title-sequence"]:not(:has(.arena-app)) {
  --site-bg: #080c16;
  --site-panel: #121b2c;
  --site-border: #394763;
  --site-text: #f1f3ff;
  --site-muted: #b7c4da;
  --site-accent: #a7caff;
  --bg: var(--site-bg);
  --panel: var(--site-panel);
  --panel2: #192339;
  --line: var(--site-border);
  --teal: var(--site-accent);
  --teal-dark: #1c3256;
  --amber: #e0c18f;
  --muted: var(--site-muted);
  --trek-display: 'Arial Narrow', 'Trebuchet MS', sans-serif;
  --trek-stars: radial-gradient(circle at 13px 27px, #afbada90 0 .7px, transparent 1px) 0 0 / 119px 79px,
    radial-gradient(circle at 72px 49px, #e2cbb784 0 .6px, transparent 1.1px) 0 0 / 183px 113px,
    radial-gradient(circle at 22px 95px, #b6ccff54 0 1px, transparent 1.4px) 0 0 / 263px 137px;
  color: var(--site-text);
  background: radial-gradient(ellipse at 55% 0, #172239, transparent 65rem), var(--site-bg);

  & .site-header { background: #080d18; border-bottom: 1px solid #344767; }
  & .game-brand { color: #d3e3ff; }
  & .game-brand .brand-mark { display: none; }
  & .game-brand::before {
    content: ''; width: 20px; height: 28px; flex-shrink: 0;
    background: linear-gradient(110deg, #8daac8, #ecf7ff 55%, #7896bf);
    clip-path: polygon(65% 0, 100% 96%, 59% 72%, 0 100%);
  }
  & .site-header nav { gap: clamp(9px, 2vw, 30px); align-items: center; }
  & .site-header nav a {
    font: 600 13px/1.2 var(--trek-display); color: #afbdd1;
    letter-spacing: .035em; white-space: nowrap;
  }
  & .site-header nav a:is(:hover, .active) { color: #edf4ff; }
  & .site-header nav a.active::after { background: #82b0ff; height: 2px; }
  & .lobby > .page-kicker, & .site-header nav a > svg { display: none; }
  & #lobby-static { padding-top: 10px; }
  & #lobby-static > .hero { margin-top: 0; }
  & .lobby .hero {
    display: grid; grid-template-columns: 1.06fr 1fr; align-items: stretch; gap: 0;
    min-height: 360px; padding: 0; overflow: hidden; border: 0; border-radius: 0;
    border-block: 1px solid #344563;
    background: var(--trek-stars), radial-gradient(ellipse at 16% 105%, #152849, transparent 67%), #03060d;
  }
  & .hero::after, & .hero::before { display: none; }
  & .hero-copy {
    align-self: center; width: auto; max-width: none; padding: clamp(26px, 3.6vw, 58px);
    z-index: 1;
  }
  & .hero h1.trek-title { max-width: none; margin: 0; color: #80aff4; }
  & .trek-title > span {
    display: block; width: fit-content; padding-right: .14em; white-space: nowrap;
    font: italic 900 clamp(52px, 6.3vw, 108px)/1 var(--trek-display);
    letter-spacing: -.085em; text-transform: uppercase; font-synthesis: weight style;
    color: #82aff0;
    background: linear-gradient(#c5e7ff 6%, #80aff0 43%, #5077b4 75%, #bddfff 100%);
    background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(1px 2px 0 #152f65);
  }
  & .trek-title small {
    display: flex; align-items: center; gap: 12px; margin: .55em 0 1.1em;
    color: #a9cbfa; font: 600 clamp(12px, 1.35vw, 20px)/1.2 var(--trek-display);
    letter-spacing: .39em; text-transform: uppercase;
  }
  & .trek-title small::before { content: ''; width: 2.2em; height: 2px; background: #7aa2d8; }
  & .hero-copy > p { max-width: 35ch; color: #ccd5e7; font: 18px/1.45 Georgia, serif; }
  & .hero-actions :is(.primary, .secondary), & :is(.primary, .secondary, .discovery-button) {
    border-radius: 2px; font-weight: 650; letter-spacing: .025em;
  }
  & :is(.hero-actions .primary.large, .primary, .discovery-button) {
    color: #081127; background: #b8d5ff; border: 1px solid #d1e5ff;
  }
  & :is(.hero-actions .primary.large, .primary, .discovery-button):hover:not(:disabled) { color: #081127; background: #d7e9ff; }
  & :is(.hero-actions .secondary.large, .secondary) { color: #dce8ff; background: #15223b; border: 1px solid #5b749c; }
  & .hero-actions .text-button { color: #bbd7ff; }

  /* The plate is a single link to the ship whose artwork and attributes it shows. */
  & .trek-ship {
    align-self: stretch; position: relative; min-width: 0; min-height: 285px;
    display: flex; flex-direction: column; justify-content: flex-end;
    color: #ecf2ff; text-decoration: none;
  }
  & .trek-vessel {
    position: absolute; inset: 3% 2% 18% 0;
    background: url('/playtests/startrek1e-enterprise.webp') center / contain no-repeat;
    /* Trace the hull in the card crop's 518 x 362 coordinate system. Both layers
       use contain so the silhouette stays registered as the hero changes shape. */
    mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 518 362'>\
      <defs><radialGradient id='glow'><stop offset='.66' stop-color='white'/><stop offset='1' stop-color='white' stop-opacity='0'/></radialGradient></defs>\
      <ellipse cx='448' cy='225' rx='70' ry='32' transform='rotate(17 448 225)' fill='url(%23glow)'/>\
      <path d='M12 104 C18 73 76 53 143 50 C222 45 323 63 373 99 C391 112 398 123 395 139 Q392 155 378 165 L364 169 Q363 174 344 181 Q333 200 336 225 Q338 231 349 235 Q364 241 380 253 Q390 262 405 262 L431 261 Q444 260 440 251 Q438 245 427 241 Q399 235 386 215 Q374 209 383 201 Q391 195 408 200 Q422 204 433 210 L490 231 Q504 236 498 245 Q492 253 470 251 Q476 266 466 271 Q458 276 429 275 L393 275 Q375 277 343 277 C309 272 278 261 251 247 Q243 243 248 233 L249 230 Q238 230 237 224 Q236 218 246 217 Q253 216 259 219 L263 220 L257 194 Q205 197 163 190 C101 182 54 165 29 145 Q8 126 12 104Z'/></svg>") center / contain no-repeat;
  }
  & .trek-ship-caption {
    position: relative; display: flex; align-items: flex-end; justify-content: space-between;
    gap: 8px 18px; flex-wrap: wrap; padding: 11px 0 0;
    margin: 0 clamp(16px, 3vw, 46px) 20px; border-top: 1px solid #566c90;
  }
  & .trek-ship-caption small { display: block; color: #adbfda; font: 10px/1.4 system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; }
  & .trek-ship-caption strong { font: italic 21px/1.25 Georgia, serif; }
  & .trek-attributes { display: flex; gap: 12px; color: #adbfda; font: 12px/1.4 var(--trek-display); }
  & .trek-attributes b { color: #fff; }
  & .trek-ship:hover strong { color: #bdd9ff; text-decoration: underline; }
  & .trek-ship:focus-visible { outline-offset: -4px; }

  & :is(.discovery-panel,.quests-panel,.battle-pass,.deck-builder,.card-set-panel,.product-card,.saved-deck-shelf,.modal) {
    background: linear-gradient(112deg, #172133, #101724 75%); border: 1px solid #33445e;
    border-radius: 3px; box-shadow: inset 3px 0 #527499;
  }
  & :is(.discovery-panel,.battle-pass,.card-rules,.card-set-panel) > h2:first-child {
    display: flex; align-items: center; gap: 14px; color: #d7e7ff;
    font: italic 600 clamp(22px, 2vw, 30px)/1.2 Georgia, serif;
  }
  & :is(.discovery-panel,.battle-pass,.card-rules,.card-set-panel) > h2:first-child::after {
    content: ''; height: 1px; flex: 1; background: linear-gradient(90deg, #536d92, transparent);
  }
  & :is(.deck-option,.quest-row,.saved-deck-tile,.pass-tier,.lobby-row,.match-row) {
    background: #182338; border-color: #3d4e68; border-radius: 3px;
  }
  & :is(.deck-option,.saved-deck-tile).selected, & .pass-tier.is-earned { border-color: #a7caff; }
  & .card-rules { background: #dce5ee; color: #192638; border: 1px solid #899cb3; border-radius: 3px; }
  & .card-rules > h2:first-child, & .card-rules :is(h3,p,.rules-text,.card-lore) { color: #192638; }
  & .card-rules .card-lore { font-family: Georgia, serif; font-style: italic; }
  & .card-rules a { color: #244a77; }
  & .card-details > div { background: #182539; }
  & .card-details dt { color: #b4cee9; }
  & .fleet-finish { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: .55em 0; border-bottom: 1px solid var(--line); }
  & .fleet-finish small { color: var(--muted); }
  & :focus-visible { outline: 2px solid #c2deff; outline-offset: 3px; }

  @media (max-width: 850px) {
    & .site-header nav { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  }
  @media (max-width: 680px) {
    & .lobby .hero { grid-template-columns: 1fr; }
    & .hero-copy { padding: 25px 18px 12px; }
    & .trek-ship { min-height: 185px; }
    & .trek-vessel { inset: -5px 0 42px; }
    & .trek-ship-caption { flex-wrap: nowrap; margin: 0 18px 14px; gap: 7px; }
    & .trek-attributes { gap: 6px; font-size: 10px; }
    & .trek-ship-caption strong { font-size: 17px; }
  }
}
