/* The research mark sits on a small plotting grid. Both layers are decorative. */
.welcome {
  position: relative;
  isolation: isolate;
}
.welcome::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: -1.25rem 0 0;
  background:
    linear-gradient(#8bc7ea12 1px, transparent 1px) center / 32px 32px,
    linear-gradient(90deg, #8bc7ea12 1px, transparent 1px) center / 32px 32px,
    radial-gradient(ellipse at 50% 33%, #428fc547 0%, #24658820 45%, transparent 74%);
  mask-image: radial-gradient(ellipse closest-side at 50% 43%, #000 12%, #000b 54%, transparent);
}
.welcome-mark {
  position: relative;
  box-shadow: inset 0 1px 0 #d2f3ff70, 0 0 27px #60c3fa46;
}
.welcome-mark::before, .welcome-mark::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}
.welcome-mark::before {
  inset: -13px;
  border: 1px solid #8cd3f839;
  box-shadow: 0 0 0 8px #74b6df08, 0 0 0 9px #74b6df18;
}
.welcome-mark::after {
  inset: -16px;
  background: radial-gradient(circle at 50% 3px, #c3edff 1.5px, #78cbec 2px, #70cced38 3px, transparent 4px);
  transform: rotate(52deg);
}
.welcome h1 { margin-top: 31px; }
.welcome > p {
  max-width: 40rem;
  margin: -.45rem auto 1.35rem;
  text-wrap: pretty;
  line-height: 1.7;
  color: #b5ccde;
}
.examples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  text-align: left;
}
.research-page .examples .quiet-button {
  --topic: #94d9ff;
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid #385269;
  border-radius: 14px;
  background: linear-gradient(145deg, #20374b, #152536 78%);
  color: #e7f2fb;
  text-align: start;
}
.research-page .examples .quiet-button:nth-child(2) { --topic: #93d9c9; }
.research-page .examples .quiet-button:nth-child(3) { --topic: #c0b7ed; }
.examples small {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--topic);
  font-size: .8125rem;
  font-weight: 600;
}
.examples small::before {
  content: "";
  flex: 0 0 .8em;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.examples strong {
  font-size: .98rem;
  font-weight: 600;
  line-height: 1.5;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.research-page .examples .quiet-button:focus-visible { border-color: var(--topic); outline-color: var(--topic); }
.welcome-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2px 1.1rem;
  margin-top: 14px;
}
.welcome-links :is(.bank-link, a) {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin: 0;
  padding: 3px 0;
  color: #b2ccdd;
  font-size: .875rem;
  text-underline-offset: .22em;
}
.welcome-links .bank-link { color: #9fddf8; }
.welcome-links a:is(:hover, :focus-visible) { color: #e0f5ff; text-decoration: underline; }
.research-stage:has(.welcome:not([hidden])) + .composer-dock { position: static; }

#ask-form:focus-within {
  border-color: #6ba8c9;
  box-shadow: 0 0 0 2px #73cff514, 0 8px 32px #14335060;
}
#ask-form::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: -1px 10% auto;
  height: 1px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, #b4ebff 50%, transparent);
}
#ask-form:focus-within::before { opacity: 1; }

.topbar .nav a { position: relative; }
.topbar .nav a::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: auto 23% 1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #9bdfff, transparent);
  opacity: 0;
}
.topbar .nav a:is([aria-current], :focus-visible)::after { opacity: .9; }

@media (hover: hover) and (pointer: fine) {
  .topbar .nav a:hover::after { opacity: .9; }
  .examples .quiet-button:hover:not(:disabled),
  .metric-link:hover { box-shadow: inset 0 1px 0 #d5f0ff22, 0 5px 18px #0a182944; }
  #send:hover:not(:disabled) { box-shadow: 0 0 16px #67caff42; }
  .research-page .examples .quiet-button:hover:not(:disabled) {
    border-color: var(--topic);
    background: linear-gradient(145deg, #29475f, #1a2c3e 78%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .welcome-mark::after { animation: research-orbit 14s linear infinite; }
  .welcome-mark i, .brand:is(:hover, :focus-visible) .brand-mark i {
    transform-origin: center bottom;
    animation: brand-sample 1.15s ease-in-out 2;
  }
  .welcome-mark i:nth-child(2), .brand:is(:hover, :focus-visible) i:nth-child(2) { animation-delay: 90ms; }
  .welcome-mark i:nth-child(3), .brand:is(:hover, :focus-visible) i:nth-child(3) { animation-delay: 180ms; }
  .welcome h1, .welcome > p, .examples, .page-heading, .game-banner, .guide-page h1 {
    animation: surface-arrive .35s ease-out backwards;
  }
  .welcome > p { animation-delay: 45ms; }
  .examples { animation-delay: 85ms; }
  .signin[open], .account-menu[open] .account-popover, .mode-picker[open] .mode-control,
  .watch-mentions:not([hidden]) { animation: surface-arrive .17s ease-out; }
  .history-drawer[open] { animation: drawer-arrive .21s ease-out; }
  .account-chevron, .watch-chevron { transition: transform .17s ease; }
  #ask-form { transition: border-color .2s, box-shadow .2s; }
  #ask-form::before, .topbar .nav a::after { transition: opacity .2s; }
  .release-bar-fill { transform-origin: center bottom; animation: bar-arrive .36s ease-out; }
  .refresh:disabled .refresh-icon { animation: loading-turn 1s linear infinite; }
  .orb-shine { animation: orbit-shine 12s ease-in-out infinite; }
  .metric-link, .release-day, .control, .examples .quiet-button, #send {
    transition: transform .18s ease-out, border-color .18s, box-shadow .18s, background-color .18s;
  }
  .catalog-row, .thread-row, .watch-product-entry { transition: background-color .16s; }
  .catalog-row .cover img, .rank-row .cover img { transition: transform .22s ease-out; }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .metric-link:hover, .release-day:hover, .examples .quiet-button:hover:not(:disabled) { transform: translateY(-2px); }
  .catalog-row:hover .cover img, .rank-row:focus-within .cover img, .rank-row:hover .cover img { transform: scale(1.045); }
  #send:not(:disabled):active, .control:not([aria-disabled="true"], :disabled):active { transform: translateY(1px); }
}
@keyframes research-orbit { from { transform: rotate(-308deg); } to { transform: rotate(52deg); } }
@keyframes brand-sample { 0%, 100% { transform: scaleY(1); } 45% { transform: scaleY(.56); } }
@keyframes surface-arrive { from { opacity: .7; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes drawer-arrive { from { transform: translateX(-1.75rem); opacity: .8; } to { transform: none; opacity: 1; } }
@keyframes bar-arrive { from { transform: scaleY(.1); } to { transform: none; } }
@keyframes loading-turn { to { transform: rotate(1turn); } }
@keyframes orbit-shine {
  0%, 100% { transform: rotate(-22deg); opacity: 1; }
  48% { transform: translate(6%, 3%) rotate(-16deg); opacity: .6; }
}

@media (max-width: 700px) {
  .topbar-inner .nav {
    min-width: 0;
    gap: 0;
    padding: 2px;
    overflow-x: auto;
  }
  .topbar-inner .nav a {
    display: grid;
    place-items: center;
    min-height: 40px;
    flex: 1 0 auto;
    padding: 4px 1px;
  }
  .topbar-inner .nav a:focus-visible { outline-offset: -3px; }
  .welcome > p { max-width: 32em; font-size: .94rem; }
}
@media (max-width: 600px) {
  .welcome { padding: 18px 0 8px; }
  .welcome-mark { width: 38px; height: 38px; padding-bottom: 9px; }
  .welcome-mark::before { inset: -9px; }
  .welcome-mark::after { inset: -12px; }
  .welcome h1 { margin: 24px 0 10px; }
  .welcome > p { margin: 0 auto 14px; line-height: 1.55; }
  .examples { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .research-page .examples .quiet-button {
    grid-template-columns: minmax(6rem, .35fr) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
  }
  .examples small::before { flex-basis: .5em; }
  .examples strong { font-size: .92rem; }
  .welcome-links { column-gap: .8rem; margin-top: 6px; }
}
